Class: GlobalCollect::Requests::Simple
- Defined in:
- lib/global_collect/requests/simple.rb
Direct Known Subclasses
CancelPayment, ConvertAmount, GetOrderStatus, ProcessChallenged, TestConnection
Instance Attribute Summary
Attributes inherited from Base
#action, #suggested_response_mixins, #version
Instance Method Summary collapse
-
#initialize(action, fields_hash) ⇒ Simple
constructor
A new instance of Simple.
- #to_xml ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(action, fields_hash) ⇒ Simple
Returns a new instance of Simple.
4 5 6 7 |
# File 'lib/global_collect/requests/simple.rb', line 4 def initialize(action, fields_hash) super(action) @contents = fields_hash end |
Instance Method Details
#to_xml ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/global_collect/requests/simple.rb', line 9 def to_xml validate! super do |params_node| if wrapper params_node.tag!(wrapper) {|wrapper_node| build_keys(wrapper_node) } else build_keys(params_node) end end end |