mirror of
https://github.com/retailcrm/mg-bot-api-client-go.git
synced 2024-11-22 04:46:05 +03:00
add images to product card, fix delivery struct fields
This commit is contained in:
parent
c7b0043002
commit
d9cbc14350
@ -271,7 +271,7 @@ func TestMgClient_MessageSendOrder(t *testing.T) {
|
|||||||
Delivery: &MessageOrderDelivery{
|
Delivery: &MessageOrderDelivery{
|
||||||
Name: "Курьерская доставка",
|
Name: "Курьерская доставка",
|
||||||
Address: "г. Москва, Проспект Мира, 9",
|
Address: "г. Москва, Проспект Мира, 9",
|
||||||
Amount: &MessageOrderCost{
|
Price: &MessageOrderCost{
|
||||||
Value: 1100,
|
Value: 1100,
|
||||||
Currency: MsgCurrencyRub,
|
Currency: MsgCurrencyRub,
|
||||||
},
|
},
|
||||||
@ -279,6 +279,8 @@ func TestMgClient_MessageSendOrder(t *testing.T) {
|
|||||||
Items: []MessageOrderItem{
|
Items: []MessageOrderItem{
|
||||||
{
|
{
|
||||||
Name: "iPhone 6",
|
Name: "iPhone 6",
|
||||||
|
Url: "https://example.com/product.html",
|
||||||
|
Img: "https://example.com/picture.png",
|
||||||
Price: &MessageOrderCost{
|
Price: &MessageOrderCost{
|
||||||
Value: 29900,
|
Value: 29900,
|
||||||
Currency: MsgCurrencyRub,
|
Currency: MsgCurrencyRub,
|
||||||
|
@ -398,6 +398,7 @@ type (
|
|||||||
MessageOrderItem struct {
|
MessageOrderItem struct {
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Url string `json:"url,omitempty"`
|
Url string `json:"url,omitempty"`
|
||||||
|
Img string `json:"img,omitempty"`
|
||||||
Quantity *MessageOrderQuantity `json:"quantity,omitempty"`
|
Quantity *MessageOrderQuantity `json:"quantity,omitempty"`
|
||||||
Price *MessageOrderCost `json:"price,omitempty"`
|
Price *MessageOrderCost `json:"price,omitempty"`
|
||||||
}
|
}
|
||||||
@ -425,8 +426,9 @@ type (
|
|||||||
|
|
||||||
MessageOrderDelivery struct {
|
MessageOrderDelivery struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Amount *MessageOrderCost `json:"amount"`
|
Price *MessageOrderCost `json:"price"`
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
|
Comment string `json:"comment,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
UserRef struct {
|
UserRef struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user