Class: Falsify::OrderLineItem
- Inherits:
-
Object
- Object
- Falsify::OrderLineItem
- Extended by:
- Enumerize
- Defined in:
- lib/falsify/models/order/order_line_item.rb
Overview
An individual item in an Order.
Required Fields:
- variant_id
- quantity
Instance Attribute Summary collapse
-
#discount_allocations ⇒ Array<DiscountAllocation>
An ordered list of amounts allocated by discount applications.
-
#fulfillable_quantity ⇒ String
The amount available to fulfill, calculated as follows:
quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity
. -
#fulfillment_service ⇒ String
The service provider that's fulfilling the item.
-
#fulfillment_status ⇒ :null, ...
How far along an order is in terms line items fulfilled.
-
#gift_card ⇒ Boolean
Whether the item is a gift card.
-
#grams ⇒ String
The weight of the item in grams.
-
#name ⇒ String
The name of the product variant.
-
#price ⇒ String
The price of the item before discounts have been applied in the shop currency.
-
#price_set ⇒ PriceSet
The price of the line item in shop and presentment currencies.
-
#product_id ⇒ String
The ID of the product that the line item belongs to.
-
#properties ⇒ Array<Hash>
An array of custom information for the item that has been added to the cart.
-
#quantity ⇒ Integer
The number of items that were purchased.
-
#requires_shipping ⇒ Boolean
Whether the item requires shipping.
-
#shopify_id ⇒ String
The ID of the line item.
-
#sku ⇒ String
The item's SKU (stock keeping unit).
-
#tax_lines ⇒ Array<TaxLine>
A list of tax line objects, each of which details a tax applied to the item.
-
#taxable ⇒ Boolean
Whether the item was taxable.
-
#tip_payment_gateway ⇒ String
The payment gateway used to tender the tip, such as shopify_payments.
-
#tip_payment_method ⇒ String
The payment method used to tender the tip, such as Visa.
-
#title ⇒ String
The title of the product.
-
#total_discount ⇒ String
The total discount amount applied to this line item in the shop currency.
-
#total_discount_set ⇒ PriceSet
The total discount applied to the line item in shop and presentment currencies.
-
#variant_id ⇒ String
The ID of the product variant.
-
#variant_title ⇒ String
The title of the product variant.
-
#vendor ⇒ String
The name of the item's supplier.
Instance Attribute Details
#discount_allocations ⇒ Array<DiscountAllocation>
An ordered list of amounts allocated by discount applications. Each discount allocation is associated to a particular discount application.
100 101 102 |
# File 'lib/falsify/models/order/order_line_item.rb', line 100 def discount_allocations @discount_allocations end |
#fulfillable_quantity ⇒ String
The amount available to fulfill, calculated as follows:
quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity
.
14 15 16 |
# File 'lib/falsify/models/order/order_line_item.rb', line 14 def fulfillable_quantity @fulfillable_quantity end |
#fulfillment_service ⇒ String
The service provider that's fulfilling the item. Valid values: "manual", or the name of the provider, such as "amazon" or "shipwire".
18 19 20 |
# File 'lib/falsify/models/order/order_line_item.rb', line 18 def fulfillment_service @fulfillment_service end |
#fulfillment_status ⇒ :null, ...
How far along an order is in terms line items fulfilled.
:fulfilled
- Every line item in the order has been fulfilled.:null
- None of the line items in the order have been fulfilled.:partial
- At least one line item in the order has been fulfilled.:restocked
- Every line item in the order has been restocked and the order canceled.
26 |
# File 'lib/falsify/models/order/order_line_item.rb', line 26 enumerize :fulfillment_status, in: [:null, :fulfilled, :partial, :not_eligible], default: :null |
#gift_card ⇒ Boolean
Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.
70 71 72 |
# File 'lib/falsify/models/order/order_line_item.rb', line 70 def gift_card @gift_card end |
#grams ⇒ String
The weight of the item in grams.
29 30 31 |
# File 'lib/falsify/models/order/order_line_item.rb', line 29 def grams @grams end |
#name ⇒ String
The name of the product variant.
66 67 68 |
# File 'lib/falsify/models/order/order_line_item.rb', line 66 def name @name end |
#price ⇒ String
The price of the item before discounts have been applied in the shop currency.
35 36 37 |
# File 'lib/falsify/models/order/order_line_item.rb', line 35 def price @price end |
#price_set ⇒ PriceSet
The price of the line item in shop and presentment currencies.
38 39 40 |
# File 'lib/falsify/models/order/order_line_item.rb', line 38 def price_set @price_set end |
#product_id ⇒ String
The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.
42 43 44 |
# File 'lib/falsify/models/order/order_line_item.rb', line 42 def product_id @product_id end |
#properties ⇒ Array<Hash>
An array of custom information for the item that has been added to the cart. Often used to provide product customization options. For more information, see Get customization information for products with line item properties.
75 76 77 |
# File 'lib/falsify/models/order/order_line_item.rb', line 75 def properties @properties end |
#quantity ⇒ Integer
The number of items that were purchased.
45 46 47 |
# File 'lib/falsify/models/order/order_line_item.rb', line 45 def quantity @quantity end |
#requires_shipping ⇒ Boolean
Whether the item requires shipping.
48 49 50 |
# File 'lib/falsify/models/order/order_line_item.rb', line 48 def requires_shipping @requires_shipping end |
#shopify_id ⇒ String
The ID of the line item.
32 33 34 |
# File 'lib/falsify/models/order/order_line_item.rb', line 32 def shopify_id @shopify_id end |
#sku ⇒ String
The item's SKU (stock keeping unit).
51 52 53 |
# File 'lib/falsify/models/order/order_line_item.rb', line 51 def sku @sku end |
#tax_lines ⇒ Array<TaxLine>
A list of tax line objects, each of which details a tax applied to the item.
81 82 83 |
# File 'lib/falsify/models/order/order_line_item.rb', line 81 def tax_lines @tax_lines end |
#taxable ⇒ Boolean
Whether the item was taxable.
78 79 80 |
# File 'lib/falsify/models/order/order_line_item.rb', line 78 def taxable @taxable end |
#tip_payment_gateway ⇒ String
The payment gateway used to tender the tip, such as shopify_payments. Present only on tips.
85 86 87 |
# File 'lib/falsify/models/order/order_line_item.rb', line 85 def tip_payment_gateway @tip_payment_gateway end |
#tip_payment_method ⇒ String
The payment method used to tender the tip, such as Visa. Present only on tips.
89 90 91 |
# File 'lib/falsify/models/order/order_line_item.rb', line 89 def tip_payment_method @tip_payment_method end |
#title ⇒ String
The title of the product.
54 55 56 |
# File 'lib/falsify/models/order/order_line_item.rb', line 54 def title @title end |
#total_discount ⇒ String
The total discount amount applied to this line item in the shop currency. This value is not subtracted in the line item price.
93 94 95 |
# File 'lib/falsify/models/order/order_line_item.rb', line 93 def total_discount @total_discount end |
#total_discount_set ⇒ PriceSet
The total discount applied to the line item in shop and presentment currencies.
96 97 98 |
# File 'lib/falsify/models/order/order_line_item.rb', line 96 def total_discount_set @total_discount_set end |
#variant_id ⇒ String
The ID of the product variant.
57 58 59 |
# File 'lib/falsify/models/order/order_line_item.rb', line 57 def variant_id @variant_id end |
#variant_title ⇒ String
The title of the product variant.
60 61 62 |
# File 'lib/falsify/models/order/order_line_item.rb', line 60 def variant_title @variant_title end |
#vendor ⇒ String
The name of the item's supplier.
63 64 65 |
# File 'lib/falsify/models/order/order_line_item.rb', line 63 def vendor @vendor end |