Class: Falsify::Fulfillment
- Inherits:
-
Object
- Object
- Falsify::Fulfillment
- 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
-
#created_at ⇒ String
The date and time when the fulfillment was created.
-
#id ⇒ String
The ID for the fulfillment.
-
#line_items ⇒ Array<LineItem>
A historical record of each item in the fulfillment.
-
#location_id ⇒ String
The unique identifier of the location that the fulfillment should be processed for.
-
#name ⇒ String
The uniquely identifying fulfillment name, consisting of two parts separated by a
.
. -
#notify_customer ⇒ Boolean
Whether the customer should be notified.
-
#order_id ⇒ String
The unique numeric identifier for the order.
-
#receipt ⇒ String
A text field that provides information about the receipt: - testcase : Whether the fulfillment was a testcase.
-
#service ⇒ Hash
The type of service used.
-
#shipment_status ⇒ :label_printed, ...
The current shipment status of the fulfillment.
-
#status ⇒ :pending, ...
The status of the fulfillment.
-
#tracking_company ⇒ String
The name of the tracking company.
-
#tracking_numbers ⇒ Array<String>
A list of tracking numbers, provided by the shipping company.
-
#tracking_urls ⇒ Array<String>
The URLs of tracking pages for the fulfillment.
-
#updated_at ⇒ String
The date and time (ISO 8601 format) when the fulfillment was last modified..
-
#variant_inventory_management ⇒ String
The name of the inventory management service.
Instance Attribute Details
#created_at ⇒ String
The date and time when the fulfillment was created. The API returns this value in ISO 8601 format.
12 13 14 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 12 def created_at @created_at end |
#id ⇒ String
The ID for the fulfillment.
15 16 17 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 15 def id @id end |
#line_items ⇒ Array<LineItem>
A historical record of each item in the fulfillment.
18 19 20 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 18 def line_items @line_items end |
#location_id ⇒ String
The unique identifier of the location that the fulfillment should be processed for. To find the ID of the location, use the Location resource.
22 23 24 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 22 def location_id @location_id end |
#name ⇒ String
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
).
27 28 29 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 27 def name @name end |
#notify_customer ⇒ Boolean
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
.
33 34 35 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 33 def notify_customer @notify_customer end |
#order_id ⇒ String
The unique numeric identifier for the order.
36 37 38 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 36 def order_id @order_id end |
#receipt ⇒ String
A text field that provides information about the receipt:
- testcase : Whether the fulfillment was a testcase.
- authorization : The authorization code.
41 42 43 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 41 def receipt @receipt end |
#service ⇒ Hash
The type of service used.
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.
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.
69 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 69 enumerize :status, in: [:pending, :open, :success, :cancelled, :error, :failure] |
#tracking_company ⇒ String
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.
74 75 76 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 74 def tracking_company @tracking_company end |
#tracking_numbers ⇒ Array<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.
85 86 87 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 85 def tracking_numbers @tracking_numbers end |
#tracking_urls ⇒ Array<String>
The URLs of tracking pages for the fulfillment.
88 89 90 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 88 def tracking_urls @tracking_urls end |
#updated_at ⇒ String
The date and time (ISO 8601 format) when the fulfillment was last modified..
91 92 93 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 91 def updated_at @updated_at end |
#variant_inventory_management ⇒ String
The name of the inventory management service.
94 95 96 |
# File 'lib/falsify/models/fulfillment/fulfillment.rb', line 94 def variant_inventory_management @variant_inventory_management end |