refactoring. put methods to individual structures

This commit is contained in:
diPhantxm
2023-03-15 21:38:17 +03:00
parent 2e60a17c56
commit 2566f85da3
17 changed files with 148 additions and 55 deletions

View File

@@ -6,6 +6,10 @@ import (
core "github.com/diphantxm/ozon-api-client"
)
type Promotions struct {
client *core.Client
}
type GetAvailablePromotionsResponse struct {
core.CommonResponse
@@ -65,7 +69,7 @@ type GetAvailablePromotionsResponse struct {
} `json:"result"`
}
func (c Client) GetAvailablePromotions() (*GetAvailablePromotionsResponse, error) {
func (c Promotions) GetAvailablePromotions() (*GetAvailablePromotionsResponse, error) {
url := "/v1/actions"
resp := &GetAvailablePromotionsResponse{}