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:
@@ -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 {
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
}`,
|
}`,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user