Class: OnlinePayments::SDK::Domain::PayoutCardPaymentMethodSpecificOutput
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::PayoutCardPaymentMethodSpecificOutput
- Defined in:
- lib/onlinepayments/sdk/domain/payout_card_payment_method_specific_output.rb
Instance Attribute Summary collapse
-
#acceptance ⇒ OnlinePayments::SDK::Domain::Acceptance
The current value of acceptance.
-
#authorisation_code ⇒ String
The current value of authorisation_code.
-
#card ⇒ OnlinePayments::SDK::Domain::CardEssentials
The current value of card.
-
#payment_product_id ⇒ Integer
The current value of payment_product_id.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#acceptance ⇒ OnlinePayments::SDK::Domain::Acceptance
Returns the current value of acceptance.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/payout_card_payment_method_specific_output.rb', line 15 def acceptance @acceptance end |
#authorisation_code ⇒ String
Returns the current value of authorisation_code.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/payout_card_payment_method_specific_output.rb', line 15 def @authorisation_code end |
#card ⇒ OnlinePayments::SDK::Domain::CardEssentials
Returns the current value of card.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/payout_card_payment_method_specific_output.rb', line 15 def card @card end |
#payment_product_id ⇒ Integer
Returns the current value of payment_product_id.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/payout_card_payment_method_specific_output.rb', line 15 def payment_product_id @payment_product_id end |
Instance Method Details
#from_hash(hash) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/onlinepayments/sdk/domain/payout_card_payment_method_specific_output.rb', line 35 def from_hash(hash) super if hash.has_key? 'acceptance' raise TypeError, "value '%s' is not a Hash" % [hash['acceptance']] unless hash['acceptance'].is_a? Hash @acceptance = OnlinePayments::SDK::Domain::Acceptance.new_from_hash(hash['acceptance']) end if hash.has_key? 'authorisationCode' @authorisation_code = hash['authorisationCode'] end if hash.has_key? 'card' raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash @card = OnlinePayments::SDK::Domain::CardEssentials.new_from_hash(hash['card']) end if hash.has_key? 'paymentProductId' @payment_product_id = hash['paymentProductId'] end end |
#to_h ⇒ Hash
26 27 28 29 30 31 32 33 |
# File 'lib/onlinepayments/sdk/domain/payout_card_payment_method_specific_output.rb', line 26 def to_h hash = super hash['acceptance'] = @acceptance.to_h unless @acceptance.nil? hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil? hash['card'] = @card.to_h unless @card.nil? hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil? hash end |