Update December 6, 2024 (#126)
This commit is contained in:
@@ -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{}
|
||||
|
||||
|
||||
@@ -151,15 +151,16 @@ func TestListOfCertifiedCategories(t *testing.T) {
|
||||
PageSize: 100,
|
||||
},
|
||||
`{
|
||||
"result": {
|
||||
"certification": [
|
||||
{
|
||||
"is_required": true,
|
||||
"category_name": "Витаминно-минеральные комплексы для взрослых"
|
||||
}
|
||||
],
|
||||
"total": 1
|
||||
}
|
||||
"certification": [
|
||||
{
|
||||
"category_id": 0,
|
||||
"category_name": "string",
|
||||
"is_required": true,
|
||||
"type_id": 0,
|
||||
"type_name": "string"
|
||||
}
|
||||
],
|
||||
"total": 1
|
||||
}`,
|
||||
},
|
||||
// Test No Client-Id or Api-Key
|
||||
|
||||
Reference in New Issue
Block a user