Update December 6, 2024 (#126)
This commit is contained in:
@@ -99,11 +99,6 @@ type ListOfCertifiedCategoriesParams struct {
|
|||||||
type ListOfCertifiedCategoriesResponse struct {
|
type ListOfCertifiedCategoriesResponse struct {
|
||||||
core.CommonResponse
|
core.CommonResponse
|
||||||
|
|
||||||
// Method result
|
|
||||||
Result ListOfCertifiedCategoriesResult `json:"result"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ListOfCertifiedCategoriesResult struct {
|
|
||||||
// Certified categories details
|
// Certified categories details
|
||||||
Certification []ListOfCertifiedCategoriesResultCert `json:"certification"`
|
Certification []ListOfCertifiedCategoriesResultCert `json:"certification"`
|
||||||
|
|
||||||
@@ -112,16 +107,25 @@ type ListOfCertifiedCategoriesResult struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ListOfCertifiedCategoriesResultCert struct {
|
type ListOfCertifiedCategoriesResultCert struct {
|
||||||
|
// Identifier of the certified category
|
||||||
|
CategoryId int64 `json:"category_id"`
|
||||||
|
|
||||||
// Category name
|
// Category name
|
||||||
CategoryName string `json:"category_name"`
|
CategoryName string `json:"category_name"`
|
||||||
|
|
||||||
// Indication of a mandatory category
|
// Indication of a mandatory category
|
||||||
IsRequired bool `json:"is_required"`
|
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
|
// List of certified categories
|
||||||
func (c Certificates) ListOfCertifiedCategories(ctx context.Context, params *ListOfCertifiedCategoriesParams) (*ListOfCertifiedCategoriesResponse, error) {
|
func (c Certificates) ListOfCertifiedCategories(ctx context.Context, params *ListOfCertifiedCategoriesParams) (*ListOfCertifiedCategoriesResponse, error) {
|
||||||
url := "/v1/product/certification/list"
|
url := "/v2/product/certification/list"
|
||||||
|
|
||||||
resp := &ListOfCertifiedCategoriesResponse{}
|
resp := &ListOfCertifiedCategoriesResponse{}
|
||||||
|
|
||||||
|
|||||||
@@ -151,15 +151,16 @@ func TestListOfCertifiedCategories(t *testing.T) {
|
|||||||
PageSize: 100,
|
PageSize: 100,
|
||||||
},
|
},
|
||||||
`{
|
`{
|
||||||
"result": {
|
|
||||||
"certification": [
|
"certification": [
|
||||||
{
|
{
|
||||||
|
"category_id": 0,
|
||||||
|
"category_name": "string",
|
||||||
"is_required": true,
|
"is_required": true,
|
||||||
"category_name": "Витаминно-минеральные комплексы для взрослых"
|
"type_id": 0,
|
||||||
|
"type_name": "string"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"total": 1
|
"total": 1
|
||||||
}
|
|
||||||
}`,
|
}`,
|
||||||
},
|
},
|
||||||
// Test No Client-Id or Api-Key
|
// Test No Client-Id or Api-Key
|
||||||
|
|||||||
Reference in New Issue
Block a user