Class: OnlinePayments::SDK::Domain::PaymentProduct3203SpecificOutput
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::PaymentProduct3203SpecificOutput
- Defined in:
- lib/onlinepayments/sdk/domain/payment_product3203_specific_output.rb
Instance Attribute Summary collapse
-
#billing_address ⇒ OnlinePayments::SDK::Domain::AddressPersonal
The current value of billing_address.
-
#shipping_address ⇒ OnlinePayments::SDK::Domain::AddressPersonal
The current value of shipping_address.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#billing_address ⇒ OnlinePayments::SDK::Domain::AddressPersonal
Returns the current value of billing_address.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/payment_product3203_specific_output.rb', line 12 def billing_address @billing_address end |
#shipping_address ⇒ OnlinePayments::SDK::Domain::AddressPersonal
Returns the current value of shipping_address.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/payment_product3203_specific_output.rb', line 12 def shipping_address @shipping_address end |
Instance Method Details
#from_hash(hash) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/onlinepayments/sdk/domain/payment_product3203_specific_output.rb', line 24 def from_hash(hash) super if hash.key? 'billingAddress' raise TypeError, "value '%s' is not a Hash" % [hash['billingAddress']] unless hash['billingAddress'].is_a? Hash @billing_address = OnlinePayments::SDK::Domain::AddressPersonal.new_from_hash(hash['billingAddress']) end if hash.key? 'shippingAddress' raise TypeError, "value '%s' is not a Hash" % [hash['shippingAddress']] unless hash['shippingAddress'].is_a? Hash @shipping_address = OnlinePayments::SDK::Domain::AddressPersonal.new_from_hash(hash['shippingAddress']) end end |
#to_h ⇒ Hash
17 18 19 20 21 22 |
# File 'lib/onlinepayments/sdk/domain/payment_product3203_specific_output.rb', line 17 def to_h hash = super hash['billingAddress'] = @billing_address.to_h if @billing_address hash['shippingAddress'] = @shipping_address.to_h if @shipping_address hash end |