Class: Spreedly::GatewayClass
- Inherits:
-
Object
- Object
- Spreedly::GatewayClass
- Includes:
- Fields
- Defined in:
- lib/spreedly/gateway_class.rb
Instance Attribute Summary collapse
-
#payment_methods ⇒ Object
readonly
Returns the value of attribute payment_methods.
-
#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
9 10 11 12 13 |
# File 'lib/spreedly/gateway_class.rb', line 9 def initialize(xml_doc) initialize_fields(xml_doc) init_supported_countries(xml_doc) init_payment_methods(xml_doc) end |
Instance Attribute Details
#payment_methods ⇒ Object (readonly)
Returns the value of attribute payment_methods.
7 8 9 |
# File 'lib/spreedly/gateway_class.rb', line 7 def payment_methods @payment_methods end |
#supported_countries ⇒ Object (readonly)
Returns the value of attribute supported_countries.
7 8 9 |
# File 'lib/spreedly/gateway_class.rb', line 7 def supported_countries @supported_countries end |
Class Method Details
.new_list_from(xml_doc) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/spreedly/gateway_class.rb', line 15 def self.new_list_from(xml_doc) gateways = xml_doc.xpath('.//gateways/gateway') gateways.map do |each| self.new(each) end end |