Module: VantivLite
- Defined in:
- lib/vantiv_lite.rb,
lib/vantiv_lite/xml.rb,
lib/vantiv_lite/config.rb,
lib/vantiv_lite/xml/ox.rb,
lib/vantiv_lite/request.rb,
lib/vantiv_lite/version.rb,
lib/vantiv_lite/response.rb,
lib/vantiv_lite/xml/rexml.rb,
lib/vantiv_lite/xml/parser.rb,
lib/vantiv_lite/xml/nokogiri.rb,
lib/vantiv_lite/xml/serializer.rb
Defined Under Namespace
Modules: XML
Classes: Config, Request, Response
Constant Summary
collapse
- TRANSACTIONS =
{
auth_reversal: 'authReversal',
authorization: 'authorization',
capture: 'capture',
credit: 'credit',
register_token: 'registerTokenRequest',
sale: 'sale',
void: 'void'
}.freeze
- MAJOR =
0
- MINOR =
1
- TINY =
6
- VERSION =
[MAJOR, MINOR, TINY].join('.').freeze
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.default_config ⇒ Object
Returns the value of attribute default_config.
8
9
10
|
# File 'lib/vantiv_lite.rb', line 8
def default_config
@default_config
end
|
.default_request ⇒ Object
Returns the value of attribute default_request.
8
9
10
|
# File 'lib/vantiv_lite.rb', line 8
def default_request
@default_request
end
|
Class Method Details
10
11
12
13
|
# File 'lib/vantiv_lite.rb', line 10
def configure(config = env_config, &blk)
@default_config = block_given? ? Config.build(&blk) : Config.with_obj(config)
@default_request = Request.new(@default_config)
end
|
.env_config ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/vantiv_lite.rb', line 15
def env_config
opts = Config::OPTS.each_with_object({}) do |k, h|
env_key = "vantiv_#{k}"
h[k] = ENV[env_key] if ENV.key?(env_key)
end
Config.new(opts)
end
|
.request(request_hash) ⇒ Object
Also known as:
call
23
24
25
|
# File 'lib/vantiv_lite.rb', line 23
def request(request_hash)
default_request.(request_hash)
end
|
.version ⇒ Object
9
10
11
|
# File 'lib/vantiv_lite/version.rb', line 9
def self.version
VERSION
end
|