Class: OnlinePayments::SDK::Domain::PaymentProduct3203SpecificOutput
- Inherits:
-
DataObject
- Object
- 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 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
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/onlinepayments/sdk/domain/payment_product3203_specific_output.rb', line 26 def from_hash(hash) super if hash.has_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.has_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
19 20 21 22 23 24 |
# File 'lib/onlinepayments/sdk/domain/payment_product3203_specific_output.rb', line 19 def to_h hash = super hash['billingAddress'] = @billing_address.to_h unless @billing_address.nil? hash['shippingAddress'] = @shipping_address.to_h unless @shipping_address.nil? hash end |