fix linter errors

This commit is contained in:
Ruslan Efanov 2022-12-09 11:40:52 +03:00
parent 22cbdd7fcf
commit 141c247482
3 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ import (
) )
// HTTPStatusUnknown can return for the method `/api/v5/customers/upload`, `/api/v5/customers-corporate/upload`, // 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 const HTTPStatusUnknown = 460
// New initialize client. // New initialize client.

View File

@ -578,7 +578,7 @@ func TestClient_CustomersUpload_Fail(t *testing.T) {
assert.Equal(t, HTTPStatusUnknown, status) assert.Equal(t, HTTPStatusUnknown, status)
assert.Equal(t, fmt.Sprintf("%d", iCodeFail), data.FailedCustomers[0].ExternalID) assert.Equal(t, fmt.Sprintf("%d", iCodeFail), data.FailedCustomers[0].ExternalID)
assert.Equal(t, "Customers are loaded with errors", err.Error()) 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) { 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, HTTPStatusUnknown, status)
assert.Equal(t, fmt.Sprintf("%d", iCodeFail), data.FailedCustomers[0].ExternalID) assert.Equal(t, fmt.Sprintf("%d", iCodeFail), data.FailedCustomers[0].ExternalID)
assert.Equal(t, "Customers are loaded with errors", err.Error()) 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) { 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, HTTPStatusUnknown, status)
assert.Equal(t, fmt.Sprintf("%d", iCodeFail), data.FailedOrders[0].ExternalID) assert.Equal(t, fmt.Sprintf("%d", iCodeFail), data.FailedOrders[0].ExternalID)
assert.Equal(t, "Orders are loaded with errors", err.Error()) 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) { func TestClient_OrdersCombine(t *testing.T) {

View File

@ -616,7 +616,7 @@ type LoyaltyBonusDetailsResponse struct {
SuccessfulResponse SuccessfulResponse
Pagination `json:"pagination"` Pagination `json:"pagination"`
Statistic LoyaltyBonusStatisticResponse `json:"statistic"` Statistic LoyaltyBonusStatisticResponse `json:"statistic"`
Bonuses []BonusDetail `json:"bonuses"` Bonuses []BonusDetail `json:"bonuses,omitempty"`
} }
type LoyaltyBonusStatisticResponse struct { type LoyaltyBonusStatisticResponse struct {