Update December 6, 2024 (#126)

This commit is contained in:
Kirill
2025-01-10 17:51:16 +03:00
committed by GitHub
parent 14986eb627
commit 32bd7748ec
2 changed files with 20 additions and 15 deletions

View File

@@ -99,11 +99,6 @@ type ListOfCertifiedCategoriesParams struct {
type ListOfCertifiedCategoriesResponse struct {
core.CommonResponse
// Method result
Result ListOfCertifiedCategoriesResult `json:"result"`
}
type ListOfCertifiedCategoriesResult struct {
// Certified categories details
Certification []ListOfCertifiedCategoriesResultCert `json:"certification"`
@@ -112,16 +107,25 @@ type ListOfCertifiedCategoriesResult struct {
}
type ListOfCertifiedCategoriesResultCert struct {
// Identifier of the certified category
CategoryId int64 `json:"category_id"`
// Category name
CategoryName string `json:"category_name"`
// Indication of a mandatory category
IsRequired bool `json:"is_required"`
// Type identifier of the certified category
TypeId int64 `json:"type_id"`
// Name of the type of certified category
TypeName string `json:"type_name"`
}
// List of certified categories
func (c Certificates) ListOfCertifiedCategories(ctx context.Context, params *ListOfCertifiedCategoriesParams) (*ListOfCertifiedCategoriesResponse, error) {
url := "/v1/product/certification/list"
url := "/v2/product/certification/list"
resp := &ListOfCertifiedCategoriesResponse{}

View File

@@ -151,15 +151,16 @@ func TestListOfCertifiedCategories(t *testing.T) {
PageSize: 100,
},
`{
"result": {
"certification": [
{
"category_id": 0,
"category_name": "string",
"is_required": true,
"category_name": "Витаминно-минеральные комплексы для взрослых"
"type_id": 0,
"type_name": "string"
}
],
"total": 1
}
}`,
},
// Test No Client-Id or Api-Key