From 2875b8620ae2ec8bda66e268a44b9570ce9b72ca Mon Sep 17 00:00:00 2001 From: Kirill Sukhorukov Date: Thu, 3 Aug 2023 09:20:03 +0300 Subject: [PATCH] add mg settings to settings response --- types.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/types.go b/types.go index 53ebbf7..eae1ef1 100644 --- a/types.go +++ b/types.go @@ -748,11 +748,27 @@ type SerializedEditLoyaltyAccount struct { SerializedBaseLoyaltyAccount } +type ChannelSetting struct { + Site string `json:"site"` + OrderType string `json:"order_type"` + OrderMethod string `json:"order_method"` +} + +type MgOrderCreationSettings struct { + Channels map[int]ChannelSetting `json:"channels"` + Default ChannelSetting `json:"default"` +} + +type MgSettings struct { + OrderCreation MgOrderCreationSettings `json:"order_creation"` +} + // Settings type. Contains retailCRM configuration. type Settings struct { DefaultCurrency SettingsNode `json:"default_currency"` SystemLanguage SettingsNode `json:"system_language"` Timezone SettingsNode `json:"timezone"` + MgSettings MgSettings `json:"mg"` WorkTimes []WorkTime `json:"work_times"` NonWorkingDays []NonWorkingDays `json:"non_working_days"` }