Class: Worldline::Connect::SDK::V1::Domain::OrderLineDetails
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::OrderLineDetails
- Defined in:
- lib/worldline/connect/sdk/v1/domain/order_line_details.rb
Instance Attribute Summary collapse
-
#discount_amount ⇒ Integer
The current value of discount_amount.
-
#google_product_category_id ⇒ Integer
The current value of google_product_category_id.
-
#line_amount_total ⇒ Integer
The current value of line_amount_total.
-
#naics_commodity_code ⇒ String
The current value of naics_commodity_code.
-
#product_category ⇒ String
The current value of product_category.
-
#product_code ⇒ String
The current value of product_code.
-
#product_image_url ⇒ String
The current value of product_image_url.
-
#product_name ⇒ String
The current value of product_name.
-
#product_price ⇒ Integer
The current value of product_price.
-
#product_sku ⇒ String
The current value of product_sku.
-
#product_type ⇒ String
The current value of product_type.
-
#product_url ⇒ String
The current value of product_url.
-
#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 Domain::DataObject
Instance Attribute Details
#discount_amount ⇒ Integer
Returns the current value of discount_amount.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def discount_amount @discount_amount end |
#google_product_category_id ⇒ Integer
Returns the current value of google_product_category_id.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def google_product_category_id @google_product_category_id end |
#line_amount_total ⇒ Integer
Returns the current value of line_amount_total.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def line_amount_total @line_amount_total end |
#naics_commodity_code ⇒ String
Returns the current value of naics_commodity_code.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def naics_commodity_code @naics_commodity_code end |
#product_category ⇒ String
Returns the current value of product_category.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def product_category @product_category end |
#product_code ⇒ String
Returns the current value of product_code.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def product_code @product_code end |
#product_image_url ⇒ String
Returns the current value of product_image_url.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def product_image_url @product_image_url end |
#product_name ⇒ String
Returns the current value of product_name.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def product_name @product_name end |
#product_price ⇒ Integer
Returns the current value of product_price.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def product_price @product_price end |
#product_sku ⇒ String
Returns the current value of product_sku.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def product_sku @product_sku end |
#product_type ⇒ String
Returns the current value of product_type.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def product_type @product_type end |
#product_url ⇒ String
Returns the current value of product_url.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def product_url @product_url end |
#quantity ⇒ Integer
Returns the current value of quantity.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def quantity @quantity end |
#tax_amount ⇒ Integer
Returns the current value of tax_amount.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def tax_amount @tax_amount end |
#unit ⇒ String
Returns the current value of unit.
27 28 29 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 27 def unit @unit end |
Instance Method Details
#from_hash(hash) ⇒ Object
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 80 def from_hash(hash) super if hash.has_key? 'discountAmount' @discount_amount = hash['discountAmount'] end if hash.has_key? 'googleProductCategoryId' @google_product_category_id = hash['googleProductCategoryId'] end if hash.has_key? 'lineAmountTotal' @line_amount_total = hash['lineAmountTotal'] end if hash.has_key? 'naicsCommodityCode' @naics_commodity_code = hash['naicsCommodityCode'] end if hash.has_key? 'productCategory' @product_category = hash['productCategory'] end if hash.has_key? 'productCode' @product_code = hash['productCode'] end if hash.has_key? 'productImageUrl' @product_image_url = hash['productImageUrl'] end if hash.has_key? 'productName' @product_name = hash['productName'] end if hash.has_key? 'productPrice' @product_price = hash['productPrice'] end if hash.has_key? 'productSku' @product_sku = hash['productSku'] end if hash.has_key? 'productType' @product_type = hash['productType'] end if hash.has_key? 'productUrl' @product_url = hash['productUrl'] 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
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/worldline/connect/sdk/v1/domain/order_line_details.rb', line 60 def to_h hash = super hash['discountAmount'] = @discount_amount unless @discount_amount.nil? hash['googleProductCategoryId'] = @google_product_category_id unless @google_product_category_id.nil? hash['lineAmountTotal'] = @line_amount_total unless @line_amount_total.nil? hash['naicsCommodityCode'] = @naics_commodity_code unless @naics_commodity_code.nil? hash['productCategory'] = @product_category unless @product_category.nil? hash['productCode'] = @product_code unless @product_code.nil? hash['productImageUrl'] = @product_image_url unless @product_image_url.nil? hash['productName'] = @product_name unless @product_name.nil? hash['productPrice'] = @product_price unless @product_price.nil? hash['productSku'] = @product_sku unless @product_sku.nil? hash['productType'] = @product_type unless @product_type.nil? hash['productUrl'] = @product_url unless @product_url.nil? hash['quantity'] = @quantity unless @quantity.nil? hash['taxAmount'] = @tax_amount unless @tax_amount.nil? hash['unit'] = @unit unless @unit.nil? hash end |