Skip to content

Commit

Permalink
Create separate LineItemByFulfillmentOrderItemQuantity struct
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChau committed Nov 14, 2023
1 parent e22a44e commit bbd38c4
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions fulfillment.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ type Fulfillment struct {
NotifyCustomer bool `json:"notify_customer"`
}

// 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 []FulfillmentOrderLineItemQuantity `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 {
Expand All @@ -78,6 +71,19 @@ type FulfillmentTrackingInfo struct {
Url string `json:"url,omitempty"`
}

// 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 []LineItemByFulfillmentOrderItemQuantity `json:"fulfillment_order_line_items,omitempty"`
}

// LineItemByFulfillmentOrderItemQuantity represents the quantity to fulfill for one item.
type LineItemByFulfillmentOrderItemQuantity struct {
Id int64 `json:"id"`
Quantity int64 `json:"quantity"`
}

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

0 comments on commit bbd38c4

Please sign in to comment.