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