Merge pull request #21 from gwinn/master

add images to product card, fix delivery struct fields
This commit is contained in:
Alex Lushpai 2018-09-26 15:37:13 +03:00 committed by GitHub
commit cc25100cd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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,

View File

@ -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 {