diff --git a/client_test.go b/client_test.go index cbc7178..4db3275 100644 --- a/client_test.go +++ b/client_test.go @@ -2948,6 +2948,11 @@ func TestClient_OrderChange(t *testing.T) { Patronymic: "Аристархович", ExternalID: random, Email: fmt.Sprintf("%s@example.com", random), + Contact: &Customer{ + ID: 4512, + BrowserID: "collector-browser-id", + Site: "site", + }, } defer gock.Off() @@ -3058,6 +3063,10 @@ func TestClient_OrderChange(t *testing.T) { t.Errorf("invalid order number: got %s want %s", cr.Order.Number, "1A") } + if cr.Order.Contact == nil || cr.Order.Contact.ID != 4512 { + t.Errorf("unexpected contact: %#v", cr.Order.Contact) + } + f.ID = cr.ID f.CustomerComment = "test comment" diff --git a/types.go b/types.go index 9fca01f..cfbee9c 100644 --- a/types.go +++ b/types.go @@ -362,6 +362,7 @@ type Order struct { Source *Source `json:"source,omitempty"` Contragent *Contragent `json:"contragent,omitempty"` Customer *Customer `json:"customer,omitempty"` + Contact *Customer `json:"contact,omitempty"` Delivery *OrderDelivery `json:"delivery,omitempty"` Marketplace *OrderMarketplace `json:"marketplace,omitempty"` Items []OrderItem `json:"items,omitempty"`