Skip to content

Commit

Permalink
update some response structures
Browse files Browse the repository at this point in the history
  • Loading branch information
diPhantxm committed Dec 12, 2023
1 parent 21c4016 commit b2cee34
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
24 changes: 21 additions & 3 deletions ozon/fbs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ type CheckProductItemsDataProduct struct {
IsMandatoryMarkNeeded bool `json:"is_mandatory_mark_needed"`

// Indication that you need to pass the product batch registration number
IsRNTPNeeded bool `json:"is_rntp_needed"`
IsRNPTNeeded bool `json:"is_rnpt_needed"`

// Product ID
ProductId int64 `json:"product_id"`
Expand All @@ -1788,17 +1788,35 @@ type CheckProductItemsDataProductExemplar struct {
// Customs cargo declaration (CCD) number
GTD string `json:"gtd"`

// Сustoms cargo declaration (CCD) check status
GTDCheckStatus string `json:"gtd_check_status"`

// Сustoms cargo declaration (CCD) check error codes
GTDErrorCodes []string `json:"gtd_error_codes"`

// Indication that the customs cargo declaration (CCD) number isn't specified
IsGTDAbsent bool `json:"is_gtd_absent"`

// "Chestny ZNAK" labeling check status
MandatoryMarkCheckStatus MandatoryMarkStatus `json:"mandatory_mark_check_status"`

// "Chestny ZNAK" labeling check error codes
MandatoryMarkErrorCodes []string `json:"mandatory_mark_error_codes"`

// Indication that the product batch registration number isn't specified
IsRNTPAbsent bool `json:"is_rntp_absent"`
IsRNPTAbsent bool `json:"is_rnpt_absent"`

// Mandatory "Chestny ZNAK" labeling
MandatoryMark string `json:"mandatory_mark"`

// Product batch registration number
RNTP string `json:"rntp"`
RNPT string `json:"rnpt"`

// Product batch registration number check status
RNPTCheckStatus string `json:"rnpt_check_status"`

// Product batch registration number check error codes
RNPTErrorCodes []string `json:"rnpt_error_codes"`

// Unique identifier of charges of the jewelry
JWUIN string `json:"jw_uin"`
Expand Down
8 changes: 4 additions & 4 deletions ozon/fbs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1404,15 +1404,15 @@ func TestCheckProductItemsData(t *testing.T) {
ExemplarId: 1,
GTD: "string",
IsGTDAbsent: true,
IsRNTPAbsent: true,
IsRNPTAbsent: true,
MandatoryMark: "string",
RNTP: "string",
RNPT: "string",
JWUIN: "string",
},
},
IsGTDNeeded: true,
IsMandatoryMarkNeeded: true,
IsRNTPNeeded: true,
IsRNPTNeeded: true,
ProductId: 22,
Quantity: 11,
},
Expand Down Expand Up @@ -2912,7 +2912,7 @@ func TestCreateOrGetProductExemplar(t *testing.T) {
continue
}

compareJsonResponse(t, test.response, &GetActPDFResponse{})
compareJsonResponse(t, test.response, &CreateOrGetProductExemplarResponse{})

if resp.StatusCode != test.statusCode {
t.Errorf("got wrong status code: got: %d, expected: %d", resp.StatusCode, test.statusCode)
Expand Down

0 comments on commit b2cee34

Please sign in to comment.