Class: Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb
Overview
Class Level3SummaryData
Instance Attribute Summary collapse
-
#discount_amount ⇒ Object
Integer.
-
#duty_amount ⇒ Object
Integer.
-
#shipping_amount ⇒ Object
Integer.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#discount_amount ⇒ Object
Integer
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb', line 15 def discount_amount @discount_amount end |
#duty_amount ⇒ Object
Integer
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb', line 18 def duty_amount @duty_amount end |
#shipping_amount ⇒ Object
Integer
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb', line 21 def shipping_amount @shipping_amount end |
Instance Method Details
#from_hash(hash) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb', line 31 def from_hash(hash) super if hash.has_key?('discountAmount') @discount_amount = hash['discountAmount'] end if hash.has_key?('dutyAmount') @duty_amount = hash['dutyAmount'] end if hash.has_key?('shippingAmount') @shipping_amount = hash['shippingAmount'] end end |
#to_h ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb', line 23 def to_h hash = super add_to_hash(hash, 'discountAmount', @discount_amount) add_to_hash(hash, 'dutyAmount', @duty_amount) add_to_hash(hash, 'shippingAmount', @shipping_amount) hash end |