Skip to content

Commit

Permalink
fix: Update types in structs.
Browse files Browse the repository at this point in the history
  • Loading branch information
gowizzard committed Mar 28, 2023
1 parent 897eaa4 commit 6ddd17a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
30 changes: 15 additions & 15 deletions fulfillment_orders.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import (
// FulfillmentOrdersReturn is to decode the json data
type FulfillmentOrdersReturn struct {
FulfillmentOrders []struct {
Id int64 `json:"id"`
ShopId int64 `json:"shop_id"`
OrderId int64 `json:"order_id"`
AssignedLocationId int64 `json:"assigned_location_id"`
Id int `json:"id"`
ShopId int `json:"shop_id"`
OrderId int `json:"order_id"`
AssignedLocationId int `json:"assigned_location_id"`
RequestStatus string `json:"request_status"`
Status string `json:"status"`
SupportedActions []string `json:"supported_actions"`
Destination struct {
Id int64 `json:"id"`
Id int `json:"id"`
Address1 string `json:"address1"`
Address2 interface{} `json:"address2"`
City string `json:"city"`
Expand All @@ -34,21 +34,21 @@ type FulfillmentOrdersReturn struct {
Zip string `json:"zip"`
} `json:"destination"`
LineItems []struct {
Id int64 `json:"id"`
ShopId int64 `json:"shop_id"`
FulfillmentOrderId int64 `json:"fulfillment_order_id"`
Quantity int `json:"quantity"`
LineItemId int64 `json:"line_item_id"`
InventoryItemId int64 `json:"inventory_item_id"`
FulfillableQuantity int `json:"fulfillable_quantity"`
VariantId int64 `json:"variant_id"`
Id int `json:"id"`
ShopId int `json:"shop_id"`
FulfillmentOrderId int `json:"fulfillment_order_id"`
Quantity int `json:"quantity"`
LineItemId int `json:"line_item_id"`
InventoryItemId int `json:"inventory_item_id"`
FulfillableQuantity int `json:"fulfillable_quantity"`
VariantId int `json:"variant_id"`
} `json:"line_items"`
FulfillAt time.Time `json:"fulfill_at"`
FulfillBy interface{} `json:"fulfill_by"`
InternationalDuties interface{} `json:"international_duties"`
FulfillmentHolds []interface{} `json:"fulfillment_holds"`
DeliveryMethod struct {
Id int64 `json:"id"`
Id int `json:"id"`
MethodType string `json:"method_type"`
MinDeliveryDateTime interface{} `json:"min_delivery_date_time"`
MaxDeliveryDateTime interface{} `json:"max_delivery_date_time"`
Expand All @@ -60,7 +60,7 @@ type FulfillmentOrdersReturn struct {
Address2 interface{} `json:"address2"`
City string `json:"city"`
CountryCode string `json:"country_code"`
LocationId int64 `json:"location_id"`
LocationId int `json:"location_id"`
Name string `json:"name"`
Phone string `json:"phone"`
Province interface{} `json:"province"`
Expand Down
14 changes: 7 additions & 7 deletions fulfillments.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,33 @@ type FulfillmentsBodyTrackingInfo struct {
}

type FulfillmentsBodyLineItemsByFulfillmentOrder struct {
FulfillmentOrderId int64 `json:"fulfillment_order_id"`
FulfillmentOrderId int `json:"fulfillment_order_id"`
FulfillmentOrderLineItems []interface{} `json:"fulfillment_order_line_items"`
}

// FulfillmentsReturn is to decode the json data
type FulfillmentsReturn struct {
Fulfillment struct {
Id int64 `json:"id"`
OrderId int64 `json:"order_id"`
Id int `json:"id"`
OrderId int `json:"order_id"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
Service string `json:"service"`
UpdatedAt time.Time `json:"updated_at"`
TrackingCompany string `json:"tracking_company"`
ShipmentStatus interface{} `json:"shipment_status"`
LocationId int64 `json:"location_id"`
LocationId int `json:"location_id"`
OriginAddress interface{} `json:"origin_address"`
LineItems []struct {
Id int64 `json:"id"`
VariantId int64 `json:"variant_id"`
Id int `json:"id"`
VariantId int `json:"variant_id"`
Title string `json:"title"`
Quantity int `json:"quantity"`
Sku string `json:"sku"`
VariantTitle string `json:"variant_title"`
Vendor string `json:"vendor"`
FulfillmentService string `json:"fulfillment_service"`
ProductId int64 `json:"product_id"`
ProductId int `json:"product_id"`
RequiresShipping bool `json:"requires_shipping"`
Taxable bool `json:"taxable"`
GiftCard bool `json:"gift_card"`
Expand Down

0 comments on commit 6ddd17a

Please sign in to comment.