diff --git a/ozon/products.go b/ozon/products.go index 4f7da57..98f6546 100644 --- a/ozon/products.go +++ b/ozon/products.go @@ -30,7 +30,7 @@ type GetStocksInfoFilter struct { OfferId []string `json:"offer_id,omitempty"` // Filter by the product_id parameter. It is possible to pass a list of values - ProductId int64 `json:"product_id,omitempty"` + ProductId []int64 `json:"product_id,omitempty"` // Filter by product visibility Visibility string `json:"visibility,omitempty"` @@ -246,6 +246,12 @@ type ProductDetails struct { // Product volume weight VolumeWeight float64 `json:"volume_weight"` + + // 'true' if the item is archived manually. + IsArchived bool `json:"is_archived"` + + // 'true' if the item is archived automatically. + IsArchivedAuto bool `json:"is_autoarchived"` } type ProductDetailCommission struct { diff --git a/ozon/products_test.go b/ozon/products_test.go index 56093f0..6512d1b 100644 --- a/ozon/products_test.go +++ b/ozon/products_test.go @@ -27,7 +27,7 @@ func TestGetStocksInfo(t *testing.T) { LastId: "", Filter: GetStocksInfoFilter{ OfferId: []string{"136834"}, - ProductId: 214887921, + ProductId: []int64{214887921}, Visibility: "ALL", }, }, @@ -251,7 +251,9 @@ func TestGetProductDetails(t *testing.T) { } ], "state_updated_at": "2021-10-21T15:48:03.927309Z" - } + }, + "is_archived": false, + "is_autoarchived": false } }`, },