From 0262578b6c091fb3de33ff604f5f811638a72458 Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Thu, 10 May 2018 16:45:56 +0300 Subject: [PATCH] improve struct Integrations, bugs fix --- v5/types.go | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/v5/types.go b/v5/types.go index 76d20b2..02b0cb7 100644 --- a/v5/types.go +++ b/v5/types.go @@ -762,32 +762,33 @@ type DeliveryShipment struct { // IntegrationModule type type IntegrationModule struct { - Code string `json:"code,omitempty"` - IntegrationCode string `json:"integrationCode,omitempty"` - Active bool `json:"active,omitempty"` - Freeze bool `json:"freeze,omitempty"` - Native bool `json:"native,omitempty"` - Name string `json:"name,omitempty"` - Logo string `json:"logo,omitempty"` - ClientID string `json:"clientId,omitempty"` - BaseURL string `json:"baseUrl,omitempty"` - AccountURL string `json:"accountUrl,omitempty"` - AvailableCountries []string `json:"availableCountries,omitempty"` - Actions []string `json:"actions,omitempty"` - Integrations *Integrations `json:"integrations,omitempty"` + Code string `json:"code,omitempty"` + IntegrationCode string `json:"integrationCode,omitempty"` + Active bool `json:"active,omitempty"` + Freeze bool `json:"freeze,omitempty"` + Native bool `json:"native,omitempty"` + Name string `json:"name,omitempty"` + Logo string `json:"logo,omitempty"` + ClientID string `json:"clientId,omitempty"` + BaseURL string `json:"baseUrl,omitempty"` + AccountURL string `json:"accountUrl,omitempty"` + AvailableCountries []string `json:"availableCountries,omitempty"` + Actions map[string]string `json:"actions,omitempty"` + Integrations *Integrations `json:"integrations,omitempty"` } // Integrations type type Integrations struct { - Telephony *Telephony `json:"telephony,omitempty"` - Delivery *Delivery `json:"delivery,omitempty"` - Store *Warehouse `json:"store,omitempty"` + Telephony *Telephony `json:"telephony,omitempty"` + Delivery *Delivery `json:"delivery,omitempty"` + Store *Warehouse `json:"store,omitempty"` + MgTransport *MgTransport `json:"mgTransport,omitempty"` } // Delivery type type Delivery struct { Description string `json:"description,omitempty"` - Actions []Action `json:"actions,omitempty,brackets"` + Actions map[string]string `json:"actions,omitempty,brackets"` PayerType []string `json:"payerType,omitempty,brackets"` PlatePrintLimit int `json:"platePrintLimit,omitempty"` RateDeliveryCost bool `json:"rateDeliveryCost,omitempty"` @@ -865,6 +866,11 @@ type Action struct { CallPoints []string `json:"callPoints,omitempty"` } +// MgTransport type +type MgTransport struct { + WebhookUrl string `json:"webhookUrl,omitempty"` +} + /** Cost related types */