fixed linters error

This commit is contained in:
Ruslan Efanov 2021-04-16 15:32:36 +03:00
parent 8d23bb3e90
commit 6716538e0a
4 changed files with 119 additions and 117 deletions

1
go.mod
View file

@ -5,5 +5,6 @@ go 1.13
require (
github.com/google/go-querystring v1.1.0
github.com/joho/godotenv v1.3.0
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
gopkg.in/h2non/gock.v1 v1.0.16
)

View file

@ -1,8 +1,9 @@
package v5
import (
"errors"
"testing"
"golang.org/x/xerrors"
)
func TestFailure_ApiErrorsSlice(t *testing.T) {
@ -14,7 +15,7 @@ func TestFailure_ApiErrorsSlice(t *testing.T) {
var expEr *APIError
e := NewAPIError(b)
if errors.As(e, &expEr) {
if xerrors.As(e, &expEr) {
if eq := expEr.Errors["0"] == expected["0"]; eq != true {
t.Errorf("%+v", eq)
}
@ -32,7 +33,7 @@ func TestFailure_ApiErrorsMap(t *testing.T) {
var expEr *APIError
e := NewAPIError(b)
if errors.As(e, &expEr) {
if xerrors.As(e, &expEr) {
if eq := expected["id"] == expEr.Errors["id"]; eq != true {
t.Errorf("%+v", eq)
}

View file

@ -20,54 +20,54 @@ type OrderCreateResponse struct {
// OperationResponse type.
type OperationResponse struct {
Success bool `json:"success"`
Errors map[string]string `json:"errors,omitempty,brackets"`
Errors map[string]string `json:"errors,omitempty"`
}
// VersionResponse return available API versions.
type VersionResponse struct {
Success bool `json:"success,omitempty"`
Versions []string `json:"versions,brackets,omitempty"`
Versions []string `json:"versions,omitempty"`
}
// CredentialResponse return available API methods.
type CredentialResponse struct {
Success bool `json:"success,omitempty"`
Credentials []string `json:"credentials,brackets,omitempty"`
Credentials []string `json:"credentials,omitempty"`
SiteAccess string `json:"siteAccess,omitempty"`
SitesAvailable []string `json:"sitesAvailable,brackets,omitempty"`
SitesAvailable []string `json:"sitesAvailable,omitempty"`
}
// CustomerResponse type.
type CustomerResponse struct {
Success bool `json:"success"`
Customer *Customer `json:"customer,omitempty,brackets"`
Customer *Customer `json:"customer,omitempty"`
}
// CorporateCustomerResponse type.
type CorporateCustomerResponse struct {
Success bool `json:"success"`
CorporateCustomer *CorporateCustomer `json:"customerCorporate,omitempty,brackets"`
CorporateCustomer *CorporateCustomer `json:"customerCorporate,omitempty"`
}
// CustomersResponse type.
type CustomersResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Customers []Customer `json:"customers,omitempty,brackets"`
Customers []Customer `json:"customers,omitempty"`
}
// CorporateCustomersResponse type.
type CorporateCustomersResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
CustomersCorporate []CorporateCustomer `json:"customersCorporate,omitempty,brackets"`
CustomersCorporate []CorporateCustomer `json:"customersCorporate,omitempty"`
}
// CorporateCustomersNotesResponse type.
type CorporateCustomersNotesResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Notes []Note `json:"notes,omitempty,brackets"`
Notes []Note `json:"notes,omitempty"`
}
// CorporateCustomersAddressesResponse type.
@ -101,7 +101,7 @@ type CorporateCustomerChangeResponse CustomerChangeResponse
// CustomersUploadResponse type.
type CustomersUploadResponse struct {
Success bool `json:"success"`
UploadedCustomers []IdentifiersPair `json:"uploadedCustomers,omitempty,brackets"`
UploadedCustomers []IdentifiersPair `json:"uploadedCustomers,omitempty"`
}
// CorporateCustomersUploadResponse type.
@ -111,7 +111,7 @@ type CorporateCustomersUploadResponse CustomersUploadResponse
type CustomersHistoryResponse struct {
Success bool `json:"success,omitempty"`
GeneratedAt string `json:"generatedAt,omitempty"`
History []CustomerHistoryRecord `json:"history,omitempty,brackets"`
History []CustomerHistoryRecord `json:"history,omitempty"`
Pagination *Pagination `json:"pagination,omitempty"`
}
@ -119,21 +119,21 @@ type CustomersHistoryResponse struct {
type CorporateCustomersHistoryResponse struct {
Success bool `json:"success,omitempty"`
GeneratedAt string `json:"generatedAt,omitempty"`
History []CorporateCustomerHistoryRecord `json:"history,omitempty,brackets"`
History []CorporateCustomerHistoryRecord `json:"history,omitempty"`
Pagination *Pagination `json:"pagination,omitempty"`
}
// OrderResponse type.
type OrderResponse struct {
Success bool `json:"success"`
Order *Order `json:"order,omitempty,brackets"`
Order *Order `json:"order,omitempty"`
}
// OrdersResponse type.
type OrdersResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Orders []Order `json:"orders,omitempty,brackets"`
Orders []Order `json:"orders,omitempty"`
}
// OrdersStatusesResponse type.
@ -145,191 +145,191 @@ type OrdersStatusesResponse struct {
// OrdersUploadResponse type.
type OrdersUploadResponse struct {
Success bool `json:"success"`
UploadedOrders []IdentifiersPair `json:"uploadedOrders,omitempty,brackets"`
UploadedOrders []IdentifiersPair `json:"uploadedOrders,omitempty"`
}
// OrdersHistoryResponse type.
type OrdersHistoryResponse struct {
Success bool `json:"success,omitempty"`
GeneratedAt string `json:"generatedAt,omitempty"`
History []OrdersHistoryRecord `json:"history,omitempty,brackets"`
History []OrdersHistoryRecord `json:"history,omitempty"`
Pagination *Pagination `json:"pagination,omitempty"`
}
// PackResponse type.
type PackResponse struct {
Success bool `json:"success"`
Pack *Pack `json:"pack,omitempty,brackets"`
Pack *Pack `json:"pack,omitempty"`
}
// PacksResponse type.
type PacksResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Packs []Pack `json:"packs,omitempty,brackets"`
Packs []Pack `json:"packs,omitempty"`
}
// PacksHistoryResponse type.
type PacksHistoryResponse struct {
Success bool `json:"success,omitempty"`
GeneratedAt string `json:"generatedAt,omitempty"`
History []PacksHistoryRecord `json:"history,omitempty,brackets"`
History []PacksHistoryRecord `json:"history,omitempty"`
Pagination *Pagination `json:"pagination,omitempty"`
}
// UserResponse type.
type UserResponse struct {
Success bool `json:"success"`
User *User `json:"user,omitempty,brackets"`
User *User `json:"user,omitempty"`
}
// UsersResponse type.
type UsersResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Users []User `json:"users,omitempty,brackets"`
Users []User `json:"users,omitempty"`
}
// UserGroupsResponse type.
type UserGroupsResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Groups []UserGroup `json:"groups,omitempty,brackets"`
Groups []UserGroup `json:"groups,omitempty"`
}
// TaskResponse type.
type TaskResponse struct {
Success bool `json:"success"`
Task *Task `json:"task,omitempty,brackets"`
Task *Task `json:"task,omitempty"`
}
// TasksResponse type.
type TasksResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Tasks []Task `json:"tasks,omitempty,brackets"`
Tasks []Task `json:"tasks,omitempty"`
}
// NotesResponse type.
type NotesResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Notes []Note `json:"notes,omitempty,brackets"`
Notes []Note `json:"notes,omitempty"`
}
// SegmentsResponse type.
type SegmentsResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Segments []Segment `json:"segments,omitempty,brackets"`
Segments []Segment `json:"segments,omitempty"`
}
// SettingsResponse type.
type SettingsResponse struct {
Success bool `json:"success"`
Settings Settings `json:"settings,omitempty,brackets"`
Settings Settings `json:"settings,omitempty"`
}
// CountriesResponse type.
type CountriesResponse struct {
Success bool `json:"success"`
CountriesIso []string `json:"countriesIso,omitempty,brackets"`
CountriesIso []string `json:"countriesIso,omitempty"`
}
// CostGroupsResponse type.
type CostGroupsResponse struct {
Success bool `json:"success"`
CostGroups []CostGroup `json:"costGroups,omitempty,brackets"`
CostGroups []CostGroup `json:"costGroups,omitempty"`
}
// CostItemsResponse type.
type CostItemsResponse struct {
Success bool `json:"success"`
CostItems []CostItem `json:"costItems,omitempty,brackets"`
CostItems []CostItem `json:"costItems,omitempty"`
}
// CouriersResponse type.
type CouriersResponse struct {
Success bool `json:"success"`
Couriers []Courier `json:"couriers,omitempty,brackets"`
Couriers []Courier `json:"couriers,omitempty"`
}
// DeliveryServiceResponse type.
type DeliveryServiceResponse struct {
Success bool `json:"success"`
DeliveryServices map[string]DeliveryService `json:"deliveryServices,omitempty,brackets"`
DeliveryServices map[string]DeliveryService `json:"deliveryServices,omitempty"`
}
// DeliveryTypesResponse type.
type DeliveryTypesResponse struct {
Success bool `json:"success"`
DeliveryTypes map[string]DeliveryType `json:"deliveryTypes,omitempty,brackets"`
DeliveryTypes map[string]DeliveryType `json:"deliveryTypes,omitempty"`
}
// LegalEntitiesResponse type.
type LegalEntitiesResponse struct {
Success bool `json:"success"`
LegalEntities []LegalEntity `json:"legalEntities,omitempty,brackets"`
LegalEntities []LegalEntity `json:"legalEntities,omitempty"`
}
// OrderMethodsResponse type.
type OrderMethodsResponse struct {
Success bool `json:"success"`
OrderMethods map[string]OrderMethod `json:"orderMethods,omitempty,brackets"`
OrderMethods map[string]OrderMethod `json:"orderMethods,omitempty"`
}
// OrderTypesResponse type.
type OrderTypesResponse struct {
Success bool `json:"success"`
OrderTypes map[string]OrderType `json:"orderTypes,omitempty,brackets"`
OrderTypes map[string]OrderType `json:"orderTypes,omitempty"`
}
// PaymentStatusesResponse type.
type PaymentStatusesResponse struct {
Success bool `json:"success"`
PaymentStatuses map[string]PaymentStatus `json:"paymentStatuses,omitempty,brackets"`
PaymentStatuses map[string]PaymentStatus `json:"paymentStatuses,omitempty"`
}
// PaymentTypesResponse type.
type PaymentTypesResponse struct {
Success bool `json:"success"`
PaymentTypes map[string]PaymentType `json:"paymentTypes,omitempty,brackets"`
PaymentTypes map[string]PaymentType `json:"paymentTypes,omitempty"`
}
// PriceTypesResponse type.
type PriceTypesResponse struct {
Success bool `json:"success"`
PriceTypes []PriceType `json:"priceTypes,omitempty,brackets"`
PriceTypes []PriceType `json:"priceTypes,omitempty"`
}
// ProductStatusesResponse type.
type ProductStatusesResponse struct {
Success bool `json:"success"`
ProductStatuses map[string]ProductStatus `json:"productStatuses,omitempty,brackets"`
ProductStatuses map[string]ProductStatus `json:"productStatuses,omitempty"`
}
// StatusesResponse type.
type StatusesResponse struct {
Success bool `json:"success"`
Statuses map[string]Status `json:"statuses,omitempty,brackets"`
Statuses map[string]Status `json:"statuses,omitempty"`
}
// StatusGroupsResponse type.
type StatusGroupsResponse struct {
Success bool `json:"success"`
StatusGroups map[string]StatusGroup `json:"statusGroups,omitempty,brackets"`
StatusGroups map[string]StatusGroup `json:"statusGroups,omitempty"`
}
// SitesResponse type.
type SitesResponse struct {
Success bool `json:"success"`
Sites map[string]Site `json:"sites,omitempty,brackets"`
Sites map[string]Site `json:"sites,omitempty"`
}
// StoresResponse type.
type StoresResponse struct {
Success bool `json:"success"`
Stores []Store `json:"stores,omitempty,brackets"`
Stores []Store `json:"stores,omitempty"`
}
// InventoriesResponse type.
@ -350,34 +350,34 @@ type StoreUploadResponse struct {
type ProductsGroupsResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
ProductGroup []ProductGroup `json:"productGroup,omitempty,brackets"`
ProductGroup []ProductGroup `json:"productGroup,omitempty"`
}
// ProductsResponse type.
type ProductsResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Products []Product `json:"products,omitempty,brackets"`
Products []Product `json:"products,omitempty"`
}
// ProductsPropertiesResponse type.
type ProductsPropertiesResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Properties []Property `json:"properties,omitempty,brackets"`
Properties []Property `json:"properties,omitempty"`
}
// DeliveryShipmentsResponse type.
type DeliveryShipmentsResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
DeliveryShipments []DeliveryShipment `json:"deliveryShipments,omitempty,brackets"`
DeliveryShipments []DeliveryShipment `json:"deliveryShipments,omitempty"`
}
// DeliveryShipmentResponse type.
type DeliveryShipmentResponse struct {
Success bool `json:"success"`
DeliveryShipment *DeliveryShipment `json:"deliveryShipment,omitempty,brackets"`
DeliveryShipment *DeliveryShipment `json:"deliveryShipment,omitempty"`
}
// DeliveryShipmentUpdateResponse type.
@ -396,13 +396,13 @@ type IntegrationModuleResponse struct {
// IntegrationModuleEditResponse type.
type IntegrationModuleEditResponse struct {
Success bool `json:"success"`
Info ResponseInfo `json:"info,omitempty,brackets"`
Info ResponseInfo `json:"info,omitempty"`
}
// ResponseInfo type.
type ResponseInfo struct {
MgTransportInfo MgInfo `json:"mgTransport,omitempty,brackets"`
MgBotInfo MgInfo `json:"mgBot,omitempty,brackets"`
MgTransportInfo MgInfo `json:"mgTransport,omitempty"`
MgBotInfo MgInfo `json:"mgBot,omitempty"`
}
// MgInfo type.
@ -415,26 +415,26 @@ type MgInfo struct {
type CostsResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
Costs []Cost `json:"costs,omitempty,brackets"`
Costs []Cost `json:"costs,omitempty"`
}
// CostsUploadResponse type.
type CostsUploadResponse struct {
Success bool `json:"success"`
UploadedCosts []int `json:"uploadedCosts,omitempty,brackets"`
UploadedCosts []int `json:"uploadedCosts,omitempty"`
}
// CostsDeleteResponse type.
type CostsDeleteResponse struct {
Success bool `json:"success"`
Count int `json:"count,omitempty,brackets"`
NotRemovedIds []int `json:"notRemovedIds,omitempty,brackets"`
Count int `json:"count,omitempty"`
NotRemovedIds []int `json:"notRemovedIds,omitempty"`
}
// CostResponse type.
type CostResponse struct {
Success bool `json:"success"`
Cost *Cost `json:"cost,omitempty,brackets"`
Cost *Cost `json:"cost,omitempty"`
}
// FilesResponse type.
@ -460,14 +460,14 @@ type FileResponse struct {
type CustomFieldsResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
CustomFields []CustomFields `json:"customFields,omitempty,brackets"`
CustomFields []CustomFields `json:"customFields,omitempty"`
}
// CustomDictionariesResponse type.
type CustomDictionariesResponse struct {
Success bool `json:"success"`
Pagination *Pagination `json:"pagination,omitempty"`
CustomDictionaries *[]CustomDictionary `json:"customDictionaries,omitempty,brackets"`
CustomDictionaries *[]CustomDictionary `json:"customDictionaries,omitempty"`
}
// CustomResponse type.
@ -479,17 +479,17 @@ type CustomResponse struct {
// CustomDictionaryResponse type.
type CustomDictionaryResponse struct {
Success bool `json:"success"`
CustomDictionary *CustomDictionary `json:"CustomDictionary,omitempty,brackets"`
CustomDictionary *CustomDictionary `json:"CustomDictionary,omitempty"`
}
// CustomFieldResponse type.
type CustomFieldResponse struct {
Success bool `json:"success"`
CustomField CustomFields `json:"customField,omitempty,brackets"`
CustomField CustomFields `json:"customField,omitempty"`
}
// UnitsResponse type.
type UnitsResponse struct {
Success bool `json:"success"`
Units *[]Unit `json:"units,omitempty,brackets"`
Units *[]Unit `json:"units,omitempty"`
}

View file

@ -98,7 +98,7 @@ type Property struct {
Code string `json:"code,omitempty"`
Name string `json:"name,omitempty"`
Value string `json:"value,omitempty"`
Sites []string `json:"Sites,omitempty,brackets"`
Sites []string `json:"Sites,omitempty"`
}
// IdentifiersPair type.
@ -127,7 +127,7 @@ type Customer struct {
Patronymic string `json:"patronymic,omitempty"`
Sex string `json:"sex,omitempty"`
Email string `json:"email,omitempty"`
Phones []Phone `json:"phones,brackets,omitempty"`
Phones []Phone `json:"phones,omitempty"`
Address *Address `json:"address,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
Birthday string `json:"birthday,omitempty"`
@ -153,8 +153,8 @@ type Customer struct {
BrowserID string `json:"browserId,omitempty"`
MgCustomerID string `json:"mgCustomerId,omitempty"`
PhotoURL string `json:"photoUrl,omitempty"`
CustomFields map[string]string `json:"customFields,omitempty,brackets"`
Tags []Tag `json:"tags,brackets,omitempty"`
CustomFields map[string]string `json:"customFields,omitempty"`
Tags []Tag `json:"tags,omitempty"`
}
// CorporateCustomer type.
@ -165,7 +165,7 @@ type CorporateCustomer struct {
CreatedAt string `json:"createdAt,omitempty"`
Vip bool `json:"vip,omitempty"`
Bad bool `json:"bad,omitempty"`
CustomFields map[string]string `json:"customFields,omitempty,brackets"`
CustomFields map[string]string `json:"customFields,omitempty"`
PersonalDiscount float32 `json:"personalDiscount,omitempty"`
DiscountCardNumber string `json:"discountCardNumber,omitempty"`
ManagerID int `json:"managerId,omitempty"`
@ -226,7 +226,7 @@ type Company struct {
CreatedAt string `json:"createdAt,omitempty"`
Contragent *Contragent `json:"contragent,omitempty"`
Address *IdentifiersPair `json:"address,omitempty"`
CustomFields map[string]string `json:"customFields,omitempty,brackets"`
CustomFields map[string]string `json:"customFields,omitempty"`
}
// CorporateCustomerNote type.
@ -249,9 +249,9 @@ type CustomerHistoryRecord struct {
Deleted bool `json:"deleted,omitempty"`
Source string `json:"source,omitempty"`
Field string `json:"field,omitempty"`
User *User `json:"user,omitempty,brackets"`
APIKey *APIKey `json:"apiKey,omitempty,brackets"`
Customer *Customer `json:"customer,omitempty,brackets"`
User *User `json:"user,omitempty"`
APIKey *APIKey `json:"apiKey,omitempty"`
Customer *Customer `json:"customer,omitempty"`
}
// CorporateCustomerHistoryRecord type.
@ -262,9 +262,9 @@ type CorporateCustomerHistoryRecord struct {
Deleted bool `json:"deleted,omitempty"`
Source string `json:"source,omitempty"`
Field string `json:"field,omitempty"`
User *User `json:"user,omitempty,brackets"`
APIKey *APIKey `json:"apiKey,omitempty,brackets"`
CorporateCustomer *CorporateCustomer `json:"corporateCustomer,omitempty,brackets"`
User *User `json:"user,omitempty"`
APIKey *APIKey `json:"apiKey,omitempty"`
CorporateCustomer *CorporateCustomer `json:"corporateCustomer,omitempty"`
}
/**
@ -319,9 +319,9 @@ type Order struct {
Customer *Customer `json:"customer,omitempty"`
Delivery *OrderDelivery `json:"delivery,omitempty"`
Marketplace *OrderMarketplace `json:"marketplace,omitempty"`
Items []OrderItem `json:"items,omitempty,brackets"`
CustomFields map[string]string `json:"customFields,omitempty,brackets"`
Payments map[string]OrderPayment `json:"payments,omitempty,brackets"`
Items []OrderItem `json:"items,omitempty"`
CustomFields map[string]string `json:"customFields,omitempty"`
Payments map[string]OrderPayment `json:"payments,omitempty"`
}
// OrdersStatus type.
@ -442,7 +442,7 @@ type OrderItem struct {
Comment string `json:"comment,omitempty"`
IsCanceled bool `json:"isCanceled,omitempty"`
Offer Offer `json:"offer,omitempty"`
Properties map[string]Property `json:"properties,omitempty,brackets"`
Properties map[string]Property `json:"properties,omitempty"`
PriceType *PriceType `json:"priceType,omitempty"`
}
@ -454,9 +454,9 @@ type OrdersHistoryRecord struct {
Deleted bool `json:"deleted,omitempty"`
Source string `json:"source,omitempty"`
Field string `json:"field,omitempty"`
User *User `json:"user,omitempty,brackets"`
APIKey *APIKey `json:"apiKey,omitempty,brackets"`
Order *Order `json:"order,omitempty,brackets"`
User *User `json:"user,omitempty"`
APIKey *APIKey `json:"apiKey,omitempty"`
Order *Order `json:"order,omitempty"`
}
// Pack type.
@ -488,8 +488,8 @@ type PacksHistoryRecord struct {
Deleted bool `json:"deleted,omitempty"`
Source string `json:"source,omitempty"`
Field string `json:"field,omitempty"`
User *User `json:"user,omitempty,brackets"`
Pack *Pack `json:"pack,omitempty,brackets"`
User *User `json:"user,omitempty"`
Pack *Pack `json:"pack,omitempty"`
}
// Offer type.
@ -507,11 +507,11 @@ type Offer struct {
Width float32 `json:"width,omitempty"`
Length float32 `json:"length,omitempty"`
Weight float32 `json:"weight,omitempty"`
Stores []Inventory `json:"stores,omitempty,brackets"`
Properties map[string]string `json:"properties,omitempty,brackets"`
Prices []OfferPrice `json:"prices,omitempty,brackets"`
Images []string `json:"images,omitempty,brackets"`
Unit *Unit `json:"unit,omitempty,brackets"`
Stores []Inventory `json:"stores,omitempty"`
Properties map[string]string `json:"properties,omitempty"`
Prices []OfferPrice `json:"prices,omitempty"`
Images []string `json:"images,omitempty"`
Unit *Unit `json:"unit,omitempty"`
}
// Inventory type.
@ -585,7 +585,7 @@ type User struct {
Email string `json:"email,omitempty"`
Phone string `json:"phone,omitempty"`
Status string `json:"status,omitempty"`
Groups []UserGroup `json:"groups,omitempty,brackets"`
Groups []UserGroup `json:"groups,omitempty"`
MgUserId uint64 `json:"mgUserId,omitempty"`
}
@ -596,12 +596,12 @@ type UserGroup struct {
SignatureTemplate string `json:"signatureTemplate,omitempty"`
IsManager bool `json:"isManager,omitempty"`
IsDeliveryMen bool `json:"isDeliveryMen,omitempty"`
DeliveryTypes []string `json:"deliveryTypes,omitempty,brackets"`
BreakdownOrderTypes []string `json:"breakdownOrderTypes,omitempty,brackets"`
BreakdownSites []string `json:"breakdownSites,omitempty,brackets"`
BreakdownOrderMethods []string `json:"breakdownOrderMethods,omitempty,brackets"`
GrantedOrderTypes []string `json:"grantedOrderTypes,omitempty,brackets"`
GrantedSites []string `json:"grantedSites,omitempty,brackets"`
DeliveryTypes []string `json:"deliveryTypes,omitempty"`
BreakdownOrderTypes []string `json:"breakdownOrderTypes,omitempty"`
BreakdownSites []string `json:"breakdownSites,omitempty"`
BreakdownOrderMethods []string `json:"breakdownOrderMethods,omitempty"`
GrantedOrderTypes []string `json:"grantedOrderTypes,omitempty"`
GrantedSites []string `json:"grantedSites,omitempty"`
}
/**
@ -796,7 +796,7 @@ type PaymentStatus struct {
PaymentComplete bool `json:"paymentComplete,omitempty"`
Description string `json:"description,omitempty"`
Ordering int `json:"ordering,omitempty"`
PaymentTypes []string `json:"paymentTypes,omitempty,brackets"`
PaymentTypes []string `json:"paymentTypes,omitempty"`
}
// PaymentType type.
@ -807,8 +807,8 @@ type PaymentType struct {
DefaultForCRM bool `json:"defaultForCrm,omitempty"`
DefaultForAPI bool `json:"defaultForApi,omitempty"`
Description string `json:"description,omitempty"`
DeliveryTypes []string `json:"deliveryTypes,omitempty,brackets"`
PaymentStatuses []string `json:"PaymentStatuses,omitempty,brackets"`
DeliveryTypes []string `json:"deliveryTypes,omitempty"`
PaymentStatuses []string `json:"PaymentStatuses,omitempty"`
}
// PriceType type.
@ -821,8 +821,8 @@ type PriceType struct {
Description string `json:"description,omitempty"`
FilterExpression string `json:"filterExpression,omitempty"`
Ordering int `json:"ordering,omitempty"`
Groups []string `json:"groups,omitempty,brackets"`
Geo []GeoHierarchyRow `json:"geo,omitempty,brackets"`
Groups []string `json:"groups,omitempty"`
Geo []GeoHierarchyRow `json:"geo,omitempty"`
}
// ProductStatus type.
@ -853,7 +853,7 @@ type StatusGroup struct {
Active bool `json:"active,omitempty"`
Ordering int `json:"ordering,omitempty"`
Process bool `json:"process,omitempty"`
Statuses []string `json:"statuses,omitempty,brackets"`
Statuses []string `json:"statuses,omitempty"`
}
// Site type.
@ -915,9 +915,9 @@ type Product struct {
Recommended bool `json:"recommended,omitempty"`
Active bool `json:"active,omitempty"`
Quantity float32 `json:"quantity,omitempty"`
Offers []Offer `json:"offers,omitempty,brackets"`
Groups []ProductGroup `json:"groups,omitempty,brackets"`
Properties map[string]string `json:"properties,omitempty,brackets"`
Offers []Offer `json:"offers,omitempty"`
Groups []ProductGroup `json:"groups,omitempty"`
Properties map[string]string `json:"properties,omitempty"`
}
// DeliveryHistoryRecord type.
@ -940,8 +940,8 @@ type DeliveryShipment struct {
Time *DeliveryTime `json:"time,omitempty"`
LunchTime string `json:"lunchTime,omitempty"`
Comment string `json:"comment,omitempty"`
Orders []Order `json:"orders,omitempty,brackets"`
ExtraData map[string]string `json:"extraData,omitempty,brackets"`
Orders []Order `json:"orders,omitempty"`
ExtraData map[string]string `json:"extraData,omitempty"`
}
// IntegrationModule type.
@ -973,8 +973,8 @@ type Integrations struct {
// Delivery type.
type Delivery struct {
Description string `json:"description,omitempty"`
Actions map[string]string `json:"actions,omitempty,brackets"`
PayerType []string `json:"payerType,omitempty,brackets"`
Actions map[string]string `json:"actions,omitempty"`
PayerType []string `json:"payerType,omitempty"`
PlatePrintLimit int `json:"platePrintLimit,omitempty"`
RateDeliveryCost bool `json:"rateDeliveryCost,omitempty"`
AllowPackages bool `json:"allowPackages,omitempty"`
@ -1023,8 +1023,8 @@ type Telephony struct {
OutputEventSupported bool `json:"outputEventSupported,omitempty"`
HangupEventSupported bool `json:"hangupEventSupported,omitempty"`
ChangeUserStatusURL string `json:"changeUserStatusUrl,omitempty"`
AdditionalCodes []AdditionalCode `json:"additionalCodes,omitempty,brackets"`
ExternalPhones []ExternalPhone `json:"externalPhones,omitempty,brackets"`
AdditionalCodes []AdditionalCode `json:"additionalCodes,omitempty"`
ExternalPhones []ExternalPhone `json:"externalPhones,omitempty"`
}
// AdditionalCode type.
@ -1041,7 +1041,7 @@ type ExternalPhone struct {
// Warehouse type.
type Warehouse struct {
Actions []Action `json:"actions,omitempty,brackets"`
Actions []Action `json:"actions,omitempty"`
}
// Action type.
@ -1073,7 +1073,7 @@ type CostRecord struct {
CostItem string `json:"costItem,omitempty"`
UserId int `json:"userId,omitempty"`
Order *Order `json:"order,omitempty"`
Sites []string `json:"sites,omitempty,brackets"`
Sites []string `json:"sites,omitempty"`
}
// Cost type.
@ -1089,7 +1089,7 @@ type Cost struct {
CreatedBy string `json:"createdBy,omitempty"`
Order *Order `json:"order,omitempty"`
UserId int `json:"userId,omitempty"`
Sites []string `json:"sites,omitempty,brackets"`
Sites []string `json:"sites,omitempty"`
}
// File type.
@ -1133,7 +1133,7 @@ CustomDictionaries related types
type CustomDictionary struct {
Name string `json:"name,omitempty"`
Code string `json:"code,omitempty"`
Elements []Element `json:"elements,omitempty,brackets"`
Elements []Element `json:"elements,omitempty"`
}
// Element type.