Skip to content

Commit

Permalink
Add tracking_info to Fulfillment
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChau committed Oct 26, 2023
1 parent db29d57 commit 12f483c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion fulfillment.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type Fulfillment struct {
UpdatedAt *time.Time `json:"updated_at,omitempty"`
TrackingCompany string `json:"tracking_company,omitempty"`
ShipmentStatus string `json:"shipment_status,omitempty"`
TrackingInfo FulfillmentTrackingInfo `json:"tracking_info,omitempty"`
TrackingNumber string `json:"tracking_number,omitempty"`
TrackingNumbers []string `json:"tracking_numbers,omitempty"`
TrackingUrl string `json:"tracking_url,omitempty"`
Expand All @@ -62,13 +63,21 @@ type Fulfillment struct {
NotifyCustomer bool `json:"notify_customer"`
}

// LineItemByFulfillmentOrder represents a Shopify line item for fulfillment.
// LineItemByFulfillmentOrder represents the FulfillmentOrders (and optionally the items) used to create a Fulfillment.
// https://shopify.dev/docs/api/admin-rest/2023-01/resources/fulfillment#post-fulfillments
type LineItemByFulfillmentOrder struct {
FulfillmentOrderID int64 `json:"fulfillment_order_id,omitempty"`
FulfillmentOrderLineItems []LineItem `json:"fulfillment_order_line_items,omitempty"`
}

// FulfillmentTrackingInfo represents the tracking information used to create a Fulfillment.
// https://shopify.dev/docs/api/admin-rest/2023-01/resources/fulfillment#post-fulfillments
type FulfillmentTrackingInfo struct {
Company string `json:"company,omitempty"`
Number string `json:"number,omitempty"`
Url string `json:"url,omitempty"`
}

// Receipt represents a Shopify receipt.
type Receipt struct {
TestCase bool `json:"testcase,omitempty"`
Expand Down

0 comments on commit 12f483c

Please sign in to comment.