add Content-Type to request header
This commit is contained in:
@@ -57,7 +57,7 @@
|
|||||||
- [x] List of accordance types (version 2)
|
- [x] List of accordance types (version 2)
|
||||||
- [x] Directory of document types
|
- [x] Directory of document types
|
||||||
- [x] List of certified categories
|
- [x] List of certified categories
|
||||||
- [ ] Adding certificates for products
|
- [x] Adding certificates for products
|
||||||
- [x] Link the certificate to the product
|
- [x] Link the certificate to the product
|
||||||
- [x] Delete certificate
|
- [x] Delete certificate
|
||||||
- [x] Certificate information
|
- [x] Certificate information
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ func (c Client) newRequest(method string, url string, body interface{}) (*http.R
|
|||||||
return req, nil
|
return req, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c Client) Request(method string, path string, req, resp interface{}) (*Response, error) {
|
func (c Client) Request(method string, path string, req, resp interface{}, options map[string]string) (*Response, error) {
|
||||||
httpReq, err := c.newRequest(method, path, req)
|
httpReq, err := c.newRequest(method, path, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ func TestRequest(t *testing.T) {
|
|||||||
c := NewMockClient(NewMockHttpHandler(test.statusCode, test.response, test.headers))
|
c := NewMockClient(NewMockHttpHandler(test.statusCode, test.response, test.headers))
|
||||||
|
|
||||||
respStruct := &TestRequestResponse{}
|
respStruct := &TestRequestResponse{}
|
||||||
resp, err := c.Request(http.MethodPost, "/", test.params, respStruct)
|
resp, err := c.Request(http.MethodPost, "/", test.params, respStruct, nil)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ func (c Analytics) GetAnalyticsData(params *GetAnalyticsDataParams) (*GetAnalyti
|
|||||||
|
|
||||||
resp := &GetAnalyticsDataResponse{}
|
resp := &GetAnalyticsDataResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -161,7 +161,7 @@ func (c Analytics) GetStocksOnWarehouses(params *GetStocksOnWarehousesParams) (*
|
|||||||
|
|
||||||
resp := &GetStocksOnWarehousesResponse{}
|
resp := &GetStocksOnWarehousesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ func (c Brands) List(params *ListCertifiedBrandsParams) (*ListCertifiedBrandsRes
|
|||||||
|
|
||||||
resp := &ListCertifiedBrandsResponse{}
|
resp := &ListCertifiedBrandsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ func (c Cancellations) GetInfo(params *GetCancellationInfoParams) (*GetCancellat
|
|||||||
|
|
||||||
resp := &GetCancellationInfoResponse{}
|
resp := &GetCancellationInfoResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -152,7 +152,7 @@ func (c Cancellations) List(params *ListCancellationsParams) (*ListCancellations
|
|||||||
|
|
||||||
resp := &ListCancellationsResponse{}
|
resp := &ListCancellationsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -180,7 +180,7 @@ func (c Cancellations) Approve(params *ApproveRejectCancellationsParams) (*Appro
|
|||||||
|
|
||||||
resp := &ApproveRejectCancellationsResponse{}
|
resp := &ApproveRejectCancellationsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -197,7 +197,7 @@ func (c Cancellations) Reject(params *ApproveRejectCancellationsParams) (*Approv
|
|||||||
|
|
||||||
resp := &ApproveRejectCancellationsResponse{}
|
resp := &ApproveRejectCancellationsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ func (c Categories) Tree(params *GetProductTreeParams) (*GetProductTreeResponse,
|
|||||||
|
|
||||||
resp := &GetProductTreeResponse{}
|
resp := &GetProductTreeResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -133,7 +133,7 @@ func (c Categories) Attributes(params *GetCategoryAttributesParams) (*GetCategor
|
|||||||
|
|
||||||
resp := &GetCategoryAttributesResponse{}
|
resp := &GetCategoryAttributesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -184,7 +184,7 @@ func (c Categories) AttributesDictionary(params *GetAttributeDictionaryParams) (
|
|||||||
|
|
||||||
resp := &GetAttributeDictionaryResponse{}
|
resp := &GetAttributeDictionaryResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ func (c Certificates) ListOfAccordanceTypes() (*ListOfAccordanceTypesResponse, e
|
|||||||
|
|
||||||
resp := &ListOfAccordanceTypesResponse{}
|
resp := &ListOfAccordanceTypesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodGet, url, nil, resp)
|
response, err := c.client.Request(http.MethodGet, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ func (c Certificates) DirectoryOfDocumentTypes() (*DirectoryOfDocumentTypesRespo
|
|||||||
|
|
||||||
resp := &DirectoryOfDocumentTypesResponse{}
|
resp := &DirectoryOfDocumentTypesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodGet, url, nil, resp)
|
response, err := c.client.Request(http.MethodGet, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ func (c Certificates) ListOfCertifiedCategories(params *ListOfCertifiedCategorie
|
|||||||
|
|
||||||
resp := &ListOfCertifiedCategoriesResponse{}
|
resp := &ListOfCertifiedCategoriesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -142,7 +142,7 @@ func (c Certificates) LinkToProduct(params *LinkCertificateToProductParams) (*Li
|
|||||||
|
|
||||||
resp := &LinkCertificateToProductResponse{}
|
resp := &LinkCertificateToProductResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -177,7 +177,7 @@ func (c Certificates) Delete(params *DeleteCertificateParams) (*DeleteCertificat
|
|||||||
|
|
||||||
resp := &DeleteCertificateResponse{}
|
resp := &DeleteCertificateResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -237,7 +237,7 @@ func (c Certificates) GetInfo(params *GetCertificateInfoParams) (*GetCertificate
|
|||||||
|
|
||||||
resp := &GetCertificateInfoResponse{}
|
resp := &GetCertificateInfoResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -316,7 +316,7 @@ func (c Certificates) List(params *ListCertificatesParams) (*ListCertificatesRes
|
|||||||
|
|
||||||
resp := &ListCertificatesResponse{}
|
resp := &ListCertificatesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -343,7 +343,7 @@ func (c Certificates) ProductStatuses() (*ProductStatusesResponse, error) {
|
|||||||
|
|
||||||
resp := &ProductStatusesResponse{}
|
resp := &ProductStatusesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, nil, resp)
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -391,7 +391,7 @@ func (c Certificates) ListProductsForCertificate(params *ListProductsForCertific
|
|||||||
|
|
||||||
resp := &ListProductsForCertificateResponse{}
|
resp := &ListProductsForCertificateResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -432,7 +432,7 @@ func (c Certificates) UnlinkFromProduct(params *UnlinkFromProductParams) (*Unlin
|
|||||||
|
|
||||||
resp := &UnlinkFromProductResponse{}
|
resp := &UnlinkFromProductResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -460,7 +460,7 @@ func (c Certificates) PossibleRejectReasons() (*PossibleRejectReasonsResponse, e
|
|||||||
|
|
||||||
resp := &PossibleRejectReasonsResponse{}
|
resp := &PossibleRejectReasonsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, nil, resp)
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -487,7 +487,53 @@ func (c Certificates) PossibleStatuses() (*PossibleStatusesResponse, error) {
|
|||||||
|
|
||||||
resp := &PossibleStatusesResponse{}
|
resp := &PossibleStatusesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, nil, resp)
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
response.CopyCommonResponse(&resp.CommonResponse)
|
||||||
|
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type AddCertificatesForProductsParams struct {
|
||||||
|
// Array of certificates for the product. Valid extensions are jpg, jpeg, png, pdf
|
||||||
|
Files []byte `json:"files"`
|
||||||
|
|
||||||
|
// Certificate name. No more than 100 characters
|
||||||
|
Name string `json:"name"`
|
||||||
|
|
||||||
|
// Certificate number. No more than 100 characters
|
||||||
|
Number string `json:"number"`
|
||||||
|
|
||||||
|
// Certificate type. To get the list of types, use the GET `/v1/product/certificate/types` method
|
||||||
|
TypeCode string `json:"type_code"`
|
||||||
|
|
||||||
|
// Accordance type. To get the list of types, use the GET `/v1/product/certificate/accordance-types` method
|
||||||
|
AccordanceTypeCode string `json:"accordance_type_code"`
|
||||||
|
|
||||||
|
// Issue date of the certificate
|
||||||
|
IssueDate time.Time `json:"issue_date"`
|
||||||
|
|
||||||
|
// Expiration date of the certificate. Can be empty for permanent certificates
|
||||||
|
ExpireDate time.Time `json:"expire_date"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type AddCertificatesForProductsResponse struct {
|
||||||
|
core.CommonResponse
|
||||||
|
|
||||||
|
Id int `json:"id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adding certificates for products
|
||||||
|
func (c Certificates) AddForProducts(params *AddCertificatesForProductsParams) (*AddCertificatesForProductsResponse, error) {
|
||||||
|
url := "/v1/product/certificate/create"
|
||||||
|
|
||||||
|
resp := &AddCertificatesForProductsResponse{}
|
||||||
|
|
||||||
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, map[string]string{
|
||||||
|
"Content-Type": "multipart/form-data",
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package ozon
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
core "github.com/diphantxm/ozon-api-client"
|
core "github.com/diphantxm/ozon-api-client"
|
||||||
)
|
)
|
||||||
@@ -652,3 +653,55 @@ func TestPossibleStatuses(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestAddCertificatesForProducts(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
|
tests := []struct {
|
||||||
|
statusCode int
|
||||||
|
headers map[string]string
|
||||||
|
params *AddCertificatesForProductsParams
|
||||||
|
response string
|
||||||
|
}{
|
||||||
|
// Test Ok
|
||||||
|
{
|
||||||
|
http.StatusOK,
|
||||||
|
map[string]string{"Client-Id": "my-client-id", "Api-Key": "my-api-key"},
|
||||||
|
&AddCertificatesForProductsParams{
|
||||||
|
Files: []byte{10, 15, 2, 0},
|
||||||
|
Name: "Certificate name",
|
||||||
|
Number: "10a-d5s9-4asdf2",
|
||||||
|
TypeCode: "declaration",
|
||||||
|
AccordanceTypeCode: "gost",
|
||||||
|
IssueDate: time.Now(),
|
||||||
|
ExpireDate: time.Now(),
|
||||||
|
},
|
||||||
|
`{
|
||||||
|
"id": 50058
|
||||||
|
}`,
|
||||||
|
},
|
||||||
|
// Test No Client-Id or Api-Key
|
||||||
|
{
|
||||||
|
http.StatusUnauthorized,
|
||||||
|
map[string]string{},
|
||||||
|
&AddCertificatesForProductsParams{},
|
||||||
|
`{
|
||||||
|
"code": 16,
|
||||||
|
"message": "Client-Id and Api-Key headers are required"
|
||||||
|
}`,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, test := range tests {
|
||||||
|
c := NewMockClient(core.NewMockHttpHandler(test.statusCode, test.response, test.headers))
|
||||||
|
|
||||||
|
resp, err := c.Certificates().AddForProducts(test.params)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if resp.StatusCode != test.statusCode {
|
||||||
|
t.Errorf("got wrong status code: got: %d, expected: %d", resp.StatusCode, test.statusCode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ func (c Chats) List(params *ListChatsParams) (*ListChatsResponse, error) {
|
|||||||
|
|
||||||
resp := &ListChatsResponse{}
|
resp := &ListChatsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ func (c Chats) SendMessage(params *SendMessageParams) (*SendMessageResponse, err
|
|||||||
|
|
||||||
resp := &SendMessageResponse{}
|
resp := &SendMessageResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ func (c Chats) SendFile(params *SendFileParams) (*SendFileResponse, error) {
|
|||||||
|
|
||||||
resp := &SendFileResponse{}
|
resp := &SendFileResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -214,7 +214,7 @@ func (c Chats) History(params *ChatHistoryParams) (*ChatHistoryResponse, error)
|
|||||||
|
|
||||||
resp := &ChatHistoryResponse{}
|
resp := &ChatHistoryResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -320,7 +320,7 @@ func (c Chats) Update(params *UpdateChatParams) (*UpdateChatResponse, error) {
|
|||||||
|
|
||||||
resp := &UpdateChatResponse{}
|
resp := &UpdateChatResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -350,7 +350,7 @@ func (c Chats) Create(params *CreateNewChatParams) (*CreateNewChatResponse, erro
|
|||||||
|
|
||||||
resp := &CreateNewChatResponse{}
|
resp := &CreateNewChatResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -380,7 +380,7 @@ func (c Chats) MarkAsRead(params *MarkAsReadParams) (*MarkAsReadResponse, error)
|
|||||||
|
|
||||||
resp := &MarkAsReadResponse{}
|
resp := &MarkAsReadResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ func (c FBO) GetShipmentsList(params *GetFBOShipmentsListParams) (*GetFBOShipmen
|
|||||||
|
|
||||||
resp := &GetFBOShipmentsListResponse{}
|
resp := &GetFBOShipmentsListResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -267,7 +267,7 @@ func (c FBO) GetShipmentDetails(params *GetShipmentDetailsParams) (*GetShipmentD
|
|||||||
|
|
||||||
resp := &GetShipmentDetailsResponse{}
|
resp := &GetShipmentDetailsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
88
ozon/fbs.go
88
ozon/fbs.go
@@ -209,7 +209,7 @@ func (c FBS) ListUnprocessedShipments(params *ListUnprocessedShipmentsParams) (*
|
|||||||
|
|
||||||
resp := &ListUnprocessedShipmentsResponse{}
|
resp := &ListUnprocessedShipmentsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -308,7 +308,7 @@ func (c FBS) GetFBSShipmentsList(params *GetFBSShipmentsListParams) (*GetFBSShip
|
|||||||
|
|
||||||
resp := &GetFBSShipmentsListResponse{}
|
resp := &GetFBSShipmentsListResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -377,7 +377,7 @@ func (c FBS) PackOrder(params *PackOrderParams) (*PackOrderResponse, error) {
|
|||||||
|
|
||||||
resp := &PackOrderResponse{}
|
resp := &PackOrderResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -443,7 +443,7 @@ func (c FBS) ValidateLabelingCodes(params *ValidateLabelingCodesParams) (*Valida
|
|||||||
|
|
||||||
resp := &ValidateLabelingCodesResponse{}
|
resp := &ValidateLabelingCodesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -539,7 +539,7 @@ func (c FBS) GetShipmentDataByBarcode(params *GetShipmentDataByBarcodeParams) (*
|
|||||||
|
|
||||||
resp := &GetShipmentDataByBarcodeResponse{}
|
resp := &GetShipmentDataByBarcodeResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -791,7 +791,7 @@ func (c FBS) GetShipmentDataByIdentifier(params *GetShipmentDataByIdentifierPara
|
|||||||
|
|
||||||
resp := &GetShipmentDataByIdentifierResponse{}
|
resp := &GetShipmentDataByIdentifierResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -835,7 +835,7 @@ func (c FBS) AddTrackingNumbers(params *AddTrackingNumbersParams) (*AddTrackingN
|
|||||||
|
|
||||||
resp := &AddTrackingNumbersResponse{}
|
resp := &AddTrackingNumbersResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -955,7 +955,7 @@ func (c FBS) ListOfShipmentCertificates(params *ListOfShipmentCertificatesParams
|
|||||||
|
|
||||||
resp := &ListOfShipmentCertificatesResponse{}
|
resp := &ListOfShipmentCertificatesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -987,7 +987,7 @@ func (c FBS) SignShipmentCertificate(params *SignShipmentCertificateParams) (*Si
|
|||||||
|
|
||||||
resp := &SignShipmentCertificateResponse{}
|
resp := &SignShipmentCertificateResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1023,7 +1023,7 @@ func (c FBS) ChangeStatusToDelivering(params *ChangeStatusToParams) (*ChangeStat
|
|||||||
|
|
||||||
resp := &ChangeStatusToResponse{}
|
resp := &ChangeStatusToResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1038,7 +1038,7 @@ func (c FBS) ChangeStatusToLastMile(params *ChangeStatusToParams) (*ChangeStatus
|
|||||||
|
|
||||||
resp := &ChangeStatusToResponse{}
|
resp := &ChangeStatusToResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1053,7 +1053,7 @@ func (c FBS) ChangeStatusToDelivered(params *ChangeStatusToParams) (*ChangeStatu
|
|||||||
|
|
||||||
resp := &ChangeStatusToResponse{}
|
resp := &ChangeStatusToResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1068,7 +1068,7 @@ func (c FBS) ChangeStatusToSendBySeller(params *ChangeStatusToParams) (*ChangeSt
|
|||||||
|
|
||||||
resp := &ChangeStatusToResponse{}
|
resp := &ChangeStatusToResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1095,7 +1095,7 @@ func (c FBS) PassShipmentToShipping(params *PassShipmentToShippingParams) (*Pass
|
|||||||
|
|
||||||
resp := &PassShipmentToShippingResponse{}
|
resp := &PassShipmentToShippingResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1140,7 +1140,7 @@ func (c FBS) CancelShipment(params *CancelShipmentParams) (*CancelShipmentRespon
|
|||||||
|
|
||||||
resp := &CancelShipmentResponse{}
|
resp := &CancelShipmentResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1185,7 +1185,7 @@ func (c FBS) CreateAct(params *CreateActParams) (*CreateActResponse, error) {
|
|||||||
|
|
||||||
resp := &CreateActResponse{}
|
resp := &CreateActResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1225,7 +1225,9 @@ func (c FBS) GetLabeling(params *GetLabelingParams) (*GetLabelingResponse, error
|
|||||||
|
|
||||||
resp := &GetLabelingResponse{}
|
resp := &GetLabelingResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, map[string]string{
|
||||||
|
"Content-Type": "application/pdf",
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1257,7 +1259,9 @@ func (c FBS) PrintLabeling(params *PrintLabelingParams) (*PrintLabelingResponse,
|
|||||||
|
|
||||||
resp := &PrintLabelingResponse{}
|
resp := &PrintLabelingResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, map[string]string{
|
||||||
|
"Content-Type": "application/pdf",
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1285,11 +1289,13 @@ type CreateTaskForGeneratingLabelResponse struct {
|
|||||||
//
|
//
|
||||||
// To get labels created as a result of the method, use the /v1/posting/fbs/package-label/get method
|
// To get labels created as a result of the method, use the /v1/posting/fbs/package-label/get method
|
||||||
func (c FBS) CreateTaskForGeneratingLabel(params *CreateTaskForGeneratingLabelParams) (*CreateTaskForGeneratingLabelResponse, error) {
|
func (c FBS) CreateTaskForGeneratingLabel(params *CreateTaskForGeneratingLabelParams) (*CreateTaskForGeneratingLabelResponse, error) {
|
||||||
url := "/v2/posting/fbs/package-label"
|
url := "/v1/posting/fbs/package-label/create"
|
||||||
|
|
||||||
resp := &CreateTaskForGeneratingLabelResponse{}
|
resp := &CreateTaskForGeneratingLabelResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, map[string]string{
|
||||||
|
"Content-Type": "application/pdf",
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1341,7 +1347,7 @@ func (c FBS) GetDropOffPointRestrictions(params *GetDropOffPointRestrictionsPara
|
|||||||
|
|
||||||
resp := &GetDropOffPointRestrictionsResponse{}
|
resp := &GetDropOffPointRestrictionsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1391,7 +1397,7 @@ func (c FBS) CheckproductItemsData(params *CheckProductItemsDataParams) (*CheckP
|
|||||||
|
|
||||||
resp := &CheckProductItemsDataResponse{}
|
resp := &CheckProductItemsDataResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1428,7 +1434,7 @@ func (c FBS) GetProductItemsCheckStatuses(params *GetProductItemsCheckStatusesPa
|
|||||||
|
|
||||||
resp := &GetProductItemsCheckStatusesResponse{}
|
resp := &GetProductItemsCheckStatusesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1466,7 +1472,7 @@ func (c FBS) RescheduleShipmentDeliveryDate(params *RescheduleShipmentDeliveryDa
|
|||||||
|
|
||||||
resp := &RescheduleShipmentDeliveryDateResponse{}
|
resp := &RescheduleShipmentDeliveryDateResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1505,7 +1511,7 @@ func (c FBS) DateAvailableForDeliverySchedule(params *DateAvailableForDeliverySc
|
|||||||
|
|
||||||
resp := &DateAvailableForDeliveryScheduleResponse{}
|
resp := &DateAvailableForDeliveryScheduleResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1538,7 +1544,7 @@ func (c FBS) ListManufacturingCountries(params *ListManufacturingCountriesParams
|
|||||||
|
|
||||||
resp := &ListManufacturingCountriesResponse{}
|
resp := &ListManufacturingCountriesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1574,7 +1580,7 @@ func (c FBS) SetManufacturingCountry(params *SetManufacturingCountryParams) (*Se
|
|||||||
|
|
||||||
resp := &SetManufacturingCountryResponse{}
|
resp := &SetManufacturingCountryResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1627,7 +1633,7 @@ func (c FBS) PartialPackOrder(params *PartialPackOrderParams) (*PartialPackOrder
|
|||||||
|
|
||||||
resp := &PartialPackOrderResponse{}
|
resp := &PartialPackOrderResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1716,7 +1722,7 @@ func (c FBS) AvailableFreightsList(params *AvailableFreightsListParams) (*Availa
|
|||||||
|
|
||||||
resp := &AvailableFreightsListResponse{}
|
resp := &AvailableFreightsListResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1752,7 +1758,7 @@ func (c FBS) GenerateAct(params *GenerateActParams) (*GenerateActResponse, error
|
|||||||
|
|
||||||
resp := &GenerateActResponse{}
|
resp := &GenerateActResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1791,7 +1797,7 @@ func (c FBS) GetDigitalAct(params *GetDigitalActParams) (*GetDigitalActResponse,
|
|||||||
|
|
||||||
resp := &GetDigitalActResponse{}
|
resp := &GetDigitalActResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1824,7 +1830,7 @@ func (c FBS) PackageUnitLabel(params *PackageUnitLabelsParams) (*PackageUnitLabe
|
|||||||
|
|
||||||
resp := &PackageUnitLabelsResponse{}
|
resp := &PackageUnitLabelsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1852,7 +1858,7 @@ func (c FBS) OpenDisputeOverShipment(params *OpenDisputeOverShipmentParams) (*Op
|
|||||||
|
|
||||||
resp := &OpenDisputeOverShipmentResponse{}
|
resp := &OpenDisputeOverShipmentResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1894,7 +1900,7 @@ func (c FBS) ShipmentCancellationReasons(params *ShipmentCancellationReasonsPara
|
|||||||
|
|
||||||
resp := &ShipmentCancellationReasonsResponse{}
|
resp := &ShipmentCancellationReasonsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1930,7 +1936,7 @@ func (c FBS) ShipmentsCancellationReasons() (*ShipmentsCancellationReasonsRespon
|
|||||||
|
|
||||||
resp := &ShipmentsCancellationReasonsResponse{}
|
resp := &ShipmentsCancellationReasonsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, nil, resp)
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1968,7 +1974,7 @@ func (c FBS) AddWeightForBulkProduct(params *AddWeightForBulkProductParams) (*Ad
|
|||||||
|
|
||||||
resp := &AddWeightForBulkProductResponse{}
|
resp := &AddWeightForBulkProductResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -2012,7 +2018,7 @@ func (c FBS) CancelSending(params *CancelSendingParams) (*CancelSendingResponse,
|
|||||||
|
|
||||||
resp := &CancelSendingResponse{}
|
resp := &CancelSendingResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -2078,7 +2084,7 @@ func (c FBS) ListShipmentInCertificate(params *ListShipmentInCertificateParams)
|
|||||||
|
|
||||||
resp := &ListShipmentInCertificateResponse{}
|
resp := &ListShipmentInCertificateResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -2113,7 +2119,7 @@ func (c FBS) SpecifyNumberOfBoxes(params *SpecifyNumberOfBoxesParams) (*SpecifyN
|
|||||||
|
|
||||||
resp := &SpecifyNumberOfBoxesResponse{}
|
resp := &SpecifyNumberOfBoxesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -2182,7 +2188,7 @@ func (c FBS) StatusOfAct(params *StatusOfActParams) (*StatusOfActResponse, error
|
|||||||
|
|
||||||
resp := &StatusOfActResponse{}
|
resp := &StatusOfActResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -2234,7 +2240,7 @@ func (c FBS) ETGBCustomsDeclarations(params *ETGBCustomsDeclarationsParams) (*ET
|
|||||||
|
|
||||||
resp := &ETGBCustomsDeclarationsResponse{}
|
resp := &ETGBCustomsDeclarationsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ func (c Finance) ReportOnSoldProducts(params *ReportOnSoldProductsParams) (*Repo
|
|||||||
|
|
||||||
resp := &ReportOnSoldProductsResponse{}
|
resp := &ReportOnSoldProductsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -238,7 +238,7 @@ func (c Finance) GetTotalTransactionsSum(params *GetTotalTransactionsSumParams)
|
|||||||
|
|
||||||
resp := &GetTotalTransactionsSumResponse{}
|
resp := &GetTotalTransactionsSumResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -377,7 +377,7 @@ func (c Finance) ListTransactions(params *ListTransactionsParams) (*ListTransact
|
|||||||
|
|
||||||
resp := &ListTransactionsResponse{}
|
resp := &ListTransactionsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ func (c Invoices) CreateUpdate(params *CreateUpdateProformaLinkParams) (*CreateU
|
|||||||
|
|
||||||
resp := &CreateUpdateProformaLinkResponse{}
|
resp := &CreateUpdateProformaLinkResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ func (c Invoices) Get(params *GetProformaLinkParams) (*GetProformaLinkResponse,
|
|||||||
|
|
||||||
resp := &GetProformaLinkResponse{}
|
resp := &GetProformaLinkResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ func (c Invoices) Delete(params *DeleteProformaLinkParams) (*DeleteProformaLinkR
|
|||||||
|
|
||||||
resp := &DeleteProformaLinkResponse{}
|
resp := &DeleteProformaLinkResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ func (c Polygons) CreateDelivery(params *CreateDeliveryPolygonParams) (*CreateDe
|
|||||||
|
|
||||||
resp := &CreateDeliveryPolygonResponse{}
|
resp := &CreateDeliveryPolygonResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -76,7 +76,7 @@ func (c Polygons) Link(params *LinkDeliveryMethodToPolygonParams) (*LinkDelivery
|
|||||||
|
|
||||||
resp := &LinkDeliveryMethodToPolygonResponse{}
|
resp := &LinkDeliveryMethodToPolygonResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -100,7 +100,7 @@ func (c Polygons) Delete(params *DeletePolygonParams) (*DeletePolygonResponse, e
|
|||||||
|
|
||||||
resp := &DeletePolygonResponse{}
|
resp := &DeletePolygonResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ func (c Products) GetStocksInfo(params *GetStocksInfoParams) (*GetStocksInfoResp
|
|||||||
|
|
||||||
resp := &GetStocksInfoResponse{}
|
resp := &GetStocksInfoResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -359,7 +359,7 @@ func (c Products) GetProductDetails(params *GetProductDetailsParams) (*GetProduc
|
|||||||
|
|
||||||
resp := &GetProductDetailsResponse{}
|
resp := &GetProductDetailsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -420,7 +420,7 @@ func (c Products) UpdateStocks(params *UpdateStocksParams) (*UpdateStocksRespons
|
|||||||
|
|
||||||
resp := &UpdateStocksResponse{}
|
resp := &UpdateStocksResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -490,7 +490,7 @@ func (c Products) UpdateQuantityStockProducts(params *UpdateQuantityStockProduct
|
|||||||
|
|
||||||
resp := &UpdateQuantityStockProductsResponse{}
|
resp := &UpdateQuantityStockProductsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -539,7 +539,7 @@ func (c Products) StocksInSellersWarehouse(params *StocksInSellersWarehouseParam
|
|||||||
|
|
||||||
resp := &StocksInSellersWarehouseResponse{}
|
resp := &StocksInSellersWarehouseResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -612,7 +612,7 @@ func (c Products) UpdatePrices(params *UpdatePricesParams) (*UpdatePricesRespons
|
|||||||
|
|
||||||
resp := &UpdatePricesResponse{}
|
resp := &UpdatePricesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -785,7 +785,7 @@ func (c Products) CreateOrUpdateProduct(params *CreateOrUpdateProductParams) (*C
|
|||||||
|
|
||||||
resp := &CreateOrUpdateProductResponse{}
|
resp := &CreateOrUpdateProductResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -847,7 +847,7 @@ func (c Products) GetListOfProducts(params *GetListOfProductsParams) (*GetListOf
|
|||||||
|
|
||||||
resp := &GetListOfProductsResponse{}
|
resp := &GetListOfProductsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -922,7 +922,7 @@ func (c Products) GetProductsRatingBySKU(params *GetProductsRatingBySKUParams) (
|
|||||||
|
|
||||||
resp := &GetProductsRatingBySKUResponse{}
|
resp := &GetProductsRatingBySKUResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -977,7 +977,7 @@ func (c Products) GetProductImportStatus(params *GetProductImportStatusParams) (
|
|||||||
|
|
||||||
resp := &GetProductImportStatusResponse{}
|
resp := &GetProductImportStatusResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1045,7 +1045,7 @@ func (c Products) CreateProductByOzonID(params *CreateProductByOzonIDParams) (*C
|
|||||||
|
|
||||||
resp := &CreateProductByOzonIDResponse{}
|
resp := &CreateProductByOzonIDResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1130,7 +1130,7 @@ func (c Products) UpdateProductImages(params *UpdateProductImagesParams) (*Produ
|
|||||||
|
|
||||||
resp := &ProductInfoResponse{}
|
resp := &ProductInfoResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1150,7 +1150,7 @@ func (c Products) CheckImageUploadingStatus(params *CheckImageUploadingStatusPar
|
|||||||
|
|
||||||
resp := &ProductInfoResponse{}
|
resp := &ProductInfoResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1190,7 +1190,7 @@ func (c Products) ListProductsByIDs(params *ListProductsByIDsParams) (*ListProdu
|
|||||||
|
|
||||||
resp := &ListProductsByIDsResponse{}
|
resp := &ListProductsByIDsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1360,7 +1360,7 @@ func (c Products) GetDescriptionOfProduct(params *GetDescriptionOfProductParams)
|
|||||||
|
|
||||||
resp := &GetDescriptionOfProductResponse{}
|
resp := &GetDescriptionOfProductResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1402,7 +1402,7 @@ func (c Products) GetProductDescription(params *GetProductDescriptionParams) (*G
|
|||||||
|
|
||||||
resp := &GetProductDescriptionResponse{}
|
resp := &GetProductDescriptionResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1451,7 +1451,7 @@ func (c Products) GetProductRangeLimit() (*GetProductRangeLimitResponse, error)
|
|||||||
|
|
||||||
resp := &GetProductRangeLimitResponse{}
|
resp := &GetProductRangeLimitResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, &struct{}{}, resp)
|
response, err := c.client.Request(http.MethodPost, url, &struct{}{}, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1496,7 +1496,7 @@ func (c Products) ChangeProductIDs(params *ChangeProductIDsParams) (*ChangeProdu
|
|||||||
|
|
||||||
resp := &ChangeProductIDsResponse{}
|
resp := &ChangeProductIDsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1523,7 +1523,7 @@ func (c Products) ArchiveProduct(params *ArchiveProductParams) (*ArchiveProductR
|
|||||||
|
|
||||||
resp := &ArchiveProductResponse{}
|
resp := &ArchiveProductResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1538,7 +1538,7 @@ func (c Products) UnarchiveProduct(params *ArchiveProductParams) (*ArchiveProduc
|
|||||||
|
|
||||||
resp := &ArchiveProductResponse{}
|
resp := &ArchiveProductResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1581,7 +1581,7 @@ func (c Products) RemoveProductWithoutSKU(params *RemoveProductWithoutSKUParams)
|
|||||||
|
|
||||||
resp := &RemoveProductWithoutSKUResponse{}
|
resp := &RemoveProductWithoutSKUResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1640,7 +1640,7 @@ func (c Products) ListGeoRestrictions(params *ListGeoRestrictionsParams) (*ListG
|
|||||||
|
|
||||||
resp := &ListGeoRestrictionsResponse{}
|
resp := &ListGeoRestrictionsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1673,7 +1673,7 @@ func (c Products) UploadActivationCodes(params *UploadActivationCodesParams) (*U
|
|||||||
|
|
||||||
resp := &UploadActivationCodesResponse{}
|
resp := &UploadActivationCodesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1706,7 +1706,7 @@ func (c Products) StatusOfUploadingActivationCodes(params *StatusOfUploadingActi
|
|||||||
|
|
||||||
resp := &StatusOfUploadingActivationCodesResponse{}
|
resp := &StatusOfUploadingActivationCodesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1892,7 +1892,7 @@ func (c Products) GetProductPriceInfo(params *GetProductPriceInfoParams) (*GetPr
|
|||||||
|
|
||||||
resp := &GetProductPriceInfoResponse{}
|
resp := &GetProductPriceInfoResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1966,7 +1966,7 @@ func (c Products) GetMarkdownInfo(params *GetMarkdownInfoParams) (*GetMarkdownIn
|
|||||||
|
|
||||||
resp := &GetMarkdownInfoResponse{}
|
resp := &GetMarkdownInfoResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1996,7 +1996,7 @@ func (c Products) SetDiscountOnMarkdownProduct(params *SetDiscountOnMarkdownProd
|
|||||||
|
|
||||||
resp := &SetDiscountOnMarkdownProductResponse{}
|
resp := &SetDiscountOnMarkdownProductResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ func (c Promotions) GetAvailablePromotions() (*GetAvailablePromotionsResponse, e
|
|||||||
|
|
||||||
resp := &GetAvailablePromotionsResponse{}
|
resp := &GetAvailablePromotionsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodGet, url, nil, resp)
|
response, err := c.client.Request(http.MethodGet, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ func (c Promotions) AddToPromotion(params *AddProductToPromotionParams) (*AddPro
|
|||||||
|
|
||||||
resp := &AddProductToPromotionResponse{}
|
resp := &AddProductToPromotionResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodGet, url, params, resp)
|
response, err := c.client.Request(http.MethodGet, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,7 @@ func (c Promotions) ProductsAvailableForPromotion(params *ProductsAvailableForPr
|
|||||||
|
|
||||||
resp := &ProductsAvailableForPromotionResponse{}
|
resp := &ProductsAvailableForPromotionResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -231,7 +231,7 @@ func (c Promotions) ProductsInPromotion(params *ProductsInPromotionParams) (*Pro
|
|||||||
|
|
||||||
resp := &ProductsInPromotionResponse{}
|
resp := &ProductsInPromotionResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -273,7 +273,7 @@ func (c Promotions) RemoveProduct(params *RemoveProductFromPromotionParams) (*Re
|
|||||||
|
|
||||||
resp := &RemoveProductFromPromotionResponse{}
|
resp := &RemoveProductFromPromotionResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -321,7 +321,7 @@ func (c Promotions) ListHotSalePromotions() (*ListHotSalePromotionsResponse, err
|
|||||||
|
|
||||||
resp := &ListHotSalePromotionsResponse{}
|
resp := &ListHotSalePromotionsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, nil, resp)
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -381,7 +381,7 @@ func (c Promotions) ProductsAvailableForHotSalePromotion(params *ProductsAvailab
|
|||||||
|
|
||||||
resp := &ProductsAvailableForHotSalePromotionResponse{}
|
resp := &ProductsAvailableForHotSalePromotionResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -430,7 +430,7 @@ func (c Promotions) AddProductsToHotSale(params *AddProductsToHotSaleParams) (*P
|
|||||||
|
|
||||||
resp := &ProductsToHotSaleResponse{}
|
resp := &ProductsToHotSaleResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -453,7 +453,7 @@ func (c Promotions) RemoveProductsToHotSale(params *RemoveProductsToHotSaleParam
|
|||||||
|
|
||||||
resp := &ProductsToHotSaleResponse{}
|
resp := &ProductsToHotSaleResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -591,7 +591,7 @@ func (c Promotions) ListDiscountRequests(params *ListDiscountRequestsParams) (*L
|
|||||||
|
|
||||||
resp := &ListDiscountRequestsResponse{}
|
resp := &ListDiscountRequestsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -652,7 +652,7 @@ func (c Promotions) ApproveDiscountRequest(params *DiscountRequestParams) (*Disc
|
|||||||
|
|
||||||
resp := &DiscountRequestResponse{}
|
resp := &DiscountRequestResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -669,7 +669,7 @@ func (c Promotions) DeclineDiscountRequest(params *DiscountRequestParams) (*Disc
|
|||||||
|
|
||||||
resp := &DiscountRequestResponse{}
|
resp := &DiscountRequestResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ func (c Rating) GetCurrentSellerRatingInfo() (*GetCurrentSellerRatingInfoRespons
|
|||||||
|
|
||||||
resp := &GetCurrentSellerRatingInfoResponse{}
|
resp := &GetCurrentSellerRatingInfoResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, nil, resp)
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -178,7 +178,7 @@ func (c Rating) GetSellerRatingInfoForPeriod(params *GetSellerRatingInfoForPerio
|
|||||||
|
|
||||||
resp := &GetSellerRatingInfoPeriodResponse{}
|
resp := &GetSellerRatingInfoPeriodResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ func (c Reports) GetList(params *GetReportsListParams) (*GetReportsListResponse,
|
|||||||
|
|
||||||
resp := &GetReportsListResponse{}
|
resp := &GetReportsListResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ func (c Reports) GetReportDetails(params *GetReportDetailsParams) (*GetReportDet
|
|||||||
|
|
||||||
resp := &GetReportDetailsResponse{}
|
resp := &GetReportDetailsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -220,7 +220,7 @@ func (c Reports) GetFinancial(params *GetFinancialReportParams) (*GetFinancialRe
|
|||||||
|
|
||||||
resp := &GetFinancialReportResponse{}
|
resp := &GetFinancialReportResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -266,7 +266,7 @@ func (c Reports) GetProducts(params *GetProductsReportParams) (*GetProductsRepor
|
|||||||
|
|
||||||
resp := &GetProductsReportResponse{}
|
resp := &GetProductsReportResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -299,7 +299,7 @@ func (c Reports) GetStocks(params *GetStocksReportParams) (*GetStocksReportRespo
|
|||||||
|
|
||||||
resp := &GetStocksReportResponse{}
|
resp := &GetStocksReportResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -342,7 +342,7 @@ func (c Reports) GetProductsMovement(params *GetProductsMovementReportParams) (*
|
|||||||
|
|
||||||
resp := &GetProductsMovementReportResponse{}
|
resp := &GetProductsMovementReportResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -391,7 +391,7 @@ func (c Reports) GetReturns(params *GetReturnsReportParams) (*GetReturnsReportRe
|
|||||||
|
|
||||||
resp := &GetReturnsReportResponse{}
|
resp := &GetReturnsReportResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -464,7 +464,7 @@ func (c Reports) GetShipment(params *GetShipmentReportParams) (*GetShipmentRepor
|
|||||||
|
|
||||||
resp := &GetShipmentReportResponse{}
|
resp := &GetShipmentReportResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -489,7 +489,7 @@ func (c Reports) IssueOnDiscountedProducts() (*IssueOnDiscountedProductsResponse
|
|||||||
|
|
||||||
resp := &IssueOnDiscountedProductsResponse{}
|
resp := &IssueOnDiscountedProductsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, nil, resp)
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -532,7 +532,7 @@ func (c Reports) ReportOnDiscountedProducts(params *ReportOnDiscountedProductsPa
|
|||||||
|
|
||||||
resp := &ReportOnDiscountedProductsResponse{}
|
resp := &ReportOnDiscountedProductsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, nil, resp)
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -547,7 +547,7 @@ func (c Reports) ListReportsOnDiscountedProducts() (*ReportOnDiscountedProductsR
|
|||||||
|
|
||||||
resp := &ReportOnDiscountedProductsResponse{}
|
resp := &ReportOnDiscountedProductsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, nil, resp)
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ func (c Returns) GetFBOReturns(params *GetFBOReturnsParams) (*GetFBOReturnsRespo
|
|||||||
|
|
||||||
resp := &GetFBOReturnsResponse{}
|
resp := &GetFBOReturnsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -240,7 +240,7 @@ func (c Returns) GetFBSReturns(params *GetFBSReturnsParams) (*GetFBSReturnsRespo
|
|||||||
|
|
||||||
resp := &GetFBSReturnsResponse{}
|
resp := &GetFBSReturnsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, params, resp)
|
response, err := c.client.Request(http.MethodPost, url, params, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ func (c Warehouses) GetListOfWarehouses() (*GetListOfWarehousesResponse, error)
|
|||||||
|
|
||||||
resp := &GetListOfWarehousesResponse{}
|
resp := &GetListOfWarehousesResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, nil, resp)
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -174,7 +174,7 @@ func (c Warehouses) GetListOfDeliveryMethods(params *GetListOfDeliveryMethodsPar
|
|||||||
|
|
||||||
resp := &GetListOfDeliveryMethodsResponse{}
|
resp := &GetListOfDeliveryMethodsResponse{}
|
||||||
|
|
||||||
response, err := c.client.Request(http.MethodPost, url, nil, resp)
|
response, err := c.client.Request(http.MethodPost, url, nil, resp, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user