1
0
mirror of synced 2024-11-22 04:56:06 +03:00

update order & product structs

This commit is contained in:
Alex Lushpai 2018-09-12 10:35:46 +03:00
parent 65a3347f16
commit 47c7131270

View File

@ -172,13 +172,13 @@ type MessageDataBot struct {
// MessageDataProduct product data from webhook // MessageDataProduct product data from webhook
type MessageDataProduct struct { type MessageDataProduct struct {
ID uint64 `json:"id"` ID uint64 `json:"id"`
Name string `json:"name"` Name string `json:"name"`
Article string `json:"article,omitempty"` Article string `json:"article,omitempty"`
Url string `json:"url,omitempty"` Url string `json:"url,omitempty"`
Img string `json:"img,omitempty"` Img string `json:"img,omitempty"`
Cost string `json:"cost,omitempty"` Cost *MessageDataOrderCost `json:"cost,omitempty"`
Quantity string `json:"quantity,omitempty"` Quantity *MessageDataOrderQuantity `json:"quantity,omitempty"`
} }
// MessageDataOrder order data from webhook // MessageDataOrder order data from webhook
@ -186,7 +186,7 @@ type MessageDataOrder struct {
Number string `json:"number"` Number string `json:"number"`
Url string `json:"url,omitempty"` Url string `json:"url,omitempty"`
Date string `json:"date,omitempty"` Date string `json:"date,omitempty"`
Cost string `json:"cost,omitempty"` Cost *MessageDataOrderCost `json:"cost,omitempty"`
Status *MessageDataOrderStatus `json:"status,omitempty"` Status *MessageDataOrderStatus `json:"status,omitempty"`
Items []MessageDataOrderItem `json:"items,omitempty"` Items []MessageDataOrderItem `json:"items,omitempty"`
} }
@ -203,6 +203,16 @@ type MessageDataOrderItem struct {
Price string `json:"price,omitempty"` Price string `json:"price,omitempty"`
} }
type MessageDataOrderCost struct {
Value float32 `json:"value,omitempty"`
Currency string `json:"currency"`
}
type MessageDataOrderQuantity struct {
Value float32 `json:"value"`
Unit string `json:"unit"`
}
// TransportRequestMeta request metadata // TransportRequestMeta request metadata
type TransportRequestMeta struct { type TransportRequestMeta struct {
ID uint64 `json:"id"` ID uint64 `json:"id"`