Class: PaysonAPI::V2::Requests::OrderItem
- Inherits:
-
Object
- Object
- PaysonAPI::V2::Requests::OrderItem
- Defined in:
- lib/payson_api/v2/requests/order_item.rb
Instance Attribute Summary collapse
-
#discount_rate ⇒ Object
Returns the value of attribute discount_rate.
-
#ean ⇒ Object
Returns the value of attribute ean.
-
#image_uri ⇒ Object
Returns the value of attribute image_uri.
-
#name ⇒ Object
Returns the value of attribute name.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#reference ⇒ Object
Returns the value of attribute reference.
-
#tax_rate ⇒ Object
Returns the value of attribute tax_rate.
-
#type ⇒ Object
Returns the value of attribute type.
-
#unit_price ⇒ Object
Returns the value of attribute unit_price.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
-
#to_hash ⇒ Object
rubocop:disable Metrics/CyclomaticComplexity.
Instance Attribute Details
#discount_rate ⇒ Object
Returns the value of attribute discount_rate.
7 8 9 |
# File 'lib/payson_api/v2/requests/order_item.rb', line 7 def discount_rate @discount_rate end |
#ean ⇒ Object
Returns the value of attribute ean.
7 8 9 |
# File 'lib/payson_api/v2/requests/order_item.rb', line 7 def ean @ean end |
#image_uri ⇒ Object
Returns the value of attribute image_uri.
7 8 9 |
# File 'lib/payson_api/v2/requests/order_item.rb', line 7 def image_uri @image_uri end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/payson_api/v2/requests/order_item.rb', line 7 def name @name end |
#quantity ⇒ Object
Returns the value of attribute quantity.
7 8 9 |
# File 'lib/payson_api/v2/requests/order_item.rb', line 7 def quantity @quantity end |
#reference ⇒ Object
Returns the value of attribute reference.
7 8 9 |
# File 'lib/payson_api/v2/requests/order_item.rb', line 7 def reference @reference end |
#tax_rate ⇒ Object
Returns the value of attribute tax_rate.
7 8 9 |
# File 'lib/payson_api/v2/requests/order_item.rb', line 7 def tax_rate @tax_rate end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/payson_api/v2/requests/order_item.rb', line 7 def type @type end |
#unit_price ⇒ Object
Returns the value of attribute unit_price.
7 8 9 |
# File 'lib/payson_api/v2/requests/order_item.rb', line 7 def unit_price @unit_price end |
#uri ⇒ Object
Returns the value of attribute uri.
7 8 9 |
# File 'lib/payson_api/v2/requests/order_item.rb', line 7 def uri @uri end |
Instance Method Details
#to_hash ⇒ Object
rubocop:disable Metrics/CyclomaticComplexity
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/payson_api/v2/requests/order_item.rb', line 10 def to_hash # rubocop:disable Metrics/CyclomaticComplexity {}.tap do |hash| hash['name'] = @name hash['quantity'] = @quantity hash['unitPrice'] = @unit_price hash['ean'] = @ean unless @ean.nil? hash['taxRate'] = @tax_rate unless @tax_rate.nil? hash['reference'] = @reference unless @reference.nil? hash['discountRate'] = @discount_rate unless @discount_rate.nil? hash['imageUri'] = @image_uri unless @image_uri.nil? hash['type'] = @type unless @type.nil? hash['uri'] = @uri unless @uri.nil? end end |