Class: Ingenico::Connect::SDK::Domain::Payment::LineItemLevel3InterchangeInformation
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::LineItemLevel3InterchangeInformation
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb
Overview
Instance Attribute Summary collapse
-
#discount_amount ⇒ Object
Integer.
-
#line_amount_total ⇒ Object
Integer.
-
#product_code ⇒ Object
String.
-
#product_price ⇒ Object
Integer.
-
#product_type ⇒ Object
String.
-
#quantity ⇒ Object
Integer.
-
#tax_amount ⇒ Object
Integer.
-
#unit ⇒ Object
String.
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/line_item_level3_interchange_information.rb', line 15 def discount_amount @discount_amount end |
#line_amount_total ⇒ Object
Integer
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 18 def line_amount_total @line_amount_total end |
#product_code ⇒ Object
String
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 21 def product_code @product_code end |
#product_price ⇒ Object
Integer
24 25 26 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 24 def product_price @product_price end |
#product_type ⇒ Object
String
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 27 def product_type @product_type end |
#quantity ⇒ Object
Integer
30 31 32 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 30 def quantity @quantity end |
#tax_amount ⇒ Object
Integer
33 34 35 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 33 def tax_amount @tax_amount end |
#unit ⇒ Object
String
36 37 38 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 36 def unit @unit end |
Instance Method Details
#from_hash(hash) ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 51 def from_hash(hash) super if hash.has_key?('discountAmount') @discount_amount = hash['discountAmount'] end if hash.has_key?('lineAmountTotal') @line_amount_total = hash['lineAmountTotal'] end if hash.has_key?('productCode') @product_code = hash['productCode'] end if hash.has_key?('productPrice') @product_price = hash['productPrice'] end if hash.has_key?('productType') @product_type = hash['productType'] end if hash.has_key?('quantity') @quantity = hash['quantity'] end if hash.has_key?('taxAmount') @tax_amount = hash['taxAmount'] end if hash.has_key?('unit') @unit = hash['unit'] end end |
#to_h ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 38 def to_h hash = super add_to_hash(hash, 'discountAmount', @discount_amount) add_to_hash(hash, 'lineAmountTotal', @line_amount_total) add_to_hash(hash, 'productCode', @product_code) add_to_hash(hash, 'productPrice', @product_price) add_to_hash(hash, 'productType', @product_type) add_to_hash(hash, 'quantity', @quantity) add_to_hash(hash, 'taxAmount', @tax_amount) add_to_hash(hash, 'unit', @unit) hash end |