Class: ChannelAdvisor::LineItem
- Inherits:
-
Object
- Object
- ChannelAdvisor::LineItem
- Defined in:
- lib/channeladvisor/line_item.rb
Instance Attribute Summary collapse
-
#allow_negative_quantity ⇒ Object
Returns the value of attribute allow_negative_quantity.
-
#buyer_feedback_rating ⇒ Object
Returns the value of attribute buyer_feedback_rating.
-
#buyer_user_id ⇒ Object
Returns the value of attribute buyer_user_id.
-
#distribution_center ⇒ Object
Returns the value of attribute distribution_center.
-
#gift_message ⇒ Object
Returns the value of attribute gift_message.
-
#gift_wrap_cost ⇒ Object
Returns the value of attribute gift_wrap_cost.
-
#gift_wrap_level ⇒ Object
Returns the value of attribute gift_wrap_level.
-
#gift_wrap_tax_cost ⇒ Object
Returns the value of attribute gift_wrap_tax_cost.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_fba ⇒ Object
Returns the value of attribute is_fba.
-
#promo_code ⇒ Object
Returns the value of attribute promo_code.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#recycling_fee ⇒ Object
Returns the value of attribute recycling_fee.
-
#sale_source ⇒ Object
Returns the value of attribute sale_source.
-
#sales_source_id ⇒ Object
Returns the value of attribute sales_source_id.
-
#shipping_cost ⇒ Object
Returns the value of attribute shipping_cost.
-
#shipping_tax_cost ⇒ Object
Returns the value of attribute shipping_tax_cost.
-
#sku ⇒ Object
Returns the value of attribute sku.
-
#tax_cost ⇒ Object
Returns the value of attribute tax_cost.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#unit_of_measure ⇒ Object
Returns the value of attribute unit_of_measure.
-
#unit_price ⇒ Object
Returns the value of attribute unit_price.
-
#unit_weight ⇒ Object
Returns the value of attribute unit_weight.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
-
#vat_rate ⇒ Object
Returns the value of attribute vat_rate.
-
#warehouse_location ⇒ Object
Returns the value of attribute warehouse_location.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ LineItem
constructor
A new instance of LineItem.
Constructor Details
#initialize(attrs = {}) ⇒ LineItem
Returns a new instance of LineItem.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/channeladvisor/line_item.rb', line 8 def initialize(attrs={}) @id = attrs[:line_item_id] @type = attrs[:line_item_type] @sku = attrs[:sku] @title = attrs[:title] @unit_price = attrs[:unit_price].to_f @quantity = attrs[:quantity].to_i @allow_negative_quantity = attrs[:allow_negative_quantity] @sale_source = attrs[:item_sale_source] @buyer_user_id = attrs[:buyer_user_id] @buyer_feedback_rating = attrs[:buyer_feedback_rating] @sales_source_id = attrs[:sales_source_id] @vat_rate = attrs[:vat_rate].to_f @tax_cost = attrs[:tax_cost].to_f @shipping_cost = attrs[:shipping_cost].to_f @shipping_tax_cost = attrs[:shipping_tax_cost].to_f @gift_wrap_cost = attrs[:gift_wrap_cost].to_f @gift_wrap_tax_cost = attrs[:gift_wrap_tax_cost].to_f @gift_message = attrs[:gift_message] @gift_wrap_level = attrs[:gift_wrap_level] @recycling_fee = attrs[:recycling_fee].to_f @unit_weight = attrs[:unit_weight].to_f @unit_of_measure = attrs[:unit_of_measure] @warehouse_location = attrs[:warehouse_location] @user_name = attrs[:user_name] @distribution_center = attrs[:distribution_center_code] @is_fba = attrs[:is_fba] @promo_code = attrs[:promo_code] end |
Instance Attribute Details
#allow_negative_quantity ⇒ Object
Returns the value of attribute allow_negative_quantity.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def allow_negative_quantity @allow_negative_quantity end |
#buyer_feedback_rating ⇒ Object
Returns the value of attribute buyer_feedback_rating.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def @buyer_feedback_rating end |
#buyer_user_id ⇒ Object
Returns the value of attribute buyer_user_id.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def buyer_user_id @buyer_user_id end |
#distribution_center ⇒ Object
Returns the value of attribute distribution_center.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def distribution_center @distribution_center end |
#gift_message ⇒ Object
Returns the value of attribute gift_message.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def @gift_message end |
#gift_wrap_cost ⇒ Object
Returns the value of attribute gift_wrap_cost.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def gift_wrap_cost @gift_wrap_cost end |
#gift_wrap_level ⇒ Object
Returns the value of attribute gift_wrap_level.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def gift_wrap_level @gift_wrap_level end |
#gift_wrap_tax_cost ⇒ Object
Returns the value of attribute gift_wrap_tax_cost.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def gift_wrap_tax_cost @gift_wrap_tax_cost end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def id @id end |
#is_fba ⇒ Object
Returns the value of attribute is_fba.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def is_fba @is_fba end |
#promo_code ⇒ Object
Returns the value of attribute promo_code.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def promo_code @promo_code end |
#quantity ⇒ Object
Returns the value of attribute quantity.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def quantity @quantity end |
#recycling_fee ⇒ Object
Returns the value of attribute recycling_fee.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def recycling_fee @recycling_fee end |
#sale_source ⇒ Object
Returns the value of attribute sale_source.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def sale_source @sale_source end |
#sales_source_id ⇒ Object
Returns the value of attribute sales_source_id.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def sales_source_id @sales_source_id end |
#shipping_cost ⇒ Object
Returns the value of attribute shipping_cost.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def shipping_cost @shipping_cost end |
#shipping_tax_cost ⇒ Object
Returns the value of attribute shipping_tax_cost.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def shipping_tax_cost @shipping_tax_cost end |
#sku ⇒ Object
Returns the value of attribute sku.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def sku @sku end |
#tax_cost ⇒ Object
Returns the value of attribute tax_cost.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def tax_cost @tax_cost end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def type @type end |
#unit_of_measure ⇒ Object
Returns the value of attribute unit_of_measure.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def unit_of_measure @unit_of_measure end |
#unit_price ⇒ Object
Returns the value of attribute unit_price.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def unit_price @unit_price end |
#unit_weight ⇒ Object
Returns the value of attribute unit_weight.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def unit_weight @unit_weight end |
#user_name ⇒ Object
Returns the value of attribute user_name.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def user_name @user_name end |
#vat_rate ⇒ Object
Returns the value of attribute vat_rate.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def vat_rate @vat_rate end |
#warehouse_location ⇒ Object
Returns the value of attribute warehouse_location.
3 4 5 |
# File 'lib/channeladvisor/line_item.rb', line 3 def warehouse_location @warehouse_location end |