add methods for returns

This commit is contained in:
diPhantxm
2023-03-15 23:07:29 +03:00
parent 2566f85da3
commit dc6e28497a
4 changed files with 410 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ type Client struct {
promotions *Promotions
rating *Rating
warehouses *Warehouses
returns *Returns
}
func (c Client) Analytics() *Analytics {
@@ -55,6 +56,10 @@ func (c Client) Warehouses() *Warehouses {
return c.warehouses
}
func (c Client) Returns() *Returns {
return c.returns
}
func NewClient(clientId, apiKey string) *Client {
coreClient := core.NewClient(DefaultAPIBaseUrl, map[string]string{
"Client-Id": clientId,
@@ -71,6 +76,7 @@ func NewClient(clientId, apiKey string) *Client {
promotions: &Promotions{client: coreClient},
rating: &Rating{client: coreClient},
warehouses: &Warehouses{client: coreClient},
returns: &Returns{client: coreClient},
}
}
@@ -87,5 +93,6 @@ func NewMockClient(handler http.HandlerFunc) *Client {
promotions: &Promotions{client: coreClient},
rating: &Rating{client: coreClient},
warehouses: &Warehouses{client: coreClient},
returns: &Returns{client: coreClient},
}
}