mirror of
https://github.com/retailcrm/mg-bot-api-client-go.git
synced 2024-11-21 20:36:05 +03:00
Merge pull request #21 from gwinn/master
add images to product card, fix delivery struct fields
This commit is contained in:
commit
cc25100cd7
@ -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