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