Archived fields for product details and fix filter for GetStockInfo (#94)

Co-authored-by: o.tyurin <o.tyurin@corp.mail.ru>
This commit is contained in:
Zloy_Leshiy
2024-06-03 13:40:55 +03:00
committed by GitHub
parent 9ea138003c
commit b26dd5bbee
2 changed files with 11 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ type GetStocksInfoFilter struct {
OfferId []string `json:"offer_id,omitempty"` OfferId []string `json:"offer_id,omitempty"`
// Filter by the product_id parameter. It is possible to pass a list of values // 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 // Filter by product visibility
Visibility string `json:"visibility,omitempty"` Visibility string `json:"visibility,omitempty"`
@@ -246,6 +246,12 @@ type ProductDetails struct {
// Product volume weight // Product volume weight
VolumeWeight float64 `json:"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 { type ProductDetailCommission struct {

View File

@@ -27,7 +27,7 @@ func TestGetStocksInfo(t *testing.T) {
LastId: "", LastId: "",
Filter: GetStocksInfoFilter{ Filter: GetStocksInfoFilter{
OfferId: []string{"136834"}, OfferId: []string{"136834"},
ProductId: 214887921, ProductId: []int64{214887921},
Visibility: "ALL", Visibility: "ALL",
}, },
}, },
@@ -251,7 +251,9 @@ func TestGetProductDetails(t *testing.T) {
} }
], ],
"state_updated_at": "2021-10-21T15:48:03.927309Z" "state_updated_at": "2021-10-21T15:48:03.927309Z"
} },
"is_archived": false,
"is_autoarchived": false
} }
}`, }`,
}, },