Merge pull request #5 from diPhantxm/refactor-enum-types

add enum types where possible
This commit is contained in:
Kirill
2023-04-02 12:54:17 +03:00
committed by GitHub
6 changed files with 138 additions and 27 deletions

View File

@@ -15,7 +15,7 @@ type GetProductTreeParams struct {
CategoryId int64 `json:"category_id"`
// Response language
Language string `json:"language" default:"DEFAULT"`
Language Language `json:"language" default:"DEFAULT"`
}
type GetProductTreeResponse struct {
@@ -54,13 +54,13 @@ func (c Categories) Tree(params *GetProductTreeParams) (*GetProductTreeResponse,
type GetCategoryAttributesParams struct {
// Filter by characteristics
AttributeType string `json:"attribute_type" default:"ALL"`
AttributeType AttributeType `json:"attribute_type" default:"ALL"`
// Category identifier
CategoryId []int64 `json:"category_id"`
// Response language
Language string `json:"language" default:"DEFAULT"`
Language Language `json:"language" default:"DEFAULT"`
}
type GetCategoryAttributesResponse struct {
@@ -151,7 +151,7 @@ type GetAttributeDictionaryParams struct {
// Response language
// The default language is Russian
Language string `json:"language" default:"DEFAULT"`
Language Language `json:"language" default:"DEFAULT"`
LastValueId int64 `json:"last_value_id"`