fixed type bugs

This commit is contained in:
Frosin 2019-08-20 11:47:53 +03:00
parent 64c42ae1fd
commit 1ca8df9800

View File

@ -110,40 +110,40 @@ Customer related types
// Customer type // Customer type
type Customer struct { type Customer struct {
ID int `json:"id,omitempty"` ID int `json:"id,omitempty"`
ExternalID string `json:"externalId,omitempty"` ExternalID string `json:"externalId,omitempty"`
FirstName string `json:"firstName,omitempty"` FirstName string `json:"firstName,omitempty"`
LastName string `json:"lastName,omitempty"` LastName string `json:"lastName,omitempty"`
Patronymic string `json:"patronymic,omitempty"` Patronymic string `json:"patronymic,omitempty"`
Sex string `json:"sex,omitempty"` Sex string `json:"sex,omitempty"`
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
Phones []Phone `json:"phones,brackets,omitempty"` Phones []Phone `json:"phones,brackets,omitempty"`
Address *Address `json:"address,omitempty"` Address *Address `json:"address,omitempty"`
CreatedAt string `json:"createdAt,omitempty"` CreatedAt string `json:"createdAt,omitempty"`
Birthday string `json:"birthday,omitempty"` Birthday string `json:"birthday,omitempty"`
ManagerID int `json:"managerId,omitempty"` ManagerID int `json:"managerId,omitempty"`
Vip bool `json:"vip,omitempty"` Vip bool `json:"vip,omitempty"`
Bad bool `json:"bad,omitempty"` Bad bool `json:"bad,omitempty"`
Site string `json:"site,omitempty"` Site string `json:"site,omitempty"`
Source *Source `json:"source,omitempty"` Source *Source `json:"source,omitempty"`
Contragent *Contragent `json:"contragent,omitempty"` Contragent *Contragent `json:"contragent,omitempty"`
PersonalDiscount float32 `json:"personalDiscount,omitempty"` PersonalDiscount float32 `json:"personalDiscount,omitempty"`
CumulativeDiscount float32 `json:"cumulativeDiscount,omitempty"` CumulativeDiscount float32 `json:"cumulativeDiscount,omitempty"`
DiscountCardNumber string `json:"discountCardNumber,omitempty"` DiscountCardNumber string `json:"discountCardNumber,omitempty"`
EmailMarketingUnsubscribedAt string `json:"emailMarketingUnsubscribedAt,omitempty"` EmailMarketingUnsubscribedAt string `json:"emailMarketingUnsubscribedAt,omitempty"`
AvgMarginSumm float32 `json:"avgMarginSumm,omitempty"` AvgMarginSumm float32 `json:"avgMarginSumm,omitempty"`
MarginSumm float32 `json:"marginSumm,omitempty"` MarginSumm float32 `json:"marginSumm,omitempty"`
TotalSumm float32 `json:"totalSumm,omitempty"` TotalSumm float32 `json:"totalSumm,omitempty"`
AverageSumm float32 `json:"averageSumm,omitempty"` AverageSumm float32 `json:"averageSumm,omitempty"`
OrdersCount int `json:"ordersCount,omitempty"` OrdersCount int `json:"ordersCount,omitempty"`
CostSumm float32 `json:"costSumm,omitempty"` CostSumm float32 `json:"costSumm,omitempty"`
MaturationTime int `json:"maturationTime,omitempty"` MaturationTime int `json:"maturationTime,omitempty"`
FirstClientID string `json:"firstClientId,omitempty"` FirstClientID string `json:"firstClientId,omitempty"`
LastClientID string `json:"lastClientId,omitempty"` LastClientID string `json:"lastClientId,omitempty"`
BrowserID string `json:"browserId,omitempty"` BrowserID string `json:"browserId,omitempty"`
MgCustomerID string `json:"mgCustomerId,omitempty"` MgCustomerID string `json:"mgCustomerId,omitempty"`
PhotoURL string `json:"photoUrl,omitempty"` PhotoURL string `json:"photoUrl,omitempty"`
CustomFields []map[string]string `json:"customFields,omitempty,brackets"` CustomFields map[string]string `json:"customFields,omitempty,brackets"`
} }
// Phone type // Phone type
@ -170,55 +170,55 @@ Order related types
// Order type // Order type
type Order struct { type Order struct {
ID int `json:"id,omitempty"` ID int `json:"id,omitempty"`
ExternalID string `json:"externalId,omitempty"` ExternalID string `json:"externalId,omitempty"`
Number string `json:"number,omitempty"` Number string `json:"number,omitempty"`
FirstName string `json:"firstName,omitempty"` FirstName string `json:"firstName,omitempty"`
LastName string `json:"lastName,omitempty"` LastName string `json:"lastName,omitempty"`
Patronymic string `json:"patronymic,omitempty"` Patronymic string `json:"patronymic,omitempty"`
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
Phone string `json:"phone,omitempty"` Phone string `json:"phone,omitempty"`
AdditionalPhone string `json:"additionalPhone,omitempty"` AdditionalPhone string `json:"additionalPhone,omitempty"`
CreatedAt string `json:"createdAt,omitempty"` CreatedAt string `json:"createdAt,omitempty"`
StatusUpdatedAt string `json:"statusUpdatedAt,omitempty"` StatusUpdatedAt string `json:"statusUpdatedAt,omitempty"`
ManagerID int `json:"managerId,omitempty"` ManagerID int `json:"managerId,omitempty"`
Mark int `json:"mark,omitempty"` Mark int `json:"mark,omitempty"`
Call bool `json:"call,omitempty"` Call bool `json:"call,omitempty"`
Expired bool `json:"expired,omitempty"` Expired bool `json:"expired,omitempty"`
FromAPI bool `json:"fromApi,omitempty"` FromAPI bool `json:"fromApi,omitempty"`
MarkDatetime string `json:"markDatetime,omitempty"` MarkDatetime string `json:"markDatetime,omitempty"`
CustomerComment string `json:"customerComment,omitempty"` CustomerComment string `json:"customerComment,omitempty"`
ManagerComment string `json:"managerComment,omitempty"` ManagerComment string `json:"managerComment,omitempty"`
Status string `json:"status,omitempty"` Status string `json:"status,omitempty"`
StatusComment string `json:"statusComment,omitempty"` StatusComment string `json:"statusComment,omitempty"`
FullPaidAt string `json:"fullPaidAt,omitempty"` FullPaidAt string `json:"fullPaidAt,omitempty"`
Site string `json:"site,omitempty"` Site string `json:"site,omitempty"`
OrderType string `json:"orderType,omitempty"` OrderType string `json:"orderType,omitempty"`
OrderMethod string `json:"orderMethod,omitempty"` OrderMethod string `json:"orderMethod,omitempty"`
CountryIso string `json:"countryIso,omitempty"` CountryIso string `json:"countryIso,omitempty"`
Summ float32 `json:"summ,omitempty"` Summ float32 `json:"summ,omitempty"`
TotalSumm float32 `json:"totalSumm,omitempty"` TotalSumm float32 `json:"totalSumm,omitempty"`
PrepaySum float32 `json:"prepaySum,omitempty"` PrepaySum float32 `json:"prepaySum,omitempty"`
PurchaseSumm float32 `json:"purchaseSumm,omitempty"` PurchaseSumm float32 `json:"purchaseSumm,omitempty"`
DiscountManualAmount float32 `json:"discountManualAmount,omitempty"` DiscountManualAmount float32 `json:"discountManualAmount,omitempty"`
DiscountManualPercent float32 `json:"discountManualPercent,omitempty"` DiscountManualPercent float32 `json:"discountManualPercent,omitempty"`
Weight float32 `json:"weight,omitempty"` Weight float32 `json:"weight,omitempty"`
Length int `json:"length,omitempty"` Length int `json:"length,omitempty"`
Width int `json:"width,omitempty"` Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"` Height int `json:"height,omitempty"`
ShipmentStore string `json:"shipmentStore,omitempty"` ShipmentStore string `json:"shipmentStore,omitempty"`
ShipmentDate string `json:"shipmentDate,omitempty"` ShipmentDate string `json:"shipmentDate,omitempty"`
ClientID string `json:"clientId,omitempty"` ClientID string `json:"clientId,omitempty"`
Shipped bool `json:"shipped,omitempty"` Shipped bool `json:"shipped,omitempty"`
UploadedToExternalStoreSystem bool `json:"uploadedToExternalStoreSystem,omitempty"` UploadedToExternalStoreSystem bool `json:"uploadedToExternalStoreSystem,omitempty"`
Source *Source `json:"source,omitempty"` Source *Source `json:"source,omitempty"`
Contragent *Contragent `json:"contragent,omitempty"` Contragent *Contragent `json:"contragent,omitempty"`
Customer *Customer `json:"customer,omitempty"` Customer *Customer `json:"customer,omitempty"`
Delivery *OrderDelivery `json:"delivery,omitempty"` Delivery *OrderDelivery `json:"delivery,omitempty"`
Marketplace *OrderMarketplace `json:"marketplace,omitempty"` Marketplace *OrderMarketplace `json:"marketplace,omitempty"`
Items []OrderItem `json:"items,omitempty,brackets"` Items []OrderItem `json:"items,omitempty,brackets"`
CustomFields []map[string]string `json:"customFields,omitempty,brackets"` CustomFields map[string]string `json:"customFields,omitempty,brackets"`
Payments []OrderPayment `json:"payments,omitempty,brackets"` Payments map[string]OrderPayment `json:"payments,omitempty,brackets"`
} }
// OrderDelivery type // OrderDelivery type
@ -276,22 +276,22 @@ type OrderPayment struct {
// OrderItem type // OrderItem type
type OrderItem struct { type OrderItem struct {
ID int `json:"id,omitempty"` ID int `json:"id,omitempty"`
InitialPrice float32 `json:"initialPrice,omitempty"` InitialPrice float32 `json:"initialPrice,omitempty"`
PurchasePrice float32 `json:"purchasePrice,omitempty"` PurchasePrice float32 `json:"purchasePrice,omitempty"`
DiscountTotal float32 `json:"discountTotal,omitempty"` DiscountTotal float32 `json:"discountTotal,omitempty"`
DiscountManualAmount float32 `json:"discountManualAmount,omitempty"` DiscountManualAmount float32 `json:"discountManualAmount,omitempty"`
DiscountManualPercent float32 `json:"discountManualPercent,omitempty"` DiscountManualPercent float32 `json:"discountManualPercent,omitempty"`
ProductName string `json:"productName,omitempty"` ProductName string `json:"productName,omitempty"`
VatRate string `json:"vatRate,omitempty"` VatRate string `json:"vatRate,omitempty"`
CreatedAt string `json:"createdAt,omitempty"` CreatedAt string `json:"createdAt,omitempty"`
Quantity float32 `json:"quantity,omitempty"` Quantity float32 `json:"quantity,omitempty"`
Status string `json:"status,omitempty"` Status string `json:"status,omitempty"`
Comment string `json:"comment,omitempty"` Comment string `json:"comment,omitempty"`
IsCanceled bool `json:"isCanceled,omitempty"` IsCanceled bool `json:"isCanceled,omitempty"`
Offer Offer `json:"offer,omitempty"` Offer Offer `json:"offer,omitempty"`
Properties []Property `json:"properties,omitempty,brackets"` Properties map[string]Property `json:"properties,omitempty,brackets"`
PriceType *PriceType `json:"priceType,omitempty"` PriceType *PriceType `json:"priceType,omitempty"`
} }
// OrdersHistoryRecord type // OrdersHistoryRecord type