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
Instance Attribute Summary collapse
-
#discount_amount ⇒ Integer
The current value of discount_amount.
-
#line_amount_total ⇒ Integer
The current value of line_amount_total.
-
#product_code ⇒ String
The current value of product_code.
-
#product_price ⇒ Integer
The current value of product_price.
-
#product_type ⇒ String
The current value of product_type.
-
#quantity ⇒ Integer
The current value of quantity.
-
#tax_amount ⇒ Integer
The current value of tax_amount.
-
#unit ⇒ String
The current value of unit.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#discount_amount ⇒ Integer
Returns the current value of discount_amount.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 19 def discount_amount @discount_amount end |
#line_amount_total ⇒ Integer
Returns the current value of line_amount_total.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 19 def line_amount_total @line_amount_total end |
#product_code ⇒ String
Returns the current value of product_code.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 19 def product_code @product_code end |
#product_price ⇒ Integer
Returns the current value of product_price.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 19 def product_price @product_price end |
#product_type ⇒ String
Returns the current value of product_type.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 19 def product_type @product_type end |
#quantity ⇒ Integer
Returns the current value of quantity.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 19 def quantity @quantity end |
#tax_amount ⇒ Integer
Returns the current value of tax_amount.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 19 def tax_amount @tax_amount end |
#unit ⇒ String
Returns the current value of unit.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb', line 19 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 ⇒ Hash
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 hash['discountAmount'] = @discount_amount unless @discount_amount.nil? hash['lineAmountTotal'] = @line_amount_total unless @line_amount_total.nil? hash['productCode'] = @product_code unless @product_code.nil? hash['productPrice'] = @product_price unless @product_price.nil? hash['productType'] = @product_type unless @product_type.nil? hash['quantity'] = @quantity unless @quantity.nil? hash['taxAmount'] = @tax_amount unless @tax_amount.nil? hash['unit'] = @unit unless @unit.nil? hash end |