Class: Maxipago::XmlBuilder::Builder
- Inherits:
-
Object
- Object
- Maxipago::XmlBuilder::Builder
- Defined in:
- lib/maxipago/xml_builder/builder.rb
Direct Known Subclasses
Constant Summary collapse
- MAXIPAGO_COMMANDS =
%w(add_consumer delete_consumer update_consumer add_card_onfile delete_card_onfile sale void reversal recurring cancel_recurring bank_bill online_debit save_on_file one_transaction_report list_transactions_report transaction_paginate authorization authentication capture)
Instance Attribute Summary collapse
-
#apiKey ⇒ Object
readonly
Returns the value of attribute apiKey.
-
#apiVersion ⇒ Object
readonly
Returns the value of attribute apiVersion.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#maxipagoId ⇒ Object
readonly
Returns the value of attribute maxipagoId.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #get_xml_data ⇒ Object
-
#initialize(maxipagoId, apiKey, apiVersion, opts) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(maxipagoId, apiKey, apiVersion, opts) ⇒ Builder
Returns a new instance of Builder.
10 11 12 13 14 15 16 |
# File 'lib/maxipago/xml_builder/builder.rb', line 10 def initialize(maxipagoId, apiKey, apiVersion, opts) @maxipagoId = maxipagoId @apiKey = apiKey @apiVersion = apiVersion @command = opts[:command].downcase @options = opts end |
Instance Attribute Details
#apiKey ⇒ Object (readonly)
Returns the value of attribute apiKey.
6 7 8 |
# File 'lib/maxipago/xml_builder/builder.rb', line 6 def apiKey @apiKey end |
#apiVersion ⇒ Object (readonly)
Returns the value of attribute apiVersion.
6 7 8 |
# File 'lib/maxipago/xml_builder/builder.rb', line 6 def apiVersion @apiVersion end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
6 7 8 |
# File 'lib/maxipago/xml_builder/builder.rb', line 6 def command @command end |
#maxipagoId ⇒ Object (readonly)
Returns the value of attribute maxipagoId.
6 7 8 |
# File 'lib/maxipago/xml_builder/builder.rb', line 6 def maxipagoId @maxipagoId end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/maxipago/xml_builder/builder.rb', line 6 def @options end |
Instance Method Details
#get_xml_data ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/maxipago/xml_builder/builder.rb', line 18 def get_xml_data if command_defined? build_xml_data else raise "Command not defined!" end end |