@@ -28,6 +28,10 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
2828 ///
2929 public let isSimplePaymentsSwitchEnabled : Bool
3030
31+ /// The state(`true` or `false`) for the Order Creation feature switch.
32+ ///
33+ public let isOrderCreationSwitchEnabled : Bool
34+
3135 /// A list (possibly empty) of known card reader IDs - i.e. IDs of card readers that should be reconnected to automatically
3236 /// e.g. ["CHB204909005931"]
3337 ///
@@ -41,12 +45,14 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
4145 feedbacks: [ FeedbackType : FeedbackSettings ] ,
4246 isViewAddOnsSwitchEnabled: Bool ,
4347 isSimplePaymentsSwitchEnabled: Bool ,
48+ isOrderCreationSwitchEnabled: Bool ,
4449 knownCardReaders: [ String ] ,
4550 lastEligibilityErrorInfo: EligibilityErrorInfo ? = nil ) {
4651 self . installationDate = installationDate
4752 self . feedbacks = feedbacks
4853 self . isViewAddOnsSwitchEnabled = isViewAddOnsSwitchEnabled
4954 self . isSimplePaymentsSwitchEnabled = isSimplePaymentsSwitchEnabled
55+ self . isOrderCreationSwitchEnabled = isOrderCreationSwitchEnabled
5056 self . knownCardReaders = knownCardReaders
5157 self . lastEligibilityErrorInfo = lastEligibilityErrorInfo
5258 }
@@ -73,6 +79,7 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
7379 feedbacks: updatedFeedbacks,
7480 isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
7581 isSimplePaymentsSwitchEnabled: isSimplePaymentsSwitchEnabled,
82+ isOrderCreationSwitchEnabled: isOrderCreationSwitchEnabled,
7683 knownCardReaders: knownCardReaders,
7784 lastEligibilityErrorInfo: lastEligibilityErrorInfo
7885 )
@@ -90,6 +97,7 @@ extension GeneralAppSettings {
9097 self . feedbacks = try container. decodeIfPresent ( [ FeedbackType : FeedbackSettings ] . self, forKey: . feedbacks) ?? [ : ]
9198 self . isViewAddOnsSwitchEnabled = try container. decodeIfPresent ( Bool . self, forKey: . isViewAddOnsSwitchEnabled) ?? false
9299 self . isSimplePaymentsSwitchEnabled = try container. decodeIfPresent ( Bool . self, forKey: . isSimplePaymentsSwitchEnabled) ?? false
100+ self . isOrderCreationSwitchEnabled = try container. decodeIfPresent ( Bool . self, forKey: . isOrderCreationSwitchEnabled) ?? false
93101 self . knownCardReaders = try container. decodeIfPresent ( [ String ] . self, forKey: . knownCardReaders) ?? [ ]
94102 self . lastEligibilityErrorInfo = try container. decodeIfPresent ( EligibilityErrorInfo . self, forKey: . lastEligibilityErrorInfo)
95103
0 commit comments