Update March 3, 2025 (#153)

This commit is contained in:
Kirill
2025-04-11 01:41:48 +03:00
committed by GitHub
parent bac3c04f59
commit a9d7a5c6d3
2 changed files with 41 additions and 11 deletions

View File

@@ -195,6 +195,14 @@ type FBSPosting struct {
// Economy product identifier // Economy product identifier
QuantumId int64 `json:"quantum_id"` QuantumId int64 `json:"quantum_id"`
// List of products with additional characteristics
Optional FBSPostingOptional `json:"optional"`
}
type FBSPostingOptional struct {
// List of products with optional labeling
ProductsWithPossibleMandatoryMark []int `json:"products_with_possible_mandatory_mark"`
} }
type FBSPostingTariffication struct { type FBSPostingTariffication struct {
@@ -373,9 +381,6 @@ type FBSRequirements struct {
} }
type PostingProduct struct { type PostingProduct struct {
// Mandatory product labeling
MandatoryMark []string `json:"mandatory_mark"`
// Product name // Product name
Name string `json:"name"` Name string `json:"name"`
@@ -393,6 +398,9 @@ type PostingProduct struct {
// Product identifier in the Ozon system, SKU // Product identifier in the Ozon system, SKU
SKU int64 `json:"sku"` SKU int64 `json:"sku"`
// Product traceability attribute
IsBLRTraceable bool `json:"is_blr_traceable"`
} }
type FBSCustomer struct { type FBSCustomer struct {
@@ -1043,6 +1051,9 @@ type GetShipmentDataByIdentifierResult struct {
// Number of the parent shipment which split resulted in the current shipment // Number of the parent shipment which split resulted in the current shipment
ParentPostingNumber string `json:"parent_posting_number"` ParentPostingNumber string `json:"parent_posting_number"`
// List of products with additional characteristics
Optional GetShipmentDataByIdentifierOptional `json:"optional"`
// Shipment number // Shipment number
PostingNumber string `json:"posting_number"` PostingNumber string `json:"posting_number"`
@@ -1094,6 +1105,11 @@ type GetShipmentDataByIdentifierResult struct {
Tariffication []FBSPostingTariffication `json:"tariffication"` Tariffication []FBSPostingTariffication `json:"tariffication"`
} }
type GetShipmentDataByIdentifierOptional struct {
// List of products with optional labeling
ProductsWithPossibleMandatoryMark []int `json:"products_with_possible_mandatory_mark"`
}
type GetShipmentDataByIdentifierResultAdditionalData struct { type GetShipmentDataByIdentifierResultAdditionalData struct {
// Key // Key
Key string `json:"key"` Key string `json:"key"`

View File

@@ -58,6 +58,11 @@ func TestListUnprocessedShipments(t *testing.T) {
"in_process_at": "2021-08-25T10:48:38Z", "in_process_at": "2021-08-25T10:48:38Z",
"shipment_date": "2021-08-26T10:00:00Z", "shipment_date": "2021-08-26T10:00:00Z",
"delivering_date": null, "delivering_date": null,
"optional": {
"products_with_possible_mandatory_mark": [
0
]
},
"cancellation": { "cancellation": {
"cancel_reason_id": 0, "cancel_reason_id": 0,
"cancel_reason": "", "cancel_reason": "",
@@ -71,12 +76,12 @@ func TestListUnprocessedShipments(t *testing.T) {
"products": [ "products": [
{ {
"currency_code": "RUB", "currency_code": "RUB",
"is_blr_traceable": true,
"price": "1259", "price": "1259",
"offer_id": "УТ-0001365", "offer_id": "УТ-0001365",
"name": "Мяч, цвет: черный, 5 кг", "name": "Мяч, цвет: черный, 5 кг",
"sku": 140048123, "sku": 140048123,
"quantity": 1, "quantity": 1
"mandatory_mark": []
} }
], ],
"addressee": null, "addressee": null,
@@ -255,6 +260,11 @@ func TestGetFBSShipmentsList(t *testing.T) {
"in_process_at": "2022-05-13T07:07:32Z", "in_process_at": "2022-05-13T07:07:32Z",
"shipment_date": "2022-05-13T10:00:00Z", "shipment_date": "2022-05-13T10:00:00Z",
"delivering_date": null, "delivering_date": null,
"optional": {
"products_with_possible_mandatory_mark": [
0
]
},
"cancellation": { "cancellation": {
"cancel_reason_id": 0, "cancel_reason_id": 0,
"cancel_reason": "", "cancel_reason": "",
@@ -267,12 +277,12 @@ func TestGetFBSShipmentsList(t *testing.T) {
"products": [ "products": [
{ {
"currency_code": "RUB", "currency_code": "RUB",
"is_blr_traceable": true,
"price": "1390.000000", "price": "1390.000000",
"offer_id": "205953", "offer_id": "205953",
"name": " Электронный конструктор PinLab Позитроник", "name": " Электронный конструктор PinLab Позитроник",
"sku": 358924380, "sku": 358924380,
"quantity": 1, "quantity": 1
"mandatory_mark": []
} }
], ],
"addressee": null, "addressee": null,
@@ -531,8 +541,7 @@ func TestGetShipmentDataByBarcode(t *testing.T) {
"offer_id": "250-7898-1", "offer_id": "250-7898-1",
"name": "Кофе ароматизированный \"Шоколадный апельсин\" 250 гр", "name": "Кофе ароматизированный \"Шоколадный апельсин\" 250 гр",
"sku": 180550365, "sku": 180550365,
"quantity": 1, "quantity": 1
"mandatory_mark": []
} }
], ],
"barcodes": null, "barcodes": null,
@@ -621,6 +630,11 @@ func TestGetShipmentDataByIdentifier(t *testing.T) {
"delivering_date": null, "delivering_date": null,
"provider_status": "", "provider_status": "",
"delivery_price": "", "delivery_price": "",
"optional": {
"products_with_possible_mandatory_mark": [
0
]
},
"cancellation": { "cancellation": {
"cancel_reason_id": 0, "cancel_reason_id": 0,
"cancel_reason": "", "cancel_reason": "",
@@ -634,12 +648,12 @@ func TestGetShipmentDataByIdentifier(t *testing.T) {
"products": [ "products": [
{ {
"currency_code": "RUB", "currency_code": "RUB",
"is_blr_traceable": true,
"price": "279.0000", "price": "279.0000",
"offer_id": "250-7898-1", "offer_id": "250-7898-1",
"name": "Кофе ароматизированный \"Шоколадный апельсин\" 250 гр", "name": "Кофе ароматизированный \"Шоколадный апельсин\" 250 гр",
"sku": 180550365, "sku": 180550365,
"quantity": 1, "quantity": 1,
"mandatory_mark": [],
"dimensions": { "dimensions": {
"height": "40.00", "height": "40.00",
"length": "240.00", "length": "240.00",