diff --git a/collect_test.go b/collect_test.go index 0015b69d..6a996afd 100644 --- a/collect_test.go +++ b/collect_test.go @@ -71,7 +71,8 @@ func TestCollectCount(t *testing.T) { t.Errorf("Collect.Count returned %d, expected %d", cnt, expected) } - cnt, err = client.Collect.Count(ListOptions{SinceId: 123}) + sinceId := uint64(123) + cnt, err = client.Collect.Count(ListOptions{SinceId: &sinceId}) if err != nil { t.Errorf("Collect.Count returned error: %v", err) } diff --git a/collection_test.go b/collection_test.go index cb64ef16..fce07375 100644 --- a/collection_test.go +++ b/collection_test.go @@ -311,12 +311,13 @@ func TestListProductsWithPagination(t *testing.T) { t.Errorf("Collection.ListProductsWithPagination returned %+v, expected %+v", products, expectedProducts) } + sinceId := uint64(0) expectedPage := &Pagination{ NextPageOptions: &ListOptions{ PageInfo: "pageInfoCode", Page: 0, Limit: 1, - SinceId: 0, + SinceId: &sinceId, CreatedAtMin: time.Time{}, CreatedAtMax: time.Time{}, UpdatedAtMin: time.Time{}, diff --git a/goshopify.go b/goshopify.go index 4ed927ea..1934c964 100644 --- a/goshopify.go +++ b/goshopify.go @@ -605,7 +605,7 @@ type ListOptions struct { // It is the deprecated way to do pagination. Page int `url:"page,omitempty"` Limit int `url:"limit,omitempty"` - SinceId uint64 `url:"since_id,omitempty"` + SinceId *uint64 `url:"since_id,omitempty"` CreatedAtMin time.Time `url:"created_at_min,omitempty"` CreatedAtMax time.Time `url:"created_at_max,omitempty"` UpdatedAtMin time.Time `url:"updated_at_min,omitempty"`