From 583362bfe3e1366823b1a92b7508c5e28d9cca63 Mon Sep 17 00:00:00 2001 From: Danila Date: Wed, 6 Sep 2023 07:40:46 +0300 Subject: [PATCH] Adding functionality from recent updates to the library --- client.go | 1 - response.go | 12 ++++++------ types.go | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/client.go b/client.go index abb0b3b..6c0cdc8 100644 --- a/client.go +++ b/client.go @@ -2305,7 +2305,6 @@ func (c *Client) Currencies() (CurrencyResponse, int, error) { data, status, err := c.GetRequest("/reference/currencies") if err != nil { - return resp, status, err } diff --git a/response.go b/response.go index 78e3e65..748f4da 100644 --- a/response.go +++ b/response.go @@ -604,21 +604,21 @@ type ClientIDResponse struct { Success bool `json:"success"` } -// SourcesResponse type +// SourcesResponse type. type SourcesResponse struct { - Success bool `json:"success"` - FailedSources []Source `json:"failedSources,omitempty"` ErrorMsg string `json:"errorMsg,omitempty"` Errors map[string]string `json:"errors,omitempty"` + FailedSources []Source `json:"failed_sources,omitempty"` + Success bool `json:"success"` } -//CurrencyResponse type +// CurrencyResponse type. type CurrencyResponse struct { - Success bool `json:"success"` Currencies []Currency `json:"currencies,omitempty"` + Success bool `json:"success"` } -//CurrencyCreateResponse type +// CurrencyCreateResponse type. type CurrencyCreateResponse struct { Success bool `json:"success"` ID int `json:"id,omitempty"` diff --git a/types.go b/types.go index e0ae080..6e72ebf 100644 --- a/types.go +++ b/types.go @@ -70,9 +70,9 @@ type Source struct { Keyword string `json:"keyword,omitempty"` Content string `json:"content,omitempty"` ClientID string `json:"client_id,omitempty"` + Site string `json:"site,omitempty"` Order LinkedOrder `json:"order,omitempty"` Customer SerializedEntityCustomer `json:"customer,omitempty"` - Site string `json:"site,omitempty"` } // Contragent type.