Skip to content

Commit

Permalink
Changed order.shipping_lines.id to uint64 (#288)
Browse files Browse the repository at this point in the history
* Changed order.shipping_lines.id to uint64
  • Loading branch information
roelofjan-elsinga authored May 15, 2024
1 parent 2276db8 commit c8f0c86
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "some-id",
"id": 123456789,
"code": "INT.TP",
"price": "4.00",
"price_set": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "some-id",
"id": 123456789,
"code": "INT.TP",
"price": "4.00",
"price_set": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "some-id",
"id": 123456789,
"code": "INT.TP",
"price": "4.00",
"price_set": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/shippinglines/valid.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "some-id",
"id": 123456789,
"code": "INT.TP",
"price": "4.00",
"price_set": {
Expand Down
2 changes: 1 addition & 1 deletion order.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ type PaymentDetails struct {
}

type ShippingLines struct {
Id string `json:"id,omitempty"`
Id uint64 `json:"id,omitempty"`
Title string `json:"title,omitempty"`
Price *decimal.Decimal `json:"price,omitempty"`
PriceSet *AmountSet `json:"price_set,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion order_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ func validShippingLines() ShippingLines {
tl2Rate := decimal.New(5, -2)

return ShippingLines{
Id: "some-id",
Id: 123456789,
Title: "Small Packet International Air",
Price: &price,
PriceSet: &AmountSet{
Expand Down

4 comments on commit c8f0c86

@pnmcosta
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @roelofjan-elsinga, just come across this issue on our test env as I recently upgraded to the latest v4.

As it's a major issue, breaks all unmarshalling of orders, would it be possible to push this on a new release to replace the latest v4?

Like myself, others will come across it on their upgrade path, and if I didn't look at the commit history I would have raised an issue about it.

For other looking to solve it, do go get github.com/bold-commerce/go-shopify/v4@master to get this fix.

@oliver006
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for leaving this note @pnmcosta
I'll cut a new release in a few so you don't need to rely on master to get the fix.

@oliver006
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pnmcosta
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's brilliant, thank you so much @oliver006

Please sign in to comment.