add mg settings to settings response

This commit is contained in:
Pavel 2023-08-11 12:23:51 +03:00 committed by GitHub
commit 407ecf5066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -748,11 +748,27 @@ type SerializedEditLoyaltyAccount struct {
SerializedBaseLoyaltyAccount 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. // Settings type. Contains retailCRM configuration.
type Settings struct { type Settings struct {
DefaultCurrency SettingsNode `json:"default_currency"` DefaultCurrency SettingsNode `json:"default_currency"`
SystemLanguage SettingsNode `json:"system_language"` SystemLanguage SettingsNode `json:"system_language"`
Timezone SettingsNode `json:"timezone"` Timezone SettingsNode `json:"timezone"`
MgSettings MgSettings `json:"mg"`
WorkTimes []WorkTime `json:"work_times"` WorkTimes []WorkTime `json:"work_times"`
NonWorkingDays []NonWorkingDays `json:"non_working_days"` NonWorkingDays []NonWorkingDays `json:"non_working_days"`
} }