Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Some Fields To Order #269

Merged
merged 8 commits into from
Feb 26, 2024
149 changes: 76 additions & 73 deletions order.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,79 +190,82 @@ const (

// Order represents a Shopify order
type Order struct {
Id uint64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
CancelledAt *time.Time `json:"cancelled_at,omitempty"`
ClosedAt *time.Time `json:"closed_at,omitempty"`
ProcessedAt *time.Time `json:"processed_at,omitempty"`
Customer *Customer `json:"customer,omitempty"`
BillingAddress *Address `json:"billing_address,omitempty"`
ShippingAddress *Address `json:"shipping_address,omitempty"`
Currency string `json:"currency,omitempty"`
TotalPrice *decimal.Decimal `json:"total_price,omitempty"`
TotalPriceSet *AmountSet `json:"total_price_set,omitempty"`
TotalShippingPriceSet *AmountSet `json:"total_shipping_price_set,omitempty"`
CurrentTotalPrice *decimal.Decimal `json:"current_total_price,omitempty"`
SubtotalPrice *decimal.Decimal `json:"subtotal_price,omitempty"`
CurrentSubtotalPrice *decimal.Decimal `json:"current_subtotal_price,omitempty"`
TotalDiscounts *decimal.Decimal `json:"total_discounts,omitempty"`
CurrentTotalDiscounts *decimal.Decimal `json:"current_total_discounts,omitempty"`
TotalLineItemsPrice *decimal.Decimal `json:"total_line_items_price,omitempty"`
TaxesIncluded bool `json:"taxes_included,omitempty"`
TotalTax *decimal.Decimal `json:"total_tax,omitempty"`
TotalTaxSet *AmountSet `json:"total_tax_set,omitempty"`
CurrentTotalTax *decimal.Decimal `json:"current_total_tax,omitempty"`
TaxLines []TaxLine `json:"tax_lines,omitempty"`
TotalWeight int `json:"total_weight,omitempty"`
FinancialStatus orderFinancialStatus `json:"financial_status,omitempty"`
Fulfillments []Fulfillment `json:"fulfillments,omitempty"`
FulfillmentStatus orderFulfillmentStatus `json:"fulfillment_status,omitempty"`
Token string `json:"token,omitempty"`
CartToken string `json:"cart_token,omitempty"`
Number int `json:"number,omitempty"`
OrderNumber int `json:"order_number,omitempty"`
Note string `json:"note,omitempty"`
Test bool `json:"test,omitempty"`
BrowserIp string `json:"browser_ip,omitempty"`
BuyerAcceptsMarketing bool `json:"buyer_accepts_marketing,omitempty"`
CancelReason orderCancelReason `json:"cancel_reason,omitempty"`
NoteAttributes []NoteAttribute `json:"note_attributes,omitempty"`
DiscountCodes []DiscountCode `json:"discount_codes,omitempty"`
LineItems []LineItem `json:"line_items,omitempty"`
ShippingLines []ShippingLines `json:"shipping_lines,omitempty"`
Transactions []Transaction `json:"transactions,omitempty"`
AppId int `json:"app_id,omitempty"`
CustomerLocale string `json:"customer_locale,omitempty"`
LandingSite string `json:"landing_site,omitempty"`
ReferringSite string `json:"referring_site,omitempty"`
SourceName string `json:"source_name,omitempty"`
ClientDetails *ClientDetails `json:"client_details,omitempty"`
Tags string `json:"tags,omitempty"`
LocationId uint64 `json:"location_id,omitempty"`
PaymentGatewayNames []string `json:"payment_gateway_names,omitempty"`
ProcessingMethod string `json:"processing_method,omitempty"`
Refunds []Refund `json:"refunds,omitempty"`
UserId uint64 `json:"user_id,omitempty"`
OrderStatusUrl string `json:"order_status_url,omitempty"`
Gateway string `json:"gateway,omitempty"`
Confirmed bool `json:"confirmed,omitempty"`
CheckoutToken string `json:"checkout_token,omitempty"`
Reference string `json:"reference,omitempty"`
SourceIdentifier string `json:"source_identifier,omitempty"`
SourceURL string `json:"source_url,omitempty"`
DeviceId uint64 `json:"device_id,omitempty"`
Phone string `json:"phone,omitempty"`
LandingSiteRef string `json:"landing_site_ref,omitempty"`
CheckoutId uint64 `json:"checkout_id,omitempty"`
ContactEmail string `json:"contact_email,omitempty"`
Metafields []Metafield `json:"metafields,omitempty"`
SendReceipt bool `json:"send_receipt,omitempty"`
SendFulfillmentReceipt bool `json:"send_fulfillment_receipt,omitempty"`
PresentmentCurrency string `json:"presentment_currency,omitempty"`
InventoryBehaviour orderInventoryBehaviour `json:"inventory_behaviour,omitempty"`
Id uint64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
CancelledAt *time.Time `json:"cancelled_at,omitempty"`
ClosedAt *time.Time `json:"closed_at,omitempty"`
ProcessedAt *time.Time `json:"processed_at,omitempty"`
Customer *Customer `json:"customer,omitempty"`
BillingAddress *Address `json:"billing_address,omitempty"`
ShippingAddress *Address `json:"shipping_address,omitempty"`
Currency string `json:"currency,omitempty"`
TotalPrice *decimal.Decimal `json:"total_price,omitempty"`
TotalPriceSet *AmountSet `json:"total_price_set,omitempty"`
TotalShippingPriceSet *AmountSet `json:"total_shipping_price_set,omitempty"`
CurrentTotalPrice *decimal.Decimal `json:"current_total_price,omitempty"`
SubtotalPrice *decimal.Decimal `json:"subtotal_price,omitempty"`
CurrentSubtotalPrice *decimal.Decimal `json:"current_subtotal_price,omitempty"`
TotalDiscounts *decimal.Decimal `json:"total_discounts,omitempty"`
TotalDiscountSet *AmountSet `json:"total_discount_set,omitempty"`
CurrentTotalDiscounts *decimal.Decimal `json:"current_total_discounts,omitempty"`
CurrentTotalDiscountsSet *AmountSet `json:"current_total_discounts_set,omitempty"`
TotalLineItemsPrice *decimal.Decimal `json:"total_line_items_price,omitempty"`
TaxesIncluded bool `json:"taxes_included,omitempty"`
TotalTax *decimal.Decimal `json:"total_tax,omitempty"`
TotalTaxSet *AmountSet `json:"total_tax_set,omitempty"`
CurrentTotalTax *decimal.Decimal `json:"current_total_tax,omitempty"`
CurrentTotalTaxSet *AmountSet `json:"current_total_tax_set,omitempty"`
TaxLines []TaxLine `json:"tax_lines,omitempty"`
TotalWeight int `json:"total_weight,omitempty"`
FinancialStatus orderFinancialStatus `json:"financial_status,omitempty"`
Fulfillments []Fulfillment `json:"fulfillments,omitempty"`
FulfillmentStatus orderFulfillmentStatus `json:"fulfillment_status,omitempty"`
Token string `json:"token,omitempty"`
CartToken string `json:"cart_token,omitempty"`
Number int `json:"number,omitempty"`
OrderNumber int `json:"order_number,omitempty"`
Note string `json:"note,omitempty"`
Test bool `json:"test,omitempty"`
BrowserIp string `json:"browser_ip,omitempty"`
BuyerAcceptsMarketing bool `json:"buyer_accepts_marketing,omitempty"`
CancelReason orderCancelReason `json:"cancel_reason,omitempty"`
NoteAttributes []NoteAttribute `json:"note_attributes,omitempty"`
DiscountCodes []DiscountCode `json:"discount_codes,omitempty"`
LineItems []LineItem `json:"line_items,omitempty"`
ShippingLines []ShippingLines `json:"shipping_lines,omitempty"`
Transactions []Transaction `json:"transactions,omitempty"`
AppId int `json:"app_id,omitempty"`
CustomerLocale string `json:"customer_locale,omitempty"`
LandingSite string `json:"landing_site,omitempty"`
ReferringSite string `json:"referring_site,omitempty"`
SourceName string `json:"source_name,omitempty"`
ClientDetails *ClientDetails `json:"client_details,omitempty"`
Tags string `json:"tags,omitempty"`
LocationId uint64 `json:"location_id,omitempty"`
PaymentGatewayNames []string `json:"payment_gateway_names,omitempty"`
ProcessingMethod string `json:"processing_method,omitempty"`
Refunds []Refund `json:"refunds,omitempty"`
UserId uint64 `json:"user_id,omitempty"`
OrderStatusUrl string `json:"order_status_url,omitempty"`
Gateway string `json:"gateway,omitempty"`
Confirmed bool `json:"confirmed,omitempty"`
CheckoutToken string `json:"checkout_token,omitempty"`
Reference string `json:"reference,omitempty"`
SourceIdentifier string `json:"source_identifier,omitempty"`
SourceURL string `json:"source_url,omitempty"`
DeviceId uint64 `json:"device_id,omitempty"`
Phone string `json:"phone,omitempty"`
LandingSiteRef string `json:"landing_site_ref,omitempty"`
CheckoutId uint64 `json:"checkout_id,omitempty"`
ContactEmail string `json:"contact_email,omitempty"`
Metafields []Metafield `json:"metafields,omitempty"`
SendReceipt bool `json:"send_receipt,omitempty"`
SendFulfillmentReceipt bool `json:"send_fulfillment_receipt,omitempty"`
PresentmentCurrency string `json:"presentment_currency,omitempty"`
InventoryBehaviour orderInventoryBehaviour `json:"inventory_behaviour,omitempty"`
}

type Address struct {
Expand Down
Loading