Class: Spreedly::Gateway

Inherits:
Model
  • Object
show all
Defined in:
lib/spreedly/gateway.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Fields

#field_hash, included, #initialize_fields

Constructor Details

#initialize(xml_doc) ⇒ Gateway


9
10
11
12
# File 'lib/spreedly/gateway.rb', line 9

def initialize(xml_doc)
  super
  init_credentials(xml_doc)
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials


7
8
9
# File 'lib/spreedly/gateway.rb', line 7

def credentials
  @credentials
end

Class Method Details

.new_list_from(xml_doc) ⇒ Object


14
15
16
17
18
19
# File 'lib/spreedly/gateway.rb', line 14

def self.new_list_from(xml_doc)
  gateways = xml_doc.xpath('.//gateways/gateway')
  gateways.map do |each|
    self.new(each)
  end
end