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

@@ -7,6 +7,10 @@ import (
core "github.com/diphantxm/ozon-api-client"
)
type FBO struct {
client *core.Client
}
type GetFBOShipmentsListParams struct {
// Sorting direction
Direction string `json:"dir"`
@@ -151,7 +155,7 @@ type GetFBOShipmentsListResponse struct {
}
// Returns a list of shipments for a specified period of time. You can additionally filter the shipments by their status
func (c Client) GetFBOShipmentsList(params *GetFBOShipmentsListParams) (*GetFBOShipmentsListResponse, error) {
func (c FBO) GetFBOShipmentsList(params *GetFBOShipmentsListParams) (*GetFBOShipmentsListResponse, error) {
url := "/v2/posting/fbo/list"
resp := &GetFBOShipmentsListResponse{}