Class: Spreedly::GatewayClass
- Inherits:
-
Object
- Object
- Spreedly::GatewayClass
- Includes:
- Fields
- Defined in:
- lib/spreedly/gateway_class.rb
Instance Attribute Summary collapse
-
#auth_modes ⇒ Object
readonly
Returns the value of attribute auth_modes.
-
#payment_methods ⇒ Object
readonly
Returns the value of attribute payment_methods.
-
#regions ⇒ Object
readonly
Returns the value of attribute regions.
-
#supported_countries ⇒ Object
readonly
Returns the value of attribute supported_countries.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(xml_doc) ⇒ GatewayClass
constructor
A new instance of GatewayClass.
Methods included from Fields
#field_hash, included, #initialize_fields
Constructor Details
#initialize(xml_doc) ⇒ GatewayClass
Returns a new instance of GatewayClass.
18 19 20 21 22 23 24 |
# File 'lib/spreedly/gateway_class.rb', line 18 def initialize(xml_doc) initialize_fields(xml_doc) init_supported_countries(xml_doc) init_regions(xml_doc) init_payment_methods(xml_doc) init_auth_modes(xml_doc) end |
Instance Attribute Details
#auth_modes ⇒ Object (readonly)
Returns the value of attribute auth_modes.
16 17 18 |
# File 'lib/spreedly/gateway_class.rb', line 16 def auth_modes @auth_modes end |
#payment_methods ⇒ Object (readonly)
Returns the value of attribute payment_methods.
16 17 18 |
# File 'lib/spreedly/gateway_class.rb', line 16 def payment_methods @payment_methods end |
#regions ⇒ Object (readonly)
Returns the value of attribute regions.
16 17 18 |
# File 'lib/spreedly/gateway_class.rb', line 16 def regions @regions end |
#supported_countries ⇒ Object (readonly)
Returns the value of attribute supported_countries.
16 17 18 |
# File 'lib/spreedly/gateway_class.rb', line 16 def supported_countries @supported_countries end |
Class Method Details
.new_list_from(xml_doc) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/spreedly/gateway_class.rb', line 26 def self.new_list_from(xml_doc) gateways = xml_doc.xpath('.//gateways/gateway') gateways.map do |each| self.new(each) end end |