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

@ -177,8 +177,8 @@ type MessageDataProduct struct {
Article string `json:"article,omitempty"`
Url string `json:"url,omitempty"`
Img string `json:"img,omitempty"`
Cost string `json:"cost,omitempty"`
Quantity string `json:"quantity,omitempty"`
Cost *MessageDataOrderCost `json:"cost,omitempty"`
Quantity *MessageDataOrderQuantity `json:"quantity,omitempty"`
}
// MessageDataOrder order data from webhook
@ -186,7 +186,7 @@ type MessageDataOrder struct {
Number string `json:"number"`
Url string `json:"url,omitempty"`
Date string `json:"date,omitempty"`
Cost string `json:"cost,omitempty"`
Cost *MessageDataOrderCost `json:"cost,omitempty"`
Status *MessageDataOrderStatus `json:"status,omitempty"`
Items []MessageDataOrderItem `json:"items,omitempty"`
}
@ -203,6 +203,16 @@ type MessageDataOrderItem struct {
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
type TransportRequestMeta struct {
ID uint64 `json:"id"`