Class: Falsify::Fulfillment

Inherits:
Object
  • Object
show all
Extended by:
Enumerize
Defined in:
lib/falsify/models/fulfillment/fulfillment.rb

Overview

In Shopify, a fulfillment represents a shipment of one or more items in an order. You can use the Fulfillment resource to view, create, modify, or delete an order's fulfillments. See the API documentation.

Instance Attribute Summary collapse

Instance Attribute Details

#created_atString

The date and time when the fulfillment was created. The API returns this value in ISO 8601 format.

Returns:

  • (String)


12
13
14
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 12

def created_at
  @created_at
end

#idString

The ID for the fulfillment.

Returns:

  • (String)


15
16
17
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 15

def id
  @id
end

#line_itemsArray<LineItem>

A historical record of each item in the fulfillment.

Returns:

  • (Array<LineItem>)


18
19
20
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 18

def line_items
  @line_items
end

#location_idString

The unique identifier of the location that the fulfillment should be processed for. To find the ID of the location, use the Location resource.

Returns:

  • (String)


22
23
24
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 22

def location_id
  @location_id
end

#nameString

The uniquely identifying fulfillment name, consisting of two parts separated by a .. The first part represents the order name and the second part represents the fulfillment number. The fulfillment number automatically increments depending on how many fulfillments are in an order (e.g. #1001.1, #1001.2).

Returns:

  • (String)


27
28
29
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 27

def name
  @name
end

#notify_customerBoolean

Whether the customer should be notified. If set to true, then an email will be sent when the fulfillment is created or updated. For orders that were initially created using the API, the default value is false. For all other orders, the default value is true.

Returns:

  • (Boolean)


33
34
35
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 33

def notify_customer
  @notify_customer
end

#order_idString

The unique numeric identifier for the order.

Returns:

  • (String)


36
37
38
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 36

def order_id
  @order_id
end

#receiptString

A text field that provides information about the receipt:

  • testcase : Whether the fulfillment was a testcase.
  • authorization : The authorization code.

Returns:

  • (String)


41
42
43
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 41

def receipt
  @receipt
end

#serviceHash

The type of service used.

Returns:

  • (Hash)


44
45
46
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 44

def service
  @service
end

#shipment_status:label_printed, ...

The current shipment status of the fulfillment. Valid values:

  • label_printed - A label for the shipment was purchased and printed.
  • label_purchased - A label for the shipment was purchased, but not printed.
  • attempted_delivery - Delivery of the shipment was attempted, but unable to be completed.
  • ready_for_pickup - The shipment is ready for pickup at a shipping depot.
  • confirmed - The carrier is aware of the shipment, but hasn't received it yet.
  • in_transit - The shipment is being transported between shipping facilities on the way to its destination.
  • out_for_delivery - The shipment is being delivered to its final destination.
  • delivered - The shipment was succesfully delivered.
  • failure - Something went wrong when pulling tracking information for the shipment, such as the tracking number was invalid or the shipment was canceled.

Returns:

  • (:label_printed, :label_purchased, :attempted_delivery, :ready_for_pickup, :confirmed, :in_transit, :out_for_delivery, :delivered, :failure)


58
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 58

enumerize :shipment_status, in: [:label_printed, :label_purchased, :attempted_delivery, :ready_for_pickup, :confirmed, :in_transit, :out_for_delivery, :delivered, :failure]

#status:pending, ...

The status of the fulfillment. Valid values:

  • pending - The fulfillment is pending.
  • open - The fulfillment has been acknowledged by the service and is in processing.
  • success - The fulfillment was successful.
  • cancelled - The fulfillment was cancelled.
  • error - There was an error with the fulfillment request.
  • failure - The fulfillment request failed.

Returns:

  • (:pending, :open, :success, :cancelled, :error, :failure)


69
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 69

enumerize :status, in: [:pending, :open, :success, :cancelled, :error, :failure]

#tracking_companyString

The name of the tracking company. When creating a fulfillment for a supported carrier, send the tracking_company exactly as written in the list above. If the tracking company doesn't match one of the supported entries, then the shipping status might not be updated properly during the fulfillment process.

Returns:

  • (String)


74
75
76
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 74

def tracking_company
  @tracking_company
end

#tracking_numbersArray<String>

A list of tracking numbers, provided by the shipping company.

It is highly recommended that you send the tracking company and the tracking URL as well. If neither one of these is sent, then the tracking company will be determined automatically. This can result in an invalid tracking URL.

The tracking URL is displayed in the shipping confirmation email, which can optionally be sent to the customer. When accounts are enabled, it is also displayed in the customer's order history.

Returns:

  • (Array<String>)


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

def tracking_numbers
  @tracking_numbers
end

#tracking_urlsArray<String>

The URLs of tracking pages for the fulfillment.

Returns:

  • (Array<String>)


88
89
90
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 88

def tracking_urls
  @tracking_urls
end

#updated_atString

The date and time (ISO 8601 format) when the fulfillment was last modified..

Returns:

  • (String)


91
92
93
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 91

def updated_at
  @updated_at
end

#variant_inventory_managementString

The name of the inventory management service.

Returns:

  • (String)


94
95
96
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 94

def variant_inventory_management
  @variant_inventory_management
end