mirror of
https://github.com/retailcrm/api-client-go.git
synced 2024-11-23 21:36:05 +03:00
fix linter errors
This commit is contained in:
parent
22cbdd7fcf
commit
141c247482
@ -18,7 +18,7 @@ import (
|
||||
)
|
||||
|
||||
// HTTPStatusUnknown can return for the method `/api/v5/customers/upload`, `/api/v5/customers-corporate/upload`,
|
||||
// `/api/v5/orders/upload`
|
||||
// `/api/v5/orders/upload`.
|
||||
const HTTPStatusUnknown = 460
|
||||
|
||||
// New initialize client.
|
||||
|
@ -578,7 +578,7 @@ func TestClient_CustomersUpload_Fail(t *testing.T) {
|
||||
assert.Equal(t, HTTPStatusUnknown, status)
|
||||
assert.Equal(t, fmt.Sprintf("%d", iCodeFail), data.FailedCustomers[0].ExternalID)
|
||||
assert.Equal(t, "Customers are loaded with errors", err.Error())
|
||||
assert.Equal(t, "Something went wrong", err.(APIError).Errors()["managerId"])
|
||||
assert.Equal(t, "Something went wrong", err.(APIError).Errors()["managerId"]) //nolint:errorlint
|
||||
}
|
||||
|
||||
func TestClient_CustomersCombine(t *testing.T) {
|
||||
@ -1230,7 +1230,7 @@ func TestClient_CorporateCustomersUpload_Fail(t *testing.T) {
|
||||
assert.Equal(t, HTTPStatusUnknown, status)
|
||||
assert.Equal(t, fmt.Sprintf("%d", iCodeFail), data.FailedCustomers[0].ExternalID)
|
||||
assert.Equal(t, "Customers are loaded with errors", err.Error())
|
||||
assert.Equal(t, "Something went wrong", err.(APIError).Errors()["managerId"])
|
||||
assert.Equal(t, "Something went wrong", err.(APIError).Errors()["managerId"]) //nolint:errorlint
|
||||
}
|
||||
|
||||
func TestClient_CorporateCustomer(t *testing.T) {
|
||||
@ -2286,7 +2286,7 @@ func TestClient_OrdersUpload_Fail(t *testing.T) {
|
||||
assert.Equal(t, HTTPStatusUnknown, status)
|
||||
assert.Equal(t, fmt.Sprintf("%d", iCodeFail), data.FailedOrders[0].ExternalID)
|
||||
assert.Equal(t, "Orders are loaded with errors", err.Error())
|
||||
assert.Equal(t, "items[0].offer.id: Offer with id 123123 not found.", err.(APIError).Errors()["0"])
|
||||
assert.Equal(t, "items[0].offer.id: Offer with id 123123 not found.", err.(APIError).Errors()["0"]) //nolint:errorlint
|
||||
}
|
||||
|
||||
func TestClient_OrdersCombine(t *testing.T) {
|
||||
|
@ -616,7 +616,7 @@ type LoyaltyBonusDetailsResponse struct {
|
||||
SuccessfulResponse
|
||||
Pagination `json:"pagination"`
|
||||
Statistic LoyaltyBonusStatisticResponse `json:"statistic"`
|
||||
Bonuses []BonusDetail `json:"bonuses"`
|
||||
Bonuses []BonusDetail `json:"bonuses,omitempty"`
|
||||
}
|
||||
|
||||
type LoyaltyBonusStatisticResponse struct {
|
||||
|
Loading…
Reference in New Issue
Block a user