From 1c0c20309734605aee3a226e53c8b9427bbff3cf Mon Sep 17 00:00:00 2001 From: Kirill Date: Sun, 2 Mar 2025 01:34:57 +0300 Subject: [PATCH] Update February 14, 2025 (#144) --- ozon/fbo.go | 35 +++++++++++++++++++++++++++++++++++ ozon/fbo_test.go | 16 +++++++++++++++- ozon/products.go | 4 ++-- 3 files changed, 52 insertions(+), 3 deletions(-) diff --git a/ozon/fbo.go b/ozon/fbo.go index 7ff49ec..f54d1ec 100644 --- a/ozon/fbo.go +++ b/ozon/fbo.go @@ -338,6 +338,9 @@ type GetSupplyRequestInfoResponse struct { } type SupplyOrder struct { + // true if the supply request can be canceled + CanCancel bool `json:"can_cancel"` + // Date of supply request creation CreationDate string `json:"creation_date"` @@ -350,6 +353,18 @@ type SupplyOrder struct { // Supply warehouse identifier DropoffWarehouseId int64 `json:"dropoff_warehouse_id"` + // true if the supply request contains Super Economy products + IsEconom bool `json:"is_econom"` + + // true if the seller has Super supplies enabled + IsSuperFBO bool `json:"is_super_fbo"` + + // true if the supply request is virtual + IsVirtual bool `json:"is_virtual"` + + // true if the supply request contains Super products + ProductSuperFBO bool `json:"product_super_fbo"` + // Filter by supply status State string `json:"state"` @@ -373,13 +388,33 @@ type Supply struct { // Supply contents identifier. Used in the /v1/supply-order/bundle method BundleId string `json:"bundle_id"` + // Filter by supply status + SupplyState string `json:"supply_state"` + // Storage warehouse identifier StorageWarehouseId int64 `json:"storage_warehouse_id"` + // Product tags in the supply request + SupplyTags []SupplyTag `json:"supply_tags"` + // Supply identifier Id int64 `json:"supply_id"` } +type SupplyTag struct { + // true if the supply request contains products certified in the Mercury system + IsEVSDRequired bool `json:"is_evsd_required"` + + // true if the supply request contains jewelry + IsJewelry bool `json:"is_jewelry"` + + // true if the supply request contains products for which labeling is possible + IsMarkingPossible bool `json:"is_marking_possible"` + + // true if the supply request contains products for which labeling is mandatory + IsMarkingRequired bool `json:"is_marking_required"` +} + type SupplyTimeslot struct { // Reason why you can't select the supply time slot Reasons []string `json:"can_not_set_reasons"` diff --git a/ozon/fbo_test.go b/ozon/fbo_test.go index 9c922d8..33eddd8 100644 --- a/ozon/fbo_test.go +++ b/ozon/fbo_test.go @@ -361,16 +361,30 @@ func TestGetSupplyRequestInfo(t *testing.T) { `{ "orders": [ { + "can_cancel": true, "creation_date": "string", "creation_flow": "string", "data_filling_deadline_utc": "2019-08-24T14:15:22Z", "dropoff_warehouse_id": 0, + "is_econom": true, + "is_super_fbo": true, + "is_virtual": true, + "product_super_fbo": true, "state": "ORDER_STATE_UNSPECIFIED", "supplies": [ { "bundle_id": "string", "storage_warehouse_id": 0, - "supply_id": 0 + "supply_id": 0, + "supply_state": "SUPPLY_STATE_UNSPECIFIED", + "supply_tags": [ + { + "is_evsd_required": true, + "is_jewelry": true, + "is_marking_possible": true, + "is_marking_required": true + } + ] } ], "supply_order_id": 0, diff --git a/ozon/products.go b/ozon/products.go index c35dd49..7878aa0 100644 --- a/ozon/products.go +++ b/ozon/products.go @@ -1387,9 +1387,9 @@ type ProductInfoResultPicture struct { // Image uploading status. // // If the `/v1/product/pictures/import` method was called, the response will always be imported—image not processed. - // To see the final status, call the `/v1/product/pictures/info` method after about 10 seconds. + // To see the final status, call the `/v2/product/pictures/info` method after about 10 seconds. // - // If you called the `/v1/product/pictures/info` method, one of the statuses will appear: + // If you called the `/v2/product/pictures/info` method, one of the statuses will appear: // - uploaded — image uploaded; // - pending — image was not uploaded State string `json:"state"`