Class: Falsify::OrderLineItem

Inherits:
Object
  • Object
show all
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

Instance Attribute Details

#discount_allocationsArray<DiscountAllocation>

An ordered list of amounts allocated by discount applications. Each discount allocation is associated to a particular discount application.

Returns:



100
101
102
# File 'lib/falsify/models/order/order_line_item.rb', line 100

def discount_allocations
  @discount_allocations
end

#fulfillable_quantityString

The amount available to fulfill, calculated as follows: quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity.

Returns:

  • (String)


14
15
16
# File 'lib/falsify/models/order/order_line_item.rb', line 14

def fulfillable_quantity
  @fulfillable_quantity
end

#fulfillment_serviceString

The service provider that's fulfilling the item. Valid values: "manual", or the name of the provider, such as "amazon" or "shipwire".

Returns:

  • (String)


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.

Returns:

  • (:null, :fulfilled, :partial, :not_eligible)


26
# File 'lib/falsify/models/order/order_line_item.rb', line 26

enumerize :fulfillment_status, in: [:null, :fulfilled, :partial, :not_eligible], default: :null

#gift_cardBoolean

Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges.

Returns:

  • (Boolean)


70
71
72
# File 'lib/falsify/models/order/order_line_item.rb', line 70

def gift_card
  @gift_card
end

#gramsString

The weight of the item in grams.

Returns:

  • (String)


29
30
31
# File 'lib/falsify/models/order/order_line_item.rb', line 29

def grams
  @grams
end

#nameString

The name of the product variant.

Returns:

  • (String)


66
67
68
# File 'lib/falsify/models/order/order_line_item.rb', line 66

def name
  @name
end

#priceString

The price of the item before discounts have been applied in the shop currency.

Returns:

  • (String)


35
36
37
# File 'lib/falsify/models/order/order_line_item.rb', line 35

def price
  @price
end

#price_setPriceSet

The price of the line item in shop and presentment currencies.

Returns:



38
39
40
# File 'lib/falsify/models/order/order_line_item.rb', line 38

def price_set
  @price_set
end

#product_idString

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.

Returns:

  • (String)


42
43
44
# File 'lib/falsify/models/order/order_line_item.rb', line 42

def product_id
  @product_id
end

#propertiesArray<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.

Returns:

  • (Array<Hash>)


75
76
77
# File 'lib/falsify/models/order/order_line_item.rb', line 75

def properties
  @properties
end

#quantityInteger

The number of items that were purchased.

Returns:

  • (Integer)


45
46
47
# File 'lib/falsify/models/order/order_line_item.rb', line 45

def quantity
  @quantity
end

#requires_shippingBoolean

Whether the item requires shipping.

Returns:

  • (Boolean)


48
49
50
# File 'lib/falsify/models/order/order_line_item.rb', line 48

def requires_shipping
  @requires_shipping
end

#shopify_idString

The ID of the line item.

Returns:

  • (String)


32
33
34
# File 'lib/falsify/models/order/order_line_item.rb', line 32

def shopify_id
  @shopify_id
end

#skuString

The item's SKU (stock keeping unit).

Returns:

  • (String)


51
52
53
# File 'lib/falsify/models/order/order_line_item.rb', line 51

def sku
  @sku
end

#tax_linesArray<TaxLine>

A list of tax line objects, each of which details a tax applied to the item.

Returns:



81
82
83
# File 'lib/falsify/models/order/order_line_item.rb', line 81

def tax_lines
  @tax_lines
end

#taxableBoolean

Whether the item was taxable.

Returns:

  • (Boolean)


78
79
80
# File 'lib/falsify/models/order/order_line_item.rb', line 78

def taxable
  @taxable
end

#tip_payment_gatewayString

The payment gateway used to tender the tip, such as shopify_payments. Present only on tips.

Returns:

  • (String)


85
86
87
# File 'lib/falsify/models/order/order_line_item.rb', line 85

def tip_payment_gateway
  @tip_payment_gateway
end

#tip_payment_methodString

The payment method used to tender the tip, such as Visa. Present only on tips.

Returns:

  • (String)


89
90
91
# File 'lib/falsify/models/order/order_line_item.rb', line 89

def tip_payment_method
  @tip_payment_method
end

#titleString

The title of the product.

Returns:

  • (String)


54
55
56
# File 'lib/falsify/models/order/order_line_item.rb', line 54

def title
  @title
end

#total_discountString

The total discount amount applied to this line item in the shop currency. This value is not subtracted in the line item price.

Returns:

  • (String)


93
94
95
# File 'lib/falsify/models/order/order_line_item.rb', line 93

def total_discount
  @total_discount
end

#total_discount_setPriceSet

The total discount applied to the line item in shop and presentment currencies.

Returns:



96
97
98
# File 'lib/falsify/models/order/order_line_item.rb', line 96

def total_discount_set
  @total_discount_set
end

#variant_idString

The ID of the product variant.

Returns:

  • (String)


57
58
59
# File 'lib/falsify/models/order/order_line_item.rb', line 57

def variant_id
  @variant_id
end

#variant_titleString

The title of the product variant.

Returns:

  • (String)


60
61
62
# File 'lib/falsify/models/order/order_line_item.rb', line 60

def variant_title
  @variant_title
end

#vendorString

The name of the item's supplier.

Returns:

  • (String)


63
64
65
# File 'lib/falsify/models/order/order_line_item.rb', line 63

def vendor
  @vendor
end