-
Notifications
You must be signed in to change notification settings - Fork 4
/
customer_order.go
102 lines (93 loc) · 5.94 KB
/
customer_order.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
package moysklad
import (
"github.com/google/uuid"
)
// CustomerOrder Заказ покупателя.
// Ключевое слово: customerorder
// Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-zakaz-pokupatelq
type CustomerOrder struct {
Printed *bool `json:"printed,omitempty"`
Contract *Contract `json:"contract,omitempty"`
AgentAccount *AgentAccount `json:"agentAccount,omitempty"`
Applicable *bool `json:"applicable,omitempty"`
Attributes *Attributes `json:"attributes,omitempty"`
Code *string `json:"code,omitempty"`
Project *Project `json:"project,omitempty"`
Created *Timestamp `json:"created,omitempty"`
Deleted *Timestamp `json:"deleted,omitempty"`
DeliveryPlannedMoment *Timestamp `json:"deliveryPlannedMoment,omitempty"`
Description *string `json:"description,omitempty"`
Published *bool `json:"published,omitempty"`
Files *Files `json:"files,omitempty"`
Group *Group `json:"group,omitempty"`
ID *uuid.UUID `json:"id,omitempty"`
InvoicedSum *float64 `json:"invoicedSum,omitempty"`
Meta *Meta `json:"meta,omitempty"`
Name *string `json:"name,omitempty"`
Moment *Timestamp `json:"moment,omitempty"`
Organization *Organization `json:"organization,omitempty"`
AccountID *uuid.UUID `json:"accountId,omitempty"`
Owner *Employee `json:"owner,omitempty"`
PayedSum *float64 `json:"payedSum,omitempty"`
Positions *Positions[CustomerOrderPosition] `json:"positions,omitempty"`
OrganizationAccount *AgentAccount `json:"organizationAccount,omitempty"`
Agent *Counterparty `json:"agent,omitempty"`
ExternalCode *string `json:"externalCode,omitempty"`
Rate *Rate `json:"rate,omitempty"`
ReservedSum *float64 `json:"reservedSum,omitempty"`
SalesChannel *SalesChannel `json:"salesChannel,omitempty"`
Shared *bool `json:"shared,omitempty"`
ShipmentAddress *string `json:"shipmentAddress,omitempty"`
ShipmentAddressFull *Address `json:"shipmentAddressFull,omitempty"`
ShippedSum *float64 `json:"shippedSum,omitempty"`
State *State `json:"state,omitempty"`
Store *Store `json:"store,omitempty"`
Sum *float64 `json:"sum,omitempty"`
SyncID *uuid.UUID `json:"syncId,omitempty"`
Prepayments *Prepayments `json:"prepayments,omitempty"`
Updated *Timestamp `json:"updated,omitempty"`
VatEnabled *bool `json:"vatEnabled,omitempty"`
VatIncluded *bool `json:"vatIncluded,omitempty"`
VatSum *float64 `json:"vatSum,omitempty"`
PurchaseOrders *PurchaseOrders `json:"purchaseOrders,omitempty"`
Demands *Demands `json:"demands,omitempty"`
Payments *Payments `json:"payments,omitempty"`
InvoicesOut *InvoicesOut `json:"invoicesOut,omitempty"`
Moves *Moves `json:"moves,omitempty"`
TaxSystem TaxSystem `json:"taxSystem,omitempty"`
}
func (c CustomerOrder) String() string {
return Stringify(c)
}
// GetMeta удовлетворяет интерфейсу HasMeta
func (c CustomerOrder) GetMeta() *Meta {
return c.Meta
}
func (c CustomerOrder) MetaType() MetaType {
return MetaTypeCustomerOrder
}
type CustomerOrders = Slice[CustomerOrder]
// CustomerOrderPosition Позиция Заказа покупателя.
// Ключевое слово: customerorderposition
// Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-zakaz-pokupatelq-zakazy-pokupatelej-pozicii-zakaza-pokupatelq
type CustomerOrderPosition struct {
Quantity *float64 `json:"quantity,omitempty"`
Assortment *AssortmentPosition `json:"assortment,omitempty"`
Discount *float64 `json:"discount,omitempty"`
ID *uuid.UUID `json:"id,omitempty"`
Pack *Pack `json:"pack,omitempty"`
Price *float64 `json:"price,omitempty"`
AccountID *uuid.UUID `json:"accountId,omitempty"`
Reserve *float64 `json:"reserve,omitempty"`
Shipped *float64 `json:"shipped,omitempty"`
Vat *int `json:"vat,omitempty"`
VatEnabled *bool `json:"vatEnabled,omitempty"`
Stock *Stock `json:"stock,omitempty"`
TaxSystem GoodTaxSystem `json:"taxSystem,omitempty"`
}
func (c CustomerOrderPosition) String() string {
return Stringify(c)
}
func (c CustomerOrderPosition) MetaType() MetaType {
return MetaTypeCustomerOrderPosition
}