Class: Spreedly::Store
- Inherits:
-
Transaction
- Object
- Model
- Transaction
- Spreedly::Store
- Defined in:
- lib/spreedly/transactions/store.rb
Instance Attribute Summary collapse
-
#basis_payment_method ⇒ Object
readonly
Returns the value of attribute basis_payment_method.
-
#payment_method ⇒ Object
readonly
Returns the value of attribute payment_method.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(xml_doc) ⇒ Store
constructor
A new instance of Store.
Methods inherited from Transaction
Methods included from Fields
#field_hash, included, #initialize_fields
Constructor Details
#initialize(xml_doc) ⇒ Store
Returns a new instance of Store.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/spreedly/transactions/store.rb', line 7 def initialize(xml_doc) super payment_method_xml_doc = xml_doc.at_xpath('.//payment_method') @payment_method = payment_method_xml_doc ? PaymentMethod.new_from(xml_doc.at_xpath('.//payment_method')) : nil @basis_payment_method = PaymentMethod.new_from(xml_doc.at_xpath('.//basis_payment_method')) response_xml_doc = xml_doc.at_xpath('.//response') @response = response_xml_doc ? Response.new(response_xml_doc) : nil end |
Instance Attribute Details
#basis_payment_method ⇒ Object (readonly)
Returns the value of attribute basis_payment_method.
5 6 7 |
# File 'lib/spreedly/transactions/store.rb', line 5 def basis_payment_method @basis_payment_method end |
#payment_method ⇒ Object (readonly)
Returns the value of attribute payment_method.
5 6 7 |
# File 'lib/spreedly/transactions/store.rb', line 5 def payment_method @payment_method end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/spreedly/transactions/store.rb', line 5 def response @response end |