From 890efe1e85dc19b3caab8dff0c414562897928e4 Mon Sep 17 00:00:00 2001 From: Filippos Sakellaropoulos Date: Tue, 19 Nov 2024 15:06:32 +0200 Subject: [PATCH] Update RequestItem struct to use optional fields for intentToRetail and isOptional --- Sources/MdocDataTransfer18013/RequestItem.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/MdocDataTransfer18013/RequestItem.swift b/Sources/MdocDataTransfer18013/RequestItem.swift index 8be8c69..e72e784 100644 --- a/Sources/MdocDataTransfer18013/RequestItem.swift +++ b/Sources/MdocDataTransfer18013/RequestItem.swift @@ -16,18 +16,18 @@ limitations under the License. import Foundation public struct RequestItem: Sendable { - public init(elementIdentifier: String, intentToRetail: Bool, isOptional: Bool) { + public init(elementIdentifier: String, intentToRetail: Bool? = nil, isOptional: Bool? = nil) { self.elementIdentifier = elementIdentifier self.intentToRetail = intentToRetail self.isOptional = isOptional } public init(elementIdentifier: String) { self.elementIdentifier = elementIdentifier - self.intentToRetail = false - self.isOptional = false + self.intentToRetail = nil + self.isOptional = nil } - let elementIdentifier: String - let intentToRetail: Bool - let isOptional: Bool + public let elementIdentifier: String + public let intentToRetail: Bool? + public let isOptional: Bool? }