diff --git a/FDKClient.podspec b/FDKClient.podspec index 465eec33e0..984952ad39 100644 --- a/FDKClient.podspec +++ b/FDKClient.podspec @@ -5,7 +5,7 @@ Pod::Spec.new do |s| s.name = 'FDKClient' - s.version = '0.1.17' + s.version = '0.1.18' s.summary = 'FDK Client SDK for Swift language' s.description = 'FDK Client SDK for Swift language that can be used to make Apps or extensions.' @@ -15,8 +15,8 @@ Pod::Spec.new do |s| s.author = { 'Nikhil Manapure' => 'nikhilmanapure@gofynd.com' } s.source = { :git => 'https://github.com/gofynd/fdk-client-swift.git', :tag => s.version.to_s } + s.swift_versions = '4.0' s.ios.deployment_target = '12.0' - s.osx.deployment_target = '10.0' s.static_framework = true s.dependency 'CryptoSwift', '~> 1.3.8' diff --git a/Sources/code/application/ApplicationAPIClient.swift b/Sources/code/application/ApplicationAPIClient.swift index a0f55a00ea..9a5cdd3d86 100644 --- a/Sources/code/application/ApplicationAPIClient.swift +++ b/Sources/code/application/ApplicationAPIClient.swift @@ -12,7 +12,7 @@ class ApplicationAPIClient { var headers = [ (key: "Authorization", value: "Bearer " + "\(config.applicationId):\(config.applicationToken)".asBase64) ] - headers.append((key: "x-fp-sdk-version", value: "0.1.17")) + headers.append((key: "x-fp-sdk-version", value: "0.1.18")) headers.append(contentsOf: extraHeaders) headers.append(contentsOf: config.extraHeaders) if let userAgent = config.userAgent { diff --git a/Sources/code/application/models/ActiveCardPaymentGatewayResponseAppModelClass.swift b/Sources/code/application/models/ActiveCardPaymentGatewayResponseAppModelClass.swift index 1e86faa2c9..170a716911 100644 --- a/Sources/code/application/models/ActiveCardPaymentGatewayResponseAppModelClass.swift +++ b/Sources/code/application/models/ActiveCardPaymentGatewayResponseAppModelClass.swift @@ -7,45 +7,45 @@ public extension ApplicationClient { Used By: Payment */ class ActiveCardPaymentGatewayResponse: Codable { - public var success: Bool - public var cards: CardPaymentGateway + public var success: Bool + public var message: String public enum CodingKeys: String, CodingKey { - case success - case cards + case success + case message } public init(cards: CardPaymentGateway, message: String, success: Bool) { - self.success = success - self.cards = cards + self.success = success + self.message = message } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - success = try container.decode(Bool.self, forKey: .success) - cards = try container.decode(CardPaymentGateway.self, forKey: .cards) + success = try container.decode(Bool.self, forKey: .success) + message = try container.decode(String.self, forKey: .message) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(cards, forKey: .cards) + try? container.encodeIfPresent(success, forKey: .success) + try? container.encodeIfPresent(message, forKey: .message) } } diff --git a/Sources/code/application/models/AddBeneficiaryDetailsRequestAppModelClass.swift b/Sources/code/application/models/AddBeneficiaryDetailsRequestAppModelClass.swift index 49536acd64..3b58643163 100644 --- a/Sources/code/application/models/AddBeneficiaryDetailsRequestAppModelClass.swift +++ b/Sources/code/application/models/AddBeneficiaryDetailsRequestAppModelClass.swift @@ -7,98 +7,98 @@ public extension ApplicationClient { Used By: Payment */ class AddBeneficiaryDetailsRequest: Codable { - public var shipmentId: String + public var otp: String? - public var requestId: String? + public var transferMode: String - public var delights: Bool + public var requestId: String? - public var otp: String? + public var orderId: String public var details: BeneficiaryModeDetails - public var orderId: String + public var shipmentId: String - public var transferMode: String + public var delights: Bool public enum CodingKeys: String, CodingKey { - case shipmentId = "shipment_id" + case otp - case requestId = "request_id" + case transferMode = "transfer_mode" - case delights + case requestId = "request_id" - case otp + case orderId = "order_id" case details - case orderId = "order_id" + case shipmentId = "shipment_id" - case transferMode = "transfer_mode" + case delights } public init(delights: Bool, details: BeneficiaryModeDetails, orderId: String, otp: String? = nil, requestId: String? = nil, shipmentId: String, transferMode: String) { - self.shipmentId = shipmentId + self.otp = otp - self.requestId = requestId + self.transferMode = transferMode - self.delights = delights + self.requestId = requestId - self.otp = otp + self.orderId = orderId self.details = details - self.orderId = orderId + self.shipmentId = shipmentId - self.transferMode = transferMode + self.delights = delights } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - shipmentId = try container.decode(String.self, forKey: .shipmentId) - do { - requestId = try container.decode(String.self, forKey: .requestId) + otp = try container.decode(String.self, forKey: .otp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - delights = try container.decode(Bool.self, forKey: .delights) + transferMode = try container.decode(String.self, forKey: .transferMode) do { - otp = try container.decode(String.self, forKey: .otp) + requestId = try container.decode(String.self, forKey: .requestId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + orderId = try container.decode(String.self, forKey: .orderId) + details = try container.decode(BeneficiaryModeDetails.self, forKey: .details) - orderId = try container.decode(String.self, forKey: .orderId) + shipmentId = try container.decode(String.self, forKey: .shipmentId) - transferMode = try container.decode(String.self, forKey: .transferMode) + delights = try container.decode(Bool.self, forKey: .delights) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) + try? container.encodeIfPresent(otp, forKey: .otp) - try? container.encodeIfPresent(requestId, forKey: .requestId) + try? container.encodeIfPresent(transferMode, forKey: .transferMode) - try? container.encodeIfPresent(delights, forKey: .delights) + try? container.encodeIfPresent(requestId, forKey: .requestId) - try? container.encodeIfPresent(otp, forKey: .otp) + try? container.encodeIfPresent(orderId, forKey: .orderId) try? container.encodeIfPresent(details, forKey: .details) - try? container.encodeIfPresent(orderId, forKey: .orderId) + try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) - try? container.encodeIfPresent(transferMode, forKey: .transferMode) + try? container.encodeIfPresent(delights, forKey: .delights) } } } diff --git a/Sources/code/application/models/AddBeneficiaryViaOtpVerificationRequestAppModelClass.swift b/Sources/code/application/models/AddBeneficiaryViaOtpVerificationRequestAppModelClass.swift index a2fe124332..47e8fc08af 100644 --- a/Sources/code/application/models/AddBeneficiaryViaOtpVerificationRequestAppModelClass.swift +++ b/Sources/code/application/models/AddBeneficiaryViaOtpVerificationRequestAppModelClass.swift @@ -7,46 +7,46 @@ public extension ApplicationClient { Used By: Payment */ class AddBeneficiaryViaOtpVerificationRequest: Codable { + public var hashKey: String + public var otp: String public var requestId: String - public var hashKey: String - public enum CodingKeys: String, CodingKey { + case hashKey = "hash_key" + case otp case requestId = "request_id" - - case hashKey = "hash_key" } public init(hashKey: String, otp: String, requestId: String) { + self.hashKey = hashKey + self.otp = otp self.requestId = requestId - - self.hashKey = hashKey } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + hashKey = try container.decode(String.self, forKey: .hashKey) + otp = try container.decode(String.self, forKey: .otp) requestId = try container.decode(String.self, forKey: .requestId) - - hashKey = try container.decode(String.self, forKey: .hashKey) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(hashKey, forKey: .hashKey) + try? container.encodeIfPresent(otp, forKey: .otp) try? container.encodeIfPresent(requestId, forKey: .requestId) - - try? container.encodeIfPresent(hashKey, forKey: .hashKey) } } } diff --git a/Sources/code/application/models/AggregatorConfigDetailAppModelClass.swift b/Sources/code/application/models/AggregatorConfigDetailAppModelClass.swift index 9a540690f6..54d5f9748a 100644 --- a/Sources/code/application/models/AggregatorConfigDetailAppModelClass.swift +++ b/Sources/code/application/models/AggregatorConfigDetailAppModelClass.swift @@ -7,95 +7,97 @@ public extension ApplicationClient { Used By: Payment */ class AggregatorConfigDetail: Codable { - public var configType: String - - public var verifyApi: String? + public var api: String? - public var pin: String? + public var secret: String public var key: String - public var merchantKey: String? + public var configType: String public var merchantId: String? - public var api: String? + public var pin: String? - public var sdk: Bool? + public var merchantKey: String? - public var secret: String + public var sdk: Bool? public var userId: String? - public enum CodingKeys: String, CodingKey { - case configType = "config_type" + public var verifyApi: String? - case verifyApi = "verify_api" + public enum CodingKeys: String, CodingKey { + case api - case pin + case secret case key - case merchantKey = "merchant_key" + case configType = "config_type" case merchantId = "merchant_id" - case api + case pin - case sdk + case merchantKey = "merchant_key" - case secret + case sdk case userId = "user_id" + + case verifyApi = "verify_api" } public init(api: String? = nil, configType: String, key: String, merchantId: String? = nil, merchantKey: String? = nil, pin: String? = nil, sdk: Bool? = nil, secret: String, userId: String? = nil, verifyApi: String? = nil) { - self.configType = configType - - self.verifyApi = verifyApi + self.api = api - self.pin = pin + self.secret = secret self.key = key - self.merchantKey = merchantKey + self.configType = configType self.merchantId = merchantId - self.api = api + self.pin = pin - self.sdk = sdk + self.merchantKey = merchantKey - self.secret = secret + self.sdk = sdk self.userId = userId + + self.verifyApi = verifyApi } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - configType = try container.decode(String.self, forKey: .configType) - do { - verifyApi = try container.decode(String.self, forKey: .verifyApi) + api = try container.decode(String.self, forKey: .api) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + secret = try container.decode(String.self, forKey: .secret) + + key = try container.decode(String.self, forKey: .key) + + configType = try container.decode(String.self, forKey: .configType) + do { - pin = try container.decode(String.self, forKey: .pin) + merchantId = try container.decode(String.self, forKey: .merchantId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - key = try container.decode(String.self, forKey: .key) - do { - merchantKey = try container.decode(String.self, forKey: .merchantKey) + pin = try container.decode(String.self, forKey: .pin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -103,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - merchantId = try container.decode(String.self, forKey: .merchantId) + merchantKey = try container.decode(String.self, forKey: .merchantKey) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -111,7 +113,7 @@ public extension ApplicationClient { } catch {} do { - api = try container.decode(String.self, forKey: .api) + sdk = try container.decode(Bool.self, forKey: .sdk) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -119,17 +121,15 @@ public extension ApplicationClient { } catch {} do { - sdk = try container.decode(Bool.self, forKey: .sdk) + userId = try container.decode(String.self, forKey: .userId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - secret = try container.decode(String.self, forKey: .secret) - do { - userId = try container.decode(String.self, forKey: .userId) + verifyApi = try container.decode(String.self, forKey: .verifyApi) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -140,25 +140,25 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(configType, forKey: .configType) - - try? container.encode(verifyApi, forKey: .verifyApi) + try? container.encode(api, forKey: .api) - try? container.encode(pin, forKey: .pin) + try? container.encodeIfPresent(secret, forKey: .secret) try? container.encodeIfPresent(key, forKey: .key) - try? container.encode(merchantKey, forKey: .merchantKey) + try? container.encodeIfPresent(configType, forKey: .configType) try? container.encode(merchantId, forKey: .merchantId) - try? container.encode(api, forKey: .api) + try? container.encode(pin, forKey: .pin) - try? container.encode(sdk, forKey: .sdk) + try? container.encode(merchantKey, forKey: .merchantKey) - try? container.encodeIfPresent(secret, forKey: .secret) + try? container.encode(sdk, forKey: .sdk) try? container.encode(userId, forKey: .userId) + + try? container.encode(verifyApi, forKey: .verifyApi) } } } diff --git a/Sources/code/application/models/AggregatorRouteAppModelClass.swift b/Sources/code/application/models/AggregatorRouteAppModelClass.swift index b1a1c1f7c6..64e99cae92 100644 --- a/Sources/code/application/models/AggregatorRouteAppModelClass.swift +++ b/Sources/code/application/models/AggregatorRouteAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Payment */ class AggregatorRoute: Codable { - public var data: [String: Any]? - - public var paymentFlowData: String? - public var paymentFlow: String? public var apiLink: String? - public enum CodingKeys: String, CodingKey { - case data + public var data: [String: Any]? - case paymentFlowData = "payment_flow_data" + public var paymentFlowData: String? + public enum CodingKeys: String, CodingKey { case paymentFlow = "payment_flow" case apiLink = "api_link" - } - public init(apiLink: String? = nil, data: [String: Any]? = nil, paymentFlow: String? = nil, paymentFlowData: String? = nil) { - self.data = data + case data - self.paymentFlowData = paymentFlowData + case paymentFlowData = "payment_flow_data" + } + public init(apiLink: String? = nil, data: [String: Any]? = nil, paymentFlow: String? = nil, paymentFlowData: String? = nil) { self.paymentFlow = paymentFlow self.apiLink = apiLink + + self.data = data + + self.paymentFlowData = paymentFlowData } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - data = try container.decode([String: Any].self, forKey: .data) + paymentFlow = try container.decode(String.self, forKey: .paymentFlow) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - paymentFlowData = try container.decode(String.self, forKey: .paymentFlowData) + apiLink = try container.decode(String.self, forKey: .apiLink) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - paymentFlow = try container.decode(String.self, forKey: .paymentFlow) + data = try container.decode([String: Any].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - apiLink = try container.decode(String.self, forKey: .apiLink) + paymentFlowData = try container.decode(String.self, forKey: .paymentFlowData) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,13 +74,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(data, forKey: .data) - - try? container.encode(paymentFlowData, forKey: .paymentFlowData) - try? container.encode(paymentFlow, forKey: .paymentFlow) try? container.encode(apiLink, forKey: .apiLink) + + try? container.encode(data, forKey: .data) + + try? container.encode(paymentFlowData, forKey: .paymentFlowData) } } } diff --git a/Sources/code/application/models/AggregatorsConfigDetailResponseAppModelClass.swift b/Sources/code/application/models/AggregatorsConfigDetailResponseAppModelClass.swift index fad1a42661..64cdaa035b 100644 --- a/Sources/code/application/models/AggregatorsConfigDetailResponseAppModelClass.swift +++ b/Sources/code/application/models/AggregatorsConfigDetailResponseAppModelClass.swift @@ -7,77 +7,75 @@ public extension ApplicationClient { Used By: Payment */ class AggregatorsConfigDetailResponse: Codable { - public var env: String + public var ccavenue: AggregatorConfigDetail? public var mswipe: AggregatorConfigDetail? - public var ccavenue: AggregatorConfigDetail? + public var simpl: AggregatorConfigDetail? - public var juspay: AggregatorConfigDetail? + public var rupifi: AggregatorConfigDetail? public var payumoney: AggregatorConfigDetail? - public var rupifi: AggregatorConfigDetail? - - public var success: Bool + public var env: String public var razorpay: AggregatorConfigDetail? public var stripe: AggregatorConfigDetail? - public var simpl: AggregatorConfigDetail? + public var success: Bool + + public var juspay: AggregatorConfigDetail? public enum CodingKeys: String, CodingKey { - case env + case ccavenue case mswipe - case ccavenue + case simpl - case juspay + case rupifi case payumoney - case rupifi - - case success + case env case razorpay case stripe - case simpl + case success + + case juspay } public init(ccavenue: AggregatorConfigDetail? = nil, env: String, juspay: AggregatorConfigDetail? = nil, mswipe: AggregatorConfigDetail? = nil, payumoney: AggregatorConfigDetail? = nil, razorpay: AggregatorConfigDetail? = nil, rupifi: AggregatorConfigDetail? = nil, simpl: AggregatorConfigDetail? = nil, stripe: AggregatorConfigDetail? = nil, success: Bool) { - self.env = env + self.ccavenue = ccavenue self.mswipe = mswipe - self.ccavenue = ccavenue + self.simpl = simpl - self.juspay = juspay + self.rupifi = rupifi self.payumoney = payumoney - self.rupifi = rupifi - - self.success = success + self.env = env self.razorpay = razorpay self.stripe = stripe - self.simpl = simpl + self.success = success + + self.juspay = juspay } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - env = try container.decode(String.self, forKey: .env) - do { - mswipe = try container.decode(AggregatorConfigDetail.self, forKey: .mswipe) + ccavenue = try container.decode(AggregatorConfigDetail.self, forKey: .ccavenue) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,7 +83,7 @@ public extension ApplicationClient { } catch {} do { - ccavenue = try container.decode(AggregatorConfigDetail.self, forKey: .ccavenue) + mswipe = try container.decode(AggregatorConfigDetail.self, forKey: .mswipe) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +91,7 @@ public extension ApplicationClient { } catch {} do { - juspay = try container.decode(AggregatorConfigDetail.self, forKey: .juspay) + simpl = try container.decode(AggregatorConfigDetail.self, forKey: .simpl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -101,7 +99,7 @@ public extension ApplicationClient { } catch {} do { - payumoney = try container.decode(AggregatorConfigDetail.self, forKey: .payumoney) + rupifi = try container.decode(AggregatorConfigDetail.self, forKey: .rupifi) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -109,14 +107,14 @@ public extension ApplicationClient { } catch {} do { - rupifi = try container.decode(AggregatorConfigDetail.self, forKey: .rupifi) + payumoney = try container.decode(AggregatorConfigDetail.self, forKey: .payumoney) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - success = try container.decode(Bool.self, forKey: .success) + env = try container.decode(String.self, forKey: .env) do { razorpay = try container.decode(AggregatorConfigDetail.self, forKey: .razorpay) @@ -134,8 +132,10 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} + success = try container.decode(Bool.self, forKey: .success) + do { - simpl = try container.decode(AggregatorConfigDetail.self, forKey: .simpl) + juspay = try container.decode(AggregatorConfigDetail.self, forKey: .juspay) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,25 +146,25 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(env, forKey: .env) + try? container.encodeIfPresent(ccavenue, forKey: .ccavenue) try? container.encodeIfPresent(mswipe, forKey: .mswipe) - try? container.encodeIfPresent(ccavenue, forKey: .ccavenue) + try? container.encodeIfPresent(simpl, forKey: .simpl) - try? container.encodeIfPresent(juspay, forKey: .juspay) + try? container.encodeIfPresent(rupifi, forKey: .rupifi) try? container.encodeIfPresent(payumoney, forKey: .payumoney) - try? container.encodeIfPresent(rupifi, forKey: .rupifi) - - try? container.encodeIfPresent(success, forKey: .success) + try? container.encodeIfPresent(env, forKey: .env) try? container.encodeIfPresent(razorpay, forKey: .razorpay) try? container.encodeIfPresent(stripe, forKey: .stripe) - try? container.encodeIfPresent(simpl, forKey: .simpl) + try? container.encodeIfPresent(success, forKey: .success) + + try? container.encodeIfPresent(juspay, forKey: .juspay) } } } diff --git a/Sources/code/application/models/AppStoreAppModelClass.swift b/Sources/code/application/models/AppStoreAppModelClass.swift index 3be679883c..f8e85590e4 100644 --- a/Sources/code/application/models/AppStoreAppModelClass.swift +++ b/Sources/code/application/models/AppStoreAppModelClass.swift @@ -7,57 +7,57 @@ public extension ApplicationClient { Used By: Catalog */ class AppStore: Codable { - public var address: StoreAddressSerializer? + public var company: CompanyStore? - public var manager: StoreManagerSerializer? + public var contactNumbers: [SellerPhoneNumber]? public var name: String? - public var company: CompanyStore? + public var address: StoreAddressSerializer? - public var uid: Int? + public var departments: [StoreDepartments]? - public var contactNumbers: [SellerPhoneNumber]? + public var manager: StoreManagerSerializer? - public var departments: [StoreDepartments]? + public var uid: Int? public enum CodingKeys: String, CodingKey { - case address + case company - case manager + case contactNumbers = "contact_numbers" case name - case company + case address - case uid + case departments - case contactNumbers = "contact_numbers" + case manager - case departments + case uid } public init(address: StoreAddressSerializer? = nil, company: CompanyStore? = nil, contactNumbers: [SellerPhoneNumber]? = nil, departments: [StoreDepartments]? = nil, manager: StoreManagerSerializer? = nil, name: String? = nil, uid: Int? = nil) { - self.address = address + self.company = company - self.manager = manager + self.contactNumbers = contactNumbers self.name = name - self.company = company + self.address = address - self.uid = uid + self.departments = departments - self.contactNumbers = contactNumbers + self.manager = manager - self.departments = departments + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - address = try container.decode(StoreAddressSerializer.self, forKey: .address) + company = try container.decode(CompanyStore.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -65,7 +65,7 @@ public extension ApplicationClient { } catch {} do { - manager = try container.decode(StoreManagerSerializer.self, forKey: .manager) + contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -81,7 +81,7 @@ public extension ApplicationClient { } catch {} do { - company = try container.decode(CompanyStore.self, forKey: .company) + address = try container.decode(StoreAddressSerializer.self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,7 +89,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + departments = try container.decode([StoreDepartments].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -97,7 +97,7 @@ public extension ApplicationClient { } catch {} do { - contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) + manager = try container.decode(StoreManagerSerializer.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - departments = try container.decode([StoreDepartments].self, forKey: .departments) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,19 +116,19 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(company, forKey: .company) - try? container.encodeIfPresent(manager, forKey: .manager) + try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(company, forKey: .company) + try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(departments, forKey: .departments) - try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) + try? container.encodeIfPresent(manager, forKey: .manager) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/ApplicationStoreListingAppModelClass.swift b/Sources/code/application/models/ApplicationStoreListingAppModelClass.swift index 6f0cfe3112..f2e4a10b73 100644 --- a/Sources/code/application/models/ApplicationStoreListingAppModelClass.swift +++ b/Sources/code/application/models/ApplicationStoreListingAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class ApplicationStoreListing: Codable { public var items: [AppStore]? - public var page: Page? - public var filters: [StoreDepartments]? + public var page: Page? + public enum CodingKeys: String, CodingKey { case items - case page - case filters + + case page } public init(filters: [StoreDepartments]? = nil, items: [AppStore]? = nil, page: Page? = nil) { self.items = items - self.page = page - self.filters = filters + + self.page = page } required public init(from decoder: Decoder) throws { @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - page = try container.decode(Page.self, forKey: .page) + filters = try container.decode([StoreDepartments].self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - filters = try container.decode([StoreDepartments].self, forKey: .filters) + page = try container.decode(Page.self, forKey: .page) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,9 +62,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(items, forKey: .items) - try? container.encodeIfPresent(page, forKey: .page) - try? container.encodeIfPresent(filters, forKey: .filters) + + try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/application/models/AttachCardRequestAppModelClass.swift b/Sources/code/application/models/AttachCardRequestAppModelClass.swift index bb41ae86d0..fd20555f3e 100644 --- a/Sources/code/application/models/AttachCardRequestAppModelClass.swift +++ b/Sources/code/application/models/AttachCardRequestAppModelClass.swift @@ -7,47 +7,47 @@ public extension ApplicationClient { Used By: Payment */ class AttachCardRequest: Codable { - public var cardId: String + public var refresh: Bool? - public var nickname: String? + public var cardId: String public var nameOnCard: String? - public var refresh: Bool? + public var nickname: String? public enum CodingKeys: String, CodingKey { - case cardId = "card_id" + case refresh - case nickname + case cardId = "card_id" case nameOnCard = "name_on_card" - case refresh + case nickname } public init(cardId: String, nameOnCard: String? = nil, nickname: String? = nil, refresh: Bool? = nil) { - self.cardId = cardId + self.refresh = refresh - self.nickname = nickname + self.cardId = cardId self.nameOnCard = nameOnCard - self.refresh = refresh + self.nickname = nickname } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - cardId = try container.decode(String.self, forKey: .cardId) - do { - nickname = try container.decode(String.self, forKey: .nickname) + refresh = try container.decode(Bool.self, forKey: .refresh) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + cardId = try container.decode(String.self, forKey: .cardId) + do { nameOnCard = try container.decode(String.self, forKey: .nameOnCard) @@ -57,7 +57,7 @@ public extension ApplicationClient { } catch {} do { - refresh = try container.decode(Bool.self, forKey: .refresh) + nickname = try container.decode(String.self, forKey: .nickname) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,13 +68,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(cardId, forKey: .cardId) + try? container.encode(refresh, forKey: .refresh) - try? container.encodeIfPresent(nickname, forKey: .nickname) + try? container.encode(cardId, forKey: .cardId) try? container.encodeIfPresent(nameOnCard, forKey: .nameOnCard) - try? container.encode(refresh, forKey: .refresh) + try? container.encodeIfPresent(nickname, forKey: .nickname) } } } diff --git a/Sources/code/application/models/AttributeDetailAppModelClass.swift b/Sources/code/application/models/AttributeDetailAppModelClass.swift index f11fa1e87c..bf9094c74e 100644 --- a/Sources/code/application/models/AttributeDetailAppModelClass.swift +++ b/Sources/code/application/models/AttributeDetailAppModelClass.swift @@ -9,30 +9,30 @@ public extension ApplicationClient { class AttributeDetail: Codable { public var logo: String? + public var description: String? + public var display: String? public var key: String? - public var description: String? - public enum CodingKeys: String, CodingKey { case logo + case description + case display case key - - case description } public init(description: String? = nil, display: String? = nil, key: String? = nil, logo: String? = nil) { self.logo = logo + self.description = description + self.display = display self.key = key - - self.description = description } required public init(from decoder: Decoder) throws { @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - display = try container.decode(String.self, forKey: .display) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - key = try container.decode(String.self, forKey: .key) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + key = try container.decode(String.self, forKey: .key) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -76,11 +76,11 @@ public extension ApplicationClient { try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(display, forKey: .display) try? container.encodeIfPresent(key, forKey: .key) - - try? container.encodeIfPresent(description, forKey: .description) } } } diff --git a/Sources/code/application/models/AutocompleteItemAppModelClass.swift b/Sources/code/application/models/AutocompleteItemAppModelClass.swift index 000af483b7..ac5833749f 100644 --- a/Sources/code/application/models/AutocompleteItemAppModelClass.swift +++ b/Sources/code/application/models/AutocompleteItemAppModelClass.swift @@ -9,30 +9,30 @@ public extension ApplicationClient { class AutocompleteItem: Codable { public var type: String? - public var display: String? + public var logo: Media? public var action: ProductListingAction? - public var logo: Media? + public var display: String? public enum CodingKeys: String, CodingKey { case type - case display + case logo case action - case logo + case display } public init(action: ProductListingAction? = nil, display: String? = nil, logo: Media? = nil, type: String? = nil) { self.type = type - self.display = display + self.logo = logo self.action = action - self.logo = logo + self.display = display } required public init(from decoder: Decoder) throws { @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - display = try container.decode(String.self, forKey: .display) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -76,11 +76,11 @@ public extension ApplicationClient { try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(display, forKey: .display) + try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(display, forKey: .display) } } } diff --git a/Sources/code/application/models/BankDetailsForOTPAppModelClass.swift b/Sources/code/application/models/BankDetailsForOTPAppModelClass.swift index 1638905ae5..a78c4a65c0 100644 --- a/Sources/code/application/models/BankDetailsForOTPAppModelClass.swift +++ b/Sources/code/application/models/BankDetailsForOTPAppModelClass.swift @@ -7,66 +7,66 @@ public extension ApplicationClient { Used By: Payment */ class BankDetailsForOTP: Codable { - public var ifscCode: String - - public var bankName: String + public var branchName: String public var accountHolder: String + public var bankName: String + public var accountNo: String - public var branchName: String + public var ifscCode: String public enum CodingKeys: String, CodingKey { - case ifscCode = "ifsc_code" - - case bankName = "bank_name" + case branchName = "branch_name" case accountHolder = "account_holder" + case bankName = "bank_name" + case accountNo = "account_no" - case branchName = "branch_name" + case ifscCode = "ifsc_code" } public init(accountHolder: String, accountNo: String, bankName: String, branchName: String, ifscCode: String) { - self.ifscCode = ifscCode - - self.bankName = bankName + self.branchName = branchName self.accountHolder = accountHolder + self.bankName = bankName + self.accountNo = accountNo - self.branchName = branchName + self.ifscCode = ifscCode } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - ifscCode = try container.decode(String.self, forKey: .ifscCode) - - bankName = try container.decode(String.self, forKey: .bankName) + branchName = try container.decode(String.self, forKey: .branchName) accountHolder = try container.decode(String.self, forKey: .accountHolder) + bankName = try container.decode(String.self, forKey: .bankName) + accountNo = try container.decode(String.self, forKey: .accountNo) - branchName = try container.decode(String.self, forKey: .branchName) + ifscCode = try container.decode(String.self, forKey: .ifscCode) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) - - try? container.encodeIfPresent(bankName, forKey: .bankName) + try? container.encodeIfPresent(branchName, forKey: .branchName) try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) + try? container.encodeIfPresent(bankName, forKey: .bankName) + try? container.encodeIfPresent(accountNo, forKey: .accountNo) - try? container.encodeIfPresent(branchName, forKey: .branchName) + try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) } } } diff --git a/Sources/code/application/models/BeneficiaryModeDetailsAppModelClass.swift b/Sources/code/application/models/BeneficiaryModeDetailsAppModelClass.swift index 5d15877a5c..fe80126de4 100644 --- a/Sources/code/application/models/BeneficiaryModeDetailsAppModelClass.swift +++ b/Sources/code/application/models/BeneficiaryModeDetailsAppModelClass.swift @@ -7,11 +7,7 @@ public extension ApplicationClient { Used By: Payment */ class BeneficiaryModeDetails: Codable { - public var ifscCode: String - - public var bankName: String - - public var wallet: String? + public var branchName: String public var mobile: String @@ -19,22 +15,22 @@ public extension ApplicationClient { public var accountHolder: String - public var address: String? + public var bankName: String - public var email: String + public var comment: String? - public var accountNo: String + public var address: String? - public var comment: String? + public var accountNo: String - public var branchName: String + public var ifscCode: String - public enum CodingKeys: String, CodingKey { - case ifscCode = "ifsc_code" + public var email: String - case bankName = "bank_name" + public var wallet: String? - case wallet + public enum CodingKeys: String, CodingKey { + case branchName = "branch_name" case mobile @@ -42,23 +38,23 @@ public extension ApplicationClient { case accountHolder = "account_holder" - case address + case bankName = "bank_name" - case email + case comment + + case address case accountNo = "account_no" - case comment + case ifscCode = "ifsc_code" - case branchName = "branch_name" + case email + + case wallet } public init(accountHolder: String, accountNo: String, address: String? = nil, bankName: String, branchName: String, comment: String? = nil, email: String, ifscCode: String, mobile: String, vpa: String? = nil, wallet: String? = nil) { - self.ifscCode = ifscCode - - self.bankName = bankName - - self.wallet = wallet + self.branchName = branchName self.mobile = mobile @@ -66,44 +62,48 @@ public extension ApplicationClient { self.accountHolder = accountHolder - self.address = address + self.bankName = bankName - self.email = email + self.comment = comment + + self.address = address self.accountNo = accountNo - self.comment = comment + self.ifscCode = ifscCode - self.branchName = branchName + self.email = email + + self.wallet = wallet } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - ifscCode = try container.decode(String.self, forKey: .ifscCode) + branchName = try container.decode(String.self, forKey: .branchName) - bankName = try container.decode(String.self, forKey: .bankName) + mobile = try container.decode(String.self, forKey: .mobile) do { - wallet = try container.decode(String.self, forKey: .wallet) + vpa = try container.decode(String.self, forKey: .vpa) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - mobile = try container.decode(String.self, forKey: .mobile) + accountHolder = try container.decode(String.self, forKey: .accountHolder) + + bankName = try container.decode(String.self, forKey: .bankName) do { - vpa = try container.decode(String.self, forKey: .vpa) + comment = try container.decode(String.self, forKey: .comment) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - accountHolder = try container.decode(String.self, forKey: .accountHolder) - do { address = try container.decode(String.self, forKey: .address) @@ -112,29 +112,25 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} - email = try container.decode(String.self, forKey: .email) - accountNo = try container.decode(String.self, forKey: .accountNo) + ifscCode = try container.decode(String.self, forKey: .ifscCode) + + email = try container.decode(String.self, forKey: .email) + do { - comment = try container.decode(String.self, forKey: .comment) + wallet = try container.decode(String.self, forKey: .wallet) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - branchName = try container.decode(String.self, forKey: .branchName) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) - - try? container.encodeIfPresent(bankName, forKey: .bankName) - - try? container.encode(wallet, forKey: .wallet) + try? container.encodeIfPresent(branchName, forKey: .branchName) try? container.encodeIfPresent(mobile, forKey: .mobile) @@ -142,15 +138,19 @@ public extension ApplicationClient { try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(bankName, forKey: .bankName) - try? container.encodeIfPresent(email, forKey: .email) + try? container.encodeIfPresent(comment, forKey: .comment) + + try? container.encodeIfPresent(address, forKey: .address) try? container.encodeIfPresent(accountNo, forKey: .accountNo) - try? container.encodeIfPresent(comment, forKey: .comment) + try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) - try? container.encodeIfPresent(branchName, forKey: .branchName) + try? container.encodeIfPresent(email, forKey: .email) + + try? container.encode(wallet, forKey: .wallet) } } } diff --git a/Sources/code/application/models/BrandDetailResponseAppModelClass.swift b/Sources/code/application/models/BrandDetailResponseAppModelClass.swift index ea58a36d5f..8937e2572c 100644 --- a/Sources/code/application/models/BrandDetailResponseAppModelClass.swift +++ b/Sources/code/application/models/BrandDetailResponseAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class BrandDetailResponse: Codable { - public var name: String? - - public var banners: ImageUrls? - public var uid: Int? public var logo: Media? - public enum CodingKeys: String, CodingKey { - case name + public var banners: ImageUrls? - case banners + public var name: String? + public enum CodingKeys: String, CodingKey { case uid case logo - } - public init(banners: ImageUrls? = nil, logo: Media? = nil, name: String? = nil, uid: Int? = nil) { - self.name = name + case banners - self.banners = banners + case name + } + public init(banners: ImageUrls? = nil, logo: Media? = nil, name: String? = nil, uid: Int? = nil) { self.uid = uid self.logo = logo + + self.banners = banners + + self.name = name } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,13 +74,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) - - try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(banners, forKey: .banners) + + try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/application/models/BrandItemAppModelClass.swift b/Sources/code/application/models/BrandItemAppModelClass.swift index 4a364b9acd..c96d031e25 100644 --- a/Sources/code/application/models/BrandItemAppModelClass.swift +++ b/Sources/code/application/models/BrandItemAppModelClass.swift @@ -7,63 +7,63 @@ public extension ApplicationClient { Used By: Catalog */ class BrandItem: Codable { - public var discount: String? - public var action: ProductListingAction? - public var slug: String? + public var banners: ImageUrls? public var name: String? - public var banners: ImageUrls? - - public var uid: Int? + public var departments: [String]? public var logo: Media? - public var departments: [String]? + public var slug: String? - public enum CodingKeys: String, CodingKey { - case discount + public var uid: Int? + public var discount: String? + + public enum CodingKeys: String, CodingKey { case action - case slug + case banners case name - case banners - - case uid + case departments case logo - case departments + case slug + + case uid + + case discount } public init(action: ProductListingAction? = nil, banners: ImageUrls? = nil, departments: [String]? = nil, discount: String? = nil, logo: Media? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { - self.discount = discount - self.action = action - self.slug = slug + self.banners = banners self.name = name - self.banners = banners - - self.uid = uid + self.departments = departments self.logo = logo - self.departments = departments + self.slug = slug + + self.uid = uid + + self.discount = discount } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - discount = try container.decode(String.self, forKey: .discount) + action = try container.decode(ProductListingAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -71,7 +71,7 @@ public extension ApplicationClient { } catch {} do { - action = try container.decode(ProductListingAction.self, forKey: .action) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -79,7 +79,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -87,7 +87,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + departments = try container.decode([String].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -95,7 +95,7 @@ public extension ApplicationClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -103,7 +103,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -111,7 +111,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -119,7 +119,7 @@ public extension ApplicationClient { } catch {} do { - departments = try container.decode([String].self, forKey: .departments) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,21 +130,21 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(discount, forKey: .discount) - try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(banners, forKey: .banners) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(banners, forKey: .banners) - - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(departments, forKey: .departments) try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(discount, forKey: .discount) } } } diff --git a/Sources/code/application/models/CardAppModelClass.swift b/Sources/code/application/models/CardAppModelClass.swift index 3720557b4d..d08b312152 100644 --- a/Sources/code/application/models/CardAppModelClass.swift +++ b/Sources/code/application/models/CardAppModelClass.swift @@ -7,113 +7,111 @@ public extension ApplicationClient { Used By: Payment */ class Card: Codable { - public var aggregatorName: String - - public var cardIsin: String? + public var cardBrand: String? - public var expYear: Int? + public var cardId: String? - public var cardBrandImage: String? + public var cardName: String? - public var cardBrand: String? + public var aggregatorName: String - public var cardIssuer: String? + public var expired: Bool? public var cardReference: String? - public var cardType: String? + public var cardNumber: String? + + public var expMonth: Int? public var nickname: String? - public var cardName: String? + public var expYear: Int? - public var expired: Bool? + public var cardIsin: String? - public var expMonth: Int? + public var cardType: String? - public var cardFingerprint: String? + public var cardIssuer: String? - public var cardId: String? + public var cardBrandImage: String? public var cardToken: String? - public var cardNumber: String? + public var cardFingerprint: String? public enum CodingKeys: String, CodingKey { - case aggregatorName = "aggregator_name" - - case cardIsin = "card_isin" + case cardBrand = "card_brand" - case expYear = "exp_year" + case cardId = "card_id" - case cardBrandImage = "card_brand_image" + case cardName = "card_name" - case cardBrand = "card_brand" + case aggregatorName = "aggregator_name" - case cardIssuer = "card_issuer" + case expired case cardReference = "card_reference" - case cardType = "card_type" + case cardNumber = "card_number" + + case expMonth = "exp_month" case nickname - case cardName = "card_name" + case expYear = "exp_year" - case expired + case cardIsin = "card_isin" - case expMonth = "exp_month" + case cardType = "card_type" - case cardFingerprint = "card_fingerprint" + case cardIssuer = "card_issuer" - case cardId = "card_id" + case cardBrandImage = "card_brand_image" case cardToken = "card_token" - case cardNumber = "card_number" + case cardFingerprint = "card_fingerprint" } public init(aggregatorName: String, cardBrand: String? = nil, cardBrandImage: String? = nil, cardFingerprint: String? = nil, cardId: String? = nil, cardIsin: String? = nil, cardIssuer: String? = nil, cardName: String? = nil, cardNumber: String? = nil, cardReference: String? = nil, cardToken: String? = nil, cardType: String? = nil, expired: Bool? = nil, expMonth: Int? = nil, expYear: Int? = nil, nickname: String? = nil) { - self.aggregatorName = aggregatorName - - self.cardIsin = cardIsin + self.cardBrand = cardBrand - self.expYear = expYear + self.cardId = cardId - self.cardBrandImage = cardBrandImage + self.cardName = cardName - self.cardBrand = cardBrand + self.aggregatorName = aggregatorName - self.cardIssuer = cardIssuer + self.expired = expired self.cardReference = cardReference - self.cardType = cardType + self.cardNumber = cardNumber + + self.expMonth = expMonth self.nickname = nickname - self.cardName = cardName + self.expYear = expYear - self.expired = expired + self.cardIsin = cardIsin - self.expMonth = expMonth + self.cardType = cardType - self.cardFingerprint = cardFingerprint + self.cardIssuer = cardIssuer - self.cardId = cardId + self.cardBrandImage = cardBrandImage self.cardToken = cardToken - self.cardNumber = cardNumber + self.cardFingerprint = cardFingerprint } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - aggregatorName = try container.decode(String.self, forKey: .aggregatorName) - do { - cardIsin = try container.decode(String.self, forKey: .cardIsin) + cardBrand = try container.decode(String.self, forKey: .cardBrand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -121,7 +119,7 @@ public extension ApplicationClient { } catch {} do { - expYear = try container.decode(Int.self, forKey: .expYear) + cardId = try container.decode(String.self, forKey: .cardId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -129,15 +127,17 @@ public extension ApplicationClient { } catch {} do { - cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) + cardName = try container.decode(String.self, forKey: .cardName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + aggregatorName = try container.decode(String.self, forKey: .aggregatorName) + do { - cardBrand = try container.decode(String.self, forKey: .cardBrand) + expired = try container.decode(Bool.self, forKey: .expired) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -145,7 +145,7 @@ public extension ApplicationClient { } catch {} do { - cardIssuer = try container.decode(String.self, forKey: .cardIssuer) + cardReference = try container.decode(String.self, forKey: .cardReference) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -153,7 +153,7 @@ public extension ApplicationClient { } catch {} do { - cardReference = try container.decode(String.self, forKey: .cardReference) + cardNumber = try container.decode(String.self, forKey: .cardNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -161,7 +161,7 @@ public extension ApplicationClient { } catch {} do { - cardType = try container.decode(String.self, forKey: .cardType) + expMonth = try container.decode(Int.self, forKey: .expMonth) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -177,7 +177,7 @@ public extension ApplicationClient { } catch {} do { - cardName = try container.decode(String.self, forKey: .cardName) + expYear = try container.decode(Int.self, forKey: .expYear) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -185,7 +185,7 @@ public extension ApplicationClient { } catch {} do { - expired = try container.decode(Bool.self, forKey: .expired) + cardIsin = try container.decode(String.self, forKey: .cardIsin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -193,7 +193,7 @@ public extension ApplicationClient { } catch {} do { - expMonth = try container.decode(Int.self, forKey: .expMonth) + cardType = try container.decode(String.self, forKey: .cardType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -201,7 +201,7 @@ public extension ApplicationClient { } catch {} do { - cardFingerprint = try container.decode(String.self, forKey: .cardFingerprint) + cardIssuer = try container.decode(String.self, forKey: .cardIssuer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -209,7 +209,7 @@ public extension ApplicationClient { } catch {} do { - cardId = try container.decode(String.self, forKey: .cardId) + cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -225,7 +225,7 @@ public extension ApplicationClient { } catch {} do { - cardNumber = try container.decode(String.self, forKey: .cardNumber) + cardFingerprint = try container.decode(String.self, forKey: .cardFingerprint) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -236,37 +236,37 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) - - try? container.encode(cardIsin, forKey: .cardIsin) + try? container.encode(cardBrand, forKey: .cardBrand) - try? container.encode(expYear, forKey: .expYear) + try? container.encode(cardId, forKey: .cardId) - try? container.encode(cardBrandImage, forKey: .cardBrandImage) + try? container.encode(cardName, forKey: .cardName) - try? container.encode(cardBrand, forKey: .cardBrand) + try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) - try? container.encode(cardIssuer, forKey: .cardIssuer) + try? container.encode(expired, forKey: .expired) try? container.encode(cardReference, forKey: .cardReference) - try? container.encode(cardType, forKey: .cardType) + try? container.encode(cardNumber, forKey: .cardNumber) + + try? container.encode(expMonth, forKey: .expMonth) try? container.encode(nickname, forKey: .nickname) - try? container.encode(cardName, forKey: .cardName) + try? container.encode(expYear, forKey: .expYear) - try? container.encode(expired, forKey: .expired) + try? container.encode(cardIsin, forKey: .cardIsin) - try? container.encode(expMonth, forKey: .expMonth) + try? container.encode(cardType, forKey: .cardType) - try? container.encode(cardFingerprint, forKey: .cardFingerprint) + try? container.encode(cardIssuer, forKey: .cardIssuer) - try? container.encode(cardId, forKey: .cardId) + try? container.encode(cardBrandImage, forKey: .cardBrandImage) try? container.encode(cardToken, forKey: .cardToken) - try? container.encode(cardNumber, forKey: .cardNumber) + try? container.encode(cardFingerprint, forKey: .cardFingerprint) } } } diff --git a/Sources/code/application/models/CardPaymentGatewayAppModelClass.swift b/Sources/code/application/models/CardPaymentGatewayAppModelClass.swift index cbcdbc220e..46ba0c5f84 100644 --- a/Sources/code/application/models/CardPaymentGatewayAppModelClass.swift +++ b/Sources/code/application/models/CardPaymentGatewayAppModelClass.swift @@ -7,43 +7,43 @@ public extension ApplicationClient { Used By: Payment */ class CardPaymentGateway: Codable { - public var api: String? - public var aggregator: String public var customerId: String? - public enum CodingKeys: String, CodingKey { - case api + public var api: String? + public enum CodingKeys: String, CodingKey { case aggregator case customerId = "customer_id" + + case api } public init(aggregator: String, api: String? = nil, customerId: String? = nil) { - self.api = api - self.aggregator = aggregator self.customerId = customerId + + self.api = api } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + aggregator = try container.decode(String.self, forKey: .aggregator) + do { - api = try container.decode(String.self, forKey: .api) + customerId = try container.decode(String.self, forKey: .customerId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - aggregator = try container.decode(String.self, forKey: .aggregator) - do { - customerId = try container.decode(String.self, forKey: .customerId) + api = try container.decode(String.self, forKey: .api) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,11 +54,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(api, forKey: .api) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) try? container.encode(customerId, forKey: .customerId) + + try? container.encode(api, forKey: .api) } } } diff --git a/Sources/code/application/models/CategoryItemsAppModelClass.swift b/Sources/code/application/models/CategoryItemsAppModelClass.swift index 129b64b062..cd38a9ae7a 100644 --- a/Sources/code/application/models/CategoryItemsAppModelClass.swift +++ b/Sources/code/application/models/CategoryItemsAppModelClass.swift @@ -7,51 +7,51 @@ public extension ApplicationClient { Used By: Catalog */ class CategoryItems: Codable { + public var childs: [Child]? + public var action: ProductListingAction? - public var slug: String? + public var banners: ImageUrls? public var name: String? - public var banners: ImageUrls? + public var slug: String? public var uid: Int? - public var childs: [Child]? - public enum CodingKeys: String, CodingKey { + case childs + case action - case slug + case banners case name - case banners + case slug case uid - - case childs } public init(action: ProductListingAction? = nil, banners: ImageUrls? = nil, childs: [Child]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { + self.childs = childs + self.action = action - self.slug = slug + self.banners = banners self.name = name - self.banners = banners + self.slug = slug self.uid = uid - - self.childs = childs } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - action = try container.decode(ProductListingAction.self, forKey: .action) + childs = try container.decode([Child].self, forKey: .childs) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -59,7 +59,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + action = try container.decode(ProductListingAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -67,7 +67,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,7 +75,7 @@ public extension ApplicationClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -83,7 +83,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension ApplicationClient { } catch {} do { - childs = try container.decode([Child].self, forKey: .childs) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,17 +102,17 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(childs, forKey: .childs) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(banners, forKey: .banners) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(slug, forKey: .slug) try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(childs, forKey: .childs) } } } diff --git a/Sources/code/application/models/CategoryListingResponseAppModelClass.swift b/Sources/code/application/models/CategoryListingResponseAppModelClass.swift index fae5cedd54..aa792f2ac5 100644 --- a/Sources/code/application/models/CategoryListingResponseAppModelClass.swift +++ b/Sources/code/application/models/CategoryListingResponseAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class CategoryListingResponse: Codable { - public var departments: [DepartmentIdentifier]? - public var data: [DepartmentCategoryTree]? - public enum CodingKeys: String, CodingKey { - case departments + public var departments: [DepartmentIdentifier]? + public enum CodingKeys: String, CodingKey { case data + + case departments } public init(data: [DepartmentCategoryTree]? = nil, departments: [DepartmentIdentifier]? = nil) { - self.departments = departments - self.data = data + + self.departments = departments } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - departments = try container.decode([DepartmentIdentifier].self, forKey: .departments) + data = try container.decode([DepartmentCategoryTree].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - data = try container.decode([DepartmentCategoryTree].self, forKey: .data) + departments = try container.decode([DepartmentIdentifier].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(departments, forKey: .departments) - try? container.encodeIfPresent(data, forKey: .data) + + try? container.encodeIfPresent(departments, forKey: .departments) } } } diff --git a/Sources/code/application/models/CategoryMetaResponseAppModelClass.swift b/Sources/code/application/models/CategoryMetaResponseAppModelClass.swift index 576995b7a0..19b320a215 100644 --- a/Sources/code/application/models/CategoryMetaResponseAppModelClass.swift +++ b/Sources/code/application/models/CategoryMetaResponseAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class CategoryMetaResponse: Codable { - public var name: String? - - public var banners: ImageUrls? - public var uid: Int? public var logo: Media? - public enum CodingKeys: String, CodingKey { - case name + public var banners: ImageUrls? - case banners + public var name: String? + public enum CodingKeys: String, CodingKey { case uid case logo - } - public init(banners: ImageUrls? = nil, logo: Media? = nil, name: String? = nil, uid: Int? = nil) { - self.name = name + case banners - self.banners = banners + case name + } + public init(banners: ImageUrls? = nil, logo: Media? = nil, name: String? = nil, uid: Int? = nil) { self.uid = uid self.logo = logo + + self.banners = banners + + self.name = name } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,13 +74,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) - - try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(banners, forKey: .banners) + + try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/application/models/ChargeCustomerRequestAppModelClass.swift b/Sources/code/application/models/ChargeCustomerRequestAppModelClass.swift index 5b3afe7c2d..95c0ab275a 100644 --- a/Sources/code/application/models/ChargeCustomerRequestAppModelClass.swift +++ b/Sources/code/application/models/ChargeCustomerRequestAppModelClass.swift @@ -7,78 +7,78 @@ public extension ApplicationClient { Used By: Payment */ class ChargeCustomerRequest: Codable { - public var aggregator: String + public var amount: Int - public var verified: Bool? + public var orderId: String public var transactionToken: String? - public var amount: Int + public var aggregator: String - public var orderId: String + public var verified: Bool? public enum CodingKeys: String, CodingKey { - case aggregator + case amount - case verified + case orderId = "order_id" case transactionToken = "transaction_token" - case amount + case aggregator - case orderId = "order_id" + case verified } public init(aggregator: String, amount: Int, orderId: String, transactionToken: String? = nil, verified: Bool? = nil) { - self.aggregator = aggregator + self.amount = amount - self.verified = verified + self.orderId = orderId self.transactionToken = transactionToken - self.amount = amount + self.aggregator = aggregator - self.orderId = orderId + self.verified = verified } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - aggregator = try container.decode(String.self, forKey: .aggregator) + amount = try container.decode(Int.self, forKey: .amount) + + orderId = try container.decode(String.self, forKey: .orderId) do { - verified = try container.decode(Bool.self, forKey: .verified) + transactionToken = try container.decode(String.self, forKey: .transactionToken) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + aggregator = try container.decode(String.self, forKey: .aggregator) + do { - transactionToken = try container.decode(String.self, forKey: .transactionToken) + verified = try container.decode(Bool.self, forKey: .verified) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - amount = try container.decode(Int.self, forKey: .amount) - - orderId = try container.decode(String.self, forKey: .orderId) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) + try? container.encode(amount, forKey: .amount) - try? container.encode(verified, forKey: .verified) + try? container.encodeIfPresent(orderId, forKey: .orderId) try? container.encode(transactionToken, forKey: .transactionToken) - try? container.encode(amount, forKey: .amount) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encodeIfPresent(orderId, forKey: .orderId) + try? container.encode(verified, forKey: .verified) } } } diff --git a/Sources/code/application/models/ChargeCustomerResponseAppModelClass.swift b/Sources/code/application/models/ChargeCustomerResponseAppModelClass.swift index 14c7959900..120c5a2f73 100644 --- a/Sources/code/application/models/ChargeCustomerResponseAppModelClass.swift +++ b/Sources/code/application/models/ChargeCustomerResponseAppModelClass.swift @@ -7,48 +7,48 @@ public extension ApplicationClient { Used By: Payment */ class ChargeCustomerResponse: Codable { - public var aggregator: String + public var cartId: String? - public var success: Bool + public var deliveryAddressId: String? public var status: String - public var cartId: String? + public var orderId: String - public var deliveryAddressId: String? + public var aggregator: String - public var orderId: String + public var success: Bool public var message: String public enum CodingKeys: String, CodingKey { - case aggregator + case cartId = "cart_id" - case success + case deliveryAddressId = "delivery_address_id" case status - case cartId = "cart_id" + case orderId = "order_id" - case deliveryAddressId = "delivery_address_id" + case aggregator - case orderId = "order_id" + case success case message } public init(aggregator: String, cartId: String? = nil, deliveryAddressId: String? = nil, message: String, orderId: String, status: String, success: Bool) { - self.aggregator = aggregator + self.cartId = cartId - self.success = success + self.deliveryAddressId = deliveryAddressId self.status = status - self.cartId = cartId + self.orderId = orderId - self.deliveryAddressId = deliveryAddressId + self.aggregator = aggregator - self.orderId = orderId + self.success = success self.message = message } @@ -56,12 +56,6 @@ public extension ApplicationClient { required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - aggregator = try container.decode(String.self, forKey: .aggregator) - - success = try container.decode(Bool.self, forKey: .success) - - status = try container.decode(String.self, forKey: .status) - do { cartId = try container.decode(String.self, forKey: .cartId) @@ -78,25 +72,31 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} + status = try container.decode(String.self, forKey: .status) + orderId = try container.decode(String.self, forKey: .orderId) + aggregator = try container.decode(String.self, forKey: .aggregator) + + success = try container.decode(Bool.self, forKey: .success) + message = try container.decode(String.self, forKey: .message) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) + try? container.encode(cartId, forKey: .cartId) - try? container.encodeIfPresent(success, forKey: .success) + try? container.encode(deliveryAddressId, forKey: .deliveryAddressId) try? container.encodeIfPresent(status, forKey: .status) - try? container.encode(cartId, forKey: .cartId) + try? container.encodeIfPresent(orderId, forKey: .orderId) - try? container.encode(deliveryAddressId, forKey: .deliveryAddressId) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encodeIfPresent(orderId, forKey: .orderId) + try? container.encodeIfPresent(success, forKey: .success) try? container.encodeIfPresent(message, forKey: .message) } diff --git a/Sources/code/application/models/ChildAppModelClass.swift b/Sources/code/application/models/ChildAppModelClass.swift index 43e21dc2de..0dbd88d998 100644 --- a/Sources/code/application/models/ChildAppModelClass.swift +++ b/Sources/code/application/models/ChildAppModelClass.swift @@ -7,57 +7,57 @@ public extension ApplicationClient { Used By: Catalog */ class Child: Codable { - public var action: ProductListingAction? + public var childs: [SecondLevelChild]? - public var slug: String? + public var action: ProductListingAction? - public var name: String? + public var banners: ImageUrls? public var customJson: [String: Any]? - public var banners: ImageUrls? + public var name: String? - public var uid: Int? + public var slug: String? - public var childs: [SecondLevelChild]? + public var uid: Int? public enum CodingKeys: String, CodingKey { - case action + case childs - case slug + case action - case name + case banners case customJson = "_custom_json" - case banners + case name - case uid + case slug - case childs + case uid } public init(action: ProductListingAction? = nil, banners: ImageUrls? = nil, childs: [SecondLevelChild]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { - self.action = action + self.childs = childs - self.slug = slug + self.action = action - self.name = name + self.banners = banners self.customJson = customJson - self.banners = banners + self.name = name - self.uid = uid + self.slug = slug - self.childs = childs + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - action = try container.decode(ProductListingAction.self, forKey: .action) + childs = try container.decode([SecondLevelChild].self, forKey: .childs) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -65,7 +65,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + action = try container.decode(ProductListingAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -73,7 +73,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,7 +89,7 @@ public extension ApplicationClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -97,7 +97,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - childs = try container.decode([SecondLevelChild].self, forKey: .childs) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,19 +116,19 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(childs, forKey: .childs) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(banners, forKey: .banners) try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(childs, forKey: .childs) + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/CollectionDetailResponseAppModelClass.swift b/Sources/code/application/models/CollectionDetailResponseAppModelClass.swift index fb6f1a8338..fe724a6805 100644 --- a/Sources/code/application/models/CollectionDetailResponseAppModelClass.swift +++ b/Sources/code/application/models/CollectionDetailResponseAppModelClass.swift @@ -7,108 +7,108 @@ public extension ApplicationClient { Used By: Catalog */ class CollectionDetailResponse: Codable { - public var tag: [String]? + public var schedule: [String: Any]? public var type: String? - public var cron: [String: Any]? - - public var isActive: Bool? - - public var description: String? + public var appId: String? - public var slug: String? + public var banners: ImageUrls? - public var badge: [String: Any]? + public var isActive: Bool? public var name: String? - public var visibleFacetsKeys: [String]? + public var tag: [String]? - public var allowSort: Bool? + public var visibleFacetsKeys: [String]? - public var banners: ImageUrls? + public var badge: [String: Any]? public var logo: Media? public var query: [String: Any]? - public var appId: String? + public var slug: String? + + public var allowSort: Bool? + + public var cron: [String: Any]? public var allowFacets: Bool? - public var schedule: [String: Any]? + public var description: String? public var meta: [String: Any]? public enum CodingKeys: String, CodingKey { - case tag + case schedule = "_schedule" case type - case cron - - case isActive = "is_active" - - case description + case appId = "app_id" - case slug + case banners - case badge + case isActive = "is_active" case name - case visibleFacetsKeys = "visible_facets_keys" + case tag - case allowSort = "allow_sort" + case visibleFacetsKeys = "visible_facets_keys" - case banners + case badge case logo case query - case appId = "app_id" + case slug + + case allowSort = "allow_sort" + + case cron case allowFacets = "allow_facets" - case schedule = "_schedule" + case description case meta } public init(allowFacets: Bool? = nil, allowSort: Bool? = nil, appId: String? = nil, badge: [String: Any]? = nil, banners: ImageUrls? = nil, cron: [String: Any]? = nil, description: String? = nil, isActive: Bool? = nil, logo: Media? = nil, meta: [String: Any]? = nil, name: String? = nil, query: [String: Any]? = nil, slug: String? = nil, tag: [String]? = nil, type: String? = nil, visibleFacetsKeys: [String]? = nil, schedule: [String: Any]? = nil) { - self.tag = tag + self.schedule = schedule self.type = type - self.cron = cron - - self.isActive = isActive - - self.description = description + self.appId = appId - self.slug = slug + self.banners = banners - self.badge = badge + self.isActive = isActive self.name = name - self.visibleFacetsKeys = visibleFacetsKeys + self.tag = tag - self.allowSort = allowSort + self.visibleFacetsKeys = visibleFacetsKeys - self.banners = banners + self.badge = badge self.logo = logo self.query = query - self.appId = appId + self.slug = slug + + self.allowSort = allowSort + + self.cron = cron self.allowFacets = allowFacets - self.schedule = schedule + self.description = description self.meta = meta } @@ -117,7 +117,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - tag = try container.decode([String].self, forKey: .tag) + schedule = try container.decode([String: Any].self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -133,7 +133,7 @@ public extension ApplicationClient { } catch {} do { - cron = try container.decode([String: Any].self, forKey: .cron) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -141,7 +141,7 @@ public extension ApplicationClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -149,7 +149,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -157,7 +157,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -165,7 +165,7 @@ public extension ApplicationClient { } catch {} do { - badge = try container.decode([String: Any].self, forKey: .badge) + tag = try container.decode([String].self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -173,7 +173,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -181,7 +181,7 @@ public extension ApplicationClient { } catch {} do { - visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) + badge = try container.decode([String: Any].self, forKey: .badge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -189,7 +189,7 @@ public extension ApplicationClient { } catch {} do { - allowSort = try container.decode(Bool.self, forKey: .allowSort) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -197,7 +197,7 @@ public extension ApplicationClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -205,7 +205,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -213,7 +213,7 @@ public extension ApplicationClient { } catch {} do { - query = try container.decode([String: Any].self, forKey: .query) + allowSort = try container.decode(Bool.self, forKey: .allowSort) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -221,7 +221,7 @@ public extension ApplicationClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + cron = try container.decode([String: Any].self, forKey: .cron) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -237,7 +237,7 @@ public extension ApplicationClient { } catch {} do { - schedule = try container.decode([String: Any].self, forKey: .schedule) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -256,37 +256,37 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(tag, forKey: .tag) + try? container.encodeIfPresent(schedule, forKey: .schedule) try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(cron, forKey: .cron) - - try? container.encodeIfPresent(isActive, forKey: .isActive) - - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) + try? container.encodeIfPresent(tag, forKey: .tag) - try? container.encodeIfPresent(allowSort, forKey: .allowSort) + try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(badge, forKey: .badge) try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(query, forKey: .query) - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(allowSort, forKey: .allowSort) + + try? container.encodeIfPresent(cron, forKey: .cron) try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) - try? container.encodeIfPresent(schedule, forKey: .schedule) + try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(meta, forKey: .meta) } diff --git a/Sources/code/application/models/CollectionListingFilterAppModelClass.swift b/Sources/code/application/models/CollectionListingFilterAppModelClass.swift index 1037f4b271..c90ad47dae 100644 --- a/Sources/code/application/models/CollectionListingFilterAppModelClass.swift +++ b/Sources/code/application/models/CollectionListingFilterAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class CollectionListingFilter: Codable { - public var type: [CollectionListingFilterType]? - public var tags: [CollectionListingFilterTag]? - public enum CodingKeys: String, CodingKey { - case type + public var type: [CollectionListingFilterType]? + public enum CodingKeys: String, CodingKey { case tags + + case type } public init(tags: [CollectionListingFilterTag]? = nil, type: [CollectionListingFilterType]? = nil) { - self.type = type - self.tags = tags + + self.type = type } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - type = try container.decode([CollectionListingFilterType].self, forKey: .type) + tags = try container.decode([CollectionListingFilterTag].self, forKey: .tags) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - tags = try container.decode([CollectionListingFilterTag].self, forKey: .tags) + type = try container.decode([CollectionListingFilterType].self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(tags, forKey: .tags) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/application/models/CollectionListingFilterTagAppModelClass.swift b/Sources/code/application/models/CollectionListingFilterTagAppModelClass.swift index f3d8a301ae..954a2657c5 100644 --- a/Sources/code/application/models/CollectionListingFilterTagAppModelClass.swift +++ b/Sources/code/application/models/CollectionListingFilterTagAppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class CollectionListingFilterTag: Codable { - public var name: String? + public var isSelected: Bool? public var display: String? - public var isSelected: Bool? + public var name: String? public enum CodingKeys: String, CodingKey { - case name + case isSelected = "is_selected" case display - case isSelected = "is_selected" + case name } public init(display: String? = nil, isSelected: Bool? = nil, name: String? = nil) { - self.name = name + self.isSelected = isSelected self.display = display - self.isSelected = isSelected + self.name = name } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + isSelected = try container.decode(Bool.self, forKey: .isSelected) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - isSelected = try container.decode(Bool.self, forKey: .isSelected) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,11 +60,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(isSelected, forKey: .isSelected) try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(isSelected, forKey: .isSelected) + try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/application/models/CollectionListingFilterTypeAppModelClass.swift b/Sources/code/application/models/CollectionListingFilterTypeAppModelClass.swift index a024d6681f..1ba02f6577 100644 --- a/Sources/code/application/models/CollectionListingFilterTypeAppModelClass.swift +++ b/Sources/code/application/models/CollectionListingFilterTypeAppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class CollectionListingFilterType: Codable { - public var name: String? + public var isSelected: Bool? public var display: String? - public var isSelected: Bool? + public var name: String? public enum CodingKeys: String, CodingKey { - case name + case isSelected = "is_selected" case display - case isSelected = "is_selected" + case name } public init(display: String? = nil, isSelected: Bool? = nil, name: String? = nil) { - self.name = name + self.isSelected = isSelected self.display = display - self.isSelected = isSelected + self.name = name } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + isSelected = try container.decode(Bool.self, forKey: .isSelected) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - isSelected = try container.decode(Bool.self, forKey: .isSelected) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,11 +60,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(isSelected, forKey: .isSelected) try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(isSelected, forKey: .isSelected) + try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/application/models/ColumnHeadersAppModelClass.swift b/Sources/code/application/models/ColumnHeadersAppModelClass.swift index 76d1310629..6b2b3967b1 100644 --- a/Sources/code/application/models/ColumnHeadersAppModelClass.swift +++ b/Sources/code/application/models/ColumnHeadersAppModelClass.swift @@ -7,51 +7,51 @@ public extension ApplicationClient { Used By: Catalog */ class ColumnHeaders: Codable { - public var col3: ColumnHeader? + public var col4: ColumnHeader? - public var col6: ColumnHeader? + public var col5: ColumnHeader? - public var col1: ColumnHeader? + public var col6: ColumnHeader? public var col2: ColumnHeader? - public var col5: ColumnHeader? + public var col1: ColumnHeader? - public var col4: ColumnHeader? + public var col3: ColumnHeader? public enum CodingKeys: String, CodingKey { - case col3 = "col_3" + case col4 = "col_4" - case col6 = "col_6" + case col5 = "col_5" - case col1 = "col_1" + case col6 = "col_6" case col2 = "col_2" - case col5 = "col_5" + case col1 = "col_1" - case col4 = "col_4" + case col3 = "col_3" } public init(col1: ColumnHeader? = nil, col2: ColumnHeader? = nil, col3: ColumnHeader? = nil, col4: ColumnHeader? = nil, col5: ColumnHeader? = nil, col6: ColumnHeader? = nil) { - self.col3 = col3 + self.col4 = col4 - self.col6 = col6 + self.col5 = col5 - self.col1 = col1 + self.col6 = col6 self.col2 = col2 - self.col5 = col5 + self.col1 = col1 - self.col4 = col4 + self.col3 = col3 } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - col3 = try container.decode(ColumnHeader.self, forKey: .col3) + col4 = try container.decode(ColumnHeader.self, forKey: .col4) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -59,7 +59,7 @@ public extension ApplicationClient { } catch {} do { - col6 = try container.decode(ColumnHeader.self, forKey: .col6) + col5 = try container.decode(ColumnHeader.self, forKey: .col5) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -67,7 +67,7 @@ public extension ApplicationClient { } catch {} do { - col1 = try container.decode(ColumnHeader.self, forKey: .col1) + col6 = try container.decode(ColumnHeader.self, forKey: .col6) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -83,7 +83,7 @@ public extension ApplicationClient { } catch {} do { - col5 = try container.decode(ColumnHeader.self, forKey: .col5) + col1 = try container.decode(ColumnHeader.self, forKey: .col1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension ApplicationClient { } catch {} do { - col4 = try container.decode(ColumnHeader.self, forKey: .col4) + col3 = try container.decode(ColumnHeader.self, forKey: .col3) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,17 +102,17 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(col3, forKey: .col3) + try? container.encodeIfPresent(col4, forKey: .col4) - try? container.encodeIfPresent(col6, forKey: .col6) + try? container.encodeIfPresent(col5, forKey: .col5) - try? container.encodeIfPresent(col1, forKey: .col1) + try? container.encodeIfPresent(col6, forKey: .col6) try? container.encodeIfPresent(col2, forKey: .col2) - try? container.encodeIfPresent(col5, forKey: .col5) + try? container.encodeIfPresent(col1, forKey: .col1) - try? container.encodeIfPresent(col4, forKey: .col4) + try? container.encodeIfPresent(col3, forKey: .col3) } } } diff --git a/Sources/code/application/models/CompanyStoreAppModelClass.swift b/Sources/code/application/models/CompanyStoreAppModelClass.swift index c2856b20f4..146a0bcf16 100644 --- a/Sources/code/application/models/CompanyStoreAppModelClass.swift +++ b/Sources/code/application/models/CompanyStoreAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class CompanyStore: Codable { - public var name: String? - public var companyType: String? - public var businessType: String? + public var name: String? public var uid: Int? - public enum CodingKeys: String, CodingKey { - case name + public var businessType: String? + public enum CodingKeys: String, CodingKey { case companyType = "company_type" - case businessType = "business_type" + case name case uid + + case businessType = "business_type" } public init(businessType: String? = nil, companyType: String? = nil, name: String? = nil, uid: Int? = nil) { - self.name = name - self.companyType = companyType - self.businessType = businessType + self.name = name self.uid = uid + + self.businessType = businessType } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + companyType = try container.decode(String.self, forKey: .companyType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - companyType = try container.decode(String.self, forKey: .companyType) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - businessType = try container.decode(String.self, forKey: .businessType) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + businessType = try container.decode(String.self, forKey: .businessType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,13 +74,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(companyType, forKey: .companyType) - try? container.encodeIfPresent(businessType, forKey: .businessType) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(businessType, forKey: .businessType) } } } diff --git a/Sources/code/application/models/DepartmentAppModelClass.swift b/Sources/code/application/models/DepartmentAppModelClass.swift index 80fc84d7fe..3eb8f7ea88 100644 --- a/Sources/code/application/models/DepartmentAppModelClass.swift +++ b/Sources/code/application/models/DepartmentAppModelClass.swift @@ -7,45 +7,45 @@ public extension ApplicationClient { Used By: Catalog */ class Department: Codable { - public var priorityOrder: Int? + public var name: String? + + public var logo: Media? public var slug: String? - public var name: String? + public var priorityOrder: Int? public var uid: Int? - public var logo: Media? - public enum CodingKeys: String, CodingKey { - case priorityOrder = "priority_order" + case name + + case logo case slug - case name + case priorityOrder = "priority_order" case uid - - case logo } public init(logo: Media? = nil, name: String? = nil, priorityOrder: Int? = nil, slug: String? = nil, uid: Int? = nil) { - self.priorityOrder = priorityOrder + self.name = name + + self.logo = logo self.slug = slug - self.name = name + self.priorityOrder = priorityOrder self.uid = uid - - self.logo = logo } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - priorityOrder = try container.decode(Int.self, forKey: .priorityOrder) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -53,7 +53,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,7 +61,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -69,7 +69,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + priorityOrder = try container.decode(Int.self, forKey: .priorityOrder) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -88,15 +88,15 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) + try? container.encodeIfPresent(name, forKey: .name) + + try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(logo, forKey: .logo) } } } diff --git a/Sources/code/application/models/DetailsSchemaV2AppModelClass.swift b/Sources/code/application/models/DetailsSchemaV2AppModelClass.swift index 7caddf896d..01818f986d 100644 --- a/Sources/code/application/models/DetailsSchemaV2AppModelClass.swift +++ b/Sources/code/application/models/DetailsSchemaV2AppModelClass.swift @@ -7,25 +7,25 @@ public extension ApplicationClient { Used By: Catalog */ class DetailsSchemaV2: Codable { - public var value: String? - public var type: String? + public var value: String? + public var key: String? public enum CodingKeys: String, CodingKey { - case value - case type + case value + case key } public init(key: String? = nil, type: String? = nil, value: String? = nil) { - self.value = value - self.type = type + self.value = value + self.key = key } @@ -33,7 +33,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - value = try container.decode(String.self, forKey: .value) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,10 +60,10 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(key, forKey: .key) } } diff --git a/Sources/code/application/models/ErrorCodeDescriptionAppModelClass.swift b/Sources/code/application/models/ErrorCodeDescriptionAppModelClass.swift index 0863e66a56..4e0ce62af9 100644 --- a/Sources/code/application/models/ErrorCodeDescriptionAppModelClass.swift +++ b/Sources/code/application/models/ErrorCodeDescriptionAppModelClass.swift @@ -7,46 +7,46 @@ public extension ApplicationClient { Used By: Payment */ class ErrorCodeDescription: Codable { - public var success: Bool - public var code: String public var description: String - public enum CodingKeys: String, CodingKey { - case success + public var success: Bool + public enum CodingKeys: String, CodingKey { case code case description + + case success } public init(code: String, description: String, success: Bool) { - self.success = success - self.code = code self.description = description + + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - success = try container.decode(Bool.self, forKey: .success) - code = try container.decode(String.self, forKey: .code) description = try container.decode(String.self, forKey: .description) + + success = try container.decode(Bool.self, forKey: .success) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(code, forKey: .code) try? container.encodeIfPresent(description, forKey: .description) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/FollowIdsDataAppModelClass.swift b/Sources/code/application/models/FollowIdsDataAppModelClass.swift index 9f8e80d148..18daf8ff40 100644 --- a/Sources/code/application/models/FollowIdsDataAppModelClass.swift +++ b/Sources/code/application/models/FollowIdsDataAppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class FollowIdsData: Codable { - public var products: [Int]? + public var collections: [Int]? public var brands: [Int]? - public var collections: [Int]? + public var products: [Int]? public enum CodingKeys: String, CodingKey { - case products + case collections case brands - case collections + case products } public init(brands: [Int]? = nil, collections: [Int]? = nil, products: [Int]? = nil) { - self.products = products + self.collections = collections self.brands = brands - self.collections = collections + self.products = products } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - products = try container.decode([Int].self, forKey: .products) + collections = try container.decode([Int].self, forKey: .collections) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - collections = try container.decode([Int].self, forKey: .collections) + products = try container.decode([Int].self, forKey: .products) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,11 +60,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(products, forKey: .products) + try? container.encodeIfPresent(collections, forKey: .collections) try? container.encodeIfPresent(brands, forKey: .brands) - try? container.encodeIfPresent(collections, forKey: .collections) + try? container.encodeIfPresent(products, forKey: .products) } } } diff --git a/Sources/code/application/models/GetCollectionDetailNestAppModelClass.swift b/Sources/code/application/models/GetCollectionDetailNestAppModelClass.swift index 5a3558ba7a..3560c5c314 100644 --- a/Sources/code/application/models/GetCollectionDetailNestAppModelClass.swift +++ b/Sources/code/application/models/GetCollectionDetailNestAppModelClass.swift @@ -7,129 +7,129 @@ public extension ApplicationClient { Used By: Catalog */ class GetCollectionDetailNest: Codable { - public var cron: [String: Any]? + public var schedule: [String: Any]? + + public var type: String? public var action: ProductListingAction? - public var description: String? + public var tag: [String]? - public var slug: String? + public var name: String? public var allowSort: Bool? - public var logo: Media? - - public var isActive: Bool? - - public var visibleFacetsKeys: [String]? + public var allowFacets: Bool? public var meta: [String: Any]? - public var name: String? + public var banners: ImageUrls? - public var uid: String? + public var visibleFacetsKeys: [String]? - public var appId: String? + public var badge: [String: Any]? - public var allowFacets: Bool? + public var logo: Media? public var query: [String: Any]? - public var schedule: [String: Any]? + public var appId: String? - public var tag: [String]? + public var isActive: Bool? - public var type: String? + public var slug: String? - public var banners: ImageUrls? + public var cron: [String: Any]? - public var badge: [String: Any]? + public var description: String? + + public var uid: String? public enum CodingKeys: String, CodingKey { - case cron + case schedule = "_schedule" + + case type case action - case description + case tag - case slug + case name case allowSort = "allow_sort" - case logo - - case isActive = "is_active" - - case visibleFacetsKeys = "visible_facets_keys" + case allowFacets = "allow_facets" case meta - case name + case banners - case uid + case visibleFacetsKeys = "visible_facets_keys" - case appId = "app_id" + case badge - case allowFacets = "allow_facets" + case logo case query - case schedule = "_schedule" + case appId = "app_id" - case tag + case isActive = "is_active" - case type + case slug - case banners + case cron - case badge + case description + + case uid } public init(action: ProductListingAction? = nil, allowFacets: Bool? = nil, allowSort: Bool? = nil, appId: String? = nil, badge: [String: Any]? = nil, banners: ImageUrls? = nil, cron: [String: Any]? = nil, description: String? = nil, isActive: Bool? = nil, logo: Media? = nil, meta: [String: Any]? = nil, name: String? = nil, query: [String: Any]? = nil, slug: String? = nil, tag: [String]? = nil, type: String? = nil, uid: String? = nil, visibleFacetsKeys: [String]? = nil, schedule: [String: Any]? = nil) { - self.cron = cron + self.schedule = schedule + + self.type = type self.action = action - self.description = description + self.tag = tag - self.slug = slug + self.name = name self.allowSort = allowSort - self.logo = logo - - self.isActive = isActive - - self.visibleFacetsKeys = visibleFacetsKeys + self.allowFacets = allowFacets self.meta = meta - self.name = name + self.banners = banners - self.uid = uid + self.visibleFacetsKeys = visibleFacetsKeys - self.appId = appId + self.badge = badge - self.allowFacets = allowFacets + self.logo = logo self.query = query - self.schedule = schedule + self.appId = appId - self.tag = tag + self.isActive = isActive - self.type = type + self.slug = slug - self.banners = banners + self.cron = cron - self.badge = badge + self.description = description + + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - cron = try container.decode([String: Any].self, forKey: .cron) + schedule = try container.decode([String: Any].self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -137,7 +137,7 @@ public extension ApplicationClient { } catch {} do { - action = try container.decode(ProductListingAction.self, forKey: .action) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -145,7 +145,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + action = try container.decode(ProductListingAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -153,7 +153,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + tag = try container.decode([String].self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -161,7 +161,7 @@ public extension ApplicationClient { } catch {} do { - allowSort = try container.decode(Bool.self, forKey: .allowSort) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -169,7 +169,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + allowSort = try container.decode(Bool.self, forKey: .allowSort) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -177,7 +177,7 @@ public extension ApplicationClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + allowFacets = try container.decode(Bool.self, forKey: .allowFacets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -185,7 +185,7 @@ public extension ApplicationClient { } catch {} do { - visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -193,7 +193,7 @@ public extension ApplicationClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -201,7 +201,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -209,7 +209,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(String.self, forKey: .uid) + badge = try container.decode([String: Any].self, forKey: .badge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -217,7 +217,7 @@ public extension ApplicationClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -225,7 +225,7 @@ public extension ApplicationClient { } catch {} do { - allowFacets = try container.decode(Bool.self, forKey: .allowFacets) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -233,7 +233,7 @@ public extension ApplicationClient { } catch {} do { - query = try container.decode([String: Any].self, forKey: .query) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -241,7 +241,7 @@ public extension ApplicationClient { } catch {} do { - schedule = try container.decode([String: Any].self, forKey: .schedule) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -249,7 +249,7 @@ public extension ApplicationClient { } catch {} do { - tag = try container.decode([String].self, forKey: .tag) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -257,7 +257,7 @@ public extension ApplicationClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + cron = try container.decode([String: Any].self, forKey: .cron) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -265,7 +265,7 @@ public extension ApplicationClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -273,7 +273,7 @@ public extension ApplicationClient { } catch {} do { - badge = try container.decode([String: Any].self, forKey: .badge) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -284,43 +284,43 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(cron, forKey: .cron) + try? container.encodeIfPresent(schedule, forKey: .schedule) + + try? container.encodeIfPresent(type, forKey: .type) try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(tag, forKey: .tag) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(allowSort, forKey: .allowSort) - try? container.encodeIfPresent(logo, forKey: .logo) - - try? container.encodeIfPresent(isActive, forKey: .isActive) - - try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) + try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encodeIfPresent(badge, forKey: .badge) - try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) + try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(query, forKey: .query) - try? container.encodeIfPresent(schedule, forKey: .schedule) + try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(tag, forKey: .tag) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(cron, forKey: .cron) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(description, forKey: .description) + + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/GetCollectionListingResponseAppModelClass.swift b/Sources/code/application/models/GetCollectionListingResponseAppModelClass.swift index d33f5c8b06..e486527e7c 100644 --- a/Sources/code/application/models/GetCollectionListingResponseAppModelClass.swift +++ b/Sources/code/application/models/GetCollectionListingResponseAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class GetCollectionListingResponse: Codable { public var items: [GetCollectionDetailNest]? - public var page: Page - public var filters: CollectionListingFilter? + public var page: Page + public enum CodingKeys: String, CodingKey { case items - case page - case filters + + case page } public init(filters: CollectionListingFilter? = nil, items: [GetCollectionDetailNest]? = nil, page: Page) { self.items = items - self.page = page - self.filters = filters + + self.page = page } required public init(from decoder: Decoder) throws { @@ -40,8 +40,6 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} - page = try container.decode(Page.self, forKey: .page) - do { filters = try container.decode(CollectionListingFilter.self, forKey: .filters) @@ -49,6 +47,8 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + page = try container.decode(Page.self, forKey: .page) } public func encode(to encoder: Encoder) throws { @@ -56,9 +56,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(items, forKey: .items) - try? container.encodeIfPresent(page, forKey: .page) - try? container.encodeIfPresent(filters, forKey: .filters) + + try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/application/models/GetGroupedProductsAppModelClass.swift b/Sources/code/application/models/GetGroupedProductsAppModelClass.swift index f6ed4ce300..e6aef5d2ba 100644 --- a/Sources/code/application/models/GetGroupedProductsAppModelClass.swift +++ b/Sources/code/application/models/GetGroupedProductsAppModelClass.swift @@ -7,67 +7,67 @@ public extension ApplicationClient { Used By: Catalog */ class GetGroupedProducts: Codable { - public var choice: String? + public var products: [Products]? public var pageVisibility: [String]? - public var slug: String? - public var name: String? - public var products: [Products]? - public var sameStoreAssignment: Bool? - public var companyId: Int? - public var logo: String? + public var choice: String? + + public var slug: String? + public var active: Bool? + public var companyId: Int? + public var meta: [String: Any]? public enum CodingKeys: String, CodingKey { - case choice + case products case pageVisibility = "page_visibility" - case slug - case name - case products - case sameStoreAssignment = "same_store_assignment" - case companyId = "company_id" - case logo + case choice + + case slug + case active + case companyId = "company_id" + case meta } public init(active: Bool? = nil, choice: String? = nil, companyId: Int? = nil, logo: String? = nil, meta: [String: Any]? = nil, name: String? = nil, pageVisibility: [String]? = nil, products: [Products]? = nil, sameStoreAssignment: Bool? = nil, slug: String? = nil) { - self.choice = choice + self.products = products self.pageVisibility = pageVisibility - self.slug = slug - self.name = name - self.products = products - self.sameStoreAssignment = sameStoreAssignment - self.companyId = companyId - self.logo = logo + self.choice = choice + + self.slug = slug + self.active = active + self.companyId = companyId + self.meta = meta } @@ -75,7 +75,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - choice = try container.decode(String.self, forKey: .choice) + products = try container.decode([Products].self, forKey: .products) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -99,7 +99,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -107,7 +107,7 @@ public extension ApplicationClient { } catch {} do { - products = try container.decode([Products].self, forKey: .products) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -115,7 +115,7 @@ public extension ApplicationClient { } catch {} do { - sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) + choice = try container.decode(String.self, forKey: .choice) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -123,7 +123,7 @@ public extension ApplicationClient { } catch {} do { - companyId = try container.decode(Int.self, forKey: .companyId) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -131,7 +131,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(String.self, forKey: .logo) + active = try container.decode(Bool.self, forKey: .active) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -139,7 +139,7 @@ public extension ApplicationClient { } catch {} do { - active = try container.decode(Bool.self, forKey: .active) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,24 +158,24 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(choice, forKey: .choice) + try? container.encodeIfPresent(products, forKey: .products) try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) - try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(products, forKey: .products) - try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) - try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(choice, forKey: .choice) + + try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(active, forKey: .active) + try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(meta, forKey: .meta) } } diff --git a/Sources/code/application/models/HomeListingResponseAppModelClass.swift b/Sources/code/application/models/HomeListingResponseAppModelClass.swift index ac186d3aaa..436d6bf73c 100644 --- a/Sources/code/application/models/HomeListingResponseAppModelClass.swift +++ b/Sources/code/application/models/HomeListingResponseAppModelClass.swift @@ -7,58 +7,58 @@ public extension ApplicationClient { Used By: Catalog */ class HomeListingResponse: Codable { - public var message: String? - public var items: [ProductListingDetail]? public var page: Page - public enum CodingKeys: String, CodingKey { - case message + public var message: String? + public enum CodingKeys: String, CodingKey { case items case page + + case message } public init(items: [ProductListingDetail]? = nil, message: String? = nil, page: Page) { - self.message = message - self.items = items self.page = page + + self.message = message } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - message = try container.decode(String.self, forKey: .message) + items = try container.decode([ProductListingDetail].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + page = try container.decode(Page.self, forKey: .page) + do { - items = try container.decode([ProductListingDetail].self, forKey: .items) + message = try container.decode(String.self, forKey: .message) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - page = try container.decode(Page.self, forKey: .page) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(items, forKey: .items) try? container.encodeIfPresent(page, forKey: .page) + + try? container.encodeIfPresent(message, forKey: .message) } } } diff --git a/Sources/code/application/models/IfscCodeResponseAppModelClass.swift b/Sources/code/application/models/IfscCodeResponseAppModelClass.swift index 87f44ebdd1..3b8d1386ad 100644 --- a/Sources/code/application/models/IfscCodeResponseAppModelClass.swift +++ b/Sources/code/application/models/IfscCodeResponseAppModelClass.swift @@ -7,31 +7,35 @@ public extension ApplicationClient { Used By: Payment */ class IfscCodeResponse: Codable { - public var success: Bool? + public var branchName: String public var bankName: String - public var branchName: String + public var success: Bool? public enum CodingKeys: String, CodingKey { - case success + case branchName = "branch_name" case bankName = "bank_name" - case branchName = "branch_name" + case success } public init(bankName: String, branchName: String, success: Bool? = nil) { - self.success = success + self.branchName = branchName self.bankName = bankName - self.branchName = branchName + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + branchName = try container.decode(String.self, forKey: .branchName) + + bankName = try container.decode(String.self, forKey: .bankName) + do { success = try container.decode(Bool.self, forKey: .success) @@ -39,20 +43,16 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - bankName = try container.decode(String.self, forKey: .bankName) - - branchName = try container.decode(String.self, forKey: .branchName) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(success, forKey: .success) + try? container.encodeIfPresent(branchName, forKey: .branchName) try? container.encodeIfPresent(bankName, forKey: .bankName) - try? container.encodeIfPresent(branchName, forKey: .branchName) + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/IntentAppAppModelClass.swift b/Sources/code/application/models/IntentAppAppModelClass.swift index af442261b7..21e1e3d893 100644 --- a/Sources/code/application/models/IntentAppAppModelClass.swift +++ b/Sources/code/application/models/IntentAppAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Payment */ class IntentApp: Codable { - public var packageName: String? + public var code: String? public var displayName: String? - public var code: String? - public var logos: PaymentModeLogo? + public var packageName: String? + public enum CodingKeys: String, CodingKey { - case packageName = "package_name" + case code case displayName = "display_name" - case code - case logos + + case packageName = "package_name" } public init(code: String? = nil, displayName: String? = nil, logos: PaymentModeLogo? = nil, packageName: String? = nil) { - self.packageName = packageName + self.code = code self.displayName = displayName - self.code = code - self.logos = logos + + self.packageName = packageName } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - packageName = try container.decode(String.self, forKey: .packageName) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - code = try container.decode(String.self, forKey: .code) + logos = try container.decode(PaymentModeLogo.self, forKey: .logos) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - logos = try container.decode(PaymentModeLogo.self, forKey: .logos) + packageName = try container.decode(String.self, forKey: .packageName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,13 +74,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(packageName, forKey: .packageName) + try? container.encode(code, forKey: .code) try? container.encode(displayName, forKey: .displayName) - try? container.encode(code, forKey: .code) - try? container.encode(logos, forKey: .logos) + + try? container.encode(packageName, forKey: .packageName) } } } diff --git a/Sources/code/application/models/IntentAppErrorListAppModelClass.swift b/Sources/code/application/models/IntentAppErrorListAppModelClass.swift index 3fa51ed9f1..272657dbe7 100644 --- a/Sources/code/application/models/IntentAppErrorListAppModelClass.swift +++ b/Sources/code/application/models/IntentAppErrorListAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Payment */ class IntentAppErrorList: Codable { - public var packageName: String? - public var code: String? - public enum CodingKeys: String, CodingKey { - case packageName = "package_name" + public var packageName: String? + public enum CodingKeys: String, CodingKey { case code + + case packageName = "package_name" } public init(code: String? = nil, packageName: String? = nil) { - self.packageName = packageName - self.code = code + + self.packageName = packageName } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - packageName = try container.decode(String.self, forKey: .packageName) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - code = try container.decode(String.self, forKey: .code) + packageName = try container.decode(String.self, forKey: .packageName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(packageName, forKey: .packageName) - try? container.encode(code, forKey: .code) + + try? container.encode(packageName, forKey: .packageName) } } } diff --git a/Sources/code/application/models/LatLongAppModelClass.swift b/Sources/code/application/models/LatLongAppModelClass.swift index bf2c79adf5..8495aa9136 100644 --- a/Sources/code/application/models/LatLongAppModelClass.swift +++ b/Sources/code/application/models/LatLongAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class LatLong: Codable { - public var coordinates: [Double]? - public var type: String? - public enum CodingKeys: String, CodingKey { - case coordinates + public var coordinates: [Double]? + public enum CodingKeys: String, CodingKey { case type + + case coordinates } public init(coordinates: [Double]? = nil, type: String? = nil) { - self.coordinates = coordinates - self.type = type + + self.coordinates = coordinates } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - coordinates = try container.decode([Double].self, forKey: .coordinates) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + coordinates = try container.decode([Double].self, forKey: .coordinates) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(coordinates, forKey: .coordinates) - try? container.encodeIfPresent(type, forKey: .type) + + try? container.encodeIfPresent(coordinates, forKey: .coordinates) } } } diff --git a/Sources/code/application/models/MediaAppModelClass.swift b/Sources/code/application/models/MediaAppModelClass.swift index 08f7a2af6a..4133e91722 100644 --- a/Sources/code/application/models/MediaAppModelClass.swift +++ b/Sources/code/application/models/MediaAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class Media: Codable { public var type: String? - public var url: String? - public var meta: Meta? + public var url: String? + public enum CodingKeys: String, CodingKey { case type - case url - case meta + + case url } public init(meta: Meta? = nil, type: String? = nil, url: String? = nil) { self.type = type - self.url = url - self.meta = meta + + self.url = url } required public init(from decoder: Decoder) throws { @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + meta = try container.decode(Meta.self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - meta = try container.decode(Meta.self, forKey: .meta) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,9 +62,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(url, forKey: .url) - try? container.encodeIfPresent(meta, forKey: .meta) + + try? container.encodeIfPresent(url, forKey: .url) } } } diff --git a/Sources/code/application/models/NotFoundResourceErrorAppModelClass.swift b/Sources/code/application/models/NotFoundResourceErrorAppModelClass.swift index b3e523d204..32d3d1525d 100644 --- a/Sources/code/application/models/NotFoundResourceErrorAppModelClass.swift +++ b/Sources/code/application/models/NotFoundResourceErrorAppModelClass.swift @@ -7,46 +7,46 @@ public extension ApplicationClient { Used By: Payment */ class NotFoundResourceError: Codable { - public var success: Bool - public var code: String public var description: String - public enum CodingKeys: String, CodingKey { - case success + public var success: Bool + public enum CodingKeys: String, CodingKey { case code case description + + case success } public init(code: String, description: String, success: Bool) { - self.success = success - self.code = code self.description = description + + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - success = try container.decode(Bool.self, forKey: .success) - code = try container.decode(String.self, forKey: .code) description = try container.decode(String.self, forKey: .description) + + success = try container.decode(Bool.self, forKey: .success) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(code, forKey: .code) try? container.encodeIfPresent(description, forKey: .description) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/OrderBeneficiaryDetailsAppModelClass.swift b/Sources/code/application/models/OrderBeneficiaryDetailsAppModelClass.swift index 18ead37459..fb4fc92fe0 100644 --- a/Sources/code/application/models/OrderBeneficiaryDetailsAppModelClass.swift +++ b/Sources/code/application/models/OrderBeneficiaryDetailsAppModelClass.swift @@ -7,153 +7,145 @@ public extension ApplicationClient { Used By: Payment */ class OrderBeneficiaryDetails: Codable { - public var id: Int + public var branchName: Bool? - public var bankName: String + public var delightsUserName: String? - public var isActive: Bool + public var mobile: Bool? - public var email: String + public var transferMode: String - public var subtitle: String + public var bankName: String public var accountNo: String - public var comment: Bool? + public var createdOn: String + + public var title: String public var beneficiaryId: String public var displayName: String - public var delightsUserName: String? - - public var transferMode: String + public var modifiedOn: String - public var ifscCode: String + public var subtitle: String - public var accountHolder: String + public var isActive: Bool - public var modifiedOn: String + public var id: Int - public var title: String + public var comment: Bool? - public var branchName: Bool? + public var accountHolder: String - public var createdOn: String + public var address: String - public var mobile: Bool? + public var ifscCode: String - public var address: String + public var email: String public enum CodingKeys: String, CodingKey { - case id + case branchName = "branch_name" - case bankName = "bank_name" + case delightsUserName = "delights_user_name" - case isActive = "is_active" + case mobile - case email + case transferMode = "transfer_mode" - case subtitle + case bankName = "bank_name" case accountNo = "account_no" - case comment + case createdOn = "created_on" + + case title case beneficiaryId = "beneficiary_id" case displayName = "display_name" - case delightsUserName = "delights_user_name" - - case transferMode = "transfer_mode" + case modifiedOn = "modified_on" - case ifscCode = "ifsc_code" + case subtitle - case accountHolder = "account_holder" + case isActive = "is_active" - case modifiedOn = "modified_on" + case id - case title + case comment - case branchName = "branch_name" + case accountHolder = "account_holder" - case createdOn = "created_on" + case address - case mobile + case ifscCode = "ifsc_code" - case address + case email } public init(accountHolder: String, accountNo: String, address: String, bankName: String, beneficiaryId: String, branchName: Bool? = nil, comment: Bool? = nil, createdOn: String, delightsUserName: String? = nil, displayName: String, email: String, id: Int, ifscCode: String, isActive: Bool, mobile: Bool? = nil, modifiedOn: String, subtitle: String, title: String, transferMode: String) { - self.id = id + self.branchName = branchName - self.bankName = bankName + self.delightsUserName = delightsUserName - self.isActive = isActive + self.mobile = mobile - self.email = email + self.transferMode = transferMode - self.subtitle = subtitle + self.bankName = bankName self.accountNo = accountNo - self.comment = comment + self.createdOn = createdOn + + self.title = title self.beneficiaryId = beneficiaryId self.displayName = displayName - self.delightsUserName = delightsUserName - - self.transferMode = transferMode + self.modifiedOn = modifiedOn - self.ifscCode = ifscCode + self.subtitle = subtitle - self.accountHolder = accountHolder + self.isActive = isActive - self.modifiedOn = modifiedOn + self.id = id - self.title = title + self.comment = comment - self.branchName = branchName + self.accountHolder = accountHolder - self.createdOn = createdOn + self.address = address - self.mobile = mobile + self.ifscCode = ifscCode - self.address = address + self.email = email } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - id = try container.decode(Int.self, forKey: .id) - - bankName = try container.decode(String.self, forKey: .bankName) - - isActive = try container.decode(Bool.self, forKey: .isActive) - - email = try container.decode(String.self, forKey: .email) - - subtitle = try container.decode(String.self, forKey: .subtitle) - - accountNo = try container.decode(String.self, forKey: .accountNo) - do { - comment = try container.decode(Bool.self, forKey: .comment) + branchName = try container.decode(Bool.self, forKey: .branchName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - beneficiaryId = try container.decode(String.self, forKey: .beneficiaryId) + do { + delightsUserName = try container.decode(String.self, forKey: .delightsUserName) - displayName = try container.decode(String.self, forKey: .displayName) + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch {} do { - delightsUserName = try container.decode(String.self, forKey: .delightsUserName) + mobile = try container.decode(Bool.self, forKey: .mobile) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,75 +154,83 @@ public extension ApplicationClient { transferMode = try container.decode(String.self, forKey: .transferMode) - ifscCode = try container.decode(String.self, forKey: .ifscCode) + bankName = try container.decode(String.self, forKey: .bankName) - accountHolder = try container.decode(String.self, forKey: .accountHolder) + accountNo = try container.decode(String.self, forKey: .accountNo) - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + createdOn = try container.decode(String.self, forKey: .createdOn) title = try container.decode(String.self, forKey: .title) - do { - branchName = try container.decode(Bool.self, forKey: .branchName) + beneficiaryId = try container.decode(String.self, forKey: .beneficiaryId) - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch {} + displayName = try container.decode(String.self, forKey: .displayName) - createdOn = try container.decode(String.self, forKey: .createdOn) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + + subtitle = try container.decode(String.self, forKey: .subtitle) + + isActive = try container.decode(Bool.self, forKey: .isActive) + + id = try container.decode(Int.self, forKey: .id) do { - mobile = try container.decode(Bool.self, forKey: .mobile) + comment = try container.decode(Bool.self, forKey: .comment) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + accountHolder = try container.decode(String.self, forKey: .accountHolder) + address = try container.decode(String.self, forKey: .address) + + ifscCode = try container.decode(String.self, forKey: .ifscCode) + + email = try container.decode(String.self, forKey: .email) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(branchName, forKey: .branchName) - try? container.encodeIfPresent(bankName, forKey: .bankName) + try? container.encode(delightsUserName, forKey: .delightsUserName) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(mobile, forKey: .mobile) - try? container.encodeIfPresent(email, forKey: .email) + try? container.encodeIfPresent(transferMode, forKey: .transferMode) - try? container.encodeIfPresent(subtitle, forKey: .subtitle) + try? container.encodeIfPresent(bankName, forKey: .bankName) try? container.encodeIfPresent(accountNo, forKey: .accountNo) - try? container.encodeIfPresent(comment, forKey: .comment) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) + + try? container.encodeIfPresent(title, forKey: .title) try? container.encodeIfPresent(beneficiaryId, forKey: .beneficiaryId) try? container.encodeIfPresent(displayName, forKey: .displayName) - try? container.encode(delightsUserName, forKey: .delightsUserName) - - try? container.encodeIfPresent(transferMode, forKey: .transferMode) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) + try? container.encodeIfPresent(subtitle, forKey: .subtitle) - try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(title, forKey: .title) + try? container.encodeIfPresent(comment, forKey: .comment) - try? container.encodeIfPresent(branchName, forKey: .branchName) + try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(mobile, forKey: .mobile) + try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(email, forKey: .email) } } } diff --git a/Sources/code/application/models/OrderBeneficiaryResponseAppModelClass.swift b/Sources/code/application/models/OrderBeneficiaryResponseAppModelClass.swift index ee80ac90cb..0425314408 100644 --- a/Sources/code/application/models/OrderBeneficiaryResponseAppModelClass.swift +++ b/Sources/code/application/models/OrderBeneficiaryResponseAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Payment */ class OrderBeneficiaryResponse: Codable { - public var showBeneficiaryDetails: Bool? - public var beneficiaries: [OrderBeneficiaryDetails]? - public enum CodingKeys: String, CodingKey { - case showBeneficiaryDetails = "show_beneficiary_details" + public var showBeneficiaryDetails: Bool? + public enum CodingKeys: String, CodingKey { case beneficiaries + + case showBeneficiaryDetails = "show_beneficiary_details" } public init(beneficiaries: [OrderBeneficiaryDetails]? = nil, showBeneficiaryDetails: Bool? = nil) { - self.showBeneficiaryDetails = showBeneficiaryDetails - self.beneficiaries = beneficiaries + + self.showBeneficiaryDetails = showBeneficiaryDetails } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - showBeneficiaryDetails = try container.decode(Bool.self, forKey: .showBeneficiaryDetails) + beneficiaries = try container.decode([OrderBeneficiaryDetails].self, forKey: .beneficiaries) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - beneficiaries = try container.decode([OrderBeneficiaryDetails].self, forKey: .beneficiaries) + showBeneficiaryDetails = try container.decode(Bool.self, forKey: .showBeneficiaryDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(showBeneficiaryDetails, forKey: .showBeneficiaryDetails) - try? container.encode(beneficiaries, forKey: .beneficiaries) + + try? container.encodeIfPresent(showBeneficiaryDetails, forKey: .showBeneficiaryDetails) } } } diff --git a/Sources/code/application/models/PaymentFlowAppModelClass.swift b/Sources/code/application/models/PaymentFlowAppModelClass.swift index 3338ca0be2..76a7709e00 100644 --- a/Sources/code/application/models/PaymentFlowAppModelClass.swift +++ b/Sources/code/application/models/PaymentFlowAppModelClass.swift @@ -7,81 +7,81 @@ public extension ApplicationClient { Used By: Payment */ class PaymentFlow: Codable { - public var mswipe: AggregatorRoute? + public var upiRazorpay: AggregatorRoute? public var ccavenue: AggregatorRoute? - public var juspay: AggregatorRoute? - - public var payubiz: AggregatorRoute? - - public var upiRazorpay: AggregatorRoute? + public var bqrRazorpay: AggregatorRoute? - public var fynd: AggregatorRoute? + public var mswipe: AggregatorRoute? - public var bqrRazorpay: AggregatorRoute? + public var simpl: AggregatorRoute? public var rupifi: AggregatorRoute? + public var payubiz: AggregatorRoute? + public var razorpay: AggregatorRoute? + public var fynd: AggregatorRoute? + public var stripe: AggregatorRoute? - public var simpl: AggregatorRoute? + public var juspay: AggregatorRoute? public enum CodingKeys: String, CodingKey { - case mswipe + case upiRazorpay = "upi_razorpay" case ccavenue - case juspay - - case payubiz - - case upiRazorpay = "upi_razorpay" + case bqrRazorpay = "bqr_razorpay" - case fynd + case mswipe - case bqrRazorpay = "bqr_razorpay" + case simpl case rupifi + case payubiz + case razorpay + case fynd + case stripe - case simpl + case juspay } public init(bqrRazorpay: AggregatorRoute? = nil, ccavenue: AggregatorRoute? = nil, fynd: AggregatorRoute? = nil, juspay: AggregatorRoute? = nil, mswipe: AggregatorRoute? = nil, payubiz: AggregatorRoute? = nil, razorpay: AggregatorRoute? = nil, rupifi: AggregatorRoute? = nil, simpl: AggregatorRoute? = nil, stripe: AggregatorRoute? = nil, upiRazorpay: AggregatorRoute? = nil) { - self.mswipe = mswipe + self.upiRazorpay = upiRazorpay self.ccavenue = ccavenue - self.juspay = juspay - - self.payubiz = payubiz - - self.upiRazorpay = upiRazorpay + self.bqrRazorpay = bqrRazorpay - self.fynd = fynd + self.mswipe = mswipe - self.bqrRazorpay = bqrRazorpay + self.simpl = simpl self.rupifi = rupifi + self.payubiz = payubiz + self.razorpay = razorpay + self.fynd = fynd + self.stripe = stripe - self.simpl = simpl + self.juspay = juspay } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - mswipe = try container.decode(AggregatorRoute.self, forKey: .mswipe) + upiRazorpay = try container.decode(AggregatorRoute.self, forKey: .upiRazorpay) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -97,7 +97,7 @@ public extension ApplicationClient { } catch {} do { - juspay = try container.decode(AggregatorRoute.self, forKey: .juspay) + bqrRazorpay = try container.decode(AggregatorRoute.self, forKey: .bqrRazorpay) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - payubiz = try container.decode(AggregatorRoute.self, forKey: .payubiz) + mswipe = try container.decode(AggregatorRoute.self, forKey: .mswipe) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -113,7 +113,7 @@ public extension ApplicationClient { } catch {} do { - upiRazorpay = try container.decode(AggregatorRoute.self, forKey: .upiRazorpay) + simpl = try container.decode(AggregatorRoute.self, forKey: .simpl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -121,7 +121,7 @@ public extension ApplicationClient { } catch {} do { - fynd = try container.decode(AggregatorRoute.self, forKey: .fynd) + rupifi = try container.decode(AggregatorRoute.self, forKey: .rupifi) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -129,7 +129,7 @@ public extension ApplicationClient { } catch {} do { - bqrRazorpay = try container.decode(AggregatorRoute.self, forKey: .bqrRazorpay) + payubiz = try container.decode(AggregatorRoute.self, forKey: .payubiz) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -137,7 +137,7 @@ public extension ApplicationClient { } catch {} do { - rupifi = try container.decode(AggregatorRoute.self, forKey: .rupifi) + razorpay = try container.decode(AggregatorRoute.self, forKey: .razorpay) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -145,7 +145,7 @@ public extension ApplicationClient { } catch {} do { - razorpay = try container.decode(AggregatorRoute.self, forKey: .razorpay) + fynd = try container.decode(AggregatorRoute.self, forKey: .fynd) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -161,7 +161,7 @@ public extension ApplicationClient { } catch {} do { - simpl = try container.decode(AggregatorRoute.self, forKey: .simpl) + juspay = try container.decode(AggregatorRoute.self, forKey: .juspay) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -172,27 +172,27 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(mswipe, forKey: .mswipe) + try? container.encode(upiRazorpay, forKey: .upiRazorpay) try? container.encode(ccavenue, forKey: .ccavenue) - try? container.encode(juspay, forKey: .juspay) - - try? container.encode(payubiz, forKey: .payubiz) - - try? container.encode(upiRazorpay, forKey: .upiRazorpay) + try? container.encode(bqrRazorpay, forKey: .bqrRazorpay) - try? container.encode(fynd, forKey: .fynd) + try? container.encode(mswipe, forKey: .mswipe) - try? container.encode(bqrRazorpay, forKey: .bqrRazorpay) + try? container.encode(simpl, forKey: .simpl) try? container.encode(rupifi, forKey: .rupifi) + try? container.encode(payubiz, forKey: .payubiz) + try? container.encode(razorpay, forKey: .razorpay) + try? container.encode(fynd, forKey: .fynd) + try? container.encode(stripe, forKey: .stripe) - try? container.encode(simpl, forKey: .simpl) + try? container.encode(juspay, forKey: .juspay) } } } diff --git a/Sources/code/application/models/PaymentInitializationRequestAppModelClass.swift b/Sources/code/application/models/PaymentInitializationRequestAppModelClass.swift index 8529487bf6..e07d9e8b25 100644 --- a/Sources/code/application/models/PaymentInitializationRequestAppModelClass.swift +++ b/Sources/code/application/models/PaymentInitializationRequestAppModelClass.swift @@ -7,44 +7,36 @@ public extension ApplicationClient { Used By: Payment */ class PaymentInitializationRequest: Codable { - public var currency: String - - public var contact: String + public var razorpayPaymentId: String? - public var aggregator: String + public var method: String public var vpa: String? - public var customerId: String - - public var merchantOrderId: String - - public var email: String - public var amount: Int public var timeout: Int? public var orderId: String - public var method: String + public var customerId: String - public var razorpayPaymentId: String? + public var aggregator: String - public enum CodingKeys: String, CodingKey { - case currency + public var currency: String - case contact + public var contact: String - case aggregator + public var email: String - case vpa + public var merchantOrderId: String - case customerId = "customer_id" + public enum CodingKeys: String, CodingKey { + case razorpayPaymentId = "razorpay_payment_id" - case merchantOrderId = "merchant_order_id" + case method - case email + case vpa case amount @@ -52,25 +44,25 @@ public extension ApplicationClient { case orderId = "order_id" - case method + case customerId = "customer_id" - case razorpayPaymentId = "razorpay_payment_id" - } + case aggregator - public init(aggregator: String, amount: Int, contact: String, currency: String, customerId: String, email: String, merchantOrderId: String, method: String, orderId: String, razorpayPaymentId: String? = nil, timeout: Int? = nil, vpa: String? = nil) { - self.currency = currency + case currency - self.contact = contact + case contact - self.aggregator = aggregator + case email - self.vpa = vpa + case merchantOrderId = "merchant_order_id" + } - self.customerId = customerId + public init(aggregator: String, amount: Int, contact: String, currency: String, customerId: String, email: String, merchantOrderId: String, method: String, orderId: String, razorpayPaymentId: String? = nil, timeout: Int? = nil, vpa: String? = nil) { + self.razorpayPaymentId = razorpayPaymentId - self.merchantOrderId = merchantOrderId + self.method = method - self.email = email + self.vpa = vpa self.amount = amount @@ -78,19 +70,31 @@ public extension ApplicationClient { self.orderId = orderId - self.method = method + self.customerId = customerId - self.razorpayPaymentId = razorpayPaymentId + self.aggregator = aggregator + + self.currency = currency + + self.contact = contact + + self.email = email + + self.merchantOrderId = merchantOrderId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - currency = try container.decode(String.self, forKey: .currency) + do { + razorpayPaymentId = try container.decode(String.self, forKey: .razorpayPaymentId) - contact = try container.decode(String.self, forKey: .contact) + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch {} - aggregator = try container.decode(String.self, forKey: .aggregator) + method = try container.decode(String.self, forKey: .method) do { vpa = try container.decode(String.self, forKey: .vpa) @@ -100,12 +104,6 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} - customerId = try container.decode(String.self, forKey: .customerId) - - merchantOrderId = try container.decode(String.self, forKey: .merchantOrderId) - - email = try container.decode(String.self, forKey: .email) - amount = try container.decode(Int.self, forKey: .amount) do { @@ -118,43 +116,45 @@ public extension ApplicationClient { orderId = try container.decode(String.self, forKey: .orderId) - method = try container.decode(String.self, forKey: .method) + customerId = try container.decode(String.self, forKey: .customerId) - do { - razorpayPaymentId = try container.decode(String.self, forKey: .razorpayPaymentId) + aggregator = try container.decode(String.self, forKey: .aggregator) - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch {} + currency = try container.decode(String.self, forKey: .currency) + + contact = try container.decode(String.self, forKey: .contact) + + email = try container.decode(String.self, forKey: .email) + + merchantOrderId = try container.decode(String.self, forKey: .merchantOrderId) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(currency, forKey: .currency) - - try? container.encodeIfPresent(contact, forKey: .contact) + try? container.encode(razorpayPaymentId, forKey: .razorpayPaymentId) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) + try? container.encodeIfPresent(method, forKey: .method) try? container.encode(vpa, forKey: .vpa) - try? container.encodeIfPresent(customerId, forKey: .customerId) - - try? container.encodeIfPresent(merchantOrderId, forKey: .merchantOrderId) - - try? container.encodeIfPresent(email, forKey: .email) - try? container.encode(amount, forKey: .amount) try? container.encode(timeout, forKey: .timeout) try? container.encodeIfPresent(orderId, forKey: .orderId) - try? container.encodeIfPresent(method, forKey: .method) + try? container.encodeIfPresent(customerId, forKey: .customerId) - try? container.encode(razorpayPaymentId, forKey: .razorpayPaymentId) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) + + try? container.encodeIfPresent(currency, forKey: .currency) + + try? container.encodeIfPresent(contact, forKey: .contact) + + try? container.encodeIfPresent(email, forKey: .email) + + try? container.encodeIfPresent(merchantOrderId, forKey: .merchantOrderId) } } } diff --git a/Sources/code/application/models/PaymentInitializationResponseAppModelClass.swift b/Sources/code/application/models/PaymentInitializationResponseAppModelClass.swift index 2bb7f0bbe1..e18d8e58f4 100644 --- a/Sources/code/application/models/PaymentInitializationResponseAppModelClass.swift +++ b/Sources/code/application/models/PaymentInitializationResponseAppModelClass.swift @@ -7,111 +7,111 @@ public extension ApplicationClient { Used By: Payment */ class PaymentInitializationResponse: Codable { - public var aggregatorOrderId: String? - - public var bqrImage: String? + public var upiPollUrl: String? - public var currency: String? + public var razorpayPaymentId: String? public var virtualId: String? - public var aggregator: String - - public var vpa: String? - - public var customerId: String? + public var status: String? - public var upiPollUrl: String? + public var aggregatorOrderId: String? public var merchantOrderId: String - public var success: Bool - - public var status: String? + public var method: String public var amount: Int? + public var vpa: String? + + public var customerId: String? + public var timeout: Int? - public var method: String + public var aggregator: String + + public var bqrImage: String? + + public var currency: String? public var pollingUrl: String - public var razorpayPaymentId: String? + public var success: Bool public enum CodingKeys: String, CodingKey { - case aggregatorOrderId = "aggregator_order_id" - - case bqrImage = "bqr_image" + case upiPollUrl = "upi_poll_url" - case currency + case razorpayPaymentId = "razorpay_payment_id" case virtualId = "virtual_id" - case aggregator - - case vpa - - case customerId = "customer_id" + case status - case upiPollUrl = "upi_poll_url" + case aggregatorOrderId = "aggregator_order_id" case merchantOrderId = "merchant_order_id" - case success - - case status + case method case amount + case vpa + + case customerId = "customer_id" + case timeout - case method + case aggregator + + case bqrImage = "bqr_image" + + case currency case pollingUrl = "polling_url" - case razorpayPaymentId = "razorpay_payment_id" + case success } public init(aggregator: String, aggregatorOrderId: String? = nil, amount: Int? = nil, bqrImage: String? = nil, currency: String? = nil, customerId: String? = nil, merchantOrderId: String, method: String, pollingUrl: String, razorpayPaymentId: String? = nil, status: String? = nil, success: Bool, timeout: Int? = nil, upiPollUrl: String? = nil, virtualId: String? = nil, vpa: String? = nil) { - self.aggregatorOrderId = aggregatorOrderId - - self.bqrImage = bqrImage + self.upiPollUrl = upiPollUrl - self.currency = currency + self.razorpayPaymentId = razorpayPaymentId self.virtualId = virtualId - self.aggregator = aggregator - - self.vpa = vpa - - self.customerId = customerId + self.status = status - self.upiPollUrl = upiPollUrl + self.aggregatorOrderId = aggregatorOrderId self.merchantOrderId = merchantOrderId - self.success = success - - self.status = status + self.method = method self.amount = amount + self.vpa = vpa + + self.customerId = customerId + self.timeout = timeout - self.method = method + self.aggregator = aggregator + + self.bqrImage = bqrImage + + self.currency = currency self.pollingUrl = pollingUrl - self.razorpayPaymentId = razorpayPaymentId + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - aggregatorOrderId = try container.decode(String.self, forKey: .aggregatorOrderId) + upiPollUrl = try container.decode(String.self, forKey: .upiPollUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -119,7 +119,7 @@ public extension ApplicationClient { } catch {} do { - bqrImage = try container.decode(String.self, forKey: .bqrImage) + razorpayPaymentId = try container.decode(String.self, forKey: .razorpayPaymentId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -127,7 +127,7 @@ public extension ApplicationClient { } catch {} do { - currency = try container.decode(String.self, forKey: .currency) + virtualId = try container.decode(String.self, forKey: .virtualId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -135,25 +135,27 @@ public extension ApplicationClient { } catch {} do { - virtualId = try container.decode(String.self, forKey: .virtualId) + status = try container.decode(String.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - aggregator = try container.decode(String.self, forKey: .aggregator) - do { - vpa = try container.decode(String.self, forKey: .vpa) + aggregatorOrderId = try container.decode(String.self, forKey: .aggregatorOrderId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + merchantOrderId = try container.decode(String.self, forKey: .merchantOrderId) + + method = try container.decode(String.self, forKey: .method) + do { - customerId = try container.decode(String.self, forKey: .customerId) + amount = try container.decode(Int.self, forKey: .amount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -161,19 +163,15 @@ public extension ApplicationClient { } catch {} do { - upiPollUrl = try container.decode(String.self, forKey: .upiPollUrl) + vpa = try container.decode(String.self, forKey: .vpa) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - merchantOrderId = try container.decode(String.self, forKey: .merchantOrderId) - - success = try container.decode(Bool.self, forKey: .success) - do { - status = try container.decode(String.self, forKey: .status) + customerId = try container.decode(String.self, forKey: .customerId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -181,68 +179,70 @@ public extension ApplicationClient { } catch {} do { - amount = try container.decode(Int.self, forKey: .amount) + timeout = try container.decode(Int.self, forKey: .timeout) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + aggregator = try container.decode(String.self, forKey: .aggregator) + do { - timeout = try container.decode(Int.self, forKey: .timeout) + bqrImage = try container.decode(String.self, forKey: .bqrImage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - method = try container.decode(String.self, forKey: .method) - - pollingUrl = try container.decode(String.self, forKey: .pollingUrl) - do { - razorpayPaymentId = try container.decode(String.self, forKey: .razorpayPaymentId) + currency = try container.decode(String.self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + pollingUrl = try container.decode(String.self, forKey: .pollingUrl) + + success = try container.decode(Bool.self, forKey: .success) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aggregatorOrderId, forKey: .aggregatorOrderId) - - try? container.encode(bqrImage, forKey: .bqrImage) + try? container.encode(upiPollUrl, forKey: .upiPollUrl) - try? container.encode(currency, forKey: .currency) + try? container.encode(razorpayPaymentId, forKey: .razorpayPaymentId) try? container.encode(virtualId, forKey: .virtualId) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) - - try? container.encode(vpa, forKey: .vpa) - - try? container.encode(customerId, forKey: .customerId) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encode(upiPollUrl, forKey: .upiPollUrl) + try? container.encodeIfPresent(aggregatorOrderId, forKey: .aggregatorOrderId) try? container.encodeIfPresent(merchantOrderId, forKey: .merchantOrderId) - try? container.encodeIfPresent(success, forKey: .success) - - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(method, forKey: .method) try? container.encode(amount, forKey: .amount) + try? container.encode(vpa, forKey: .vpa) + + try? container.encode(customerId, forKey: .customerId) + try? container.encode(timeout, forKey: .timeout) - try? container.encodeIfPresent(method, forKey: .method) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) + + try? container.encode(bqrImage, forKey: .bqrImage) + + try? container.encode(currency, forKey: .currency) try? container.encodeIfPresent(pollingUrl, forKey: .pollingUrl) - try? container.encode(razorpayPaymentId, forKey: .razorpayPaymentId) + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/PaymentModeListAppModelClass.swift b/Sources/code/application/models/PaymentModeListAppModelClass.swift index ff19aa3dc2..bf171fb814 100644 --- a/Sources/code/application/models/PaymentModeListAppModelClass.swift +++ b/Sources/code/application/models/PaymentModeListAppModelClass.swift @@ -7,197 +7,199 @@ public extension ApplicationClient { Used By: Payment */ class PaymentModeList: Codable { - public var cardBrandImage: String? + public var intentAppErrorDictList: [IntentAppErrorList]? - public var intentApp: [IntentApp]? + public var aggregatorName: String - public var cardFingerprint: String? + public var retryCount: Int? - public var cardBrand: String? + public var cardReference: String? + + public var nickname: String? + + public var cardType: String? public var merchantCode: String? - public var aggregatorName: String + public var cardNumber: String? - public var cardIssuer: String? + public var expMonth: Int? - public var intentAppErrorDictList: [IntentAppErrorList]? + public var timeout: Int? - public var intentAppErrorList: [String]? + public var cardIssuer: String? public var displayName: String? - public var cardIsin: String? - public var code: String? - public var cardNumber: String? - - public var fyndVpa: String? + public var cardBrandImage: String? - public var displayPriority: Int? + public var logoUrl: PaymentModeLogo? - public var cardType: String? + public var cardBrand: String? - public var expired: Bool? + public var name: String? - public var cardName: String? + public var intentAppErrorList: [String]? - public var timeout: Int? + public var cardIsin: String? - public var name: String? + public var intentFlow: Bool? - public var retryCount: Int? + public var cardId: String? public var cardToken: String? - public var logoUrl: PaymentModeLogo? + public var cardFingerprint: String? - public var intentFlow: Bool? + public var intentApp: [IntentApp]? - public var expYear: Int? + public var expired: Bool? - public var cardReference: String? + public var expYear: Int? - public var nickname: String? + public var fyndVpa: String? - public var expMonth: Int? + public var cardName: String? - public var cardId: String? + public var displayPriority: Int? public enum CodingKeys: String, CodingKey { - case cardBrandImage = "card_brand_image" + case intentAppErrorDictList = "intent_app_error_dict_list" - case intentApp = "intent_app" + case aggregatorName = "aggregator_name" - case cardFingerprint = "card_fingerprint" + case retryCount = "retry_count" - case cardBrand = "card_brand" + case cardReference = "card_reference" + + case nickname + + case cardType = "card_type" case merchantCode = "merchant_code" - case aggregatorName = "aggregator_name" + case cardNumber = "card_number" - case cardIssuer = "card_issuer" + case expMonth = "exp_month" - case intentAppErrorDictList = "intent_app_error_dict_list" + case timeout - case intentAppErrorList = "intent_app_error_list" + case cardIssuer = "card_issuer" case displayName = "display_name" - case cardIsin = "card_isin" - case code - case cardNumber = "card_number" - - case fyndVpa = "fynd_vpa" + case cardBrandImage = "card_brand_image" - case displayPriority = "display_priority" + case logoUrl = "logo_url" - case cardType = "card_type" + case cardBrand = "card_brand" - case expired + case name - case cardName = "card_name" + case intentAppErrorList = "intent_app_error_list" - case timeout + case cardIsin = "card_isin" - case name + case intentFlow = "intent_flow" - case retryCount = "retry_count" + case cardId = "card_id" case cardToken = "card_token" - case logoUrl = "logo_url" + case cardFingerprint = "card_fingerprint" - case intentFlow = "intent_flow" + case intentApp = "intent_app" - case expYear = "exp_year" + case expired - case cardReference = "card_reference" + case expYear = "exp_year" - case nickname + case fyndVpa = "fynd_vpa" - case expMonth = "exp_month" + case cardName = "card_name" - case cardId = "card_id" + case displayPriority = "display_priority" } public init(aggregatorName: String, cardBrand: String? = nil, cardBrandImage: String? = nil, cardFingerprint: String? = nil, cardId: String? = nil, cardIsin: String? = nil, cardIssuer: String? = nil, cardName: String? = nil, cardNumber: String? = nil, cardReference: String? = nil, cardToken: String? = nil, cardType: String? = nil, code: String? = nil, displayName: String? = nil, displayPriority: Int? = nil, expired: Bool? = nil, expMonth: Int? = nil, expYear: Int? = nil, fyndVpa: String? = nil, intentApp: [IntentApp]? = nil, intentAppErrorDictList: [IntentAppErrorList]? = nil, intentAppErrorList: [String]? = nil, intentFlow: Bool? = nil, logoUrl: PaymentModeLogo? = nil, merchantCode: String? = nil, name: String? = nil, nickname: String? = nil, retryCount: Int? = nil, timeout: Int? = nil) { - self.cardBrandImage = cardBrandImage + self.intentAppErrorDictList = intentAppErrorDictList - self.intentApp = intentApp + self.aggregatorName = aggregatorName - self.cardFingerprint = cardFingerprint + self.retryCount = retryCount - self.cardBrand = cardBrand + self.cardReference = cardReference + + self.nickname = nickname + + self.cardType = cardType self.merchantCode = merchantCode - self.aggregatorName = aggregatorName + self.cardNumber = cardNumber - self.cardIssuer = cardIssuer + self.expMonth = expMonth - self.intentAppErrorDictList = intentAppErrorDictList + self.timeout = timeout - self.intentAppErrorList = intentAppErrorList + self.cardIssuer = cardIssuer self.displayName = displayName - self.cardIsin = cardIsin - self.code = code - self.cardNumber = cardNumber - - self.fyndVpa = fyndVpa + self.cardBrandImage = cardBrandImage - self.displayPriority = displayPriority + self.logoUrl = logoUrl - self.cardType = cardType + self.cardBrand = cardBrand - self.expired = expired + self.name = name - self.cardName = cardName + self.intentAppErrorList = intentAppErrorList - self.timeout = timeout + self.cardIsin = cardIsin - self.name = name + self.intentFlow = intentFlow - self.retryCount = retryCount + self.cardId = cardId self.cardToken = cardToken - self.logoUrl = logoUrl + self.cardFingerprint = cardFingerprint - self.intentFlow = intentFlow + self.intentApp = intentApp - self.expYear = expYear + self.expired = expired - self.cardReference = cardReference + self.expYear = expYear - self.nickname = nickname + self.fyndVpa = fyndVpa - self.expMonth = expMonth + self.cardName = cardName - self.cardId = cardId + self.displayPriority = displayPriority } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) + intentAppErrorDictList = try container.decode([IntentAppErrorList].self, forKey: .intentAppErrorDictList) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + aggregatorName = try container.decode(String.self, forKey: .aggregatorName) + do { - intentApp = try container.decode([IntentApp].self, forKey: .intentApp) + retryCount = try container.decode(Int.self, forKey: .retryCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -205,7 +207,7 @@ public extension ApplicationClient { } catch {} do { - cardFingerprint = try container.decode(String.self, forKey: .cardFingerprint) + cardReference = try container.decode(String.self, forKey: .cardReference) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -213,7 +215,7 @@ public extension ApplicationClient { } catch {} do { - cardBrand = try container.decode(String.self, forKey: .cardBrand) + nickname = try container.decode(String.self, forKey: .nickname) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -221,17 +223,15 @@ public extension ApplicationClient { } catch {} do { - merchantCode = try container.decode(String.self, forKey: .merchantCode) + cardType = try container.decode(String.self, forKey: .cardType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - aggregatorName = try container.decode(String.self, forKey: .aggregatorName) - do { - cardIssuer = try container.decode(String.self, forKey: .cardIssuer) + merchantCode = try container.decode(String.self, forKey: .merchantCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -239,7 +239,7 @@ public extension ApplicationClient { } catch {} do { - intentAppErrorDictList = try container.decode([IntentAppErrorList].self, forKey: .intentAppErrorDictList) + cardNumber = try container.decode(String.self, forKey: .cardNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -247,7 +247,7 @@ public extension ApplicationClient { } catch {} do { - intentAppErrorList = try container.decode([String].self, forKey: .intentAppErrorList) + expMonth = try container.decode(Int.self, forKey: .expMonth) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -255,7 +255,7 @@ public extension ApplicationClient { } catch {} do { - displayName = try container.decode(String.self, forKey: .displayName) + timeout = try container.decode(Int.self, forKey: .timeout) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -263,7 +263,7 @@ public extension ApplicationClient { } catch {} do { - cardIsin = try container.decode(String.self, forKey: .cardIsin) + cardIssuer = try container.decode(String.self, forKey: .cardIssuer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -271,7 +271,7 @@ public extension ApplicationClient { } catch {} do { - code = try container.decode(String.self, forKey: .code) + displayName = try container.decode(String.self, forKey: .displayName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -279,7 +279,7 @@ public extension ApplicationClient { } catch {} do { - cardNumber = try container.decode(String.self, forKey: .cardNumber) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -287,7 +287,7 @@ public extension ApplicationClient { } catch {} do { - fyndVpa = try container.decode(String.self, forKey: .fyndVpa) + cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -295,7 +295,7 @@ public extension ApplicationClient { } catch {} do { - displayPriority = try container.decode(Int.self, forKey: .displayPriority) + logoUrl = try container.decode(PaymentModeLogo.self, forKey: .logoUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -303,7 +303,7 @@ public extension ApplicationClient { } catch {} do { - cardType = try container.decode(String.self, forKey: .cardType) + cardBrand = try container.decode(String.self, forKey: .cardBrand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -311,7 +311,7 @@ public extension ApplicationClient { } catch {} do { - expired = try container.decode(Bool.self, forKey: .expired) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -319,7 +319,7 @@ public extension ApplicationClient { } catch {} do { - cardName = try container.decode(String.self, forKey: .cardName) + intentAppErrorList = try container.decode([String].self, forKey: .intentAppErrorList) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -327,7 +327,7 @@ public extension ApplicationClient { } catch {} do { - timeout = try container.decode(Int.self, forKey: .timeout) + cardIsin = try container.decode(String.self, forKey: .cardIsin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -335,7 +335,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + intentFlow = try container.decode(Bool.self, forKey: .intentFlow) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -343,7 +343,7 @@ public extension ApplicationClient { } catch {} do { - retryCount = try container.decode(Int.self, forKey: .retryCount) + cardId = try container.decode(String.self, forKey: .cardId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -359,7 +359,7 @@ public extension ApplicationClient { } catch {} do { - logoUrl = try container.decode(PaymentModeLogo.self, forKey: .logoUrl) + cardFingerprint = try container.decode(String.self, forKey: .cardFingerprint) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -367,7 +367,7 @@ public extension ApplicationClient { } catch {} do { - intentFlow = try container.decode(Bool.self, forKey: .intentFlow) + intentApp = try container.decode([IntentApp].self, forKey: .intentApp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -375,7 +375,7 @@ public extension ApplicationClient { } catch {} do { - expYear = try container.decode(Int.self, forKey: .expYear) + expired = try container.decode(Bool.self, forKey: .expired) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -383,7 +383,7 @@ public extension ApplicationClient { } catch {} do { - cardReference = try container.decode(String.self, forKey: .cardReference) + expYear = try container.decode(Int.self, forKey: .expYear) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -391,7 +391,7 @@ public extension ApplicationClient { } catch {} do { - nickname = try container.decode(String.self, forKey: .nickname) + fyndVpa = try container.decode(String.self, forKey: .fyndVpa) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -399,7 +399,7 @@ public extension ApplicationClient { } catch {} do { - expMonth = try container.decode(Int.self, forKey: .expMonth) + cardName = try container.decode(String.self, forKey: .cardName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -407,7 +407,7 @@ public extension ApplicationClient { } catch {} do { - cardId = try container.decode(String.self, forKey: .cardId) + displayPriority = try container.decode(Int.self, forKey: .displayPriority) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -418,63 +418,63 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(cardBrandImage, forKey: .cardBrandImage) + try? container.encode(intentAppErrorDictList, forKey: .intentAppErrorDictList) - try? container.encode(intentApp, forKey: .intentApp) + try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) - try? container.encode(cardFingerprint, forKey: .cardFingerprint) + try? container.encode(retryCount, forKey: .retryCount) - try? container.encode(cardBrand, forKey: .cardBrand) + try? container.encode(cardReference, forKey: .cardReference) + + try? container.encode(nickname, forKey: .nickname) + + try? container.encode(cardType, forKey: .cardType) try? container.encode(merchantCode, forKey: .merchantCode) - try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) + try? container.encode(cardNumber, forKey: .cardNumber) - try? container.encode(cardIssuer, forKey: .cardIssuer) + try? container.encode(expMonth, forKey: .expMonth) - try? container.encode(intentAppErrorDictList, forKey: .intentAppErrorDictList) + try? container.encode(timeout, forKey: .timeout) - try? container.encode(intentAppErrorList, forKey: .intentAppErrorList) + try? container.encode(cardIssuer, forKey: .cardIssuer) try? container.encode(displayName, forKey: .displayName) - try? container.encode(cardIsin, forKey: .cardIsin) - try? container.encode(code, forKey: .code) - try? container.encode(cardNumber, forKey: .cardNumber) - - try? container.encode(fyndVpa, forKey: .fyndVpa) + try? container.encode(cardBrandImage, forKey: .cardBrandImage) - try? container.encode(displayPriority, forKey: .displayPriority) + try? container.encode(logoUrl, forKey: .logoUrl) - try? container.encode(cardType, forKey: .cardType) + try? container.encode(cardBrand, forKey: .cardBrand) - try? container.encode(expired, forKey: .expired) + try? container.encode(name, forKey: .name) - try? container.encode(cardName, forKey: .cardName) + try? container.encode(intentAppErrorList, forKey: .intentAppErrorList) - try? container.encode(timeout, forKey: .timeout) + try? container.encode(cardIsin, forKey: .cardIsin) - try? container.encode(name, forKey: .name) + try? container.encode(intentFlow, forKey: .intentFlow) - try? container.encode(retryCount, forKey: .retryCount) + try? container.encode(cardId, forKey: .cardId) try? container.encode(cardToken, forKey: .cardToken) - try? container.encode(logoUrl, forKey: .logoUrl) + try? container.encode(cardFingerprint, forKey: .cardFingerprint) - try? container.encode(intentFlow, forKey: .intentFlow) + try? container.encode(intentApp, forKey: .intentApp) - try? container.encode(expYear, forKey: .expYear) + try? container.encode(expired, forKey: .expired) - try? container.encode(cardReference, forKey: .cardReference) + try? container.encode(expYear, forKey: .expYear) - try? container.encode(nickname, forKey: .nickname) + try? container.encode(fyndVpa, forKey: .fyndVpa) - try? container.encode(expMonth, forKey: .expMonth) + try? container.encode(cardName, forKey: .cardName) - try? container.encode(cardId, forKey: .cardId) + try? container.encode(displayPriority, forKey: .displayPriority) } } } diff --git a/Sources/code/application/models/PaymentModeRouteResponseAppModelClass.swift b/Sources/code/application/models/PaymentModeRouteResponseAppModelClass.swift index 8e7fae23e2..2c11a4075a 100644 --- a/Sources/code/application/models/PaymentModeRouteResponseAppModelClass.swift +++ b/Sources/code/application/models/PaymentModeRouteResponseAppModelClass.swift @@ -7,36 +7,36 @@ public extension ApplicationClient { Used By: Payment */ class PaymentModeRouteResponse: Codable { - public var success: Bool - public var paymentOptions: PaymentOptionAndFlow - public enum CodingKeys: String, CodingKey { - case success + public var success: Bool + public enum CodingKeys: String, CodingKey { case paymentOptions = "payment_options" + + case success } public init(paymentOptions: PaymentOptionAndFlow, success: Bool) { - self.success = success - self.paymentOptions = paymentOptions + + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - success = try container.decode(Bool.self, forKey: .success) - paymentOptions = try container.decode(PaymentOptionAndFlow.self, forKey: .paymentOptions) + + success = try container.decode(Bool.self, forKey: .success) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(paymentOptions, forKey: .paymentOptions) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/PaymentStatusUpdateRequestAppModelClass.swift b/Sources/code/application/models/PaymentStatusUpdateRequestAppModelClass.swift index 5d6b1d414b..df7f15cf9e 100644 --- a/Sources/code/application/models/PaymentStatusUpdateRequestAppModelClass.swift +++ b/Sources/code/application/models/PaymentStatusUpdateRequestAppModelClass.swift @@ -7,126 +7,126 @@ public extension ApplicationClient { Used By: Payment */ class PaymentStatusUpdateRequest: Codable { - public var currency: String - - public var contact: String + public var status: String - public var aggregator: String + public var method: String public var vpa: String - public var customerId: String + public var amount: Int - public var merchantOrderId: String + public var orderId: String - public var status: String + public var customerId: String - public var email: String + public var aggregator: String - public var amount: Int + public var currency: String - public var orderId: String + public var contact: String - public var method: String + public var email: String - public enum CodingKeys: String, CodingKey { - case currency + public var merchantOrderId: String - case contact + public enum CodingKeys: String, CodingKey { + case status - case aggregator + case method case vpa - case customerId = "customer_id" + case amount - case merchantOrderId = "merchant_order_id" + case orderId = "order_id" - case status + case customerId = "customer_id" - case email + case aggregator - case amount + case currency - case orderId = "order_id" + case contact - case method + case email + + case merchantOrderId = "merchant_order_id" } public init(aggregator: String, amount: Int, contact: String, currency: String, customerId: String, email: String, merchantOrderId: String, method: String, orderId: String, status: String, vpa: String) { - self.currency = currency - - self.contact = contact + self.status = status - self.aggregator = aggregator + self.method = method self.vpa = vpa - self.customerId = customerId + self.amount = amount - self.merchantOrderId = merchantOrderId + self.orderId = orderId - self.status = status + self.customerId = customerId - self.email = email + self.aggregator = aggregator - self.amount = amount + self.currency = currency - self.orderId = orderId + self.contact = contact - self.method = method + self.email = email + + self.merchantOrderId = merchantOrderId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - currency = try container.decode(String.self, forKey: .currency) - - contact = try container.decode(String.self, forKey: .contact) + status = try container.decode(String.self, forKey: .status) - aggregator = try container.decode(String.self, forKey: .aggregator) + method = try container.decode(String.self, forKey: .method) vpa = try container.decode(String.self, forKey: .vpa) - customerId = try container.decode(String.self, forKey: .customerId) + amount = try container.decode(Int.self, forKey: .amount) - merchantOrderId = try container.decode(String.self, forKey: .merchantOrderId) + orderId = try container.decode(String.self, forKey: .orderId) - status = try container.decode(String.self, forKey: .status) + customerId = try container.decode(String.self, forKey: .customerId) - email = try container.decode(String.self, forKey: .email) + aggregator = try container.decode(String.self, forKey: .aggregator) - amount = try container.decode(Int.self, forKey: .amount) + currency = try container.decode(String.self, forKey: .currency) - orderId = try container.decode(String.self, forKey: .orderId) + contact = try container.decode(String.self, forKey: .contact) - method = try container.decode(String.self, forKey: .method) + email = try container.decode(String.self, forKey: .email) + + merchantOrderId = try container.decode(String.self, forKey: .merchantOrderId) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(currency, forKey: .currency) - - try? container.encodeIfPresent(contact, forKey: .contact) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) + try? container.encodeIfPresent(method, forKey: .method) try? container.encodeIfPresent(vpa, forKey: .vpa) - try? container.encodeIfPresent(customerId, forKey: .customerId) + try? container.encode(amount, forKey: .amount) - try? container.encodeIfPresent(merchantOrderId, forKey: .merchantOrderId) + try? container.encodeIfPresent(orderId, forKey: .orderId) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(customerId, forKey: .customerId) - try? container.encodeIfPresent(email, forKey: .email) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encode(amount, forKey: .amount) + try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encodeIfPresent(orderId, forKey: .orderId) + try? container.encodeIfPresent(contact, forKey: .contact) - try? container.encodeIfPresent(method, forKey: .method) + try? container.encodeIfPresent(email, forKey: .email) + + try? container.encodeIfPresent(merchantOrderId, forKey: .merchantOrderId) } } } diff --git a/Sources/code/application/models/PaymentStatusUpdateResponseAppModelClass.swift b/Sources/code/application/models/PaymentStatusUpdateResponseAppModelClass.swift index e014d231d5..8d335e0fb8 100644 --- a/Sources/code/application/models/PaymentStatusUpdateResponseAppModelClass.swift +++ b/Sources/code/application/models/PaymentStatusUpdateResponseAppModelClass.swift @@ -7,46 +7,46 @@ public extension ApplicationClient { Used By: Payment */ class PaymentStatusUpdateResponse: Codable { + public var retry: Bool + public var aggregatorName: String public var status: String - public var retry: Bool - public enum CodingKeys: String, CodingKey { + case retry + case aggregatorName = "aggregator_name" case status - - case retry } public init(aggregatorName: String, retry: Bool, status: String) { + self.retry = retry + self.aggregatorName = aggregatorName self.status = status - - self.retry = retry } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + retry = try container.decode(Bool.self, forKey: .retry) + aggregatorName = try container.decode(String.self, forKey: .aggregatorName) status = try container.decode(String.self, forKey: .status) - - retry = try container.decode(Bool.self, forKey: .retry) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(retry, forKey: .retry) + try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) try? container.encodeIfPresent(status, forKey: .status) - - try? container.encodeIfPresent(retry, forKey: .retry) } } } diff --git a/Sources/code/application/models/Price1AppModelClass.swift b/Sources/code/application/models/Price1AppModelClass.swift index 6ee57012c5..c3c85a2594 100644 --- a/Sources/code/application/models/Price1AppModelClass.swift +++ b/Sources/code/application/models/Price1AppModelClass.swift @@ -7,45 +7,45 @@ public extension ApplicationClient { Used By: Catalog */ class Price1: Codable { + public var maxEffective: Double? + + public var minEffective: Double? + public var minMarked: Double? public var maxMarked: Double? - public var minEffective: Double? - public var currency: String? - public var maxEffective: Double? - public enum CodingKeys: String, CodingKey { + case maxEffective = "max_effective" + + case minEffective = "min_effective" + case minMarked = "min_marked" case maxMarked = "max_marked" - case minEffective = "min_effective" - case currency - - case maxEffective = "max_effective" } public init(currency: String? = nil, maxEffective: Double? = nil, maxMarked: Double? = nil, minEffective: Double? = nil, minMarked: Double? = nil) { + self.maxEffective = maxEffective + + self.minEffective = minEffective + self.minMarked = minMarked self.maxMarked = maxMarked - self.minEffective = minEffective - self.currency = currency - - self.maxEffective = maxEffective } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - minMarked = try container.decode(Double.self, forKey: .minMarked) + maxEffective = try container.decode(Double.self, forKey: .maxEffective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -53,7 +53,7 @@ public extension ApplicationClient { } catch {} do { - maxMarked = try container.decode(Double.self, forKey: .maxMarked) + minEffective = try container.decode(Double.self, forKey: .minEffective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,7 +61,7 @@ public extension ApplicationClient { } catch {} do { - minEffective = try container.decode(Double.self, forKey: .minEffective) + minMarked = try container.decode(Double.self, forKey: .minMarked) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -69,7 +69,7 @@ public extension ApplicationClient { } catch {} do { - currency = try container.decode(String.self, forKey: .currency) + maxMarked = try container.decode(Double.self, forKey: .maxMarked) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - maxEffective = try container.decode(Double.self, forKey: .maxEffective) + currency = try container.decode(String.self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -88,15 +88,15 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(maxEffective, forKey: .maxEffective) + + try? container.encodeIfPresent(minEffective, forKey: .minEffective) + try? container.encodeIfPresent(minMarked, forKey: .minMarked) try? container.encodeIfPresent(maxMarked, forKey: .maxMarked) - try? container.encodeIfPresent(minEffective, forKey: .minEffective) - try? container.encodeIfPresent(currency, forKey: .currency) - - try? container.encodeIfPresent(maxEffective, forKey: .maxEffective) } } } diff --git a/Sources/code/application/models/PriceAppModelClass.swift b/Sources/code/application/models/PriceAppModelClass.swift index 0bd635771f..8d5c1b3921 100644 --- a/Sources/code/application/models/PriceAppModelClass.swift +++ b/Sources/code/application/models/PriceAppModelClass.swift @@ -7,30 +7,30 @@ public extension ApplicationClient { Used By: Catalog */ class Price: Codable { - public var max: Double? + public var currencySymbol: String? public var min: Double? - public var currencySymbol: String? + public var max: Double? public var currencyCode: String? public enum CodingKeys: String, CodingKey { - case max + case currencySymbol = "currency_symbol" case min - case currencySymbol = "currency_symbol" + case max case currencyCode = "currency_code" } public init(currencyCode: String? = nil, currencySymbol: String? = nil, max: Double? = nil, min: Double? = nil) { - self.max = max + self.currencySymbol = currencySymbol self.min = min - self.currencySymbol = currencySymbol + self.max = max self.currencyCode = currencyCode } @@ -39,7 +39,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - max = try container.decode(Double.self, forKey: .max) + currencySymbol = try container.decode(String.self, forKey: .currencySymbol) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - currencySymbol = try container.decode(String.self, forKey: .currencySymbol) + max = try container.decode(Double.self, forKey: .max) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,11 +74,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(max, forKey: .max) + try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) try? container.encodeIfPresent(min, forKey: .min) - try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) + try? container.encodeIfPresent(max, forKey: .max) try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) } diff --git a/Sources/code/application/models/ProductBrandAppModelClass.swift b/Sources/code/application/models/ProductBrandAppModelClass.swift index 05525666e9..9c72a5c4bd 100644 --- a/Sources/code/application/models/ProductBrandAppModelClass.swift +++ b/Sources/code/application/models/ProductBrandAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class ProductBrand: Codable { + public var logo: Media? + + public var action: ProductListingAction? + public var name: String? public var uid: Int? - public var action: ProductListingAction? + public enum CodingKeys: String, CodingKey { + case logo - public var logo: Media? + case action - public enum CodingKeys: String, CodingKey { case name case uid - - case action - - case logo } public init(action: ProductListingAction? = nil, logo: Media? = nil, name: String? = nil, uid: Int? = nil) { - self.name = name - - self.uid = uid + self.logo = logo self.action = action - self.logo = logo + self.name = name + + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + action = try container.decode(ProductListingAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - action = try container.decode(ProductListingAction.self, forKey: .action) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,13 +74,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) - - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(name, forKey: .name) + + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/ProductCompareResponseAppModelClass.swift b/Sources/code/application/models/ProductCompareResponseAppModelClass.swift index b47e12718a..04ded11eff 100644 --- a/Sources/code/application/models/ProductCompareResponseAppModelClass.swift +++ b/Sources/code/application/models/ProductCompareResponseAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class ProductCompareResponse: Codable { - public var attributesMetadata: [AttributeMetadata]? - public var items: [ProductDetail]? - public var subtitle: String? + public var attributesMetadata: [AttributeMetadata]? public var title: String? - public enum CodingKeys: String, CodingKey { - case attributesMetadata = "attributes_metadata" + public var subtitle: String? + public enum CodingKeys: String, CodingKey { case items - case subtitle + case attributesMetadata = "attributes_metadata" case title + + case subtitle } public init(attributesMetadata: [AttributeMetadata]? = nil, items: [ProductDetail]? = nil, subtitle: String? = nil, title: String? = nil) { - self.attributesMetadata = attributesMetadata - self.items = items - self.subtitle = subtitle + self.attributesMetadata = attributesMetadata self.title = title + + self.subtitle = subtitle } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - attributesMetadata = try container.decode([AttributeMetadata].self, forKey: .attributesMetadata) + items = try container.decode([ProductDetail].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - items = try container.decode([ProductDetail].self, forKey: .items) + attributesMetadata = try container.decode([AttributeMetadata].self, forKey: .attributesMetadata) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - subtitle = try container.decode(String.self, forKey: .subtitle) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - title = try container.decode(String.self, forKey: .title) + subtitle = try container.decode(String.self, forKey: .subtitle) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,13 +74,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(attributesMetadata, forKey: .attributesMetadata) - try? container.encodeIfPresent(items, forKey: .items) - try? container.encodeIfPresent(subtitle, forKey: .subtitle) + try? container.encodeIfPresent(attributesMetadata, forKey: .attributesMetadata) try? container.encodeIfPresent(title, forKey: .title) + + try? container.encodeIfPresent(subtitle, forKey: .subtitle) } } } diff --git a/Sources/code/application/models/ProductDetailAppModelClass.swift b/Sources/code/application/models/ProductDetailAppModelClass.swift index d6c9fdd130..48abf826c8 100644 --- a/Sources/code/application/models/ProductDetailAppModelClass.swift +++ b/Sources/code/application/models/ProductDetailAppModelClass.swift @@ -7,183 +7,183 @@ public extension ApplicationClient { Used By: Catalog */ class ProductDetail: Codable { - public var ratingCount: Int? + public var type: String? public var action: ProductListingAction? - public var hasVariant: Bool? + public var name: String? - public var description: String? + public var color: String? - public var customMeta: [MetaFields]? + public var imageNature: String? - public var similars: [String]? + public var rating: Double? - public var slug: String + public var ratingCount: Int? - public var price: ProductListingPrice? + public var discount: String? - public var itemType: String? + public var customMeta: [MetaFields]? - public var categories: [ProductBrand]? + public var groupedAttributes: [ProductDetailGroupedAttribute]? + + public var hasVariant: Bool? public var highlights: [String]? - public var productOnlineDate: String? + public var customJson: [String: Any]? - public var tryouts: [String]? + public var categories: [ProductBrand]? - public var medias: [Media]? + public var shortDescription: String? - public var rating: Double? + public var price: ProductListingPrice? - public var discount: String? + public var similars: [String]? - public var name: String? + public var itemCode: String? public var teaserTag: String? - public var uid: Int? - - public var imageNature: String? + public var medias: [Media]? public var brand: ProductBrand? - public var shortDescription: String? + public var productOnlineDate: String? - public var type: String? + public var attributes: [String: Any]? - public var groupedAttributes: [ProductDetailGroupedAttribute]? + public var tryouts: [String]? - public var customJson: [String: Any]? + public var itemType: String? - public var color: String? + public var slug: String - public var attributes: [String: Any]? + public var description: String? - public var itemCode: String? + public var uid: Int? public enum CodingKeys: String, CodingKey { - case ratingCount = "rating_count" + case type case action - case hasVariant = "has_variant" + case name - case description + case color - case customMeta = "_custom_meta" + case imageNature = "image_nature" - case similars + case rating - case slug + case ratingCount = "rating_count" - case price + case discount - case itemType = "item_type" + case customMeta = "_custom_meta" - case categories + case groupedAttributes = "grouped_attributes" + + case hasVariant = "has_variant" case highlights - case productOnlineDate = "product_online_date" + case customJson = "_custom_json" - case tryouts + case categories - case medias + case shortDescription = "short_description" - case rating + case price - case discount + case similars - case name + case itemCode = "item_code" case teaserTag = "teaser_tag" - case uid - - case imageNature = "image_nature" + case medias case brand - case shortDescription = "short_description" + case productOnlineDate = "product_online_date" - case type + case attributes - case groupedAttributes = "grouped_attributes" + case tryouts - case customJson = "_custom_json" + case itemType = "item_type" - case color + case slug - case attributes + case description - case itemCode = "item_code" + case uid } public init(action: ProductListingAction? = nil, attributes: [String: Any]? = nil, brand: ProductBrand? = nil, categories: [ProductBrand]? = nil, color: String? = nil, description: String? = nil, discount: String? = nil, groupedAttributes: [ProductDetailGroupedAttribute]? = nil, hasVariant: Bool? = nil, highlights: [String]? = nil, imageNature: String? = nil, itemCode: String? = nil, itemType: String? = nil, medias: [Media]? = nil, name: String? = nil, price: ProductListingPrice? = nil, productOnlineDate: String? = nil, rating: Double? = nil, ratingCount: Int? = nil, shortDescription: String? = nil, similars: [String]? = nil, slug: String, teaserTag: String? = nil, tryouts: [String]? = nil, type: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil, customMeta: [MetaFields]? = nil) { - self.ratingCount = ratingCount + self.type = type self.action = action - self.hasVariant = hasVariant + self.name = name - self.description = description + self.color = color - self.customMeta = customMeta + self.imageNature = imageNature - self.similars = similars + self.rating = rating - self.slug = slug + self.ratingCount = ratingCount - self.price = price + self.discount = discount - self.itemType = itemType + self.customMeta = customMeta - self.categories = categories + self.groupedAttributes = groupedAttributes + + self.hasVariant = hasVariant self.highlights = highlights - self.productOnlineDate = productOnlineDate + self.customJson = customJson - self.tryouts = tryouts + self.categories = categories - self.medias = medias + self.shortDescription = shortDescription - self.rating = rating + self.price = price - self.discount = discount + self.similars = similars - self.name = name + self.itemCode = itemCode self.teaserTag = teaserTag - self.uid = uid - - self.imageNature = imageNature + self.medias = medias self.brand = brand - self.shortDescription = shortDescription + self.productOnlineDate = productOnlineDate - self.type = type + self.attributes = attributes - self.groupedAttributes = groupedAttributes + self.tryouts = tryouts - self.customJson = customJson + self.itemType = itemType - self.color = color + self.slug = slug - self.attributes = attributes + self.description = description - self.itemCode = itemCode + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - ratingCount = try container.decode(Int.self, forKey: .ratingCount) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -199,7 +199,7 @@ public extension ApplicationClient { } catch {} do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -207,7 +207,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -215,7 +215,7 @@ public extension ApplicationClient { } catch {} do { - customMeta = try container.decode([MetaFields].self, forKey: .customMeta) + imageNature = try container.decode(String.self, forKey: .imageNature) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -223,17 +223,15 @@ public extension ApplicationClient { } catch {} do { - similars = try container.decode([String].self, forKey: .similars) + rating = try container.decode(Double.self, forKey: .rating) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - slug = try container.decode(String.self, forKey: .slug) - do { - price = try container.decode(ProductListingPrice.self, forKey: .price) + ratingCount = try container.decode(Int.self, forKey: .ratingCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -241,7 +239,7 @@ public extension ApplicationClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -249,7 +247,7 @@ public extension ApplicationClient { } catch {} do { - categories = try container.decode([ProductBrand].self, forKey: .categories) + customMeta = try container.decode([MetaFields].self, forKey: .customMeta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -257,7 +255,7 @@ public extension ApplicationClient { } catch {} do { - highlights = try container.decode([String].self, forKey: .highlights) + groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -265,7 +263,7 @@ public extension ApplicationClient { } catch {} do { - productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + hasVariant = try container.decode(Bool.self, forKey: .hasVariant) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -273,7 +271,7 @@ public extension ApplicationClient { } catch {} do { - tryouts = try container.decode([String].self, forKey: .tryouts) + highlights = try container.decode([String].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -281,7 +279,7 @@ public extension ApplicationClient { } catch {} do { - medias = try container.decode([Media].self, forKey: .medias) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -289,7 +287,7 @@ public extension ApplicationClient { } catch {} do { - rating = try container.decode(Double.self, forKey: .rating) + categories = try container.decode([ProductBrand].self, forKey: .categories) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -297,7 +295,7 @@ public extension ApplicationClient { } catch {} do { - discount = try container.decode(String.self, forKey: .discount) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -305,7 +303,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + price = try container.decode(ProductListingPrice.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -313,7 +311,7 @@ public extension ApplicationClient { } catch {} do { - teaserTag = try container.decode(String.self, forKey: .teaserTag) + similars = try container.decode([String].self, forKey: .similars) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -321,7 +319,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -329,7 +327,7 @@ public extension ApplicationClient { } catch {} do { - imageNature = try container.decode(String.self, forKey: .imageNature) + teaserTag = try container.decode(String.self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -337,7 +335,7 @@ public extension ApplicationClient { } catch {} do { - brand = try container.decode(ProductBrand.self, forKey: .brand) + medias = try container.decode([Media].self, forKey: .medias) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -345,7 +343,7 @@ public extension ApplicationClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + brand = try container.decode(ProductBrand.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -353,7 +351,7 @@ public extension ApplicationClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -361,7 +359,7 @@ public extension ApplicationClient { } catch {} do { - groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) + attributes = try container.decode([String: Any].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -369,7 +367,7 @@ public extension ApplicationClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + tryouts = try container.decode([String].self, forKey: .tryouts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -377,15 +375,17 @@ public extension ApplicationClient { } catch {} do { - color = try container.decode(String.self, forKey: .color) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + slug = try container.decode(String.self, forKey: .slug) + do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -393,7 +393,7 @@ public extension ApplicationClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -404,61 +404,61 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(type, forKey: .type) try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(color, forKey: .color) - try? container.encodeIfPresent(customMeta, forKey: .customMeta) + try? container.encodeIfPresent(imageNature, forKey: .imageNature) - try? container.encodeIfPresent(similars, forKey: .similars) + try? container.encodeIfPresent(rating, forKey: .rating) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(discount, forKey: .discount) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(customMeta, forKey: .customMeta) - try? container.encodeIfPresent(categories, forKey: .categories) + try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + + try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) try? container.encodeIfPresent(highlights, forKey: .highlights) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) + try? container.encodeIfPresent(categories, forKey: .categories) - try? container.encodeIfPresent(medias, forKey: .medias) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(rating, forKey: .rating) + try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(discount, forKey: .discount) + try? container.encodeIfPresent(similars, forKey: .similars) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) - try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(medias, forKey: .medias) try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(attributes, forKey: .attributes) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(tryouts, forKey: .tryouts) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(color, forKey: .color) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(attributes, forKey: .attributes) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/ProductDetailAttributeAppModelClass.swift b/Sources/code/application/models/ProductDetailAttributeAppModelClass.swift index 635704b994..598ff6dea4 100644 --- a/Sources/code/application/models/ProductDetailAttributeAppModelClass.swift +++ b/Sources/code/application/models/ProductDetailAttributeAppModelClass.swift @@ -7,25 +7,25 @@ public extension ApplicationClient { Used By: Catalog */ class ProductDetailAttribute: Codable { - public var value: String? - public var type: String? + public var value: String? + public var key: String? public enum CodingKeys: String, CodingKey { - case value - case type + case value + case key } public init(key: String? = nil, type: String? = nil, value: String? = nil) { - self.value = value - self.type = type + self.value = value + self.key = key } @@ -33,7 +33,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - value = try container.decode(String.self, forKey: .value) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,10 +60,10 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(key, forKey: .key) } } diff --git a/Sources/code/application/models/ProductDetailsAppModelClass.swift b/Sources/code/application/models/ProductDetailsAppModelClass.swift index 7cea4783fb..75e0142cac 100644 --- a/Sources/code/application/models/ProductDetailsAppModelClass.swift +++ b/Sources/code/application/models/ProductDetailsAppModelClass.swift @@ -7,135 +7,135 @@ public extension ApplicationClient { Used By: Catalog */ class ProductDetails: Codable { - public var ratingCount: Int? - - public var description: String? + public var name: String? - public var hasVariant: Bool? + public var media: [[String: Any]]? - public var slug: String? + public var rating: Double? - public var countryOfOrigin: String? + public var imageNature: String? public var templateTag: String? - public var outOfStock: Bool? + public var ratingCount: Int? - public var media: [[String: Any]]? + public var brandUid: Int? - public var rating: Double? + public var groupedAttributes: [String: Any]? - public var isSet: Bool? + public var countryOfOrigin: String? - public var name: String? + public var hasVariant: Bool? - public var imageNature: String? + public var outOfStock: Bool? - public var brandUid: Int? + public var images: [[String: Any]]? public var shortDescription: String? - public var identifier: [String: Any]? + public var isSet: Bool? - public var groupedAttributes: [String: Any]? + public var itemCode: String? + + public var identifier: [String: Any]? public var hsnCode: Int? public var attributes: [String: Any]? - public var itemCode: String? + public var slug: String? - public var images: [[String: Any]]? + public var description: String? public enum CodingKeys: String, CodingKey { - case ratingCount = "rating_count" - - case description + case name - case hasVariant = "has_variant" + case media - case slug + case rating - case countryOfOrigin = "country_of_origin" + case imageNature = "image_nature" case templateTag = "template_tag" - case outOfStock = "out_of_stock" + case ratingCount = "rating_count" - case media + case brandUid = "brand_uid" - case rating + case groupedAttributes = "grouped_attributes" - case isSet = "is_set" + case countryOfOrigin = "country_of_origin" - case name + case hasVariant = "has_variant" - case imageNature = "image_nature" + case outOfStock = "out_of_stock" - case brandUid = "brand_uid" + case images case shortDescription = "short_description" - case identifier + case isSet = "is_set" - case groupedAttributes = "grouped_attributes" + case itemCode = "item_code" + + case identifier case hsnCode = "hsn_code" case attributes - case itemCode = "item_code" + case slug - case images + case description } public init(attributes: [String: Any]? = nil, brandUid: Int? = nil, countryOfOrigin: String? = nil, description: String? = nil, groupedAttributes: [String: Any]? = nil, hasVariant: Bool? = nil, hsnCode: Int? = nil, identifier: [String: Any]? = nil, images: [[String: Any]]? = nil, imageNature: String? = nil, isSet: Bool? = nil, itemCode: String? = nil, media: [[String: Any]]? = nil, name: String? = nil, outOfStock: Bool? = nil, rating: Double? = nil, ratingCount: Int? = nil, shortDescription: String? = nil, slug: String? = nil, templateTag: String? = nil) { - self.ratingCount = ratingCount - - self.description = description + self.name = name - self.hasVariant = hasVariant + self.media = media - self.slug = slug + self.rating = rating - self.countryOfOrigin = countryOfOrigin + self.imageNature = imageNature self.templateTag = templateTag - self.outOfStock = outOfStock + self.ratingCount = ratingCount - self.media = media + self.brandUid = brandUid - self.rating = rating + self.groupedAttributes = groupedAttributes - self.isSet = isSet + self.countryOfOrigin = countryOfOrigin - self.name = name + self.hasVariant = hasVariant - self.imageNature = imageNature + self.outOfStock = outOfStock - self.brandUid = brandUid + self.images = images self.shortDescription = shortDescription - self.identifier = identifier + self.isSet = isSet - self.groupedAttributes = groupedAttributes + self.itemCode = itemCode + + self.identifier = identifier self.hsnCode = hsnCode self.attributes = attributes - self.itemCode = itemCode + self.slug = slug - self.images = images + self.description = description } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - ratingCount = try container.decode(Int.self, forKey: .ratingCount) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -143,7 +143,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + media = try container.decode([[String: Any]].self, forKey: .media) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -151,7 +151,7 @@ public extension ApplicationClient { } catch {} do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + rating = try container.decode(Double.self, forKey: .rating) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -159,7 +159,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + imageNature = try container.decode(String.self, forKey: .imageNature) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -167,7 +167,7 @@ public extension ApplicationClient { } catch {} do { - countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) + templateTag = try container.decode(String.self, forKey: .templateTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -175,7 +175,7 @@ public extension ApplicationClient { } catch {} do { - templateTag = try container.decode(String.self, forKey: .templateTag) + ratingCount = try container.decode(Int.self, forKey: .ratingCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -183,7 +183,7 @@ public extension ApplicationClient { } catch {} do { - outOfStock = try container.decode(Bool.self, forKey: .outOfStock) + brandUid = try container.decode(Int.self, forKey: .brandUid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -191,7 +191,7 @@ public extension ApplicationClient { } catch {} do { - media = try container.decode([[String: Any]].self, forKey: .media) + groupedAttributes = try container.decode([String: Any].self, forKey: .groupedAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -199,7 +199,7 @@ public extension ApplicationClient { } catch {} do { - rating = try container.decode(Double.self, forKey: .rating) + countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -207,7 +207,7 @@ public extension ApplicationClient { } catch {} do { - isSet = try container.decode(Bool.self, forKey: .isSet) + hasVariant = try container.decode(Bool.self, forKey: .hasVariant) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -215,7 +215,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + outOfStock = try container.decode(Bool.self, forKey: .outOfStock) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -223,7 +223,7 @@ public extension ApplicationClient { } catch {} do { - imageNature = try container.decode(String.self, forKey: .imageNature) + images = try container.decode([[String: Any]].self, forKey: .images) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -231,7 +231,7 @@ public extension ApplicationClient { } catch {} do { - brandUid = try container.decode(Int.self, forKey: .brandUid) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -239,7 +239,7 @@ public extension ApplicationClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + isSet = try container.decode(Bool.self, forKey: .isSet) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -247,7 +247,7 @@ public extension ApplicationClient { } catch {} do { - identifier = try container.decode([String: Any].self, forKey: .identifier) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -255,7 +255,7 @@ public extension ApplicationClient { } catch {} do { - groupedAttributes = try container.decode([String: Any].self, forKey: .groupedAttributes) + identifier = try container.decode([String: Any].self, forKey: .identifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -279,7 +279,7 @@ public extension ApplicationClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -287,7 +287,7 @@ public extension ApplicationClient { } catch {} do { - images = try container.decode([[String: Any]].self, forKey: .images) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -298,45 +298,45 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) - - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + try? container.encodeIfPresent(media, forKey: .media) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(rating, forKey: .rating) - try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) + try? container.encodeIfPresent(imageNature, forKey: .imageNature) try? container.encodeIfPresent(templateTag, forKey: .templateTag) - try? container.encodeIfPresent(outOfStock, forKey: .outOfStock) + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) - try? container.encodeIfPresent(media, forKey: .media) + try? container.encodeIfPresent(brandUid, forKey: .brandUid) - try? container.encodeIfPresent(rating, forKey: .rating) + try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) - try? container.encodeIfPresent(isSet, forKey: .isSet) + try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(outOfStock, forKey: .outOfStock) - try? container.encodeIfPresent(brandUid, forKey: .brandUid) + try? container.encodeIfPresent(images, forKey: .images) try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(identifier, forKey: .identifier) + try? container.encodeIfPresent(isSet, forKey: .isSet) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) + + try? container.encodeIfPresent(identifier, forKey: .identifier) try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) try? container.encodeIfPresent(attributes, forKey: .attributes) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(images, forKey: .images) + try? container.encodeIfPresent(description, forKey: .description) } } } diff --git a/Sources/code/application/models/ProductFiltersKeyAppModelClass.swift b/Sources/code/application/models/ProductFiltersKeyAppModelClass.swift index 07ab661d5c..b0d980e97c 100644 --- a/Sources/code/application/models/ProductFiltersKeyAppModelClass.swift +++ b/Sources/code/application/models/ProductFiltersKeyAppModelClass.swift @@ -7,39 +7,37 @@ public extension ApplicationClient { Used By: Catalog */ class ProductFiltersKey: Codable { - public var name: String - public var kind: String? + public var logo: String? + public var display: String - public var logo: String? + public var name: String public enum CodingKeys: String, CodingKey { - case name - case kind + case logo + case display - case logo + case name } public init(display: String, kind: String? = nil, logo: String? = nil, name: String) { - self.name = name - self.kind = kind + self.logo = logo + self.display = display - self.logo = logo + self.name = name } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decode(String.self, forKey: .name) - do { kind = try container.decode(String.self, forKey: .kind) @@ -48,8 +46,6 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} - display = try container.decode(String.self, forKey: .display) - do { logo = try container.decode(String.self, forKey: .logo) @@ -57,18 +53,22 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + display = try container.decode(String.self, forKey: .display) + + name = try container.decode(String.self, forKey: .name) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(kind, forKey: .kind) + try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/application/models/ProductFiltersValueAppModelClass.swift b/Sources/code/application/models/ProductFiltersValueAppModelClass.swift index 6adefa82b6..c18d9e1612 100644 --- a/Sources/code/application/models/ProductFiltersValueAppModelClass.swift +++ b/Sources/code/application/models/ProductFiltersValueAppModelClass.swift @@ -7,87 +7,89 @@ public extension ApplicationClient { Used By: Catalog */ class ProductFiltersValue: Codable { - public var value: String? + public var isSelected: Bool - public var min: Int? + public var max: Int? - public var display: String + public var queryFormat: String? - public var selectedMax: Int? + public var count: Int? public var currencyCode: String? - public var currencySymbol: String? - - public var queryFormat: String? + public var selectedMax: Int? - public var displayFormat: String? + public var value: String? public var selectedMin: Int? - public var max: Int? + public var displayFormat: String? - public var count: Int? + public var currencySymbol: String? - public var isSelected: Bool + public var min: Int? + + public var display: String public enum CodingKeys: String, CodingKey { - case value + case isSelected = "is_selected" - case min + case max - case display + case queryFormat = "query_format" - case selectedMax = "selected_max" + case count case currencyCode = "currency_code" - case currencySymbol = "currency_symbol" - - case queryFormat = "query_format" + case selectedMax = "selected_max" - case displayFormat = "display_format" + case value case selectedMin = "selected_min" - case max + case displayFormat = "display_format" - case count + case currencySymbol = "currency_symbol" - case isSelected = "is_selected" + case min + + case display } public init(count: Int? = nil, currencyCode: String? = nil, currencySymbol: String? = nil, display: String, displayFormat: String? = nil, isSelected: Bool, max: Int? = nil, min: Int? = nil, queryFormat: String? = nil, selectedMax: Int? = nil, selectedMin: Int? = nil, value: String? = nil) { - self.value = value + self.isSelected = isSelected - self.min = min + self.max = max - self.display = display + self.queryFormat = queryFormat - self.selectedMax = selectedMax + self.count = count self.currencyCode = currencyCode - self.currencySymbol = currencySymbol - - self.queryFormat = queryFormat + self.selectedMax = selectedMax - self.displayFormat = displayFormat + self.value = value self.selectedMin = selectedMin - self.max = max + self.displayFormat = displayFormat - self.count = count + self.currencySymbol = currencySymbol - self.isSelected = isSelected + self.min = min + + self.display = display } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + isSelected = try container.decode(Bool.self, forKey: .isSelected) + do { - value = try container.decode(String.self, forKey: .value) + max = try container.decode(Int.self, forKey: .max) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -95,17 +97,15 @@ public extension ApplicationClient { } catch {} do { - min = try container.decode(Int.self, forKey: .min) + queryFormat = try container.decode(String.self, forKey: .queryFormat) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - display = try container.decode(String.self, forKey: .display) - do { - selectedMax = try container.decode(Int.self, forKey: .selectedMax) + count = try container.decode(Int.self, forKey: .count) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -121,7 +121,7 @@ public extension ApplicationClient { } catch {} do { - currencySymbol = try container.decode(String.self, forKey: .currencySymbol) + selectedMax = try container.decode(Int.self, forKey: .selectedMax) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -129,7 +129,7 @@ public extension ApplicationClient { } catch {} do { - queryFormat = try container.decode(String.self, forKey: .queryFormat) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -137,7 +137,7 @@ public extension ApplicationClient { } catch {} do { - displayFormat = try container.decode(String.self, forKey: .displayFormat) + selectedMin = try container.decode(Int.self, forKey: .selectedMin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -145,7 +145,7 @@ public extension ApplicationClient { } catch {} do { - selectedMin = try container.decode(Int.self, forKey: .selectedMin) + displayFormat = try container.decode(String.self, forKey: .displayFormat) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -153,7 +153,7 @@ public extension ApplicationClient { } catch {} do { - max = try container.decode(Int.self, forKey: .max) + currencySymbol = try container.decode(String.self, forKey: .currencySymbol) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -161,42 +161,42 @@ public extension ApplicationClient { } catch {} do { - count = try container.decode(Int.self, forKey: .count) + min = try container.decode(Int.self, forKey: .min) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - isSelected = try container.decode(Bool.self, forKey: .isSelected) + display = try container.decode(String.self, forKey: .display) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(isSelected, forKey: .isSelected) - try? container.encodeIfPresent(min, forKey: .min) + try? container.encodeIfPresent(max, forKey: .max) - try? container.encodeIfPresent(display, forKey: .display) + try? container.encodeIfPresent(queryFormat, forKey: .queryFormat) - try? container.encodeIfPresent(selectedMax, forKey: .selectedMax) + try? container.encodeIfPresent(count, forKey: .count) try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) - try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) - - try? container.encodeIfPresent(queryFormat, forKey: .queryFormat) + try? container.encodeIfPresent(selectedMax, forKey: .selectedMax) - try? container.encodeIfPresent(displayFormat, forKey: .displayFormat) + try? container.encodeIfPresent(value, forKey: .value) try? container.encodeIfPresent(selectedMin, forKey: .selectedMin) - try? container.encodeIfPresent(max, forKey: .max) + try? container.encodeIfPresent(displayFormat, forKey: .displayFormat) - try? container.encodeIfPresent(count, forKey: .count) + try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) - try? container.encodeIfPresent(isSelected, forKey: .isSelected) + try? container.encodeIfPresent(min, forKey: .min) + + try? container.encodeIfPresent(display, forKey: .display) } } } diff --git a/Sources/code/application/models/ProductListingActionPageAppModelClass.swift b/Sources/code/application/models/ProductListingActionPageAppModelClass.swift index 151c34a84b..584f1b524f 100644 --- a/Sources/code/application/models/ProductListingActionPageAppModelClass.swift +++ b/Sources/code/application/models/ProductListingActionPageAppModelClass.swift @@ -7,25 +7,25 @@ public extension ApplicationClient { Used By: Catalog */ class ProductListingActionPage: Codable { - public var query: [String: Any]? - public var type: String? + public var query: [String: Any]? + public var params: [String: Any]? public enum CodingKeys: String, CodingKey { - case query - case type + case query + case params } public init(params: [String: Any]? = nil, query: [String: Any]? = nil, type: String? = nil) { - self.query = query - self.type = type + self.query = query + self.params = params } @@ -33,7 +33,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - query = try container.decode([String: Any].self, forKey: .query) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,10 +60,10 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(query, forKey: .query) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(query, forKey: .query) + try? container.encodeIfPresent(params, forKey: .params) } } diff --git a/Sources/code/application/models/ProductListingDetailAppModelClass.swift b/Sources/code/application/models/ProductListingDetailAppModelClass.swift index ef00a6d825..ec099474d8 100644 --- a/Sources/code/application/models/ProductListingDetailAppModelClass.swift +++ b/Sources/code/application/models/ProductListingDetailAppModelClass.swift @@ -7,195 +7,195 @@ public extension ApplicationClient { Used By: Catalog */ class ProductListingDetail: Codable { - public var ratingCount: Int? + public var type: String? public var action: ProductListingAction? - public var hasVariant: Bool? + public var name: String? - public var description: String? + public var color: String? - public var customMeta: [MetaFields]? + public var imageNature: String? - public var similars: [String]? + public var rating: Double? - public var slug: String + public var ratingCount: Int? - public var price: ProductListingPrice? + public var discount: String? - public var itemType: String? + public var customMeta: [MetaFields]? - public var categories: [ProductBrand]? + public var groupedAttributes: [ProductDetailGroupedAttribute]? + + public var hasVariant: Bool? public var highlights: [String]? - public var variants: [ProductVariantListingResponse]? + public var sellable: Bool? - public var productOnlineDate: String? + public var customJson: [String: Any]? - public var tryouts: [String]? + public var categories: [ProductBrand]? - public var medias: [Media]? + public var shortDescription: String? - public var rating: Double? + public var price: ProductListingPrice? - public var discount: String? + public var similars: [String]? - public var name: String? + public var itemCode: String? public var teaserTag: String? - public var uid: Int? + public var variants: [ProductVariantListingResponse]? - public var imageNature: String? + public var medias: [Media]? public var brand: ProductBrand? - public var shortDescription: String? - - public var type: String? + public var productOnlineDate: String? - public var sellable: Bool? + public var attributes: [String: Any]? - public var groupedAttributes: [ProductDetailGroupedAttribute]? + public var tryouts: [String]? - public var customJson: [String: Any]? + public var itemType: String? - public var color: String? + public var slug: String - public var attributes: [String: Any]? + public var description: String? - public var itemCode: String? + public var uid: Int? public enum CodingKeys: String, CodingKey { - case ratingCount = "rating_count" + case type case action - case hasVariant = "has_variant" + case name - case description + case color - case customMeta = "_custom_meta" + case imageNature = "image_nature" - case similars + case rating - case slug + case ratingCount = "rating_count" - case price + case discount - case itemType = "item_type" + case customMeta = "_custom_meta" - case categories + case groupedAttributes = "grouped_attributes" + + case hasVariant = "has_variant" case highlights - case variants + case sellable - case productOnlineDate = "product_online_date" + case customJson = "_custom_json" - case tryouts + case categories - case medias + case shortDescription = "short_description" - case rating + case price - case discount + case similars - case name + case itemCode = "item_code" case teaserTag = "teaser_tag" - case uid + case variants - case imageNature = "image_nature" + case medias case brand - case shortDescription = "short_description" - - case type + case productOnlineDate = "product_online_date" - case sellable + case attributes - case groupedAttributes = "grouped_attributes" + case tryouts - case customJson = "_custom_json" + case itemType = "item_type" - case color + case slug - case attributes + case description - case itemCode = "item_code" + case uid } public init(action: ProductListingAction? = nil, attributes: [String: Any]? = nil, brand: ProductBrand? = nil, categories: [ProductBrand]? = nil, color: String? = nil, description: String? = nil, discount: String? = nil, groupedAttributes: [ProductDetailGroupedAttribute]? = nil, hasVariant: Bool? = nil, highlights: [String]? = nil, imageNature: String? = nil, itemCode: String? = nil, itemType: String? = nil, medias: [Media]? = nil, name: String? = nil, price: ProductListingPrice? = nil, productOnlineDate: String? = nil, rating: Double? = nil, ratingCount: Int? = nil, sellable: Bool? = nil, shortDescription: String? = nil, similars: [String]? = nil, slug: String, teaserTag: String? = nil, tryouts: [String]? = nil, type: String? = nil, uid: Int? = nil, variants: [ProductVariantListingResponse]? = nil, customJson: [String: Any]? = nil, customMeta: [MetaFields]? = nil) { - self.ratingCount = ratingCount + self.type = type self.action = action - self.hasVariant = hasVariant + self.name = name - self.description = description + self.color = color - self.customMeta = customMeta + self.imageNature = imageNature - self.similars = similars + self.rating = rating - self.slug = slug + self.ratingCount = ratingCount - self.price = price + self.discount = discount - self.itemType = itemType + self.customMeta = customMeta - self.categories = categories + self.groupedAttributes = groupedAttributes + + self.hasVariant = hasVariant self.highlights = highlights - self.variants = variants + self.sellable = sellable - self.productOnlineDate = productOnlineDate + self.customJson = customJson - self.tryouts = tryouts + self.categories = categories - self.medias = medias + self.shortDescription = shortDescription - self.rating = rating + self.price = price - self.discount = discount + self.similars = similars - self.name = name + self.itemCode = itemCode self.teaserTag = teaserTag - self.uid = uid + self.variants = variants - self.imageNature = imageNature + self.medias = medias self.brand = brand - self.shortDescription = shortDescription - - self.type = type + self.productOnlineDate = productOnlineDate - self.sellable = sellable + self.attributes = attributes - self.groupedAttributes = groupedAttributes + self.tryouts = tryouts - self.customJson = customJson + self.itemType = itemType - self.color = color + self.slug = slug - self.attributes = attributes + self.description = description - self.itemCode = itemCode + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - ratingCount = try container.decode(Int.self, forKey: .ratingCount) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -211,7 +211,7 @@ public extension ApplicationClient { } catch {} do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -219,7 +219,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -227,7 +227,7 @@ public extension ApplicationClient { } catch {} do { - customMeta = try container.decode([MetaFields].self, forKey: .customMeta) + imageNature = try container.decode(String.self, forKey: .imageNature) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -235,17 +235,15 @@ public extension ApplicationClient { } catch {} do { - similars = try container.decode([String].self, forKey: .similars) + rating = try container.decode(Double.self, forKey: .rating) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - slug = try container.decode(String.self, forKey: .slug) - do { - price = try container.decode(ProductListingPrice.self, forKey: .price) + ratingCount = try container.decode(Int.self, forKey: .ratingCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -253,7 +251,7 @@ public extension ApplicationClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -261,7 +259,7 @@ public extension ApplicationClient { } catch {} do { - categories = try container.decode([ProductBrand].self, forKey: .categories) + customMeta = try container.decode([MetaFields].self, forKey: .customMeta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -269,7 +267,7 @@ public extension ApplicationClient { } catch {} do { - highlights = try container.decode([String].self, forKey: .highlights) + groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -277,7 +275,7 @@ public extension ApplicationClient { } catch {} do { - variants = try container.decode([ProductVariantListingResponse].self, forKey: .variants) + hasVariant = try container.decode(Bool.self, forKey: .hasVariant) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -285,7 +283,7 @@ public extension ApplicationClient { } catch {} do { - productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + highlights = try container.decode([String].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -293,7 +291,7 @@ public extension ApplicationClient { } catch {} do { - tryouts = try container.decode([String].self, forKey: .tryouts) + sellable = try container.decode(Bool.self, forKey: .sellable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -301,7 +299,7 @@ public extension ApplicationClient { } catch {} do { - medias = try container.decode([Media].self, forKey: .medias) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -309,7 +307,7 @@ public extension ApplicationClient { } catch {} do { - rating = try container.decode(Double.self, forKey: .rating) + categories = try container.decode([ProductBrand].self, forKey: .categories) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -317,7 +315,7 @@ public extension ApplicationClient { } catch {} do { - discount = try container.decode(String.self, forKey: .discount) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -325,7 +323,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + price = try container.decode(ProductListingPrice.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -333,7 +331,7 @@ public extension ApplicationClient { } catch {} do { - teaserTag = try container.decode(String.self, forKey: .teaserTag) + similars = try container.decode([String].self, forKey: .similars) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -341,7 +339,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -349,7 +347,7 @@ public extension ApplicationClient { } catch {} do { - imageNature = try container.decode(String.self, forKey: .imageNature) + teaserTag = try container.decode(String.self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -357,7 +355,7 @@ public extension ApplicationClient { } catch {} do { - brand = try container.decode(ProductBrand.self, forKey: .brand) + variants = try container.decode([ProductVariantListingResponse].self, forKey: .variants) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -365,7 +363,7 @@ public extension ApplicationClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + medias = try container.decode([Media].self, forKey: .medias) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -373,7 +371,7 @@ public extension ApplicationClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + brand = try container.decode(ProductBrand.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -381,7 +379,7 @@ public extension ApplicationClient { } catch {} do { - sellable = try container.decode(Bool.self, forKey: .sellable) + productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -389,7 +387,7 @@ public extension ApplicationClient { } catch {} do { - groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) + attributes = try container.decode([String: Any].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -397,7 +395,7 @@ public extension ApplicationClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + tryouts = try container.decode([String].self, forKey: .tryouts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -405,15 +403,17 @@ public extension ApplicationClient { } catch {} do { - color = try container.decode(String.self, forKey: .color) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + slug = try container.decode(String.self, forKey: .slug) + do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -421,7 +421,7 @@ public extension ApplicationClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -432,65 +432,65 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(type, forKey: .type) try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(color, forKey: .color) - try? container.encodeIfPresent(customMeta, forKey: .customMeta) + try? container.encodeIfPresent(imageNature, forKey: .imageNature) - try? container.encodeIfPresent(similars, forKey: .similars) + try? container.encodeIfPresent(rating, forKey: .rating) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(discount, forKey: .discount) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(customMeta, forKey: .customMeta) - try? container.encodeIfPresent(categories, forKey: .categories) + try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + + try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) try? container.encodeIfPresent(highlights, forKey: .highlights) - try? container.encodeIfPresent(variants, forKey: .variants) + try? container.encodeIfPresent(sellable, forKey: .sellable) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) + try? container.encodeIfPresent(categories, forKey: .categories) - try? container.encodeIfPresent(medias, forKey: .medias) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(rating, forKey: .rating) + try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(discount, forKey: .discount) + try? container.encodeIfPresent(similars, forKey: .similars) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(variants, forKey: .variants) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(medias, forKey: .medias) try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) - try? container.encodeIfPresent(sellable, forKey: .sellable) + try? container.encodeIfPresent(attributes, forKey: .attributes) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(tryouts, forKey: .tryouts) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(color, forKey: .color) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(attributes, forKey: .attributes) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/ProductListingPriceAppModelClass.swift b/Sources/code/application/models/ProductListingPriceAppModelClass.swift index b5d2741aeb..e32c4ee070 100644 --- a/Sources/code/application/models/ProductListingPriceAppModelClass.swift +++ b/Sources/code/application/models/ProductListingPriceAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class ProductListingPrice: Codable { - public var effective: Price? - public var marked: Price? - public enum CodingKeys: String, CodingKey { - case effective + public var effective: Price? + public enum CodingKeys: String, CodingKey { case marked + + case effective } public init(effective: Price? = nil, marked: Price? = nil) { - self.effective = effective - self.marked = marked + + self.effective = effective } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - effective = try container.decode(Price.self, forKey: .effective) + marked = try container.decode(Price.self, forKey: .marked) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - marked = try container.decode(Price.self, forKey: .marked) + effective = try container.decode(Price.self, forKey: .effective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(effective, forKey: .effective) - try? container.encodeIfPresent(marked, forKey: .marked) + + try? container.encodeIfPresent(effective, forKey: .effective) } } } diff --git a/Sources/code/application/models/ProductListingResponseAppModelClass.swift b/Sources/code/application/models/ProductListingResponseAppModelClass.swift index 8043ecf295..e5ff77df6c 100644 --- a/Sources/code/application/models/ProductListingResponseAppModelClass.swift +++ b/Sources/code/application/models/ProductListingResponseAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class ProductListingResponse: Codable { - public var sortOn: [ProductSortOn]? - public var items: [ProductListingDetail]? - public var page: Page - public var filters: [ProductFilters]? - public enum CodingKeys: String, CodingKey { - case sortOn = "sort_on" + public var sortOn: [ProductSortOn]? - case items + public var page: Page - case page + public enum CodingKeys: String, CodingKey { + case items case filters + + case sortOn = "sort_on" + + case page } public init(filters: [ProductFilters]? = nil, items: [ProductListingDetail]? = nil, page: Page, sortOn: [ProductSortOn]? = nil) { - self.sortOn = sortOn - self.items = items - self.page = page - self.filters = filters + + self.sortOn = sortOn + + self.page = page } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - sortOn = try container.decode([ProductSortOn].self, forKey: .sortOn) + items = try container.decode([ProductListingDetail].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,34 +47,34 @@ public extension ApplicationClient { } catch {} do { - items = try container.decode([ProductListingDetail].self, forKey: .items) + filters = try container.decode([ProductFilters].self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - page = try container.decode(Page.self, forKey: .page) - do { - filters = try container.decode([ProductFilters].self, forKey: .filters) + sortOn = try container.decode([ProductSortOn].self, forKey: .sortOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + page = try container.decode(Page.self, forKey: .page) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(sortOn, forKey: .sortOn) - try? container.encodeIfPresent(items, forKey: .items) - try? container.encodeIfPresent(page, forKey: .page) - try? container.encodeIfPresent(filters, forKey: .filters) + + try? container.encodeIfPresent(sortOn, forKey: .sortOn) + + try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/application/models/ProductSetV2AppModelClass.swift b/Sources/code/application/models/ProductSetV2AppModelClass.swift index 3aeaad21d5..113cdfd617 100644 --- a/Sources/code/application/models/ProductSetV2AppModelClass.swift +++ b/Sources/code/application/models/ProductSetV2AppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class ProductSetV2: Codable { - public var quantity: Int? - public var sizeDistribution: ProductSetDistributionV2? - public enum CodingKeys: String, CodingKey { - case quantity + public var quantity: Int? + public enum CodingKeys: String, CodingKey { case sizeDistribution = "size_distribution" + + case quantity } public init(quantity: Int? = nil, sizeDistribution: ProductSetDistributionV2? = nil) { - self.quantity = quantity - self.sizeDistribution = sizeDistribution + + self.quantity = quantity } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - quantity = try container.decode(Int.self, forKey: .quantity) + sizeDistribution = try container.decode(ProductSetDistributionV2.self, forKey: .sizeDistribution) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - sizeDistribution = try container.decode(ProductSetDistributionV2.self, forKey: .sizeDistribution) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(quantity, forKey: .quantity) - try? container.encodeIfPresent(sizeDistribution, forKey: .sizeDistribution) + + try? container.encodeIfPresent(quantity, forKey: .quantity) } } } diff --git a/Sources/code/application/models/ProductSimilarItemAppModelClass.swift b/Sources/code/application/models/ProductSimilarItemAppModelClass.swift index 5e5b5f8fba..db586d7dba 100644 --- a/Sources/code/application/models/ProductSimilarItemAppModelClass.swift +++ b/Sources/code/application/models/ProductSimilarItemAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class ProductSimilarItem: Codable { public var items: [ProductDetail]? - public var subtitle: String? - public var title: String? + public var subtitle: String? + public enum CodingKeys: String, CodingKey { case items - case subtitle - case title + + case subtitle } public init(items: [ProductDetail]? = nil, subtitle: String? = nil, title: String? = nil) { self.items = items - self.subtitle = subtitle - self.title = title + + self.subtitle = subtitle } required public init(from decoder: Decoder) throws { @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - subtitle = try container.decode(String.self, forKey: .subtitle) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - title = try container.decode(String.self, forKey: .title) + subtitle = try container.decode(String.self, forKey: .subtitle) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,9 +62,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(items, forKey: .items) - try? container.encodeIfPresent(subtitle, forKey: .subtitle) - try? container.encodeIfPresent(title, forKey: .title) + + try? container.encodeIfPresent(subtitle, forKey: .subtitle) } } } diff --git a/Sources/code/application/models/ProductSizeAppModelClass.swift b/Sources/code/application/models/ProductSizeAppModelClass.swift index 3dbabcbb17..ecc4c3a062 100644 --- a/Sources/code/application/models/ProductSizeAppModelClass.swift +++ b/Sources/code/application/models/ProductSizeAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class ProductSize: Codable { + public var isAvailable: Bool? + public var quantity: Int? public var value: String? public var display: String? - public var isAvailable: Bool? - public enum CodingKeys: String, CodingKey { + case isAvailable = "is_available" + case quantity case value case display - - case isAvailable = "is_available" } public init(display: String? = nil, isAvailable: Bool? = nil, quantity: Int? = nil, value: String? = nil) { + self.isAvailable = isAvailable + self.quantity = quantity self.value = value self.display = display - - self.isAvailable = isAvailable } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - quantity = try container.decode(Int.self, forKey: .quantity) + isAvailable = try container.decode(Bool.self, forKey: .isAvailable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - value = try container.decode(String.self, forKey: .value) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - display = try container.decode(String.self, forKey: .display) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - isAvailable = try container.decode(Bool.self, forKey: .isAvailable) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,13 +74,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) + try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(value, forKey: .value) try? container.encodeIfPresent(display, forKey: .display) - - try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) } } } diff --git a/Sources/code/application/models/ProductSizePriceResponseV2AppModelClass.swift b/Sources/code/application/models/ProductSizePriceResponseV2AppModelClass.swift index 7baef6027b..9642a053b5 100644 --- a/Sources/code/application/models/ProductSizePriceResponseV2AppModelClass.swift +++ b/Sources/code/application/models/ProductSizePriceResponseV2AppModelClass.swift @@ -7,123 +7,123 @@ public extension ApplicationClient { Used By: Catalog */ class ProductSizePriceResponseV2: Codable { - public var pincode: Int? - - public var discount: String? + public var strategyWiseListing: [StrategyWiseListingSchemaV2]? public var quantity: Int? - public var strategyWiseListing: [StrategyWiseListingSchemaV2]? + public var pricePerPiece: ProductStockPriceV2? + + public var discount: String? public var set: ProductSetV2? - public var specialBadge: String? + public var marketplaceAttributes: [MarketPlaceSttributesSchemaV2]? - public var articleAssignment: ArticleAssignmentV2? + public var articleId: String? public var price: ProductStockPriceV2? - public var longLat: [Double]? - public var itemType: String? - public var groupedAttributes: [SellerGroupAttributes]? + public var longLat: [Double]? - public var seller: SellerV2? + public var groupedAttributes: [SellerGroupAttributes]? public var store: StoreV2? + public var pincode: Int? + public var returnConfig: ReturnConfigSchemaV2? - public var articleId: String? + public var seller: SellerV2? - public var sellerCount: Int? + public var articleAssignment: ArticleAssignmentV2? - public var marketplaceAttributes: [MarketPlaceSttributesSchemaV2]? + public var sellerCount: Int? - public var pricePerPiece: ProductStockPriceV2? + public var specialBadge: String? public enum CodingKeys: String, CodingKey { - case pincode - - case discount + case strategyWiseListing = "strategy_wise_listing" case quantity - case strategyWiseListing = "strategy_wise_listing" + case pricePerPiece = "price_per_piece" + + case discount case set - case specialBadge = "special_badge" + case marketplaceAttributes = "marketplace_attributes" - case articleAssignment = "article_assignment" + case articleId = "article_id" case price - case longLat = "long_lat" - case itemType = "item_type" - case groupedAttributes = "grouped_attributes" + case longLat = "long_lat" - case seller + case groupedAttributes = "grouped_attributes" case store + case pincode + case returnConfig = "return_config" - case articleId = "article_id" + case seller - case sellerCount = "seller_count" + case articleAssignment = "article_assignment" - case marketplaceAttributes = "marketplace_attributes" + case sellerCount = "seller_count" - case pricePerPiece = "price_per_piece" + case specialBadge = "special_badge" } public init(articleAssignment: ArticleAssignmentV2? = nil, articleId: String? = nil, discount: String? = nil, groupedAttributes: [SellerGroupAttributes]? = nil, itemType: String? = nil, longLat: [Double]? = nil, marketplaceAttributes: [MarketPlaceSttributesSchemaV2]? = nil, pincode: Int? = nil, price: ProductStockPriceV2? = nil, pricePerPiece: ProductStockPriceV2? = nil, quantity: Int? = nil, returnConfig: ReturnConfigSchemaV2? = nil, seller: SellerV2? = nil, sellerCount: Int? = nil, set: ProductSetV2? = nil, specialBadge: String? = nil, store: StoreV2? = nil, strategyWiseListing: [StrategyWiseListingSchemaV2]? = nil) { - self.pincode = pincode - - self.discount = discount + self.strategyWiseListing = strategyWiseListing self.quantity = quantity - self.strategyWiseListing = strategyWiseListing + self.pricePerPiece = pricePerPiece + + self.discount = discount self.set = set - self.specialBadge = specialBadge + self.marketplaceAttributes = marketplaceAttributes - self.articleAssignment = articleAssignment + self.articleId = articleId self.price = price - self.longLat = longLat - self.itemType = itemType - self.groupedAttributes = groupedAttributes + self.longLat = longLat - self.seller = seller + self.groupedAttributes = groupedAttributes self.store = store + self.pincode = pincode + self.returnConfig = returnConfig - self.articleId = articleId + self.seller = seller - self.sellerCount = sellerCount + self.articleAssignment = articleAssignment - self.marketplaceAttributes = marketplaceAttributes + self.sellerCount = sellerCount - self.pricePerPiece = pricePerPiece + self.specialBadge = specialBadge } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - pincode = try container.decode(Int.self, forKey: .pincode) + strategyWiseListing = try container.decode([StrategyWiseListingSchemaV2].self, forKey: .strategyWiseListing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -131,7 +131,7 @@ public extension ApplicationClient { } catch {} do { - discount = try container.decode(String.self, forKey: .discount) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -139,7 +139,7 @@ public extension ApplicationClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + pricePerPiece = try container.decode(ProductStockPriceV2.self, forKey: .pricePerPiece) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -147,7 +147,7 @@ public extension ApplicationClient { } catch {} do { - strategyWiseListing = try container.decode([StrategyWiseListingSchemaV2].self, forKey: .strategyWiseListing) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -163,7 +163,7 @@ public extension ApplicationClient { } catch {} do { - specialBadge = try container.decode(String.self, forKey: .specialBadge) + marketplaceAttributes = try container.decode([MarketPlaceSttributesSchemaV2].self, forKey: .marketplaceAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -171,7 +171,7 @@ public extension ApplicationClient { } catch {} do { - articleAssignment = try container.decode(ArticleAssignmentV2.self, forKey: .articleAssignment) + articleId = try container.decode(String.self, forKey: .articleId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -187,7 +187,7 @@ public extension ApplicationClient { } catch {} do { - longLat = try container.decode([Double].self, forKey: .longLat) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -195,7 +195,7 @@ public extension ApplicationClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + longLat = try container.decode([Double].self, forKey: .longLat) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -211,7 +211,7 @@ public extension ApplicationClient { } catch {} do { - seller = try container.decode(SellerV2.self, forKey: .seller) + store = try container.decode(StoreV2.self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -219,7 +219,7 @@ public extension ApplicationClient { } catch {} do { - store = try container.decode(StoreV2.self, forKey: .store) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -235,7 +235,7 @@ public extension ApplicationClient { } catch {} do { - articleId = try container.decode(String.self, forKey: .articleId) + seller = try container.decode(SellerV2.self, forKey: .seller) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -243,7 +243,7 @@ public extension ApplicationClient { } catch {} do { - sellerCount = try container.decode(Int.self, forKey: .sellerCount) + articleAssignment = try container.decode(ArticleAssignmentV2.self, forKey: .articleAssignment) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -251,7 +251,7 @@ public extension ApplicationClient { } catch {} do { - marketplaceAttributes = try container.decode([MarketPlaceSttributesSchemaV2].self, forKey: .marketplaceAttributes) + sellerCount = try container.decode(Int.self, forKey: .sellerCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -259,7 +259,7 @@ public extension ApplicationClient { } catch {} do { - pricePerPiece = try container.decode(ProductStockPriceV2.self, forKey: .pricePerPiece) + specialBadge = try container.decode(String.self, forKey: .specialBadge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -270,41 +270,41 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(pincode, forKey: .pincode) - - try? container.encodeIfPresent(discount, forKey: .discount) + try? container.encodeIfPresent(strategyWiseListing, forKey: .strategyWiseListing) try? container.encodeIfPresent(quantity, forKey: .quantity) - try? container.encodeIfPresent(strategyWiseListing, forKey: .strategyWiseListing) + try? container.encodeIfPresent(pricePerPiece, forKey: .pricePerPiece) + + try? container.encodeIfPresent(discount, forKey: .discount) try? container.encodeIfPresent(set, forKey: .set) - try? container.encodeIfPresent(specialBadge, forKey: .specialBadge) + try? container.encodeIfPresent(marketplaceAttributes, forKey: .marketplaceAttributes) - try? container.encodeIfPresent(articleAssignment, forKey: .articleAssignment) + try? container.encodeIfPresent(articleId, forKey: .articleId) try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(longLat, forKey: .longLat) - try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(longLat, forKey: .longLat) - try? container.encodeIfPresent(seller, forKey: .seller) + try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) try? container.encodeIfPresent(store, forKey: .store) + try? container.encodeIfPresent(pincode, forKey: .pincode) + try? container.encodeIfPresent(returnConfig, forKey: .returnConfig) - try? container.encodeIfPresent(articleId, forKey: .articleId) + try? container.encodeIfPresent(seller, forKey: .seller) - try? container.encodeIfPresent(sellerCount, forKey: .sellerCount) + try? container.encodeIfPresent(articleAssignment, forKey: .articleAssignment) - try? container.encodeIfPresent(marketplaceAttributes, forKey: .marketplaceAttributes) + try? container.encodeIfPresent(sellerCount, forKey: .sellerCount) - try? container.encodeIfPresent(pricePerPiece, forKey: .pricePerPiece) + try? container.encodeIfPresent(specialBadge, forKey: .specialBadge) } } } diff --git a/Sources/code/application/models/ProductSizeSellerFilterSchemaV2AppModelClass.swift b/Sources/code/application/models/ProductSizeSellerFilterSchemaV2AppModelClass.swift index 81d14f60f2..1981c3668f 100644 --- a/Sources/code/application/models/ProductSizeSellerFilterSchemaV2AppModelClass.swift +++ b/Sources/code/application/models/ProductSizeSellerFilterSchemaV2AppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class ProductSizeSellerFilterSchemaV2: Codable { - public var name: String? + public var isSelected: Bool? public var value: String? - public var isSelected: Bool? + public var name: String? public enum CodingKeys: String, CodingKey { - case name + case isSelected = "is_selected" case value - case isSelected = "is_selected" + case name } public init(isSelected: Bool? = nil, name: String? = nil, value: String? = nil) { - self.name = name + self.isSelected = isSelected self.value = value - self.isSelected = isSelected + self.name = name } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + isSelected = try container.decode(Bool.self, forKey: .isSelected) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - isSelected = try container.decode(Bool.self, forKey: .isSelected) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,11 +60,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(isSelected, forKey: .isSelected) try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(isSelected, forKey: .isSelected) + try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/application/models/ProductSizeSellersResponseV2AppModelClass.swift b/Sources/code/application/models/ProductSizeSellersResponseV2AppModelClass.swift index 19436ce599..15595407e3 100644 --- a/Sources/code/application/models/ProductSizeSellersResponseV2AppModelClass.swift +++ b/Sources/code/application/models/ProductSizeSellersResponseV2AppModelClass.swift @@ -7,25 +7,25 @@ public extension ApplicationClient { Used By: Catalog */ class ProductSizeSellersResponseV2: Codable { - public var sortOn: [ProductSizeSellerFilterSchemaV2]? - public var items: [ProductSizePriceResponseV2]? + public var sortOn: [ProductSizeSellerFilterSchemaV2]? + public var page: Page public enum CodingKeys: String, CodingKey { - case sortOn = "sort_on" - case items + case sortOn = "sort_on" + case page } public init(items: [ProductSizePriceResponseV2]? = nil, page: Page, sortOn: [ProductSizeSellerFilterSchemaV2]? = nil) { - self.sortOn = sortOn - self.items = items + self.sortOn = sortOn + self.page = page } @@ -33,7 +33,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - sortOn = try container.decode([ProductSizeSellerFilterSchemaV2].self, forKey: .sortOn) + items = try container.decode([ProductSizePriceResponseV2].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - items = try container.decode([ProductSizePriceResponseV2].self, forKey: .items) + sortOn = try container.decode([ProductSizeSellerFilterSchemaV2].self, forKey: .sortOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,10 +54,10 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(sortOn, forKey: .sortOn) - try? container.encodeIfPresent(items, forKey: .items) + try? container.encodeIfPresent(sortOn, forKey: .sortOn) + try? container.encodeIfPresent(page, forKey: .page) } } diff --git a/Sources/code/application/models/ProductSizesAppModelClass.swift b/Sources/code/application/models/ProductSizesAppModelClass.swift index 2fbf862203..848466a99a 100644 --- a/Sources/code/application/models/ProductSizesAppModelClass.swift +++ b/Sources/code/application/models/ProductSizesAppModelClass.swift @@ -7,51 +7,51 @@ public extension ApplicationClient { Used By: Catalog */ class ProductSizes: Codable { - public var discount: String? - public var sellable: Bool? - public var sizes: [ProductSize]? + public var stores: ProductSizeStores? public var price: ProductListingPrice? + public var sizes: [ProductSize]? + public var sizeChart: SizeChart? - public var stores: ProductSizeStores? + public var discount: String? public enum CodingKeys: String, CodingKey { - case discount - case sellable - case sizes + case stores case price + case sizes + case sizeChart = "size_chart" - case stores + case discount } public init(discount: String? = nil, price: ProductListingPrice? = nil, sellable: Bool? = nil, sizes: [ProductSize]? = nil, sizeChart: SizeChart? = nil, stores: ProductSizeStores? = nil) { - self.discount = discount - self.sellable = sellable - self.sizes = sizes + self.stores = stores self.price = price + self.sizes = sizes + self.sizeChart = sizeChart - self.stores = stores + self.discount = discount } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - discount = try container.decode(String.self, forKey: .discount) + sellable = try container.decode(Bool.self, forKey: .sellable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -59,7 +59,7 @@ public extension ApplicationClient { } catch {} do { - sellable = try container.decode(Bool.self, forKey: .sellable) + stores = try container.decode(ProductSizeStores.self, forKey: .stores) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -67,7 +67,7 @@ public extension ApplicationClient { } catch {} do { - sizes = try container.decode([ProductSize].self, forKey: .sizes) + price = try container.decode(ProductListingPrice.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,7 +75,7 @@ public extension ApplicationClient { } catch {} do { - price = try container.decode(ProductListingPrice.self, forKey: .price) + sizes = try container.decode([ProductSize].self, forKey: .sizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension ApplicationClient { } catch {} do { - stores = try container.decode(ProductSizeStores.self, forKey: .stores) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,17 +102,17 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(discount, forKey: .discount) - try? container.encodeIfPresent(sellable, forKey: .sellable) - try? container.encodeIfPresent(sizes, forKey: .sizes) + try? container.encodeIfPresent(stores, forKey: .stores) try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(sizes, forKey: .sizes) + try? container.encodeIfPresent(sizeChart, forKey: .sizeChart) - try? container.encodeIfPresent(stores, forKey: .stores) + try? container.encodeIfPresent(discount, forKey: .discount) } } } diff --git a/Sources/code/application/models/ProductSortOnAppModelClass.swift b/Sources/code/application/models/ProductSortOnAppModelClass.swift index b2cb05d78b..cf50e6620d 100644 --- a/Sources/code/application/models/ProductSortOnAppModelClass.swift +++ b/Sources/code/application/models/ProductSortOnAppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class ProductSortOn: Codable { - public var name: String? + public var isSelected: Bool? public var value: String? - public var isSelected: Bool? + public var name: String? public enum CodingKeys: String, CodingKey { - case name + case isSelected = "is_selected" case value - case isSelected = "is_selected" + case name } public init(isSelected: Bool? = nil, name: String? = nil, value: String? = nil) { - self.name = name + self.isSelected = isSelected self.value = value - self.isSelected = isSelected + self.name = name } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + isSelected = try container.decode(Bool.self, forKey: .isSelected) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - isSelected = try container.decode(Bool.self, forKey: .isSelected) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,11 +60,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(isSelected, forKey: .isSelected) try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(isSelected, forKey: .isSelected) + try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/application/models/ProductStockPriceAppModelClass.swift b/Sources/code/application/models/ProductStockPriceAppModelClass.swift index daba1a5453..2c71291336 100644 --- a/Sources/code/application/models/ProductStockPriceAppModelClass.swift +++ b/Sources/code/application/models/ProductStockPriceAppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class ProductStockPrice: Codable { - public var effective: Double? + public var currency: String? public var marked: Double? - public var currency: String? + public var effective: Double? public enum CodingKeys: String, CodingKey { - case effective + case currency case marked - case currency + case effective } public init(currency: String? = nil, effective: Double? = nil, marked: Double? = nil) { - self.effective = effective + self.currency = currency self.marked = marked - self.currency = currency + self.effective = effective } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - effective = try container.decode(Double.self, forKey: .effective) + currency = try container.decode(String.self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - currency = try container.decode(String.self, forKey: .currency) + effective = try container.decode(Double.self, forKey: .effective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,11 +60,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(effective, forKey: .effective) + try? container.encodeIfPresent(currency, forKey: .currency) try? container.encodeIfPresent(marked, forKey: .marked) - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(effective, forKey: .effective) } } } diff --git a/Sources/code/application/models/ProductStockPriceV2AppModelClass.swift b/Sources/code/application/models/ProductStockPriceV2AppModelClass.swift index e1ac8e871d..bb84fef7c3 100644 --- a/Sources/code/application/models/ProductStockPriceV2AppModelClass.swift +++ b/Sources/code/application/models/ProductStockPriceV2AppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class ProductStockPriceV2: Codable { - public var effective: Double? + public var currency: String? public var marked: Double? - public var currency: String? + public var effective: Double? public enum CodingKeys: String, CodingKey { - case effective + case currency case marked - case currency + case effective } public init(currency: String? = nil, effective: Double? = nil, marked: Double? = nil) { - self.effective = effective + self.currency = currency self.marked = marked - self.currency = currency + self.effective = effective } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - effective = try container.decode(Double.self, forKey: .effective) + currency = try container.decode(String.self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - currency = try container.decode(String.self, forKey: .currency) + effective = try container.decode(Double.self, forKey: .effective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,11 +60,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(effective, forKey: .effective) + try? container.encodeIfPresent(currency, forKey: .currency) try? container.encodeIfPresent(marked, forKey: .marked) - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(effective, forKey: .effective) } } } diff --git a/Sources/code/application/models/ProductStockStatusItemAppModelClass.swift b/Sources/code/application/models/ProductStockStatusItemAppModelClass.swift index 206b57d69c..e25579c83f 100644 --- a/Sources/code/application/models/ProductStockStatusItemAppModelClass.swift +++ b/Sources/code/application/models/ProductStockStatusItemAppModelClass.swift @@ -7,69 +7,69 @@ public extension ApplicationClient { Used By: Catalog */ class ProductStockStatusItem: Codable { - public var itemId: Int? - public var quantity: Int? + public var company: CompanyDetail? + public var identifier: [String: Any]? public var size: String? - public var store: StoreDetail? - public var price: ProductStockPrice? + public var itemId: Int? + + public var store: StoreDetail? + public var seller: Seller? public var uid: String? - public var company: CompanyDetail? - public enum CodingKeys: String, CodingKey { - case itemId = "item_id" - case quantity + case company + case identifier case size - case store - case price + case itemId = "item_id" + + case store + case seller case uid - - case company } public init(company: CompanyDetail? = nil, identifier: [String: Any]? = nil, itemId: Int? = nil, price: ProductStockPrice? = nil, quantity: Int? = nil, seller: Seller? = nil, size: String? = nil, store: StoreDetail? = nil, uid: String? = nil) { - self.itemId = itemId - self.quantity = quantity + self.company = company + self.identifier = identifier self.size = size - self.store = store - self.price = price + self.itemId = itemId + + self.store = store + self.seller = seller self.uid = uid - - self.company = company } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - itemId = try container.decode(Int.self, forKey: .itemId) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + company = try container.decode(CompanyDetail.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -101,7 +101,7 @@ public extension ApplicationClient { } catch {} do { - store = try container.decode(StoreDetail.self, forKey: .store) + price = try container.decode(ProductStockPrice.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -109,7 +109,7 @@ public extension ApplicationClient { } catch {} do { - price = try container.decode(ProductStockPrice.self, forKey: .price) + itemId = try container.decode(Int.self, forKey: .itemId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -117,7 +117,7 @@ public extension ApplicationClient { } catch {} do { - seller = try container.decode(Seller.self, forKey: .seller) + store = try container.decode(StoreDetail.self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -125,7 +125,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(String.self, forKey: .uid) + seller = try container.decode(Seller.self, forKey: .seller) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -133,7 +133,7 @@ public extension ApplicationClient { } catch {} do { - company = try container.decode(CompanyDetail.self, forKey: .company) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,23 +144,23 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(itemId, forKey: .itemId) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(company, forKey: .company) + try? container.encodeIfPresent(identifier, forKey: .identifier) try? container.encodeIfPresent(size, forKey: .size) - try? container.encodeIfPresent(store, forKey: .store) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(itemId, forKey: .itemId) + + try? container.encodeIfPresent(store, forKey: .store) + try? container.encodeIfPresent(seller, forKey: .seller) try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(company, forKey: .company) } } } diff --git a/Sources/code/application/models/ProductVariantItemResponseAppModelClass.swift b/Sources/code/application/models/ProductVariantItemResponseAppModelClass.swift index dd350a598c..ae4fe0a882 100644 --- a/Sources/code/application/models/ProductVariantItemResponseAppModelClass.swift +++ b/Sources/code/application/models/ProductVariantItemResponseAppModelClass.swift @@ -7,69 +7,69 @@ public extension ApplicationClient { Used By: Catalog */ class ProductVariantItemResponse: Codable { - public var value: String? - public var action: ProductListingAction? - public var slug: String? + public var medias: [Media]? - public var name: String? + public var colorName: String? - public var medias: [Media]? + public var value: String? + + public var name: String? public var isAvailable: Bool? + public var slug: String? + public var color: String? public var uid: Int? - public var colorName: String? - public enum CodingKeys: String, CodingKey { - case value - case action - case slug + case medias - case name + case colorName = "color_name" - case medias + case value + + case name case isAvailable = "is_available" + case slug + case color case uid - - case colorName = "color_name" } public init(action: ProductListingAction? = nil, color: String? = nil, colorName: String? = nil, isAvailable: Bool? = nil, medias: [Media]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil, value: String? = nil) { - self.value = value - self.action = action - self.slug = slug + self.medias = medias - self.name = name + self.colorName = colorName - self.medias = medias + self.value = value + + self.name = name self.isAvailable = isAvailable + self.slug = slug + self.color = color self.uid = uid - - self.colorName = colorName } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - value = try container.decode(String.self, forKey: .value) + action = try container.decode(ProductListingAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - action = try container.decode(ProductListingAction.self, forKey: .action) + medias = try container.decode([Media].self, forKey: .medias) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,7 +85,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + colorName = try container.decode(String.self, forKey: .colorName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +93,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -101,7 +101,7 @@ public extension ApplicationClient { } catch {} do { - medias = try container.decode([Media].self, forKey: .medias) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -117,7 +117,7 @@ public extension ApplicationClient { } catch {} do { - color = try container.decode(String.self, forKey: .color) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -125,7 +125,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -133,7 +133,7 @@ public extension ApplicationClient { } catch {} do { - colorName = try container.decode(String.self, forKey: .colorName) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,23 +144,23 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(medias, forKey: .medias) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(colorName, forKey: .colorName) - try? container.encodeIfPresent(medias, forKey: .medias) + try? container.encodeIfPresent(value, forKey: .value) + + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) + try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(color, forKey: .color) try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(colorName, forKey: .colorName) } } } diff --git a/Sources/code/application/models/ProductVariantListingResponseAppModelClass.swift b/Sources/code/application/models/ProductVariantListingResponseAppModelClass.swift index bede599086..8036f9c18a 100644 --- a/Sources/code/application/models/ProductVariantListingResponseAppModelClass.swift +++ b/Sources/code/application/models/ProductVariantListingResponseAppModelClass.swift @@ -7,45 +7,45 @@ public extension ApplicationClient { Used By: Catalog */ class ProductVariantListingResponse: Codable { + public var items: [ProductVariantItemResponse]? + public var total: Int? - public var header: String? + public var key: String? public var displayType: String? - public var key: String? - - public var items: [ProductVariantItemResponse]? + public var header: String? public enum CodingKeys: String, CodingKey { + case items + case total - case header + case key case displayType = "display_type" - case key - - case items + case header } public init(displayType: String? = nil, header: String? = nil, items: [ProductVariantItemResponse]? = nil, key: String? = nil, total: Int? = nil) { + self.items = items + self.total = total - self.header = header + self.key = key self.displayType = displayType - self.key = key - - self.items = items + self.header = header } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - total = try container.decode(Int.self, forKey: .total) + items = try container.decode([ProductVariantItemResponse].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -53,7 +53,7 @@ public extension ApplicationClient { } catch {} do { - header = try container.decode(String.self, forKey: .header) + total = try container.decode(Int.self, forKey: .total) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,7 +61,7 @@ public extension ApplicationClient { } catch {} do { - displayType = try container.decode(String.self, forKey: .displayType) + key = try container.decode(String.self, forKey: .key) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -69,7 +69,7 @@ public extension ApplicationClient { } catch {} do { - key = try container.decode(String.self, forKey: .key) + displayType = try container.decode(String.self, forKey: .displayType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - items = try container.decode([ProductVariantItemResponse].self, forKey: .items) + header = try container.decode(String.self, forKey: .header) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -88,15 +88,15 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(items, forKey: .items) + try? container.encodeIfPresent(total, forKey: .total) - try? container.encodeIfPresent(header, forKey: .header) + try? container.encodeIfPresent(key, forKey: .key) try? container.encodeIfPresent(displayType, forKey: .displayType) - try? container.encodeIfPresent(key, forKey: .key) - - try? container.encodeIfPresent(items, forKey: .items) + try? container.encodeIfPresent(header, forKey: .header) } } } diff --git a/Sources/code/application/models/ProductVariantResponseAppModelClass.swift b/Sources/code/application/models/ProductVariantResponseAppModelClass.swift index eacb478efc..8bee340034 100644 --- a/Sources/code/application/models/ProductVariantResponseAppModelClass.swift +++ b/Sources/code/application/models/ProductVariantResponseAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class ProductVariantResponse: Codable { - public var header: String? - - public var displayType: String? + public var key: String? public var items: [ProductVariantItemResponse]? - public var key: String? + public var displayType: String? - public enum CodingKeys: String, CodingKey { - case header + public var header: String? - case displayType = "display_type" + public enum CodingKeys: String, CodingKey { + case key case items - case key + case displayType = "display_type" + + case header } public init(displayType: String? = nil, header: String? = nil, items: [ProductVariantItemResponse]? = nil, key: String? = nil) { - self.header = header - - self.displayType = displayType + self.key = key self.items = items - self.key = key + self.displayType = displayType + + self.header = header } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - header = try container.decode(String.self, forKey: .header) + key = try container.decode(String.self, forKey: .key) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - displayType = try container.decode(String.self, forKey: .displayType) + items = try container.decode([ProductVariantItemResponse].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - items = try container.decode([ProductVariantItemResponse].self, forKey: .items) + displayType = try container.decode(String.self, forKey: .displayType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - key = try container.decode(String.self, forKey: .key) + header = try container.decode(String.self, forKey: .header) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,13 +74,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(header, forKey: .header) - - try? container.encodeIfPresent(displayType, forKey: .displayType) + try? container.encodeIfPresent(key, forKey: .key) try? container.encodeIfPresent(items, forKey: .items) - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(displayType, forKey: .displayType) + + try? container.encodeIfPresent(header, forKey: .header) } } } diff --git a/Sources/code/application/models/ProductsAppModelClass.swift b/Sources/code/application/models/ProductsAppModelClass.swift index 03a5e7a09f..d2f18dfe6e 100644 --- a/Sources/code/application/models/ProductsAppModelClass.swift +++ b/Sources/code/application/models/ProductsAppModelClass.swift @@ -7,69 +7,69 @@ public extension ApplicationClient { Used By: Catalog */ class Products: Codable { + public var minQuantity: Int? + public var allowRemove: Bool? public var productUid: Int? - public var autoSelect: Bool? - - public var autoAddToCart: Bool? + public var price: Price1? - public var minQuantity: Int? + public var sizes: [Size]? public var productDetails: ProductDetails? - public var price: Price1? + public var autoSelect: Bool? - public var maxQuantity: Int? + public var autoAddToCart: Bool? - public var sizes: [Size]? + public var maxQuantity: Int? public enum CodingKeys: String, CodingKey { + case minQuantity = "min_quantity" + case allowRemove = "allow_remove" case productUid = "product_uid" - case autoSelect = "auto_select" - - case autoAddToCart = "auto_add_to_cart" + case price - case minQuantity = "min_quantity" + case sizes case productDetails = "product_details" - case price + case autoSelect = "auto_select" - case maxQuantity = "max_quantity" + case autoAddToCart = "auto_add_to_cart" - case sizes + case maxQuantity = "max_quantity" } public init(allowRemove: Bool? = nil, autoAddToCart: Bool? = nil, autoSelect: Bool? = nil, maxQuantity: Int? = nil, minQuantity: Int? = nil, price: Price1? = nil, productDetails: ProductDetails? = nil, productUid: Int? = nil, sizes: [Size]? = nil) { + self.minQuantity = minQuantity + self.allowRemove = allowRemove self.productUid = productUid - self.autoSelect = autoSelect - - self.autoAddToCart = autoAddToCart + self.price = price - self.minQuantity = minQuantity + self.sizes = sizes self.productDetails = productDetails - self.price = price + self.autoSelect = autoSelect - self.maxQuantity = maxQuantity + self.autoAddToCart = autoAddToCart - self.sizes = sizes + self.maxQuantity = maxQuantity } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - allowRemove = try container.decode(Bool.self, forKey: .allowRemove) + minQuantity = try container.decode(Int.self, forKey: .minQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - productUid = try container.decode(Int.self, forKey: .productUid) + allowRemove = try container.decode(Bool.self, forKey: .allowRemove) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,7 +85,7 @@ public extension ApplicationClient { } catch {} do { - autoSelect = try container.decode(Bool.self, forKey: .autoSelect) + productUid = try container.decode(Int.self, forKey: .productUid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +93,7 @@ public extension ApplicationClient { } catch {} do { - autoAddToCart = try container.decode(Bool.self, forKey: .autoAddToCart) + price = try container.decode(Price1.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -101,7 +101,7 @@ public extension ApplicationClient { } catch {} do { - minQuantity = try container.decode(Int.self, forKey: .minQuantity) + sizes = try container.decode([Size].self, forKey: .sizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -117,7 +117,7 @@ public extension ApplicationClient { } catch {} do { - price = try container.decode(Price1.self, forKey: .price) + autoSelect = try container.decode(Bool.self, forKey: .autoSelect) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -125,7 +125,7 @@ public extension ApplicationClient { } catch {} do { - maxQuantity = try container.decode(Int.self, forKey: .maxQuantity) + autoAddToCart = try container.decode(Bool.self, forKey: .autoAddToCart) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -133,7 +133,7 @@ public extension ApplicationClient { } catch {} do { - sizes = try container.decode([Size].self, forKey: .sizes) + maxQuantity = try container.decode(Int.self, forKey: .maxQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,23 +144,23 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(minQuantity, forKey: .minQuantity) + try? container.encodeIfPresent(allowRemove, forKey: .allowRemove) try? container.encodeIfPresent(productUid, forKey: .productUid) - try? container.encodeIfPresent(autoSelect, forKey: .autoSelect) - - try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) + try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(minQuantity, forKey: .minQuantity) + try? container.encodeIfPresent(sizes, forKey: .sizes) try? container.encodeIfPresent(productDetails, forKey: .productDetails) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(autoSelect, forKey: .autoSelect) - try? container.encodeIfPresent(maxQuantity, forKey: .maxQuantity) + try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) - try? container.encodeIfPresent(sizes, forKey: .sizes) + try? container.encodeIfPresent(maxQuantity, forKey: .maxQuantity) } } } diff --git a/Sources/code/application/models/ProductsComparisonResponseAppModelClass.swift b/Sources/code/application/models/ProductsComparisonResponseAppModelClass.swift index b375345f1f..0650949c8c 100644 --- a/Sources/code/application/models/ProductsComparisonResponseAppModelClass.swift +++ b/Sources/code/application/models/ProductsComparisonResponseAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class ProductsComparisonResponse: Codable { - public var attributesMetadata: [AttributeMetadata]? - public var items: [ProductDetail]? - public enum CodingKeys: String, CodingKey { - case attributesMetadata = "attributes_metadata" + public var attributesMetadata: [AttributeMetadata]? + public enum CodingKeys: String, CodingKey { case items + + case attributesMetadata = "attributes_metadata" } public init(attributesMetadata: [AttributeMetadata]? = nil, items: [ProductDetail]? = nil) { - self.attributesMetadata = attributesMetadata - self.items = items + + self.attributesMetadata = attributesMetadata } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - attributesMetadata = try container.decode([AttributeMetadata].self, forKey: .attributesMetadata) + items = try container.decode([ProductDetail].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - items = try container.decode([ProductDetail].self, forKey: .items) + attributesMetadata = try container.decode([AttributeMetadata].self, forKey: .attributesMetadata) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(attributesMetadata, forKey: .attributesMetadata) - try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(attributesMetadata, forKey: .attributesMetadata) } } } diff --git a/Sources/code/application/models/RefundAccountResponseAppModelClass.swift b/Sources/code/application/models/RefundAccountResponseAppModelClass.swift index 46ee019d03..81d1d5e32a 100644 --- a/Sources/code/application/models/RefundAccountResponseAppModelClass.swift +++ b/Sources/code/application/models/RefundAccountResponseAppModelClass.swift @@ -7,31 +7,31 @@ public extension ApplicationClient { Used By: Payment */ class RefundAccountResponse: Codable { + public var isVerifiedFlag: Bool? + public var data: [String: Any]? public var success: Bool - public var isVerifiedFlag: Bool? - public var message: String public enum CodingKeys: String, CodingKey { + case isVerifiedFlag = "is_verified_flag" + case data case success - case isVerifiedFlag = "is_verified_flag" - case message } public init(data: [String: Any]? = nil, isVerifiedFlag: Bool? = nil, message: String, success: Bool) { + self.isVerifiedFlag = isVerifiedFlag + self.data = data self.success = success - self.isVerifiedFlag = isVerifiedFlag - self.message = message } @@ -39,35 +39,35 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - data = try container.decode([String: Any].self, forKey: .data) + isVerifiedFlag = try container.decode(Bool.self, forKey: .isVerifiedFlag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - success = try container.decode(Bool.self, forKey: .success) - do { - isVerifiedFlag = try container.decode(Bool.self, forKey: .isVerifiedFlag) + data = try container.decode([String: Any].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + success = try container.decode(Bool.self, forKey: .success) + message = try container.decode(String.self, forKey: .message) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(isVerifiedFlag, forKey: .isVerifiedFlag) + try? container.encodeIfPresent(data, forKey: .data) try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(isVerifiedFlag, forKey: .isVerifiedFlag) - try? container.encodeIfPresent(message, forKey: .message) } } diff --git a/Sources/code/application/models/ReturnConfigSchemaV2AppModelClass.swift b/Sources/code/application/models/ReturnConfigSchemaV2AppModelClass.swift index 238ac8979a..81b16dda69 100644 --- a/Sources/code/application/models/ReturnConfigSchemaV2AppModelClass.swift +++ b/Sources/code/application/models/ReturnConfigSchemaV2AppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class ReturnConfigSchemaV2: Codable { - public var returnable: Bool? - public var time: Int? public var unit: String? - public enum CodingKeys: String, CodingKey { - case returnable + public var returnable: Bool? + public enum CodingKeys: String, CodingKey { case time case unit + + case returnable } public init(returnable: Bool? = nil, time: Int? = nil, unit: String? = nil) { - self.returnable = returnable - self.time = time self.unit = unit + + self.returnable = returnable } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - returnable = try container.decode(Bool.self, forKey: .returnable) + time = try container.decode(Int.self, forKey: .time) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - time = try container.decode(Int.self, forKey: .time) + unit = try container.decode(String.self, forKey: .unit) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - unit = try container.decode(String.self, forKey: .unit) + returnable = try container.decode(Bool.self, forKey: .returnable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,11 +60,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(returnable, forKey: .returnable) - try? container.encodeIfPresent(time, forKey: .time) try? container.encodeIfPresent(unit, forKey: .unit) + + try? container.encodeIfPresent(returnable, forKey: .returnable) } } } diff --git a/Sources/code/application/models/RootPaymentModeAppModelClass.swift b/Sources/code/application/models/RootPaymentModeAppModelClass.swift index 2075fb083c..8098d8e809 100644 --- a/Sources/code/application/models/RootPaymentModeAppModelClass.swift +++ b/Sources/code/application/models/RootPaymentModeAppModelClass.swift @@ -9,48 +9,48 @@ public extension ApplicationClient { class RootPaymentMode: Codable { public var aggregatorName: String? - public var addCardEnabled: Bool? - - public var displayPriority: Int - public var list: [PaymentModeList]? public var name: String + public var anonymousEnable: Bool? + + public var addCardEnabled: Bool? + public var displayName: String - public var anonymousEnable: Bool? + public var displayPriority: Int public enum CodingKeys: String, CodingKey { case aggregatorName = "aggregator_name" - case addCardEnabled = "add_card_enabled" - - case displayPriority = "display_priority" - case list case name + case anonymousEnable = "anonymous_enable" + + case addCardEnabled = "add_card_enabled" + case displayName = "display_name" - case anonymousEnable = "anonymous_enable" + case displayPriority = "display_priority" } public init(addCardEnabled: Bool? = nil, aggregatorName: String? = nil, anonymousEnable: Bool? = nil, displayName: String, displayPriority: Int, list: [PaymentModeList]? = nil, name: String) { self.aggregatorName = aggregatorName - self.addCardEnabled = addCardEnabled - - self.displayPriority = displayPriority - self.list = list self.name = name + self.anonymousEnable = anonymousEnable + + self.addCardEnabled = addCardEnabled + self.displayName = displayName - self.anonymousEnable = anonymousEnable + self.displayPriority = displayPriority } required public init(from decoder: Decoder) throws { @@ -65,34 +65,34 @@ public extension ApplicationClient { } catch {} do { - addCardEnabled = try container.decode(Bool.self, forKey: .addCardEnabled) + list = try container.decode([PaymentModeList].self, forKey: .list) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - displayPriority = try container.decode(Int.self, forKey: .displayPriority) + name = try container.decode(String.self, forKey: .name) do { - list = try container.decode([PaymentModeList].self, forKey: .list) + anonymousEnable = try container.decode(Bool.self, forKey: .anonymousEnable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - name = try container.decode(String.self, forKey: .name) - - displayName = try container.decode(String.self, forKey: .displayName) - do { - anonymousEnable = try container.decode(Bool.self, forKey: .anonymousEnable) + addCardEnabled = try container.decode(Bool.self, forKey: .addCardEnabled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + displayName = try container.decode(String.self, forKey: .displayName) + + displayPriority = try container.decode(Int.self, forKey: .displayPriority) } public func encode(to encoder: Encoder) throws { @@ -100,17 +100,17 @@ public extension ApplicationClient { try? container.encode(aggregatorName, forKey: .aggregatorName) - try? container.encode(addCardEnabled, forKey: .addCardEnabled) - - try? container.encodeIfPresent(displayPriority, forKey: .displayPriority) - try? container.encodeIfPresent(list, forKey: .list) try? container.encodeIfPresent(name, forKey: .name) + try? container.encode(anonymousEnable, forKey: .anonymousEnable) + + try? container.encode(addCardEnabled, forKey: .addCardEnabled) + try? container.encodeIfPresent(displayName, forKey: .displayName) - try? container.encode(anonymousEnable, forKey: .anonymousEnable) + try? container.encodeIfPresent(displayPriority, forKey: .displayPriority) } } } diff --git a/Sources/code/application/models/RupifiBannerDataAppModelClass.swift b/Sources/code/application/models/RupifiBannerDataAppModelClass.swift index 10fe974f7d..c7389a93de 100644 --- a/Sources/code/application/models/RupifiBannerDataAppModelClass.swift +++ b/Sources/code/application/models/RupifiBannerDataAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Payment */ class RupifiBannerData: Codable { - public var status: String? - public var kycUrl: String? - public enum CodingKeys: String, CodingKey { - case status + public var status: String? + public enum CodingKeys: String, CodingKey { case kycUrl = "kyc_url" + + case status } public init(kycUrl: String? = nil, status: String? = nil) { - self.status = status - self.kycUrl = kycUrl + + self.status = status } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - status = try container.decode(String.self, forKey: .status) + kycUrl = try container.decode(String.self, forKey: .kycUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - kycUrl = try container.decode(String.self, forKey: .kycUrl) + status = try container.decode(String.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(kycUrl, forKey: .kycUrl) + + try? container.encodeIfPresent(status, forKey: .status) } } } diff --git a/Sources/code/application/models/SecondLevelChildAppModelClass.swift b/Sources/code/application/models/SecondLevelChildAppModelClass.swift index 82a39c75ff..703b5593c2 100644 --- a/Sources/code/application/models/SecondLevelChildAppModelClass.swift +++ b/Sources/code/application/models/SecondLevelChildAppModelClass.swift @@ -7,57 +7,57 @@ public extension ApplicationClient { Used By: Catalog */ class SecondLevelChild: Codable { - public var action: ProductListingAction? + public var childs: [ThirdLevelChild]? - public var slug: String? + public var action: ProductListingAction? - public var name: String? + public var banners: ImageUrls? public var customJson: [String: Any]? - public var banners: ImageUrls? + public var name: String? - public var uid: Int? + public var slug: String? - public var childs: [ThirdLevelChild]? + public var uid: Int? public enum CodingKeys: String, CodingKey { - case action + case childs - case slug + case action - case name + case banners case customJson = "_custom_json" - case banners + case name - case uid + case slug - case childs + case uid } public init(action: ProductListingAction? = nil, banners: ImageUrls? = nil, childs: [ThirdLevelChild]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { - self.action = action + self.childs = childs - self.slug = slug + self.action = action - self.name = name + self.banners = banners self.customJson = customJson - self.banners = banners + self.name = name - self.uid = uid + self.slug = slug - self.childs = childs + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - action = try container.decode(ProductListingAction.self, forKey: .action) + childs = try container.decode([ThirdLevelChild].self, forKey: .childs) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -65,7 +65,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + action = try container.decode(ProductListingAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -73,7 +73,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,7 +89,7 @@ public extension ApplicationClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -97,7 +97,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - childs = try container.decode([ThirdLevelChild].self, forKey: .childs) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,19 +116,19 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(childs, forKey: .childs) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(banners, forKey: .banners) try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(childs, forKey: .childs) + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/SellerAppModelClass.swift b/Sources/code/application/models/SellerAppModelClass.swift index eb57905d90..76717c9ec3 100644 --- a/Sources/code/application/models/SellerAppModelClass.swift +++ b/Sources/code/application/models/SellerAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class Seller: Codable { public var name: String? - public var count: Int? - public var uid: Int? + public var count: Int? + public enum CodingKeys: String, CodingKey { case name - case count - case uid + + case count } public init(count: Int? = nil, name: String? = nil, uid: Int? = nil) { self.name = name - self.count = count - self.uid = uid + + self.count = count } required public init(from decoder: Decoder) throws { @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - count = try container.decode(Int.self, forKey: .count) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + count = try container.decode(Int.self, forKey: .count) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,9 +62,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(count, forKey: .count) - try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(count, forKey: .count) } } } diff --git a/Sources/code/application/models/SellerV2AppModelClass.swift b/Sources/code/application/models/SellerV2AppModelClass.swift index 815d809a1e..80c06e0945 100644 --- a/Sources/code/application/models/SellerV2AppModelClass.swift +++ b/Sources/code/application/models/SellerV2AppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class SellerV2: Codable { public var name: String? - public var count: Int? - public var uid: Int? + public var count: Int? + public enum CodingKeys: String, CodingKey { case name - case count - case uid + + case count } public init(count: Int? = nil, name: String? = nil, uid: Int? = nil) { self.name = name - self.count = count - self.uid = uid + + self.count = count } required public init(from decoder: Decoder) throws { @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - count = try container.decode(Int.self, forKey: .count) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + count = try container.decode(Int.self, forKey: .count) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,9 +62,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(count, forKey: .count) - try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(count, forKey: .count) } } } diff --git a/Sources/code/application/models/SetDefaultBeneficiaryResponseAppModelClass.swift b/Sources/code/application/models/SetDefaultBeneficiaryResponseAppModelClass.swift index 9f239d49e2..5c0c3b46c8 100644 --- a/Sources/code/application/models/SetDefaultBeneficiaryResponseAppModelClass.swift +++ b/Sources/code/application/models/SetDefaultBeneficiaryResponseAppModelClass.swift @@ -7,25 +7,27 @@ public extension ApplicationClient { Used By: Payment */ class SetDefaultBeneficiaryResponse: Codable { - public var success: Bool? - public var isBeneficiarySet: Bool - public enum CodingKeys: String, CodingKey { - case success + public var success: Bool? + public enum CodingKeys: String, CodingKey { case isBeneficiarySet = "is_beneficiary_set" + + case success } public init(isBeneficiarySet: Bool, success: Bool? = nil) { - self.success = success - self.isBeneficiarySet = isBeneficiarySet + + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + isBeneficiarySet = try container.decode(Bool.self, forKey: .isBeneficiarySet) + do { success = try container.decode(Bool.self, forKey: .success) @@ -33,16 +35,14 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - isBeneficiarySet = try container.decode(Bool.self, forKey: .isBeneficiarySet) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(isBeneficiarySet, forKey: .isBeneficiarySet) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/SizeAppModelClass.swift b/Sources/code/application/models/SizeAppModelClass.swift index eee2dce49e..0432f187b9 100644 --- a/Sources/code/application/models/SizeAppModelClass.swift +++ b/Sources/code/application/models/SizeAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class Size: Codable { + public var isAvailable: Bool? + public var quantity: Int? public var value: String? public var display: String? - public var isAvailable: Bool? - public enum CodingKeys: String, CodingKey { + case isAvailable = "is_available" + case quantity case value case display - - case isAvailable = "is_available" } public init(display: String? = nil, isAvailable: Bool? = nil, quantity: Int? = nil, value: String? = nil) { + self.isAvailable = isAvailable + self.quantity = quantity self.value = value self.display = display - - self.isAvailable = isAvailable } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - quantity = try container.decode(Int.self, forKey: .quantity) + isAvailable = try container.decode(Bool.self, forKey: .isAvailable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - value = try container.decode(String.self, forKey: .value) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - display = try container.decode(String.self, forKey: .display) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - isAvailable = try container.decode(Bool.self, forKey: .isAvailable) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,13 +74,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) + try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(value, forKey: .value) try? container.encodeIfPresent(display, forKey: .display) - - try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) } } } diff --git a/Sources/code/application/models/SizeChartAppModelClass.swift b/Sources/code/application/models/SizeChartAppModelClass.swift index c26beaf3fa..677fccd4e8 100644 --- a/Sources/code/application/models/SizeChartAppModelClass.swift +++ b/Sources/code/application/models/SizeChartAppModelClass.swift @@ -7,57 +7,57 @@ public extension ApplicationClient { Used By: Catalog */ class SizeChart: Codable { - public var headers: ColumnHeaders? - - public var description: String? + public var unit: String? public var image: String? + public var title: String? + public var sizes: [SizeChartValues]? - public var unit: String? + public var description: String? - public var sizeTip: String? + public var headers: ColumnHeaders? - public var title: String? + public var sizeTip: String? public enum CodingKeys: String, CodingKey { - case headers - - case description + case unit case image + case title + case sizes - case unit + case description - case sizeTip = "size_tip" + case headers - case title + case sizeTip = "size_tip" } public init(description: String? = nil, headers: ColumnHeaders? = nil, image: String? = nil, sizes: [SizeChartValues]? = nil, sizeTip: String? = nil, title: String? = nil, unit: String? = nil) { - self.headers = headers - - self.description = description + self.unit = unit self.image = image + self.title = title + self.sizes = sizes - self.unit = unit + self.description = description - self.sizeTip = sizeTip + self.headers = headers - self.title = title + self.sizeTip = sizeTip } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - headers = try container.decode(ColumnHeaders.self, forKey: .headers) + unit = try container.decode(String.self, forKey: .unit) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -65,7 +65,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + image = try container.decode(String.self, forKey: .image) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -73,7 +73,7 @@ public extension ApplicationClient { } catch {} do { - image = try container.decode(String.self, forKey: .image) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,7 +89,7 @@ public extension ApplicationClient { } catch {} do { - unit = try container.decode(String.self, forKey: .unit) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -97,7 +97,7 @@ public extension ApplicationClient { } catch {} do { - sizeTip = try container.decode(String.self, forKey: .sizeTip) + headers = try container.decode(ColumnHeaders.self, forKey: .headers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - title = try container.decode(String.self, forKey: .title) + sizeTip = try container.decode(String.self, forKey: .sizeTip) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,19 +116,19 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(headers, forKey: .headers) - - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(unit, forKey: .unit) try? container.encodeIfPresent(image, forKey: .image) + try? container.encodeIfPresent(title, forKey: .title) + try? container.encodeIfPresent(sizes, forKey: .sizes) - try? container.encodeIfPresent(unit, forKey: .unit) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(sizeTip, forKey: .sizeTip) + try? container.encodeIfPresent(headers, forKey: .headers) - try? container.encodeIfPresent(title, forKey: .title) + try? container.encodeIfPresent(sizeTip, forKey: .sizeTip) } } } diff --git a/Sources/code/application/models/SizeChartValuesAppModelClass.swift b/Sources/code/application/models/SizeChartValuesAppModelClass.swift index d45483fd53..3bf87b63c1 100644 --- a/Sources/code/application/models/SizeChartValuesAppModelClass.swift +++ b/Sources/code/application/models/SizeChartValuesAppModelClass.swift @@ -7,51 +7,51 @@ public extension ApplicationClient { Used By: Catalog */ class SizeChartValues: Codable { - public var col3: String? + public var col4: String? - public var col6: String? + public var col5: String? - public var col1: String? + public var col6: String? public var col2: String? - public var col5: String? + public var col1: String? - public var col4: String? + public var col3: String? public enum CodingKeys: String, CodingKey { - case col3 = "col_3" + case col4 = "col_4" - case col6 = "col_6" + case col5 = "col_5" - case col1 = "col_1" + case col6 = "col_6" case col2 = "col_2" - case col5 = "col_5" + case col1 = "col_1" - case col4 = "col_4" + case col3 = "col_3" } public init(col1: String? = nil, col2: String? = nil, col3: String? = nil, col4: String? = nil, col5: String? = nil, col6: String? = nil) { - self.col3 = col3 + self.col4 = col4 - self.col6 = col6 + self.col5 = col5 - self.col1 = col1 + self.col6 = col6 self.col2 = col2 - self.col5 = col5 + self.col1 = col1 - self.col4 = col4 + self.col3 = col3 } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - col3 = try container.decode(String.self, forKey: .col3) + col4 = try container.decode(String.self, forKey: .col4) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -59,7 +59,7 @@ public extension ApplicationClient { } catch {} do { - col6 = try container.decode(String.self, forKey: .col6) + col5 = try container.decode(String.self, forKey: .col5) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -67,7 +67,7 @@ public extension ApplicationClient { } catch {} do { - col1 = try container.decode(String.self, forKey: .col1) + col6 = try container.decode(String.self, forKey: .col6) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -83,7 +83,7 @@ public extension ApplicationClient { } catch {} do { - col5 = try container.decode(String.self, forKey: .col5) + col1 = try container.decode(String.self, forKey: .col1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension ApplicationClient { } catch {} do { - col4 = try container.decode(String.self, forKey: .col4) + col3 = try container.decode(String.self, forKey: .col3) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,17 +102,17 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(col3, forKey: .col3) + try? container.encodeIfPresent(col4, forKey: .col4) - try? container.encodeIfPresent(col6, forKey: .col6) + try? container.encodeIfPresent(col5, forKey: .col5) - try? container.encodeIfPresent(col1, forKey: .col1) + try? container.encodeIfPresent(col6, forKey: .col6) try? container.encodeIfPresent(col2, forKey: .col2) - try? container.encodeIfPresent(col5, forKey: .col5) + try? container.encodeIfPresent(col1, forKey: .col1) - try? container.encodeIfPresent(col4, forKey: .col4) + try? container.encodeIfPresent(col3, forKey: .col3) } } } diff --git a/Sources/code/application/models/StoreAddressSerializerAppModelClass.swift b/Sources/code/application/models/StoreAddressSerializerAppModelClass.swift index 791e5cf801..f5589e307d 100644 --- a/Sources/code/application/models/StoreAddressSerializerAppModelClass.swift +++ b/Sources/code/application/models/StoreAddressSerializerAppModelClass.swift @@ -7,7 +7,9 @@ public extension ApplicationClient { Used By: Catalog */ class StoreAddressSerializer: Codable { - public var address2: String? + public var state: String? + + public var city: String? public var pincode: Int? @@ -17,16 +19,16 @@ public extension ApplicationClient { public var address1: String? - public var state: String? - public var latitude: Double? - public var city: String? + public var address2: String? public var longitude: Double? public enum CodingKeys: String, CodingKey { - case address2 + case state + + case city case pincode @@ -36,17 +38,17 @@ public extension ApplicationClient { case address1 - case state - case latitude - case city + case address2 case longitude } public init(address1: String? = nil, address2: String? = nil, city: String? = nil, country: String? = nil, landmark: String? = nil, latitude: Double? = nil, longitude: Double? = nil, pincode: Int? = nil, state: String? = nil) { - self.address2 = address2 + self.state = state + + self.city = city self.pincode = pincode @@ -56,11 +58,9 @@ public extension ApplicationClient { self.address1 = address1 - self.state = state - self.latitude = latitude - self.city = city + self.address2 = address2 self.longitude = longitude } @@ -69,7 +69,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - address2 = try container.decode(String.self, forKey: .address2) + state = try container.decode(String.self, forKey: .state) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - pincode = try container.decode(Int.self, forKey: .pincode) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,7 +85,7 @@ public extension ApplicationClient { } catch {} do { - country = try container.decode(String.self, forKey: .country) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +93,7 @@ public extension ApplicationClient { } catch {} do { - landmark = try container.decode(String.self, forKey: .landmark) + country = try container.decode(String.self, forKey: .country) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -101,7 +101,7 @@ public extension ApplicationClient { } catch {} do { - address1 = try container.decode(String.self, forKey: .address1) + landmark = try container.decode(String.self, forKey: .landmark) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -109,7 +109,7 @@ public extension ApplicationClient { } catch {} do { - state = try container.decode(String.self, forKey: .state) + address1 = try container.decode(String.self, forKey: .address1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -125,7 +125,7 @@ public extension ApplicationClient { } catch {} do { - city = try container.decode(String.self, forKey: .city) + address2 = try container.decode(String.self, forKey: .address2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,7 +144,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(address2, forKey: .address2) + try? container.encodeIfPresent(state, forKey: .state) + + try? container.encodeIfPresent(city, forKey: .city) try? container.encodeIfPresent(pincode, forKey: .pincode) @@ -154,11 +156,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(address1, forKey: .address1) - try? container.encodeIfPresent(state, forKey: .state) - try? container.encodeIfPresent(latitude, forKey: .latitude) - try? container.encodeIfPresent(city, forKey: .city) + try? container.encodeIfPresent(address2, forKey: .address2) try? container.encodeIfPresent(longitude, forKey: .longitude) } diff --git a/Sources/code/application/models/StoreAppModelClass.swift b/Sources/code/application/models/StoreAppModelClass.swift index a31c96a650..d97abc02ef 100644 --- a/Sources/code/application/models/StoreAppModelClass.swift +++ b/Sources/code/application/models/StoreAppModelClass.swift @@ -7,75 +7,75 @@ public extension ApplicationClient { Used By: Catalog */ class Store: Codable { - public var pincode: Int? - - public var address: String? + public var state: String? - public var country: String? + public var city: String? - public var state: String? + public var storeEmail: String? public var name: String? - public var latLong: LatLong? + public var address: String? public var storeCode: String? - public var uid: Int? + public var country: String? - public var city: String? + public var pincode: Int? - public var storeEmail: String? + public var latLong: LatLong? - public enum CodingKeys: String, CodingKey { - case pincode + public var uid: Int? - case address + public enum CodingKeys: String, CodingKey { + case state - case country + case city - case state + case storeEmail = "store_email" case name - case latLong = "lat_long" + case address case storeCode = "store_code" - case uid + case country - case city + case pincode - case storeEmail = "store_email" + case latLong = "lat_long" + + case uid } public init(address: String? = nil, city: String? = nil, country: String? = nil, latLong: LatLong? = nil, name: String? = nil, pincode: Int? = nil, state: String? = nil, storeCode: String? = nil, storeEmail: String? = nil, uid: Int? = nil) { - self.pincode = pincode - - self.address = address + self.state = state - self.country = country + self.city = city - self.state = state + self.storeEmail = storeEmail self.name = name - self.latLong = latLong + self.address = address self.storeCode = storeCode - self.uid = uid + self.country = country - self.city = city + self.pincode = pincode - self.storeEmail = storeEmail + self.latLong = latLong + + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - pincode = try container.decode(Int.self, forKey: .pincode) + state = try container.decode(String.self, forKey: .state) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -83,7 +83,7 @@ public extension ApplicationClient { } catch {} do { - address = try container.decode(String.self, forKey: .address) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension ApplicationClient { } catch {} do { - country = try container.decode(String.self, forKey: .country) + storeEmail = try container.decode(String.self, forKey: .storeEmail) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -99,7 +99,7 @@ public extension ApplicationClient { } catch {} do { - state = try container.decode(String.self, forKey: .state) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -107,7 +107,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + address = try container.decode(String.self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -115,7 +115,7 @@ public extension ApplicationClient { } catch {} do { - latLong = try container.decode(LatLong.self, forKey: .latLong) + storeCode = try container.decode(String.self, forKey: .storeCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -123,7 +123,7 @@ public extension ApplicationClient { } catch {} do { - storeCode = try container.decode(String.self, forKey: .storeCode) + country = try container.decode(String.self, forKey: .country) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -131,7 +131,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -139,7 +139,7 @@ public extension ApplicationClient { } catch {} do { - city = try container.decode(String.self, forKey: .city) + latLong = try container.decode(LatLong.self, forKey: .latLong) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -147,7 +147,7 @@ public extension ApplicationClient { } catch {} do { - storeEmail = try container.decode(String.self, forKey: .storeEmail) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,25 +158,25 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(pincode, forKey: .pincode) - - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(state, forKey: .state) - try? container.encodeIfPresent(country, forKey: .country) + try? container.encodeIfPresent(city, forKey: .city) - try? container.encodeIfPresent(state, forKey: .state) + try? container.encodeIfPresent(storeEmail, forKey: .storeEmail) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(latLong, forKey: .latLong) + try? container.encodeIfPresent(address, forKey: .address) try? container.encodeIfPresent(storeCode, forKey: .storeCode) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(country, forKey: .country) - try? container.encodeIfPresent(city, forKey: .city) + try? container.encodeIfPresent(pincode, forKey: .pincode) - try? container.encodeIfPresent(storeEmail, forKey: .storeEmail) + try? container.encodeIfPresent(latLong, forKey: .latLong) + + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/StoreDepartmentsAppModelClass.swift b/Sources/code/application/models/StoreDepartmentsAppModelClass.swift index f46a7b6447..8dba17c199 100644 --- a/Sources/code/application/models/StoreDepartmentsAppModelClass.swift +++ b/Sources/code/application/models/StoreDepartmentsAppModelClass.swift @@ -7,45 +7,45 @@ public extension ApplicationClient { Used By: Catalog */ class StoreDepartments: Codable { - public var priorityOrder: Int? + public var name: String? + + public var logo: String? public var slug: String? - public var name: String? + public var priorityOrder: Int? public var uid: Int? - public var logo: String? - public enum CodingKeys: String, CodingKey { - case priorityOrder = "priority_order" + case name + + case logo case slug - case name + case priorityOrder = "priority_order" case uid - - case logo } public init(logo: String? = nil, name: String? = nil, priorityOrder: Int? = nil, slug: String? = nil, uid: Int? = nil) { - self.priorityOrder = priorityOrder + self.name = name + + self.logo = logo self.slug = slug - self.name = name + self.priorityOrder = priorityOrder self.uid = uid - - self.logo = logo } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - priorityOrder = try container.decode(Int.self, forKey: .priorityOrder) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -53,7 +53,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,7 +61,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -69,7 +69,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + priorityOrder = try container.decode(Int.self, forKey: .priorityOrder) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(String.self, forKey: .logo) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -88,15 +88,15 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) + try? container.encodeIfPresent(name, forKey: .name) + + try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(logo, forKey: .logo) } } } diff --git a/Sources/code/application/models/StoreDetailAppModelClass.swift b/Sources/code/application/models/StoreDetailAppModelClass.swift index bf5529c6ef..dcc7800496 100644 --- a/Sources/code/application/models/StoreDetailAppModelClass.swift +++ b/Sources/code/application/models/StoreDetailAppModelClass.swift @@ -7,31 +7,31 @@ public extension ApplicationClient { Used By: Catalog */ class StoreDetail: Codable { - public var name: String? - public var city: String? public var code: String? + public var name: String? + public var id: Int? public enum CodingKeys: String, CodingKey { - case name - case city case code + case name + case id } public init(city: String? = nil, code: String? = nil, id: Int? = nil, name: String? = nil) { - self.name = name - self.city = city self.code = code + self.name = name + self.id = id } @@ -39,7 +39,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - city = try container.decode(String.self, forKey: .city) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - code = try container.decode(String.self, forKey: .code) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,12 +74,12 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(city, forKey: .city) try? container.encodeIfPresent(code, forKey: .code) + try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(id, forKey: .id) } } diff --git a/Sources/code/application/models/StoreDetailsAppModelClass.swift b/Sources/code/application/models/StoreDetailsAppModelClass.swift index 4e7476202d..60ccf4f586 100644 --- a/Sources/code/application/models/StoreDetailsAppModelClass.swift +++ b/Sources/code/application/models/StoreDetailsAppModelClass.swift @@ -7,69 +7,69 @@ public extension ApplicationClient { Used By: Catalog */ class StoreDetails: Codable { - public var address: StoreAddressSerializer? + public var company: CompanyStore? - public var manager: StoreManagerSerializer? + public var contactNumbers: [SellerPhoneNumber]? + + public var customJson: [String: Any]? public var name: String? - public var customJson: [String: Any]? + public var address: StoreAddressSerializer? - public var timing: [StoreTiming]? + public var departments: [StoreDepartments]? - public var company: CompanyStore? + public var manager: StoreManagerSerializer? public var uid: Int? - public var contactNumbers: [SellerPhoneNumber]? - - public var departments: [StoreDepartments]? + public var timing: [StoreTiming]? public enum CodingKeys: String, CodingKey { - case address + case company - case manager + case contactNumbers = "contact_numbers" + + case customJson = "_custom_json" case name - case customJson = "_custom_json" + case address - case timing + case departments - case company + case manager case uid - case contactNumbers = "contact_numbers" - - case departments + case timing } public init(address: StoreAddressSerializer? = nil, company: CompanyStore? = nil, contactNumbers: [SellerPhoneNumber]? = nil, departments: [StoreDepartments]? = nil, manager: StoreManagerSerializer? = nil, name: String? = nil, timing: [StoreTiming]? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { - self.address = address + self.company = company - self.manager = manager + self.contactNumbers = contactNumbers + + self.customJson = customJson self.name = name - self.customJson = customJson + self.address = address - self.timing = timing + self.departments = departments - self.company = company + self.manager = manager self.uid = uid - self.contactNumbers = contactNumbers - - self.departments = departments + self.timing = timing } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - address = try container.decode(StoreAddressSerializer.self, forKey: .address) + company = try container.decode(CompanyStore.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - manager = try container.decode(StoreManagerSerializer.self, forKey: .manager) + contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,7 +85,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +93,7 @@ public extension ApplicationClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -101,7 +101,7 @@ public extension ApplicationClient { } catch {} do { - timing = try container.decode([StoreTiming].self, forKey: .timing) + address = try container.decode(StoreAddressSerializer.self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -109,7 +109,7 @@ public extension ApplicationClient { } catch {} do { - company = try container.decode(CompanyStore.self, forKey: .company) + departments = try container.decode([StoreDepartments].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -117,7 +117,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + manager = try container.decode(StoreManagerSerializer.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -125,7 +125,7 @@ public extension ApplicationClient { } catch {} do { - contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -133,7 +133,7 @@ public extension ApplicationClient { } catch {} do { - departments = try container.decode([StoreDepartments].self, forKey: .departments) + timing = try container.decode([StoreTiming].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,23 +144,23 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(company, forKey: .company) - try? container.encodeIfPresent(manager, forKey: .manager) + try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) + + try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(timing, forKey: .timing) + try? container.encodeIfPresent(departments, forKey: .departments) - try? container.encodeIfPresent(company, forKey: .company) + try? container.encodeIfPresent(manager, forKey: .manager) try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) - - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(timing, forKey: .timing) } } } diff --git a/Sources/code/application/models/StoreManagerSerializerAppModelClass.swift b/Sources/code/application/models/StoreManagerSerializerAppModelClass.swift index d9503bc268..41cc7f51a0 100644 --- a/Sources/code/application/models/StoreManagerSerializerAppModelClass.swift +++ b/Sources/code/application/models/StoreManagerSerializerAppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class StoreManagerSerializer: Codable { + public var mobileNo: SellerPhoneNumber? + public var name: String? public var email: String? - public var mobileNo: SellerPhoneNumber? - public enum CodingKeys: String, CodingKey { + case mobileNo = "mobile_no" + case name case email - - case mobileNo = "mobile_no" } public init(email: String? = nil, mobileNo: SellerPhoneNumber? = nil, name: String? = nil) { + self.mobileNo = mobileNo + self.name = name self.email = email - - self.mobileNo = mobileNo } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + mobileNo = try container.decode(SellerPhoneNumber.self, forKey: .mobileNo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - email = try container.decode(String.self, forKey: .email) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - mobileNo = try container.decode(SellerPhoneNumber.self, forKey: .mobileNo) + email = try container.decode(String.self, forKey: .email) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,11 +60,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(mobileNo, forKey: .mobileNo) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(email, forKey: .email) - - try? container.encodeIfPresent(mobileNo, forKey: .mobileNo) } } } diff --git a/Sources/code/application/models/StoreTimingAppModelClass.swift b/Sources/code/application/models/StoreTimingAppModelClass.swift index c25cb34fd7..c27d734e5f 100644 --- a/Sources/code/application/models/StoreTimingAppModelClass.swift +++ b/Sources/code/application/models/StoreTimingAppModelClass.swift @@ -9,29 +9,29 @@ public extension ApplicationClient { class StoreTiming: Codable { public var opening: Time? - public var weekday: String? - public var open: Bool? + public var weekday: String? + public var closing: Time? public enum CodingKeys: String, CodingKey { case opening - case weekday - case open + case weekday + case closing } public init(closing: Time? = nil, open: Bool? = nil, opening: Time? = nil, weekday: String? = nil) { self.opening = opening - self.weekday = weekday - self.open = open + self.weekday = weekday + self.closing = closing } @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - weekday = try container.decode(String.self, forKey: .weekday) + open = try container.decode(Bool.self, forKey: .open) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - open = try container.decode(Bool.self, forKey: .open) + weekday = try container.decode(String.self, forKey: .weekday) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -76,10 +76,10 @@ public extension ApplicationClient { try? container.encodeIfPresent(opening, forKey: .opening) - try? container.encodeIfPresent(weekday, forKey: .weekday) - try? container.encodeIfPresent(open, forKey: .open) + try? container.encodeIfPresent(weekday, forKey: .weekday) + try? container.encodeIfPresent(closing, forKey: .closing) } } diff --git a/Sources/code/application/models/StoreV2AppModelClass.swift b/Sources/code/application/models/StoreV2AppModelClass.swift index 83b464d441..bea205e12a 100644 --- a/Sources/code/application/models/StoreV2AppModelClass.swift +++ b/Sources/code/application/models/StoreV2AppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class StoreV2: Codable { public var name: String? - public var count: Int? - public var uid: Int? + public var count: Int? + public enum CodingKeys: String, CodingKey { case name - case count - case uid + + case count } public init(count: Int? = nil, name: String? = nil, uid: Int? = nil) { self.name = name - self.count = count - self.uid = uid + + self.count = count } required public init(from decoder: Decoder) throws { @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - count = try container.decode(Int.self, forKey: .count) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + count = try container.decode(Int.self, forKey: .count) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,9 +62,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(count, forKey: .count) - try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(count, forKey: .count) } } } diff --git a/Sources/code/application/models/StrategyWiseListingSchemaV2AppModelClass.swift b/Sources/code/application/models/StrategyWiseListingSchemaV2AppModelClass.swift index 37508ae795..d0c56b7464 100644 --- a/Sources/code/application/models/StrategyWiseListingSchemaV2AppModelClass.swift +++ b/Sources/code/application/models/StrategyWiseListingSchemaV2AppModelClass.swift @@ -9,30 +9,30 @@ public extension ApplicationClient { class StrategyWiseListingSchemaV2: Codable { public var distance: Int? - public var pincode: Int? - public var quantity: Int? public var tat: Int? + public var pincode: Int? + public enum CodingKeys: String, CodingKey { case distance - case pincode - case quantity case tat + + case pincode } public init(distance: Int? = nil, pincode: Int? = nil, quantity: Int? = nil, tat: Int? = nil) { self.distance = distance - self.pincode = pincode - self.quantity = quantity self.tat = tat + + self.pincode = pincode } required public init(from decoder: Decoder) throws { @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - pincode = try container.decode(Int.self, forKey: .pincode) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + tat = try container.decode(Int.self, forKey: .tat) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - tat = try container.decode(Int.self, forKey: .tat) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -76,11 +76,11 @@ public extension ApplicationClient { try? container.encodeIfPresent(distance, forKey: .distance) - try? container.encodeIfPresent(pincode, forKey: .pincode) - try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(tat, forKey: .tat) + + try? container.encodeIfPresent(pincode, forKey: .pincode) } } } diff --git a/Sources/code/application/models/ThirdLevelChildAppModelClass.swift b/Sources/code/application/models/ThirdLevelChildAppModelClass.swift index 150cb68325..b6b9c462b2 100644 --- a/Sources/code/application/models/ThirdLevelChildAppModelClass.swift +++ b/Sources/code/application/models/ThirdLevelChildAppModelClass.swift @@ -7,57 +7,57 @@ public extension ApplicationClient { Used By: Catalog */ class ThirdLevelChild: Codable { - public var action: ProductListingAction? + public var childs: [[String: Any]]? - public var slug: String? + public var action: ProductListingAction? - public var name: String? + public var banners: ImageUrls? public var customJson: [String: Any]? - public var banners: ImageUrls? + public var name: String? - public var uid: Int? + public var slug: String? - public var childs: [[String: Any]]? + public var uid: Int? public enum CodingKeys: String, CodingKey { - case action + case childs - case slug + case action - case name + case banners case customJson = "_custom_json" - case banners + case name - case uid + case slug - case childs + case uid } public init(action: ProductListingAction? = nil, banners: ImageUrls? = nil, childs: [[String: Any]]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { - self.action = action + self.childs = childs - self.slug = slug + self.action = action - self.name = name + self.banners = banners self.customJson = customJson - self.banners = banners + self.name = name - self.uid = uid + self.slug = slug - self.childs = childs + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - action = try container.decode(ProductListingAction.self, forKey: .action) + childs = try container.decode([[String: Any]].self, forKey: .childs) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -65,7 +65,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + action = try container.decode(ProductListingAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -73,7 +73,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,7 +89,7 @@ public extension ApplicationClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -97,7 +97,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - childs = try container.decode([[String: Any]].self, forKey: .childs) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,19 +116,19 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(childs, forKey: .childs) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(banners, forKey: .banners) try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(childs, forKey: .childs) + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/TimeAppModelClass.swift b/Sources/code/application/models/TimeAppModelClass.swift index 1c7cdc0120..a913732e52 100644 --- a/Sources/code/application/models/TimeAppModelClass.swift +++ b/Sources/code/application/models/TimeAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class Time: Codable { - public var hour: Int? - public var minute: Int? - public enum CodingKeys: String, CodingKey { - case hour + public var hour: Int? + public enum CodingKeys: String, CodingKey { case minute + + case hour } public init(hour: Int? = nil, minute: Int? = nil) { - self.hour = hour - self.minute = minute + + self.hour = hour } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - hour = try container.decode(Int.self, forKey: .hour) + minute = try container.decode(Int.self, forKey: .minute) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - minute = try container.decode(Int.self, forKey: .minute) + hour = try container.decode(Int.self, forKey: .hour) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(hour, forKey: .hour) - try? container.encodeIfPresent(minute, forKey: .minute) + + try? container.encodeIfPresent(hour, forKey: .hour) } } } diff --git a/Sources/code/application/models/TransferItemsDetailsAppModelClass.swift b/Sources/code/application/models/TransferItemsDetailsAppModelClass.swift index 8b0a9e9f01..1fc1888950 100644 --- a/Sources/code/application/models/TransferItemsDetailsAppModelClass.swift +++ b/Sources/code/application/models/TransferItemsDetailsAppModelClass.swift @@ -9,36 +9,36 @@ public extension ApplicationClient { class TransferItemsDetails: Codable { public var id: Int - public var logoSmall: String - - public var logoLarge: String - public var name: String + public var logoSmall: String + public var displayName: String? + public var logoLarge: String + public enum CodingKeys: String, CodingKey { case id - case logoSmall = "logo_small" - - case logoLarge = "logo_large" - case name + case logoSmall = "logo_small" + case displayName = "display_name" + + case logoLarge = "logo_large" } public init(displayName: String? = nil, id: Int, logoLarge: String, logoSmall: String, name: String) { self.id = id - self.logoSmall = logoSmall - - self.logoLarge = logoLarge - self.name = name + self.logoSmall = logoSmall + self.displayName = displayName + + self.logoLarge = logoLarge } required public init(from decoder: Decoder) throws { @@ -46,12 +46,10 @@ public extension ApplicationClient { id = try container.decode(Int.self, forKey: .id) - logoSmall = try container.decode(String.self, forKey: .logoSmall) - - logoLarge = try container.decode(String.self, forKey: .logoLarge) - name = try container.decode(String.self, forKey: .name) + logoSmall = try container.decode(String.self, forKey: .logoSmall) + do { displayName = try container.decode(String.self, forKey: .displayName) @@ -59,6 +57,8 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + logoLarge = try container.decode(String.self, forKey: .logoLarge) } public func encode(to encoder: Encoder) throws { @@ -66,13 +66,13 @@ public extension ApplicationClient { try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(logoSmall, forKey: .logoSmall) - - try? container.encodeIfPresent(logoLarge, forKey: .logoLarge) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(logoSmall, forKey: .logoSmall) + try? container.encodeIfPresent(displayName, forKey: .displayName) + + try? container.encodeIfPresent(logoLarge, forKey: .logoLarge) } } } diff --git a/Sources/code/application/models/TransferModeDetailsAppModelClass.swift b/Sources/code/application/models/TransferModeDetailsAppModelClass.swift index e9341ba610..2fde367500 100644 --- a/Sources/code/application/models/TransferModeDetailsAppModelClass.swift +++ b/Sources/code/application/models/TransferModeDetailsAppModelClass.swift @@ -7,27 +7,25 @@ public extension ApplicationClient { Used By: Payment */ class TransferModeDetails: Codable { - public var displayName: String - public var items: [TransferItemsDetails]? - public enum CodingKeys: String, CodingKey { - case displayName = "display_name" + public var displayName: String + public enum CodingKeys: String, CodingKey { case items + + case displayName = "display_name" } public init(displayName: String, items: [TransferItemsDetails]? = nil) { - self.displayName = displayName - self.items = items + + self.displayName = displayName } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - displayName = try container.decode(String.self, forKey: .displayName) - do { items = try container.decode([TransferItemsDetails].self, forKey: .items) @@ -35,14 +33,16 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + displayName = try container.decode(String.self, forKey: .displayName) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(displayName, forKey: .displayName) - try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(displayName, forKey: .displayName) } } } diff --git a/Sources/code/application/models/UpdateRefundTransferModeRequestAppModelClass.swift b/Sources/code/application/models/UpdateRefundTransferModeRequestAppModelClass.swift index 8ba9fa68f5..d30b36929f 100644 --- a/Sources/code/application/models/UpdateRefundTransferModeRequestAppModelClass.swift +++ b/Sources/code/application/models/UpdateRefundTransferModeRequestAppModelClass.swift @@ -7,36 +7,36 @@ public extension ApplicationClient { Used By: Payment */ class UpdateRefundTransferModeRequest: Codable { - public var transferMode: String - public var enable: Bool - public enum CodingKeys: String, CodingKey { - case transferMode = "transfer_mode" + public var transferMode: String + public enum CodingKeys: String, CodingKey { case enable + + case transferMode = "transfer_mode" } public init(enable: Bool, transferMode: String) { - self.transferMode = transferMode - self.enable = enable + + self.transferMode = transferMode } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - transferMode = try container.decode(String.self, forKey: .transferMode) - enable = try container.decode(Bool.self, forKey: .enable) + + transferMode = try container.decode(String.self, forKey: .transferMode) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(transferMode, forKey: .transferMode) - try? container.encodeIfPresent(enable, forKey: .enable) + + try? container.encodeIfPresent(transferMode, forKey: .transferMode) } } } diff --git a/Sources/code/application/models/ValidateCustomerRequestAppModelClass.swift b/Sources/code/application/models/ValidateCustomerRequestAppModelClass.swift index d122b48e58..2b6e9c420e 100644 --- a/Sources/code/application/models/ValidateCustomerRequestAppModelClass.swift +++ b/Sources/code/application/models/ValidateCustomerRequestAppModelClass.swift @@ -7,66 +7,66 @@ public extension ApplicationClient { Used By: Payment */ class ValidateCustomerRequest: Codable { + public var aggregator: String + + public var merchantParams: [String: Any] + public var transactionAmountInPaise: Int public var payload: String - public var aggregator: String - public var phoneNumber: String - public var merchantParams: [String: Any] - public enum CodingKeys: String, CodingKey { + case aggregator + + case merchantParams = "merchant_params" + case transactionAmountInPaise = "transaction_amount_in_paise" case payload - case aggregator - case phoneNumber = "phone_number" - - case merchantParams = "merchant_params" } public init(aggregator: String, merchantParams: [String: Any], payload: String, phoneNumber: String, transactionAmountInPaise: Int) { + self.aggregator = aggregator + + self.merchantParams = merchantParams + self.transactionAmountInPaise = transactionAmountInPaise self.payload = payload - self.aggregator = aggregator - self.phoneNumber = phoneNumber - - self.merchantParams = merchantParams } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + aggregator = try container.decode(String.self, forKey: .aggregator) + + merchantParams = try container.decode([String: Any].self, forKey: .merchantParams) + transactionAmountInPaise = try container.decode(Int.self, forKey: .transactionAmountInPaise) payload = try container.decode(String.self, forKey: .payload) - aggregator = try container.decode(String.self, forKey: .aggregator) - phoneNumber = try container.decode(String.self, forKey: .phoneNumber) - - merchantParams = try container.decode([String: Any].self, forKey: .merchantParams) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) + + try? container.encodeIfPresent(merchantParams, forKey: .merchantParams) + try? container.encodeIfPresent(transactionAmountInPaise, forKey: .transactionAmountInPaise) try? container.encode(payload, forKey: .payload) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encodeIfPresent(phoneNumber, forKey: .phoneNumber) - - try? container.encodeIfPresent(merchantParams, forKey: .merchantParams) } } } diff --git a/Sources/code/application/models/WalletOtpRequestAppModelClass.swift b/Sources/code/application/models/WalletOtpRequestAppModelClass.swift index 0f2851d627..0bdaa62023 100644 --- a/Sources/code/application/models/WalletOtpRequestAppModelClass.swift +++ b/Sources/code/application/models/WalletOtpRequestAppModelClass.swift @@ -7,36 +7,36 @@ public extension ApplicationClient { Used By: Payment */ class WalletOtpRequest: Codable { - public var mobile: String - public var countryCode: String - public enum CodingKeys: String, CodingKey { - case mobile + public var mobile: String + public enum CodingKeys: String, CodingKey { case countryCode = "country_code" + + case mobile } public init(countryCode: String, mobile: String) { - self.mobile = mobile - self.countryCode = countryCode + + self.mobile = mobile } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - mobile = try container.decode(String.self, forKey: .mobile) - countryCode = try container.decode(String.self, forKey: .countryCode) + + mobile = try container.decode(String.self, forKey: .mobile) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(mobile, forKey: .mobile) - try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + try? container.encodeIfPresent(mobile, forKey: .mobile) } } } diff --git a/Sources/code/application/models/WalletOtpResponseAppModelClass.swift b/Sources/code/application/models/WalletOtpResponseAppModelClass.swift index 698a82b00d..9828c00577 100644 --- a/Sources/code/application/models/WalletOtpResponseAppModelClass.swift +++ b/Sources/code/application/models/WalletOtpResponseAppModelClass.swift @@ -7,32 +7,32 @@ public extension ApplicationClient { Used By: Payment */ class WalletOtpResponse: Codable { - public var requestId: String + public var isVerifiedFlag: String public var success: Bool? - public var isVerifiedFlag: String + public var requestId: String public enum CodingKeys: String, CodingKey { - case requestId = "request_id" + case isVerifiedFlag = "is_verified_flag" case success - case isVerifiedFlag = "is_verified_flag" + case requestId = "request_id" } public init(isVerifiedFlag: String, requestId: String, success: Bool? = nil) { - self.requestId = requestId + self.isVerifiedFlag = isVerifiedFlag self.success = success - self.isVerifiedFlag = isVerifiedFlag + self.requestId = requestId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - requestId = try container.decode(String.self, forKey: .requestId) + isVerifiedFlag = try container.decode(String.self, forKey: .isVerifiedFlag) do { success = try container.decode(Bool.self, forKey: .success) @@ -42,17 +42,17 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} - isVerifiedFlag = try container.decode(String.self, forKey: .isVerifiedFlag) + requestId = try container.decode(String.self, forKey: .requestId) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(requestId, forKey: .requestId) + try? container.encodeIfPresent(isVerifiedFlag, forKey: .isVerifiedFlag) try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(isVerifiedFlag, forKey: .isVerifiedFlag) + try? container.encodeIfPresent(requestId, forKey: .requestId) } } } diff --git a/Sources/code/application/models/WrongOtpErrorAppModelClass.swift b/Sources/code/application/models/WrongOtpErrorAppModelClass.swift index 9838768489..115f85aa95 100644 --- a/Sources/code/application/models/WrongOtpErrorAppModelClass.swift +++ b/Sources/code/application/models/WrongOtpErrorAppModelClass.swift @@ -7,46 +7,46 @@ public extension ApplicationClient { Used By: Payment */ class WrongOtpError: Codable { - public var success: String + public var isVerifiedFlag: Bool public var description: String - public var isVerifiedFlag: Bool + public var success: String public enum CodingKeys: String, CodingKey { - case success + case isVerifiedFlag = "is_verified_flag" case description - case isVerifiedFlag = "is_verified_flag" + case success } public init(description: String, isVerifiedFlag: Bool, success: String) { - self.success = success + self.isVerifiedFlag = isVerifiedFlag self.description = description - self.isVerifiedFlag = isVerifiedFlag + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - success = try container.decode(String.self, forKey: .success) + isVerifiedFlag = try container.decode(Bool.self, forKey: .isVerifiedFlag) description = try container.decode(String.self, forKey: .description) - isVerifiedFlag = try container.decode(Bool.self, forKey: .isVerifiedFlag) + success = try container.decode(String.self, forKey: .success) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(success, forKey: .success) + try? container.encodeIfPresent(isVerifiedFlag, forKey: .isVerifiedFlag) try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(isVerifiedFlag, forKey: .isVerifiedFlag) + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/common/Extensions.swift b/Sources/code/common/Extensions.swift index b133581f17..dcf310b272 100644 --- a/Sources/code/common/Extensions.swift +++ b/Sources/code/common/Extensions.swift @@ -71,7 +71,11 @@ extension Decodable { public extension Data { var dictionary: [String: Any]? { - try? JSONSerialization.jsonObject(with: self, options: []) as? [String: Any] + do { + return try JSONSerialization.jsonObject(with: self, options: []) as? [String: Any] + } catch { + return nil + } } } diff --git a/Sources/code/platform/PlatformAPIClient.swift b/Sources/code/platform/PlatformAPIClient.swift index 73eb3efa28..880cd35260 100644 --- a/Sources/code/platform/PlatformAPIClient.swift +++ b/Sources/code/platform/PlatformAPIClient.swift @@ -14,7 +14,7 @@ public enum PlatformAPIClient { if let token = token { var finalHeaders = headers finalHeaders.append((key: "Authorization", value: "Bearer " + token.accessToken)) - finalHeaders.append((key: "x-fp-sdk-version", value: "0.1.17")) + finalHeaders.append((key: "x-fp-sdk-version", value: "0.1.18")) finalHeaders.append(contentsOf: config.extraHeaders) if let userAgent = config.userAgent { finalHeaders.append((key: "User-Agent", value: userAgent)) diff --git a/Sources/code/platform/PlatformClient.swift b/Sources/code/platform/PlatformClient.swift index 0cb44525be..d9435f3362 100644 --- a/Sources/code/platform/PlatformClient.swift +++ b/Sources/code/platform/PlatformClient.swift @@ -8172,20 +8172,20 @@ public class PlatformClient { /** * - * Summary: Delete a Search Keywords - * Description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully + * Summary: Update Search Keyword + * Description: Update Search Keyword by its id. On successful request, returns the updated collection **/ - public func deleteSearchKeywords( + public func updateSearchKeywords( id: String, - - onResponse: @escaping (_ response: DeleteResponse?, _ error: FDKError?) -> Void + body: CreateSearchKeyword, + onResponse: @escaping (_ response: GetSearchWordsData?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "delete", + method: "put", url: "/service/platform/catalog/v1.0/company/\(companyId)/application/\(applicationId)/search/keyword/\(id)/", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -8196,7 +8196,7 @@ public class PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteResponse.self, from: data) + let response = Utility.decode(GetSearchWordsData.self, from: data) onResponse(response, nil) } else { @@ -8211,20 +8211,20 @@ public class PlatformClient { /** * - * Summary: Update Search Keyword - * Description: Update Search Keyword by its id. On successful request, returns the updated collection + * Summary: Delete a Search Keywords + * Description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully **/ - public func updateSearchKeywords( + public func deleteSearchKeywords( id: String, - body: CreateSearchKeyword, - onResponse: @escaping (_ response: GetSearchWordsData?, _ error: FDKError?) -> Void + + onResponse: @escaping (_ response: DeleteResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "put", + method: "delete", url: "/service/platform/catalog/v1.0/company/\(companyId)/application/\(applicationId)/search/keyword/\(id)/", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -8235,7 +8235,7 @@ public class PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetSearchWordsData.self, from: data) + let response = Utility.decode(DeleteResponse.self, from: data) onResponse(response, nil) } else { @@ -8364,20 +8364,20 @@ public class PlatformClient { /** * - * Summary: Delete a Autocomplete Keywords - * Description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully + * Summary: Create & Update Autocomplete Keyword + * Description: Update a mapping by it's id. On successful request, returns the updated Keyword mapping **/ - public func deleteAutocompleteKeyword( + public func updateAutocompleteKeyword( id: String, - - onResponse: @escaping (_ response: DeleteResponse?, _ error: FDKError?) -> Void + body: CreateAutocompleteKeyword, + onResponse: @escaping (_ response: GetAutocompleteWordsResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "delete", + method: "put", url: "/service/platform/catalog/v1.0/company/\(companyId)/application/\(applicationId)/search/autocomplete/\(id)/", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -8388,7 +8388,7 @@ public class PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteResponse.self, from: data) + let response = Utility.decode(GetAutocompleteWordsResponse.self, from: data) onResponse(response, nil) } else { @@ -8403,20 +8403,20 @@ public class PlatformClient { /** * - * Summary: Create & Update Autocomplete Keyword - * Description: Update a mapping by it's id. On successful request, returns the updated Keyword mapping + * Summary: Delete a Autocomplete Keywords + * Description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully **/ - public func updateAutocompleteKeyword( + public func deleteAutocompleteKeyword( id: String, - body: CreateAutocompleteKeyword, - onResponse: @escaping (_ response: GetAutocompleteWordsResponse?, _ error: FDKError?) -> Void + + onResponse: @escaping (_ response: DeleteResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "put", + method: "delete", url: "/service/platform/catalog/v1.0/company/\(companyId)/application/\(applicationId)/search/autocomplete/\(id)/", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -8427,7 +8427,7 @@ public class PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetAutocompleteWordsResponse.self, from: data) + let response = Utility.decode(DeleteResponse.self, from: data) onResponse(response, nil) } else { @@ -8925,20 +8925,20 @@ public class PlatformClient { /** * - * Summary: Delete a Collection - * Description: Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully + * Summary: Update a collection + * Description: Update a collection by it's id. On successful request, returns the updated collection **/ - public func deleteCollection( + public func updateCollection( id: String, - - onResponse: @escaping (_ response: DeleteResponse?, _ error: FDKError?) -> Void + body: UpdateCollection, + onResponse: @escaping (_ response: UpdateCollection?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "delete", + method: "put", url: "/service/platform/catalog/v1.0/company/\(companyId)/application/\(applicationId)/collections/\(id)/", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -8949,7 +8949,7 @@ public class PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteResponse.self, from: data) + let response = Utility.decode(UpdateCollection.self, from: data) onResponse(response, nil) } else { @@ -8964,20 +8964,20 @@ public class PlatformClient { /** * - * Summary: Update a collection - * Description: Update a collection by it's id. On successful request, returns the updated collection + * Summary: Delete a Collection + * Description: Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully **/ - public func updateCollection( + public func deleteCollection( id: String, - body: UpdateCollection, - onResponse: @escaping (_ response: UpdateCollection?, _ error: FDKError?) -> Void + + onResponse: @escaping (_ response: DeleteResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "put", + method: "delete", url: "/service/platform/catalog/v1.0/company/\(companyId)/application/\(applicationId)/collections/\(id)/", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -8988,7 +8988,7 @@ public class PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdateCollection.self, from: data) + let response = Utility.decode(DeleteResponse.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/client/CatalogPlatformClient.swift b/Sources/code/platform/client/CatalogPlatformClient.swift index f5021af22f..b508703f9d 100644 --- a/Sources/code/platform/client/CatalogPlatformClient.swift +++ b/Sources/code/platform/client/CatalogPlatformClient.swift @@ -1536,20 +1536,20 @@ public extension PlatformClient { /** * - * Summary: Delete a product. - * Description: This API allows to delete product. + * Summary: Edit a product. + * Description: This API allows to edit product. **/ - public func deleteProduct( + public func editProduct( itemId: Int, - + body: ProductCreateUpdate, onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "delete", + method: "put", url: "/service/platform/catalog/v1.0/company/\(companyId)/products/\(itemId)/", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -1575,20 +1575,20 @@ public extension PlatformClient { /** * - * Summary: Edit a product. - * Description: This API allows to edit product. + * Summary: Delete a product. + * Description: This API allows to delete product. **/ - public func editProduct( + public func deleteProduct( itemId: Int, - body: ProductCreateUpdate, + onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "put", + method: "delete", url: "/service/platform/catalog/v1.0/company/\(companyId)/products/\(itemId)/", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -1795,20 +1795,20 @@ public extension PlatformClient { /** * - * Summary: Delete Bulk product job. - * Description: This API allows to delete bulk product job associated with company. + * Summary: Create products in bulk associated with given batch Id. + * Description: This API helps to create products in bulk push to kafka for approval/creation. **/ - public func deleteProductBulkJob( - batchId: Int, - + public func createProductsInBulk( + batchId: String, + body: BulkProductRequest, onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "delete", + method: "post", url: "/service/platform/catalog/v1.0/company/\(companyId)/products/bulk/\(batchId)", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -1834,20 +1834,20 @@ public extension PlatformClient { /** * - * Summary: Create products in bulk associated with given batch Id. - * Description: This API helps to create products in bulk push to kafka for approval/creation. + * Summary: Delete Bulk product job. + * Description: This API allows to delete bulk product job associated with company. **/ - public func createProductsInBulk( - batchId: String, - body: BulkProductRequest, + public func deleteProductBulkJob( + batchId: Int, + onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "post", + method: "delete", url: "/service/platform/catalog/v1.0/company/\(companyId)/products/bulk/\(batchId)", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -2331,20 +2331,20 @@ public extension PlatformClient { /** * - * Summary: Delete Bulk Inventory job. - * Description: This API allows to delete bulk Inventory job associated with company. + * Summary: Create products in bulk associated with given batch Id. + * Description: This API helps to create products in bulk push to kafka for approval/creation. **/ - public func deleteBulkInventoryJob( + public func createBulkInventory( batchId: String, - + body: InventoryBulkRequest, onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "delete", + method: "post", url: "/service/platform/catalog/v1.0/company/\(companyId)/inventory/bulk/\(batchId)/", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -2370,20 +2370,20 @@ public extension PlatformClient { /** * - * Summary: Create products in bulk associated with given batch Id. - * Description: This API helps to create products in bulk push to kafka for approval/creation. + * Summary: Delete Bulk Inventory job. + * Description: This API allows to delete bulk Inventory job associated with company. **/ - public func createBulkInventory( + public func deleteBulkInventoryJob( batchId: String, - body: InventoryBulkRequest, + onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "post", + method: "delete", url: "/service/platform/catalog/v1.0/company/\(companyId)/inventory/bulk/\(batchId)/", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in diff --git a/Sources/code/platform/client/CompanyProfilePlatformClient.swift b/Sources/code/platform/client/CompanyProfilePlatformClient.swift index 19190cf4f2..193438ec4c 100644 --- a/Sources/code/platform/client/CompanyProfilePlatformClient.swift +++ b/Sources/code/platform/client/CompanyProfilePlatformClient.swift @@ -124,20 +124,20 @@ public extension PlatformClient { /** * - * Summary: Edit a brand. - * Description: This API allows to edit meta of a brand. + * Summary: Get a single brand. + * Description: This API helps to get data associated to a particular brand. **/ - public func editBrand( + public func getBrand( brandId: String, - body: CreateUpdateBrandRequestSerializer, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + + onResponse: @escaping (_ response: GetBrandResponseSerializer?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "put", + method: "get", url: "/service/platform/company-profile/v1.0/company/\(companyId)/brand/\(brandId)", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -148,7 +148,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(GetBrandResponseSerializer.self, from: data) onResponse(response, nil) } else { @@ -163,20 +163,20 @@ public extension PlatformClient { /** * - * Summary: Get a single brand. - * Description: This API helps to get data associated to a particular brand. + * Summary: Edit a brand. + * Description: This API allows to edit meta of a brand. **/ - public func getBrand( + public func editBrand( brandId: String, - - onResponse: @escaping (_ response: GetBrandResponseSerializer?, _ error: FDKError?) -> Void + body: CreateUpdateBrandRequestSerializer, + onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "get", + method: "put", url: "/service/platform/company-profile/v1.0/company/\(companyId)/brand/\(brandId)", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -187,7 +187,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetBrandResponseSerializer.self, from: data) + let response = Utility.decode(SuccessResponse.self, from: data) onResponse(response, nil) } else { @@ -500,20 +500,20 @@ public extension PlatformClient { /** * - * Summary: Edit a location asscoiated to a company. - * Description: This API allows to edit a location associated to a company. + * Summary: Get details of a specific location. + * Description: This API helps to get data associated to a specific location. **/ - public func updateLocation( + public func getLocationDetail( locationId: String, - body: LocationSerializer, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + + onResponse: @escaping (_ response: GetLocationSerializer?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "put", + method: "get", url: "/service/platform/company-profile/v1.0/company/\(companyId)/location/\(locationId)", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -524,7 +524,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(GetLocationSerializer.self, from: data) onResponse(response, nil) } else { @@ -539,20 +539,20 @@ public extension PlatformClient { /** * - * Summary: Get details of a specific location. - * Description: This API helps to get data associated to a specific location. + * Summary: Edit a location asscoiated to a company. + * Description: This API allows to edit a location associated to a company. **/ - public func getLocationDetail( + public func updateLocation( locationId: String, - - onResponse: @escaping (_ response: GetLocationSerializer?, _ error: FDKError?) -> Void + body: LocationSerializer, + onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "get", + method: "put", url: "/service/platform/company-profile/v1.0/company/\(companyId)/location/\(locationId)", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -563,7 +563,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetLocationSerializer.self, from: data) + let response = Utility.decode(SuccessResponse.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/models/AddBeneficiaryDetailsRequestPlatformModelClass.swift b/Sources/code/platform/models/AddBeneficiaryDetailsRequestPlatformModelClass.swift index 5d89c6ec42..288536f7b5 100644 --- a/Sources/code/platform/models/AddBeneficiaryDetailsRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/AddBeneficiaryDetailsRequestPlatformModelClass.swift @@ -8,97 +8,97 @@ public extension PlatformClient { */ class AddBeneficiaryDetailsRequest: Codable { - public var shipmentId: String + public var requestId: String? public var delights: Bool + public var transferMode: String + public var otp: String? - public var transferMode: String + public var shipmentId: String public var details: BeneficiaryModeDetails - public var requestId: String? - public var orderId: String public enum CodingKeys: String, CodingKey { - case shipmentId = "shipment_id" + case requestId = "request_id" case delights + case transferMode = "transfer_mode" + case otp - case transferMode = "transfer_mode" + case shipmentId = "shipment_id" case details - case requestId = "request_id" - case orderId = "order_id" } public init(delights: Bool, details: BeneficiaryModeDetails, orderId: String, otp: String? = nil, requestId: String? = nil, shipmentId: String, transferMode: String) { - self.shipmentId = shipmentId + self.requestId = requestId self.delights = delights + self.transferMode = transferMode + self.otp = otp - self.transferMode = transferMode + self.shipmentId = shipmentId self.details = details - self.requestId = requestId - self.orderId = orderId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - shipmentId = try container.decode(String.self, forKey: .shipmentId) - - delights = try container.decode(Bool.self, forKey: .delights) - do { - otp = try container.decode(String.self, forKey: .otp) + requestId = try container.decode(String.self, forKey: .requestId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - transferMode = try container.decode(String.self, forKey: .transferMode) + delights = try container.decode(Bool.self, forKey: .delights) - details = try container.decode(BeneficiaryModeDetails.self, forKey: .details) + transferMode = try container.decode(String.self, forKey: .transferMode) do { - requestId = try container.decode(String.self, forKey: .requestId) + otp = try container.decode(String.self, forKey: .otp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + shipmentId = try container.decode(String.self, forKey: .shipmentId) + + details = try container.decode(BeneficiaryModeDetails.self, forKey: .details) + orderId = try container.decode(String.self, forKey: .orderId) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) + try? container.encodeIfPresent(requestId, forKey: .requestId) try? container.encodeIfPresent(delights, forKey: .delights) + try? container.encodeIfPresent(transferMode, forKey: .transferMode) + try? container.encodeIfPresent(otp, forKey: .otp) - try? container.encodeIfPresent(transferMode, forKey: .transferMode) + try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) try? container.encodeIfPresent(details, forKey: .details) - try? container.encodeIfPresent(requestId, forKey: .requestId) - try? container.encodeIfPresent(orderId, forKey: .orderId) } } diff --git a/Sources/code/platform/models/AppCatalogConfigurationPlatformModelClass.swift b/Sources/code/platform/models/AppCatalogConfigurationPlatformModelClass.swift index 063dbfac0c..6079612dbd 100644 --- a/Sources/code/platform/models/AppCatalogConfigurationPlatformModelClass.swift +++ b/Sources/code/platform/models/AppCatalogConfigurationPlatformModelClass.swift @@ -8,61 +8,61 @@ public extension PlatformClient { */ class AppCatalogConfiguration: Codable { - public var listing: ConfigurationListing? - - public var appId: String - public var id: String? - public var configId: String? - public var configType: String + public var listing: ConfigurationListing? + public var product: ConfigurationProduct? - public enum CodingKeys: String, CodingKey { - case listing + public var appId: String - case appId = "app_id" + public var configId: String? + public enum CodingKeys: String, CodingKey { case id - case configId = "config_id" - case configType = "config_type" + case listing + case product - } - public init(appId: String, configId: String? = nil, configType: String, id: String? = nil, listing: ConfigurationListing? = nil, product: ConfigurationProduct? = nil) { - self.listing = listing + case appId = "app_id" - self.appId = appId + case configId = "config_id" + } + public init(appId: String, configId: String? = nil, configType: String, id: String? = nil, listing: ConfigurationListing? = nil, product: ConfigurationProduct? = nil) { self.id = id - self.configId = configId - self.configType = configType + self.listing = listing + self.product = product + + self.appId = appId + + self.configId = configId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - listing = try container.decode(ConfigurationListing.self, forKey: .listing) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - appId = try container.decode(String.self, forKey: .appId) + configType = try container.decode(String.self, forKey: .configType) do { - id = try container.decode(String.self, forKey: .id) + listing = try container.decode(ConfigurationListing.self, forKey: .listing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,17 +70,17 @@ public extension PlatformClient { } catch {} do { - configId = try container.decode(String.self, forKey: .configId) + product = try container.decode(ConfigurationProduct.self, forKey: .product) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - configType = try container.decode(String.self, forKey: .configType) + appId = try container.decode(String.self, forKey: .appId) do { - product = try container.decode(ConfigurationProduct.self, forKey: .product) + configId = try container.decode(String.self, forKey: .configId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,17 +91,17 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(listing, forKey: .listing) - - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(configId, forKey: .configId) - try? container.encodeIfPresent(configType, forKey: .configType) + try? container.encodeIfPresent(listing, forKey: .listing) + try? container.encodeIfPresent(product, forKey: .product) + + try? container.encodeIfPresent(appId, forKey: .appId) + + try? container.encodeIfPresent(configId, forKey: .configId) } } } diff --git a/Sources/code/platform/models/AppConfigurationPlatformModelClass.swift b/Sources/code/platform/models/AppConfigurationPlatformModelClass.swift index 04b9f7f13d..3dff0450c4 100644 --- a/Sources/code/platform/models/AppConfigurationPlatformModelClass.swift +++ b/Sources/code/platform/models/AppConfigurationPlatformModelClass.swift @@ -8,43 +8,45 @@ public extension PlatformClient { */ class AppConfiguration: Codable { + public var configType: String + public var listing: ConfigurationListing? + public var product: ConfigurationProduct? + public var appId: String public var configId: String? - public var configType: String - - public var product: ConfigurationProduct? - public enum CodingKeys: String, CodingKey { + case configType = "config_type" + case listing + case product + case appId = "app_id" case configId = "config_id" - - case configType = "config_type" - - case product } public init(appId: String, configId: String? = nil, configType: String, listing: ConfigurationListing? = nil, product: ConfigurationProduct? = nil) { + self.configType = configType + self.listing = listing + self.product = product + self.appId = appId self.configId = configId - - self.configType = configType - - self.product = product } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + configType = try container.decode(String.self, forKey: .configType) + do { listing = try container.decode(ConfigurationListing.self, forKey: .listing) @@ -53,20 +55,18 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - appId = try container.decode(String.self, forKey: .appId) - do { - configId = try container.decode(String.self, forKey: .configId) + product = try container.decode(ConfigurationProduct.self, forKey: .product) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - configType = try container.decode(String.self, forKey: .configType) + appId = try container.decode(String.self, forKey: .appId) do { - product = try container.decode(ConfigurationProduct.self, forKey: .product) + configId = try container.decode(String.self, forKey: .configId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,15 +77,15 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(configType, forKey: .configType) + try? container.encodeIfPresent(listing, forKey: .listing) + try? container.encodeIfPresent(product, forKey: .product) + try? container.encodeIfPresent(appId, forKey: .appId) try? container.encodeIfPresent(configId, forKey: .configId) - - try? container.encodeIfPresent(configType, forKey: .configType) - - try? container.encodeIfPresent(product, forKey: .product) } } } diff --git a/Sources/code/platform/models/ApplicationProductListingResponsePlatformModelClass.swift b/Sources/code/platform/models/ApplicationProductListingResponsePlatformModelClass.swift index 550a562dd1..526dd80b07 100644 --- a/Sources/code/platform/models/ApplicationProductListingResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/ApplicationProductListingResponsePlatformModelClass.swift @@ -8,49 +8,49 @@ public extension PlatformClient { */ class ApplicationProductListingResponse: Codable { - public var filters: [ProductFilters]? - public var page: Page - public var sortOn: [ProductSortOn]? - public var items: [ProductListingDetail]? - public enum CodingKeys: String, CodingKey { - case filters + public var filters: [ProductFilters]? - case page + public var sortOn: [ProductSortOn]? - case sortOn = "sort_on" + public enum CodingKeys: String, CodingKey { + case page case items + + case filters + + case sortOn = "sort_on" } public init(filters: [ProductFilters]? = nil, items: [ProductListingDetail]? = nil, page: Page, sortOn: [ProductSortOn]? = nil) { - self.filters = filters - self.page = page - self.sortOn = sortOn - self.items = items + + self.filters = filters + + self.sortOn = sortOn } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + page = try container.decode(Page.self, forKey: .page) + do { - filters = try container.decode([ProductFilters].self, forKey: .filters) + items = try container.decode([ProductListingDetail].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - page = try container.decode(Page.self, forKey: .page) - do { - sortOn = try container.decode([ProductSortOn].self, forKey: .sortOn) + filters = try container.decode([ProductFilters].self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -58,7 +58,7 @@ public extension PlatformClient { } catch {} do { - items = try container.decode([ProductListingDetail].self, forKey: .items) + sortOn = try container.decode([ProductSortOn].self, forKey: .sortOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -69,13 +69,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(page, forKey: .page) - try? container.encodeIfPresent(sortOn, forKey: .sortOn) - try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(filters, forKey: .filters) + + try? container.encodeIfPresent(sortOn, forKey: .sortOn) } } } diff --git a/Sources/code/platform/models/ArticleQueryPlatformModelClass.swift b/Sources/code/platform/models/ArticleQueryPlatformModelClass.swift index adca58db24..7c84701304 100644 --- a/Sources/code/platform/models/ArticleQueryPlatformModelClass.swift +++ b/Sources/code/platform/models/ArticleQueryPlatformModelClass.swift @@ -8,33 +8,31 @@ public extension PlatformClient { */ class ArticleQuery: Codable { - public var itemId: Int - public var ignoredStores: [Int]? + public var itemId: Int + public var size: String public enum CodingKeys: String, CodingKey { - case itemId = "item_id" - case ignoredStores = "ignored_stores" + case itemId = "item_id" + case size } public init(ignoredStores: [Int]? = nil, itemId: Int, size: String) { - self.itemId = itemId - self.ignoredStores = ignoredStores + self.itemId = itemId + self.size = size } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - itemId = try container.decode(Int.self, forKey: .itemId) - do { ignoredStores = try container.decode([Int].self, forKey: .ignoredStores) @@ -43,16 +41,18 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + itemId = try container.decode(Int.self, forKey: .itemId) + size = try container.decode(String.self, forKey: .size) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(itemId, forKey: .itemId) - try? container.encodeIfPresent(ignoredStores, forKey: .ignoredStores) + try? container.encodeIfPresent(itemId, forKey: .itemId) + try? container.encodeIfPresent(size, forKey: .size) } } diff --git a/Sources/code/platform/models/AssignStoreArticlePlatformModelClass.swift b/Sources/code/platform/models/AssignStoreArticlePlatformModelClass.swift index a41dd7508e..4337b3da70 100644 --- a/Sources/code/platform/models/AssignStoreArticlePlatformModelClass.swift +++ b/Sources/code/platform/models/AssignStoreArticlePlatformModelClass.swift @@ -8,45 +8,45 @@ public extension PlatformClient { */ class AssignStoreArticle: Codable { + public var meta: [String: Any]? + + public var query: ArticleQuery? + public var groupId: String? public var quantity: Int? - public var meta: [String: Any]? - public var articleAssignment: ArticleAssignment? - public var query: ArticleQuery? - public enum CodingKeys: String, CodingKey { + case meta + + case query + case groupId = "group_id" case quantity - case meta - case articleAssignment = "article_assignment" - - case query } public init(articleAssignment: ArticleAssignment? = nil, groupId: String? = nil, meta: [String: Any]? = nil, quantity: Int? = nil, query: ArticleQuery? = nil) { + self.meta = meta + + self.query = query + self.groupId = groupId self.quantity = quantity - self.meta = meta - self.articleAssignment = articleAssignment - - self.query = query } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - groupId = try container.decode(String.self, forKey: .groupId) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + query = try container.decode(ArticleQuery.self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + groupId = try container.decode(String.self, forKey: .groupId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - articleAssignment = try container.decode(ArticleAssignment.self, forKey: .articleAssignment) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - query = try container.decode(ArticleQuery.self, forKey: .query) + articleAssignment = try container.decode(ArticleAssignment.self, forKey: .articleAssignment) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,15 +89,15 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(meta, forKey: .meta) + + try? container.encodeIfPresent(query, forKey: .query) + try? container.encodeIfPresent(groupId, forKey: .groupId) try? container.encodeIfPresent(quantity, forKey: .quantity) - try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(articleAssignment, forKey: .articleAssignment) - - try? container.encodeIfPresent(query, forKey: .query) } } } diff --git a/Sources/code/platform/models/AssignStorePlatformModelClass.swift b/Sources/code/platform/models/AssignStorePlatformModelClass.swift index 1b21173624..905db70db0 100644 --- a/Sources/code/platform/models/AssignStorePlatformModelClass.swift +++ b/Sources/code/platform/models/AssignStorePlatformModelClass.swift @@ -8,110 +8,110 @@ public extension PlatformClient { */ class AssignStore: Codable { + public var channelType: String? + + public var channelIdentifier: String? + + public var articles: [AssignStoreArticle] + + public var pincode: String + public var companyId: Int? public var appId: String public var storeIds: [Int]? - public var channelType: String? + public enum CodingKeys: String, CodingKey { + case channelType = "channel_type" - public var pincode: String + case channelIdentifier = "channel_identifier" - public var channelIdentifier: String? + case articles - public var articles: [AssignStoreArticle] + case pincode - public enum CodingKeys: String, CodingKey { case companyId = "company_id" case appId = "app_id" case storeIds = "store_ids" + } - case channelType = "channel_type" + public init(appId: String, articles: [AssignStoreArticle], channelIdentifier: String? = nil, channelType: String? = nil, companyId: Int? = nil, pincode: String, storeIds: [Int]? = nil) { + self.channelType = channelType - case pincode + self.channelIdentifier = channelIdentifier - case channelIdentifier = "channel_identifier" + self.articles = articles - case articles - } + self.pincode = pincode - public init(appId: String, articles: [AssignStoreArticle], channelIdentifier: String? = nil, channelType: String? = nil, companyId: Int? = nil, pincode: String, storeIds: [Int]? = nil) { self.companyId = companyId self.appId = appId self.storeIds = storeIds - - self.channelType = channelType - - self.pincode = pincode - - self.channelIdentifier = channelIdentifier - - self.articles = articles } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - companyId = try container.decode(Int.self, forKey: .companyId) + channelType = try container.decode(String.self, forKey: .channelType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - appId = try container.decode(String.self, forKey: .appId) - do { - storeIds = try container.decode([Int].self, forKey: .storeIds) + channelIdentifier = try container.decode(String.self, forKey: .channelIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + articles = try container.decode([AssignStoreArticle].self, forKey: .articles) + + pincode = try container.decode(String.self, forKey: .pincode) + do { - channelType = try container.decode(String.self, forKey: .channelType) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - pincode = try container.decode(String.self, forKey: .pincode) + appId = try container.decode(String.self, forKey: .appId) do { - channelIdentifier = try container.decode(String.self, forKey: .channelIdentifier) + storeIds = try container.decode([Int].self, forKey: .storeIds) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - articles = try container.decode([AssignStoreArticle].self, forKey: .articles) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) - - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encodeIfPresent(channelType, forKey: .channelType) - try? container.encodeIfPresent(storeIds, forKey: .storeIds) + try? container.encodeIfPresent(channelIdentifier, forKey: .channelIdentifier) - try? container.encodeIfPresent(channelType, forKey: .channelType) + try? container.encodeIfPresent(articles, forKey: .articles) try? container.encodeIfPresent(pincode, forKey: .pincode) - try? container.encodeIfPresent(channelIdentifier, forKey: .channelIdentifier) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(articles, forKey: .articles) + try? container.encodeIfPresent(appId, forKey: .appId) + + try? container.encodeIfPresent(storeIds, forKey: .storeIds) } } } diff --git a/Sources/code/platform/models/AttributeMasterFilterPlatformModelClass.swift b/Sources/code/platform/models/AttributeMasterFilterPlatformModelClass.swift index 8672095895..3ef53fc84f 100644 --- a/Sources/code/platform/models/AttributeMasterFilterPlatformModelClass.swift +++ b/Sources/code/platform/models/AttributeMasterFilterPlatformModelClass.swift @@ -8,33 +8,35 @@ public extension PlatformClient { */ class AttributeMasterFilter: Codable { - public var dependsOn: [String]? + public var indexing: Bool public var priority: Int? - public var indexing: Bool + public var dependsOn: [String]? public enum CodingKeys: String, CodingKey { - case dependsOn = "depends_on" + case indexing case priority - case indexing + case dependsOn = "depends_on" } public init(dependsOn: [String]? = nil, indexing: Bool, priority: Int? = nil) { - self.dependsOn = dependsOn + self.indexing = indexing self.priority = priority - self.indexing = indexing + self.dependsOn = dependsOn } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + indexing = try container.decode(Bool.self, forKey: .indexing) + do { - dependsOn = try container.decode([String].self, forKey: .dependsOn) + priority = try container.decode(Int.self, forKey: .priority) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,24 +44,22 @@ public extension PlatformClient { } catch {} do { - priority = try container.decode(Int.self, forKey: .priority) + dependsOn = try container.decode([String].self, forKey: .dependsOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - indexing = try container.decode(Bool.self, forKey: .indexing) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(dependsOn, forKey: .dependsOn) + try? container.encodeIfPresent(indexing, forKey: .indexing) try? container.encodeIfPresent(priority, forKey: .priority) - try? container.encodeIfPresent(indexing, forKey: .indexing) + try? container.encodeIfPresent(dependsOn, forKey: .dependsOn) } } } diff --git a/Sources/code/platform/models/AttributeMasterMetaPlatformModelClass.swift b/Sources/code/platform/models/AttributeMasterMetaPlatformModelClass.swift index 31574fdb12..85168e0927 100644 --- a/Sources/code/platform/models/AttributeMasterMetaPlatformModelClass.swift +++ b/Sources/code/platform/models/AttributeMasterMetaPlatformModelClass.swift @@ -8,27 +8,25 @@ public extension PlatformClient { */ class AttributeMasterMeta: Codable { - public var mandatoryDetails: AttributeMasterMandatoryDetails - public var enriched: Bool? - public enum CodingKeys: String, CodingKey { - case mandatoryDetails = "mandatory_details" + public var mandatoryDetails: AttributeMasterMandatoryDetails + public enum CodingKeys: String, CodingKey { case enriched + + case mandatoryDetails = "mandatory_details" } public init(enriched: Bool? = nil, mandatoryDetails: AttributeMasterMandatoryDetails) { - self.mandatoryDetails = mandatoryDetails - self.enriched = enriched + + self.mandatoryDetails = mandatoryDetails } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - mandatoryDetails = try container.decode(AttributeMasterMandatoryDetails.self, forKey: .mandatoryDetails) - do { enriched = try container.decode(Bool.self, forKey: .enriched) @@ -36,14 +34,16 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + mandatoryDetails = try container.decode(AttributeMasterMandatoryDetails.self, forKey: .mandatoryDetails) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(mandatoryDetails, forKey: .mandatoryDetails) - try? container.encodeIfPresent(enriched, forKey: .enriched) + + try? container.encodeIfPresent(mandatoryDetails, forKey: .mandatoryDetails) } } } diff --git a/Sources/code/platform/models/AttributeMasterPlatformModelClass.swift b/Sources/code/platform/models/AttributeMasterPlatformModelClass.swift index aaabfb1fe7..a92d4cb128 100644 --- a/Sources/code/platform/models/AttributeMasterPlatformModelClass.swift +++ b/Sources/code/platform/models/AttributeMasterPlatformModelClass.swift @@ -8,51 +8,51 @@ public extension PlatformClient { */ class AttributeMaster: Codable { + public var format: String? + public var multi: Bool? - public var range: AttributeSchemaRange? + public var allowedValues: [String]? public var mandatory: Bool? - public var type: String - - public var format: String? + public var range: AttributeSchemaRange? - public var allowedValues: [String]? + public var type: String public enum CodingKeys: String, CodingKey { + case format + case multi - case range + case allowedValues = "allowed_values" case mandatory - case type - - case format + case range - case allowedValues = "allowed_values" + case type } public init(allowedValues: [String]? = nil, format: String? = nil, mandatory: Bool? = nil, multi: Bool? = nil, range: AttributeSchemaRange? = nil, type: String) { + self.format = format + self.multi = multi - self.range = range + self.allowedValues = allowedValues self.mandatory = mandatory - self.type = type - - self.format = format + self.range = range - self.allowedValues = allowedValues + self.type = type } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - multi = try container.decode(Bool.self, forKey: .multi) + format = try container.decode(String.self, forKey: .format) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,7 +60,7 @@ public extension PlatformClient { } catch {} do { - range = try container.decode(AttributeSchemaRange.self, forKey: .range) + multi = try container.decode(Bool.self, forKey: .multi) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,17 +68,15 @@ public extension PlatformClient { } catch {} do { - mandatory = try container.decode(Bool.self, forKey: .mandatory) + allowedValues = try container.decode([String].self, forKey: .allowedValues) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - type = try container.decode(String.self, forKey: .type) - do { - format = try container.decode(String.self, forKey: .format) + mandatory = try container.decode(Bool.self, forKey: .mandatory) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,28 +84,30 @@ public extension PlatformClient { } catch {} do { - allowedValues = try container.decode([String].self, forKey: .allowedValues) + range = try container.decode(AttributeSchemaRange.self, forKey: .range) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + type = try container.decode(String.self, forKey: .type) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(format, forKey: .format) + try? container.encodeIfPresent(multi, forKey: .multi) - try? container.encodeIfPresent(range, forKey: .range) + try? container.encodeIfPresent(allowedValues, forKey: .allowedValues) try? container.encodeIfPresent(mandatory, forKey: .mandatory) - try? container.encodeIfPresent(type, forKey: .type) - - try? container.encodeIfPresent(format, forKey: .format) + try? container.encodeIfPresent(range, forKey: .range) - try? container.encodeIfPresent(allowedValues, forKey: .allowedValues) + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/AttributeSchemaRangePlatformModelClass.swift b/Sources/code/platform/models/AttributeSchemaRangePlatformModelClass.swift index e20f625a07..44c186c503 100644 --- a/Sources/code/platform/models/AttributeSchemaRangePlatformModelClass.swift +++ b/Sources/code/platform/models/AttributeSchemaRangePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class AttributeSchemaRange: Codable { - public var min: Int? - public var max: Int? - public enum CodingKeys: String, CodingKey { - case min + public var min: Int? + public enum CodingKeys: String, CodingKey { case max + + case min } public init(max: Int? = nil, min: Int? = nil) { - self.min = min - self.max = max + + self.min = min } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - min = try container.decode(Int.self, forKey: .min) + max = try container.decode(Int.self, forKey: .max) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - max = try container.decode(Int.self, forKey: .max) + min = try container.decode(Int.self, forKey: .min) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(min, forKey: .min) - try? container.encodeIfPresent(max, forKey: .max) + + try? container.encodeIfPresent(min, forKey: .min) } } } diff --git a/Sources/code/platform/models/AutocompletePageActionPlatformModelClass.swift b/Sources/code/platform/models/AutocompletePageActionPlatformModelClass.swift index cad2733330..a7994b7054 100644 --- a/Sources/code/platform/models/AutocompletePageActionPlatformModelClass.swift +++ b/Sources/code/platform/models/AutocompletePageActionPlatformModelClass.swift @@ -12,18 +12,18 @@ public extension PlatformClient { public var params: [String: Any]? - public var type: String? - public var url: String? + public var type: String? + public enum CodingKeys: String, CodingKey { case query case params - case type - case url + + case type } public init(params: [String: Any]? = nil, query: [String: Any]? = nil, type: String? = nil, url: String? = nil) { @@ -31,9 +31,9 @@ public extension PlatformClient { self.params = params - self.type = type - self.url = url + + self.type = type } required public init(from decoder: Decoder) throws { @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -79,9 +79,9 @@ public extension PlatformClient { try? container.encodeIfPresent(params, forKey: .params) - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(url, forKey: .url) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/AutocompleteResultPlatformModelClass.swift b/Sources/code/platform/models/AutocompleteResultPlatformModelClass.swift index 56e8dd0e30..674e7ad66e 100644 --- a/Sources/code/platform/models/AutocompleteResultPlatformModelClass.swift +++ b/Sources/code/platform/models/AutocompleteResultPlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class AutocompleteResult: Codable { - public var display: String? - - public var customJson: [String: Any]? - public var action: AutocompleteAction? - public var logo: Media? + public var display: String? - public enum CodingKeys: String, CodingKey { - case display + public var logo: Media? - case customJson = "_custom_json" + public var customJson: [String: Any]? + public enum CodingKeys: String, CodingKey { case action + case display + case logo + + case customJson = "_custom_json" } public init(action: AutocompleteAction? = nil, display: String? = nil, logo: Media? = nil, customJson: [String: Any]? = nil) { - self.display = display - - self.customJson = customJson - self.action = action + self.display = display + self.logo = logo + + self.customJson = customJson } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - display = try container.decode(String.self, forKey: .display) + action = try container.decode(AutocompleteAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - action = try container.decode(AutocompleteAction.self, forKey: .action) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(display, forKey: .display) - - try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(display, forKey: .display) + try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(customJson, forKey: .customJson) } } } diff --git a/Sources/code/platform/models/BannerImagePlatformModelClass.swift b/Sources/code/platform/models/BannerImagePlatformModelClass.swift index aa1862d8de..9a9117ea09 100644 --- a/Sources/code/platform/models/BannerImagePlatformModelClass.swift +++ b/Sources/code/platform/models/BannerImagePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class BannerImage: Codable { - public var aspectRatio: String? - public var url: String? - public enum CodingKeys: String, CodingKey { - case aspectRatio = "aspect_ratio" + public var aspectRatio: String? + public enum CodingKeys: String, CodingKey { case url + + case aspectRatio = "aspect_ratio" } public init(aspectRatio: String? = nil, url: String? = nil) { - self.aspectRatio = aspectRatio - self.url = url + + self.aspectRatio = aspectRatio } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - aspectRatio = try container.decode(String.self, forKey: .aspectRatio) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + aspectRatio = try container.decode(String.self, forKey: .aspectRatio) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) - try? container.encodeIfPresent(url, forKey: .url) + + try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) } } } diff --git a/Sources/code/platform/models/BeneficiaryModeDetailsPlatformModelClass.swift b/Sources/code/platform/models/BeneficiaryModeDetailsPlatformModelClass.swift index 0cfe840409..94737c5568 100644 --- a/Sources/code/platform/models/BeneficiaryModeDetailsPlatformModelClass.swift +++ b/Sources/code/platform/models/BeneficiaryModeDetailsPlatformModelClass.swift @@ -8,83 +8,79 @@ public extension PlatformClient { */ class BeneficiaryModeDetails: Codable { - public var accountNo: String + public var comment: String? - public var branchName: String + public var vpa: String? - public var comment: String? + public var branchName: String public var address: String? - public var vpa: String? - public var accountHolder: String - public var email: String + public var bankName: String - public var ifscCode: String + public var email: String public var mobile: String public var wallet: String? - public var bankName: String + public var accountNo: String + + public var ifscCode: String public enum CodingKeys: String, CodingKey { - case accountNo = "account_no" + case comment - case branchName = "branch_name" + case vpa - case comment + case branchName = "branch_name" case address - case vpa - case accountHolder = "account_holder" - case email + case bankName = "bank_name" - case ifscCode = "ifsc_code" + case email case mobile case wallet - case bankName = "bank_name" + case accountNo = "account_no" + + case ifscCode = "ifsc_code" } public init(accountHolder: String, accountNo: String, address: String? = nil, bankName: String, branchName: String, comment: String? = nil, email: String, ifscCode: String, mobile: String, vpa: String? = nil, wallet: String? = nil) { - self.accountNo = accountNo + self.comment = comment - self.branchName = branchName + self.vpa = vpa - self.comment = comment + self.branchName = branchName self.address = address - self.vpa = vpa - self.accountHolder = accountHolder - self.email = email + self.bankName = bankName - self.ifscCode = ifscCode + self.email = email self.mobile = mobile self.wallet = wallet - self.bankName = bankName + self.accountNo = accountNo + + self.ifscCode = ifscCode } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - accountNo = try container.decode(String.self, forKey: .accountNo) - - branchName = try container.decode(String.self, forKey: .branchName) - do { comment = try container.decode(String.self, forKey: .comment) @@ -94,15 +90,17 @@ public extension PlatformClient { } catch {} do { - address = try container.decode(String.self, forKey: .address) + vpa = try container.decode(String.self, forKey: .vpa) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + branchName = try container.decode(String.self, forKey: .branchName) + do { - vpa = try container.decode(String.self, forKey: .vpa) + address = try container.decode(String.self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -111,9 +109,9 @@ public extension PlatformClient { accountHolder = try container.decode(String.self, forKey: .accountHolder) - email = try container.decode(String.self, forKey: .email) + bankName = try container.decode(String.self, forKey: .bankName) - ifscCode = try container.decode(String.self, forKey: .ifscCode) + email = try container.decode(String.self, forKey: .email) mobile = try container.decode(String.self, forKey: .mobile) @@ -125,33 +123,35 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - bankName = try container.decode(String.self, forKey: .bankName) + accountNo = try container.decode(String.self, forKey: .accountNo) + + ifscCode = try container.decode(String.self, forKey: .ifscCode) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(accountNo, forKey: .accountNo) + try? container.encodeIfPresent(comment, forKey: .comment) - try? container.encodeIfPresent(branchName, forKey: .branchName) + try? container.encode(vpa, forKey: .vpa) - try? container.encodeIfPresent(comment, forKey: .comment) + try? container.encodeIfPresent(branchName, forKey: .branchName) try? container.encodeIfPresent(address, forKey: .address) - try? container.encode(vpa, forKey: .vpa) - try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) - try? container.encodeIfPresent(email, forKey: .email) + try? container.encodeIfPresent(bankName, forKey: .bankName) - try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) + try? container.encodeIfPresent(email, forKey: .email) try? container.encodeIfPresent(mobile, forKey: .mobile) try? container.encode(wallet, forKey: .wallet) - try? container.encodeIfPresent(bankName, forKey: .bankName) + try? container.encodeIfPresent(accountNo, forKey: .accountNo) + + try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) } } } diff --git a/Sources/code/platform/models/BrandItemPlatformModelClass.swift b/Sources/code/platform/models/BrandItemPlatformModelClass.swift index efadebc453..d7222b0d74 100644 --- a/Sources/code/platform/models/BrandItemPlatformModelClass.swift +++ b/Sources/code/platform/models/BrandItemPlatformModelClass.swift @@ -10,54 +10,54 @@ public extension PlatformClient { class BrandItem: Codable { public var discount: String? - public var departments: [String]? + public var action: Action? public var slug: String? - public var uid: Int? + public var name: String? public var banners: ImageUrls? - public var name: String? - - public var action: Action? + public var uid: Int? public var logo: Media? + public var departments: [String]? + public enum CodingKeys: String, CodingKey { case discount - case departments + case action case slug - case uid + case name case banners - case name - - case action + case uid case logo + + case departments } public init(action: Action? = nil, banners: ImageUrls? = nil, departments: [String]? = nil, discount: String? = nil, logo: Media? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { self.discount = discount - self.departments = departments + self.action = action self.slug = slug - self.uid = uid + self.name = name self.banners = banners - self.name = name - - self.action = action + self.uid = uid self.logo = logo + + self.departments = departments } required public init(from decoder: Decoder) throws { @@ -72,7 +72,7 @@ public extension PlatformClient { } catch {} do { - departments = try container.decode([String].self, forKey: .departments) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -88,7 +88,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +104,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -112,7 +112,7 @@ public extension PlatformClient { } catch {} do { - action = try container.decode(Action.self, forKey: .action) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -120,7 +120,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + departments = try container.decode([String].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -133,19 +133,19 @@ public extension PlatformClient { try? container.encodeIfPresent(discount, forKey: .discount) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(action, forKey: .action) try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(name, forKey: .name) - - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(departments, forKey: .departments) } } } diff --git a/Sources/code/platform/models/BulkInventoryGetItemsPlatformModelClass.swift b/Sources/code/platform/models/BulkInventoryGetItemsPlatformModelClass.swift index 8c8000690e..12a8777674 100644 --- a/Sources/code/platform/models/BulkInventoryGetItemsPlatformModelClass.swift +++ b/Sources/code/platform/models/BulkInventoryGetItemsPlatformModelClass.swift @@ -8,105 +8,105 @@ public extension PlatformClient { */ class BulkInventoryGetItems: Codable { - public var companyId: Int? + public var cancelled: Int? - public var createdBy: [String: Any]? + public var failedRecords: [String]? - public var modifiedOn: String? + public var id: String? - public var filePath: String? + public var createdBy: [String: Any]? - public var total: Int? + public var failed: Int? - public var createdOn: String? + public var total: Int? - public var cancelled: Int? + public var succeed: Int? - public var id: String? + public var cancelledRecords: [String]? - public var succeed: Int? + public var filePath: String? public var modifiedBy: [String: Any]? - public var failedRecords: [String]? + public var companyId: Int? - public var failed: Int? + public var modifiedOn: String? public var isActive: Bool? - public var stage: String? + public var createdOn: String? - public var cancelledRecords: [String]? + public var stage: String? public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + case cancelled - case createdBy = "created_by" + case failedRecords = "failed_records" - case modifiedOn = "modified_on" + case id - case filePath = "file_path" + case createdBy = "created_by" - case total + case failed - case createdOn = "created_on" + case total - case cancelled + case succeed - case id + case cancelledRecords = "cancelled_records" - case succeed + case filePath = "file_path" case modifiedBy = "modified_by" - case failedRecords = "failed_records" + case companyId = "company_id" - case failed + case modifiedOn = "modified_on" case isActive = "is_active" - case stage + case createdOn = "created_on" - case cancelledRecords = "cancelled_records" + case stage } public init(cancelled: Int? = nil, cancelledRecords: [String]? = nil, companyId: Int? = nil, createdBy: [String: Any]? = nil, createdOn: String? = nil, failed: Int? = nil, failedRecords: [String]? = nil, filePath: String? = nil, id: String? = nil, isActive: Bool? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, stage: String? = nil, succeed: Int? = nil, total: Int? = nil) { - self.companyId = companyId + self.cancelled = cancelled - self.createdBy = createdBy + self.failedRecords = failedRecords - self.modifiedOn = modifiedOn + self.id = id - self.filePath = filePath + self.createdBy = createdBy - self.total = total + self.failed = failed - self.createdOn = createdOn + self.total = total - self.cancelled = cancelled + self.succeed = succeed - self.id = id + self.cancelledRecords = cancelledRecords - self.succeed = succeed + self.filePath = filePath self.modifiedBy = modifiedBy - self.failedRecords = failedRecords + self.companyId = companyId - self.failed = failed + self.modifiedOn = modifiedOn self.isActive = isActive - self.stage = stage + self.createdOn = createdOn - self.cancelledRecords = cancelledRecords + self.stage = stage } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - companyId = try container.decode(Int.self, forKey: .companyId) + cancelled = try container.decode(Int.self, forKey: .cancelled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +114,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + failedRecords = try container.decode([String].self, forKey: .failedRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension PlatformClient { } catch {} do { - filePath = try container.decode(String.self, forKey: .filePath) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - total = try container.decode(Int.self, forKey: .total) + failed = try container.decode(Int.self, forKey: .failed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + total = try container.decode(Int.self, forKey: .total) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ public extension PlatformClient { } catch {} do { - cancelled = try container.decode(Int.self, forKey: .cancelled) + succeed = try container.decode(Int.self, forKey: .succeed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +170,7 @@ public extension PlatformClient { } catch {} do { - succeed = try container.decode(Int.self, forKey: .succeed) + filePath = try container.decode(String.self, forKey: .filePath) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,7 +186,7 @@ public extension PlatformClient { } catch {} do { - failedRecords = try container.decode([String].self, forKey: .failedRecords) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +194,7 @@ public extension PlatformClient { } catch {} do { - failed = try container.decode(Int.self, forKey: .failed) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -210,7 +210,7 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +218,7 @@ public extension PlatformClient { } catch {} do { - cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -229,35 +229,35 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(cancelled, forKey: .cancelled) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(filePath, forKey: .filePath) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(total, forKey: .total) + try? container.encodeIfPresent(failed, forKey: .failed) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(total, forKey: .total) - try? container.encodeIfPresent(cancelled, forKey: .cancelled) + try? container.encodeIfPresent(succeed, forKey: .succeed) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) - try? container.encodeIfPresent(succeed, forKey: .succeed) + try? container.encodeIfPresent(filePath, forKey: .filePath) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(failed, forKey: .failed) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) + try? container.encodeIfPresent(stage, forKey: .stage) } } } diff --git a/Sources/code/platform/models/BulkJobPlatformModelClass.swift b/Sources/code/platform/models/BulkJobPlatformModelClass.swift index 42c332db30..303a879371 100644 --- a/Sources/code/platform/models/BulkJobPlatformModelClass.swift +++ b/Sources/code/platform/models/BulkJobPlatformModelClass.swift @@ -8,119 +8,117 @@ public extension PlatformClient { */ class BulkJob: Codable { - public var companyId: Int + public var cancelled: Int? - public var createdBy: UserInfo1? + public var failedRecords: [[String: Any]]? - public var modifiedOn: String? + public var trackingUrl: String? + + public var createdBy: UserInfo1? public var total: Int - public var filePath: String? + public var failed: Int? - public var createdOn: String + public var customTemplateTag: String? public var succeed: Int? - public var cancelled: Int? + public var cancelledRecords: [[String: Any]]? - public var templateTag: String? + public var filePath: String? public var modifiedBy: UserInfo1? - public var trackingUrl: String? + public var companyId: Int - public var failedRecords: [[String: Any]]? + public var modifiedOn: String? - public var failed: Int? + public var templateTag: String? public var isActive: Bool? + public var createdOn: String + public var stage: String? - public var customTemplateTag: String? + public enum CodingKeys: String, CodingKey { + case cancelled - public var cancelledRecords: [[String: Any]]? + case failedRecords = "failed_records" - public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + case trackingUrl = "tracking_url" case createdBy = "created_by" - case modifiedOn = "modified_on" - case total - case filePath = "file_path" + case failed - case createdOn = "created_on" + case customTemplateTag = "custom_template_tag" case succeed - case cancelled + case cancelledRecords = "cancelled_records" - case templateTag = "template_tag" + case filePath = "file_path" case modifiedBy = "modified_by" - case trackingUrl = "tracking_url" + case companyId = "company_id" - case failedRecords = "failed_records" + case modifiedOn = "modified_on" - case failed + case templateTag = "template_tag" case isActive = "is_active" - case stage - - case customTemplateTag = "custom_template_tag" + case createdOn = "created_on" - case cancelledRecords = "cancelled_records" + case stage } public init(cancelled: Int? = nil, cancelledRecords: [[String: Any]]? = nil, companyId: Int, createdBy: UserInfo1? = nil, createdOn: String, customTemplateTag: String? = nil, failed: Int? = nil, failedRecords: [[String: Any]]? = nil, filePath: String? = nil, isActive: Bool? = nil, modifiedBy: UserInfo1? = nil, modifiedOn: String? = nil, stage: String? = nil, succeed: Int? = nil, templateTag: String? = nil, total: Int, trackingUrl: String? = nil) { - self.companyId = companyId + self.cancelled = cancelled - self.createdBy = createdBy + self.failedRecords = failedRecords - self.modifiedOn = modifiedOn + self.trackingUrl = trackingUrl + + self.createdBy = createdBy self.total = total - self.filePath = filePath + self.failed = failed - self.createdOn = createdOn + self.customTemplateTag = customTemplateTag self.succeed = succeed - self.cancelled = cancelled + self.cancelledRecords = cancelledRecords - self.templateTag = templateTag + self.filePath = filePath self.modifiedBy = modifiedBy - self.trackingUrl = trackingUrl + self.companyId = companyId - self.failedRecords = failedRecords + self.modifiedOn = modifiedOn - self.failed = failed + self.templateTag = templateTag self.isActive = isActive - self.stage = stage - - self.customTemplateTag = customTemplateTag + self.createdOn = createdOn - self.cancelledRecords = cancelledRecords + self.stage = stage } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - companyId = try container.decode(Int.self, forKey: .companyId) - do { - createdBy = try container.decode(UserInfo1.self, forKey: .createdBy) + cancelled = try container.decode(Int.self, forKey: .cancelled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,35 +126,33 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + failedRecords = try container.decode([[String: Any]].self, forKey: .failedRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - total = try container.decode(Int.self, forKey: .total) - do { - filePath = try container.decode(String.self, forKey: .filePath) + trackingUrl = try container.decode(String.self, forKey: .trackingUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - createdOn = try container.decode(String.self, forKey: .createdOn) - do { - succeed = try container.decode(Int.self, forKey: .succeed) + createdBy = try container.decode(UserInfo1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + total = try container.decode(Int.self, forKey: .total) + do { - cancelled = try container.decode(Int.self, forKey: .cancelled) + failed = try container.decode(Int.self, forKey: .failed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -164,7 +160,7 @@ public extension PlatformClient { } catch {} do { - templateTag = try container.decode(String.self, forKey: .templateTag) + customTemplateTag = try container.decode(String.self, forKey: .customTemplateTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -172,7 +168,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserInfo1.self, forKey: .modifiedBy) + succeed = try container.decode(Int.self, forKey: .succeed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -180,7 +176,7 @@ public extension PlatformClient { } catch {} do { - trackingUrl = try container.decode(String.self, forKey: .trackingUrl) + cancelledRecords = try container.decode([[String: Any]].self, forKey: .cancelledRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -188,7 +184,7 @@ public extension PlatformClient { } catch {} do { - failedRecords = try container.decode([[String: Any]].self, forKey: .failedRecords) + filePath = try container.decode(String.self, forKey: .filePath) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -196,15 +192,17 @@ public extension PlatformClient { } catch {} do { - failed = try container.decode(Int.self, forKey: .failed) + modifiedBy = try container.decode(UserInfo1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + companyId = try container.decode(Int.self, forKey: .companyId) + do { - isActive = try container.decode(Bool.self, forKey: .isActive) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -212,7 +210,7 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + templateTag = try container.decode(String.self, forKey: .templateTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -220,15 +218,17 @@ public extension PlatformClient { } catch {} do { - customTemplateTag = try container.decode(String.self, forKey: .customTemplateTag) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + createdOn = try container.decode(String.self, forKey: .createdOn) + do { - cancelledRecords = try container.decode([[String: Any]].self, forKey: .cancelledRecords) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -239,39 +239,39 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(cancelled, forKey: .cancelled) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(trackingUrl, forKey: .trackingUrl) + + try? container.encodeIfPresent(createdBy, forKey: .createdBy) try? container.encodeIfPresent(total, forKey: .total) - try? container.encodeIfPresent(filePath, forKey: .filePath) + try? container.encodeIfPresent(failed, forKey: .failed) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(customTemplateTag, forKey: .customTemplateTag) try? container.encodeIfPresent(succeed, forKey: .succeed) - try? container.encodeIfPresent(cancelled, forKey: .cancelled) + try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) - try? container.encodeIfPresent(templateTag, forKey: .templateTag) + try? container.encodeIfPresent(filePath, forKey: .filePath) try? container.encode(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(trackingUrl, forKey: .trackingUrl) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(failed, forKey: .failed) + try? container.encodeIfPresent(templateTag, forKey: .templateTag) try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(stage, forKey: .stage) - - try? container.encodeIfPresent(customTemplateTag, forKey: .customTemplateTag) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) + try? container.encodeIfPresent(stage, forKey: .stage) } } } diff --git a/Sources/code/platform/models/BulkProductRequestPlatformModelClass.swift b/Sources/code/platform/models/BulkProductRequestPlatformModelClass.swift index daa22eb006..2fbc9a5cb1 100644 --- a/Sources/code/platform/models/BulkProductRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/BulkProductRequestPlatformModelClass.swift @@ -8,29 +8,29 @@ public extension PlatformClient { */ class BulkProductRequest: Codable { - public var companyId: Int - public var data: [[String: Any]] + public var companyId: Int + public var batchId: String public var templateTag: String public enum CodingKeys: String, CodingKey { - case companyId = "company_id" - case data + case companyId = "company_id" + case batchId = "batch_id" case templateTag = "template_tag" } public init(batchId: String, companyId: Int, data: [[String: Any]], templateTag: String) { - self.companyId = companyId - self.data = data + self.companyId = companyId + self.batchId = batchId self.templateTag = templateTag @@ -39,10 +39,10 @@ public extension PlatformClient { required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - companyId = try container.decode(Int.self, forKey: .companyId) - data = try container.decode([[String: Any]].self, forKey: .data) + companyId = try container.decode(Int.self, forKey: .companyId) + batchId = try container.decode(String.self, forKey: .batchId) templateTag = try container.decode(String.self, forKey: .templateTag) @@ -51,10 +51,10 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(data, forKey: .data) + try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(batchId, forKey: .batchId) try? container.encodeIfPresent(templateTag, forKey: .templateTag) diff --git a/Sources/code/platform/models/BulkResponsePlatformModelClass.swift b/Sources/code/platform/models/BulkResponsePlatformModelClass.swift index 72e5798925..932ef3b254 100644 --- a/Sources/code/platform/models/BulkResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/BulkResponsePlatformModelClass.swift @@ -10,42 +10,42 @@ public extension PlatformClient { class BulkResponse: Codable { public var createdBy: UserInfo1? - public var modifiedOn: String? + public var modifiedBy: UserInfo1? - public var createdOn: String + public var modifiedOn: String? - public var modifiedBy: UserInfo1? + public var batchId: String public var isActive: Bool? - public var batchId: String + public var createdOn: String public enum CodingKeys: String, CodingKey { case createdBy = "created_by" - case modifiedOn = "modified_on" + case modifiedBy = "modified_by" - case createdOn = "created_on" + case modifiedOn = "modified_on" - case modifiedBy = "modified_by" + case batchId = "batch_id" case isActive = "is_active" - case batchId = "batch_id" + case createdOn = "created_on" } public init(batchId: String, createdBy: UserInfo1? = nil, createdOn: String, isActive: Bool? = nil, modifiedBy: UserInfo1? = nil, modifiedOn: String? = nil) { self.createdBy = createdBy - self.modifiedOn = modifiedOn + self.modifiedBy = modifiedBy - self.createdOn = createdOn + self.modifiedOn = modifiedOn - self.modifiedBy = modifiedBy + self.batchId = batchId self.isActive = isActive - self.batchId = batchId + self.createdOn = createdOn } required public init(from decoder: Decoder) throws { @@ -60,23 +60,23 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + modifiedBy = try container.decode(UserInfo1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - createdOn = try container.decode(String.self, forKey: .createdOn) - do { - modifiedBy = try container.decode(UserInfo1.self, forKey: .modifiedBy) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + batchId = try container.decode(String.self, forKey: .batchId) + do { isActive = try container.decode(Bool.self, forKey: .isActive) @@ -85,7 +85,7 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - batchId = try container.decode(String.self, forKey: .batchId) + createdOn = try container.decode(String.self, forKey: .createdOn) } public func encode(to encoder: Encoder) throws { @@ -93,15 +93,15 @@ public extension PlatformClient { try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encode(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encode(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(batchId, forKey: .batchId) try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(batchId, forKey: .batchId) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) } } } diff --git a/Sources/code/platform/models/CatalogInsightBrandPlatformModelClass.swift b/Sources/code/platform/models/CatalogInsightBrandPlatformModelClass.swift index c5e1522a80..f754c27699 100644 --- a/Sources/code/platform/models/CatalogInsightBrandPlatformModelClass.swift +++ b/Sources/code/platform/models/CatalogInsightBrandPlatformModelClass.swift @@ -8,51 +8,51 @@ public extension PlatformClient { */ class CatalogInsightBrand: Codable { - public var totalArticles: Int? - public var articleFreshness: Int? - public var availableArticles: Int? - public var totalSizes: Int? + public var name: String? + + public var availableArticles: Int? + public var availableSizes: Int? - public var name: String? + public var totalArticles: Int? public enum CodingKeys: String, CodingKey { - case totalArticles = "total_articles" - case articleFreshness = "article_freshness" - case availableArticles = "available_articles" - case totalSizes = "total_sizes" + case name + + case availableArticles = "available_articles" + case availableSizes = "available_sizes" - case name + case totalArticles = "total_articles" } public init(articleFreshness: Int? = nil, availableArticles: Int? = nil, availableSizes: Int? = nil, name: String? = nil, totalArticles: Int? = nil, totalSizes: Int? = nil) { - self.totalArticles = totalArticles - self.articleFreshness = articleFreshness - self.availableArticles = availableArticles - self.totalSizes = totalSizes + self.name = name + + self.availableArticles = availableArticles + self.availableSizes = availableSizes - self.name = name + self.totalArticles = totalArticles } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - totalArticles = try container.decode(Int.self, forKey: .totalArticles) + articleFreshness = try container.decode(Int.self, forKey: .articleFreshness) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,7 +60,7 @@ public extension PlatformClient { } catch {} do { - articleFreshness = try container.decode(Int.self, forKey: .articleFreshness) + totalSizes = try container.decode(Int.self, forKey: .totalSizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ public extension PlatformClient { } catch {} do { - availableArticles = try container.decode(Int.self, forKey: .availableArticles) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -76,7 +76,7 @@ public extension PlatformClient { } catch {} do { - totalSizes = try container.decode(Int.self, forKey: .totalSizes) + availableArticles = try container.decode(Int.self, forKey: .availableArticles) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +92,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + totalArticles = try container.decode(Int.self, forKey: .totalArticles) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -103,17 +103,17 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(totalArticles, forKey: .totalArticles) - try? container.encodeIfPresent(articleFreshness, forKey: .articleFreshness) - try? container.encodeIfPresent(availableArticles, forKey: .availableArticles) - try? container.encodeIfPresent(totalSizes, forKey: .totalSizes) + try? container.encodeIfPresent(name, forKey: .name) + + try? container.encodeIfPresent(availableArticles, forKey: .availableArticles) + try? container.encodeIfPresent(availableSizes, forKey: .availableSizes) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(totalArticles, forKey: .totalArticles) } } } diff --git a/Sources/code/platform/models/CatalogInsightItemPlatformModelClass.swift b/Sources/code/platform/models/CatalogInsightItemPlatformModelClass.swift index 6e6cf4b99b..79d8e16ae8 100644 --- a/Sources/code/platform/models/CatalogInsightItemPlatformModelClass.swift +++ b/Sources/code/platform/models/CatalogInsightItemPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class CatalogInsightItem: Codable { - public var count: Int? + public var outOfStockCount: Int? public var sellableCount: Int? - public var outOfStockCount: Int? + public var count: Int? public enum CodingKeys: String, CodingKey { - case count + case outOfStockCount = "out_of_stock_count" case sellableCount = "sellable_count" - case outOfStockCount = "out_of_stock_count" + case count } public init(count: Int? = nil, outOfStockCount: Int? = nil, sellableCount: Int? = nil) { - self.count = count + self.outOfStockCount = outOfStockCount self.sellableCount = sellableCount - self.outOfStockCount = outOfStockCount + self.count = count } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - count = try container.decode(Int.self, forKey: .count) + outOfStockCount = try container.decode(Int.self, forKey: .outOfStockCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - outOfStockCount = try container.decode(Int.self, forKey: .outOfStockCount) + count = try container.decode(Int.self, forKey: .count) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(count, forKey: .count) + try? container.encodeIfPresent(outOfStockCount, forKey: .outOfStockCount) try? container.encodeIfPresent(sellableCount, forKey: .sellableCount) - try? container.encodeIfPresent(outOfStockCount, forKey: .outOfStockCount) + try? container.encodeIfPresent(count, forKey: .count) } } } diff --git a/Sources/code/platform/models/CatalogInsightResponsePlatformModelClass.swift b/Sources/code/platform/models/CatalogInsightResponsePlatformModelClass.swift index fcfc273f8a..ecc386964d 100644 --- a/Sources/code/platform/models/CatalogInsightResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/CatalogInsightResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class CatalogInsightResponse: Codable { - public var item: CatalogInsightItem? - public var brandDistribution: CatalogInsightBrand? - public enum CodingKeys: String, CodingKey { - case item + public var item: CatalogInsightItem? + public enum CodingKeys: String, CodingKey { case brandDistribution = "brand_distribution" + + case item } public init(brandDistribution: CatalogInsightBrand? = nil, item: CatalogInsightItem? = nil) { - self.item = item - self.brandDistribution = brandDistribution + + self.item = item } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - item = try container.decode(CatalogInsightItem.self, forKey: .item) + brandDistribution = try container.decode(CatalogInsightBrand.self, forKey: .brandDistribution) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - brandDistribution = try container.decode(CatalogInsightBrand.self, forKey: .brandDistribution) + item = try container.decode(CatalogInsightItem.self, forKey: .item) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(item, forKey: .item) - try? container.encodeIfPresent(brandDistribution, forKey: .brandDistribution) + + try? container.encodeIfPresent(item, forKey: .item) } } } diff --git a/Sources/code/platform/models/CategoryItemsPlatformModelClass.swift b/Sources/code/platform/models/CategoryItemsPlatformModelClass.swift index b16464de4a..9ee1a0289c 100644 --- a/Sources/code/platform/models/CategoryItemsPlatformModelClass.swift +++ b/Sources/code/platform/models/CategoryItemsPlatformModelClass.swift @@ -8,42 +8,42 @@ public extension PlatformClient { */ class CategoryItems: Codable { + public var action: Action? + public var slug: String? - public var uid: Int? + public var name: String? public var banners: ImageUrls? - public var name: String? - - public var action: Action? + public var uid: Int? public var childs: [Child]? public enum CodingKeys: String, CodingKey { + case action + case slug - case uid + case name case banners - case name - - case action + case uid case childs } public init(action: Action? = nil, banners: ImageUrls? = nil, childs: [Child]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { + self.action = action + self.slug = slug - self.uid = uid + self.name = name self.banners = banners - self.name = name - - self.action = action + self.uid = uid self.childs = childs } @@ -52,7 +52,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - slug = try container.decode(String.self, forKey: .slug) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,7 +60,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ public extension PlatformClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -76,7 +76,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,7 +84,7 @@ public extension PlatformClient { } catch {} do { - action = try container.decode(Action.self, forKey: .action) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -103,15 +103,15 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(name, forKey: .name) - - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(childs, forKey: .childs) } diff --git a/Sources/code/platform/models/CategoryMappingPlatformModelClass.swift b/Sources/code/platform/models/CategoryMappingPlatformModelClass.swift index a82e924762..a05368cd09 100644 --- a/Sources/code/platform/models/CategoryMappingPlatformModelClass.swift +++ b/Sources/code/platform/models/CategoryMappingPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class CategoryMapping: Codable { - public var google: CategoryMappingValues? - public var ajio: CategoryMappingValues? public var facebook: CategoryMappingValues? - public enum CodingKeys: String, CodingKey { - case google + public var google: CategoryMappingValues? + public enum CodingKeys: String, CodingKey { case ajio case facebook + + case google } public init(ajio: CategoryMappingValues? = nil, facebook: CategoryMappingValues? = nil, google: CategoryMappingValues? = nil) { - self.google = google - self.ajio = ajio self.facebook = facebook + + self.google = google } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - google = try container.decode(CategoryMappingValues.self, forKey: .google) + ajio = try container.decode(CategoryMappingValues.self, forKey: .ajio) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - ajio = try container.decode(CategoryMappingValues.self, forKey: .ajio) + facebook = try container.decode(CategoryMappingValues.self, forKey: .facebook) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - facebook = try container.decode(CategoryMappingValues.self, forKey: .facebook) + google = try container.decode(CategoryMappingValues.self, forKey: .google) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(google, forKey: .google) - try? container.encodeIfPresent(ajio, forKey: .ajio) try? container.encodeIfPresent(facebook, forKey: .facebook) + + try? container.encodeIfPresent(google, forKey: .google) } } } diff --git a/Sources/code/platform/models/CategoryPlatformModelClass.swift b/Sources/code/platform/models/CategoryPlatformModelClass.swift index 63b059cdba..d638a752f1 100644 --- a/Sources/code/platform/models/CategoryPlatformModelClass.swift +++ b/Sources/code/platform/models/CategoryPlatformModelClass.swift @@ -10,108 +10,108 @@ public extension PlatformClient { class Category: Codable { public var media: Media2? - public var tryouts: [String]? + public var departments: [Int] + + public var id: String? + + public var slug: String? + + public var name: String public var priority: Int? public var createdBy: [String: Any]? - public var modifiedOn: String? + public var marketplaces: CategoryMapping? - public var createdOn: String? + public var synonyms: [String]? public var modifiedBy: [String: Any]? - public var departments: [Int] + public var modifiedOn: String? - public var slug: String? + public var isActive: Bool public var uid: Int? - public var hierarchy: [Hierarchy]? + public var createdOn: String? - public var marketplaces: CategoryMapping? + public var level: Int - public var synonyms: [String]? + public var tryouts: [String]? - public var isActive: Bool + public var hierarchy: [Hierarchy]? - public var id: String? + public enum CodingKeys: String, CodingKey { + case media - public var level: Int + case departments - public var name: String + case id = "_id" - public enum CodingKeys: String, CodingKey { - case media + case slug - case tryouts + case name case priority case createdBy = "created_by" - case modifiedOn = "modified_on" + case marketplaces - case createdOn = "created_on" + case synonyms case modifiedBy = "modified_by" - case departments + case modifiedOn = "modified_on" - case slug + case isActive = "is_active" case uid - case hierarchy - - case marketplaces - - case synonyms - - case isActive = "is_active" - - case id = "_id" + case createdOn = "created_on" case level - case name + case tryouts + + case hierarchy } public init(createdBy: [String: Any]? = nil, createdOn: String? = nil, departments: [Int], hierarchy: [Hierarchy]? = nil, isActive: Bool, level: Int, marketplaces: CategoryMapping? = nil, media: Media2? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String, priority: Int? = nil, slug: String? = nil, synonyms: [String]? = nil, tryouts: [String]? = nil, uid: Int? = nil, id: String? = nil) { self.media = media - self.tryouts = tryouts + self.departments = departments + + self.id = id + + self.slug = slug + + self.name = name self.priority = priority self.createdBy = createdBy - self.modifiedOn = modifiedOn + self.marketplaces = marketplaces - self.createdOn = createdOn + self.synonyms = synonyms self.modifiedBy = modifiedBy - self.departments = departments + self.modifiedOn = modifiedOn - self.slug = slug + self.isActive = isActive self.uid = uid - self.hierarchy = hierarchy - - self.marketplaces = marketplaces - - self.synonyms = synonyms - - self.isActive = isActive - - self.id = id + self.createdOn = createdOn self.level = level - self.name = name + self.tryouts = tryouts + + self.hierarchy = hierarchy } required public init(from decoder: Decoder) throws { @@ -125,8 +125,10 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + departments = try container.decode([Int].self, forKey: .departments) + do { - tryouts = try container.decode([String].self, forKey: .tryouts) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,15 +136,17 @@ public extension PlatformClient { } catch {} do { - priority = try container.decode(Int.self, forKey: .priority) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + priority = try container.decode(Int.self, forKey: .priority) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +154,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +162,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + marketplaces = try container.decode(CategoryMapping.self, forKey: .marketplaces) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,17 +170,15 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) + synonyms = try container.decode([String].self, forKey: .synonyms) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - departments = try container.decode([Int].self, forKey: .departments) - do { - slug = try container.decode(String.self, forKey: .slug) + modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -184,15 +186,17 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + isActive = try container.decode(Bool.self, forKey: .isActive) + do { - hierarchy = try container.decode([Hierarchy].self, forKey: .hierarchy) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -200,34 +204,30 @@ public extension PlatformClient { } catch {} do { - marketplaces = try container.decode(CategoryMapping.self, forKey: .marketplaces) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + level = try container.decode(Int.self, forKey: .level) + do { - synonyms = try container.decode([String].self, forKey: .synonyms) + tryouts = try container.decode([String].self, forKey: .tryouts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - isActive = try container.decode(Bool.self, forKey: .isActive) - do { - id = try container.decode(String.self, forKey: .id) + hierarchy = try container.decode([Hierarchy].self, forKey: .hierarchy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - level = try container.decode(Int.self, forKey: .level) - - name = try container.decode(String.self, forKey: .name) } public func encode(to encoder: Encoder) throws { @@ -235,37 +235,37 @@ public extension PlatformClient { try? container.encodeIfPresent(media, forKey: .media) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) + try? container.encodeIfPresent(departments, forKey: .departments) + + try? container.encodeIfPresent(id, forKey: .id) + + try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(priority, forKey: .priority) try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(marketplaces, forKey: .marketplaces) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(synonyms, forKey: .synonyms) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(hierarchy, forKey: .hierarchy) - - try? container.encodeIfPresent(marketplaces, forKey: .marketplaces) - - try? container.encodeIfPresent(synonyms, forKey: .synonyms) - - try? container.encodeIfPresent(isActive, forKey: .isActive) - - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) try? container.encodeIfPresent(level, forKey: .level) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(tryouts, forKey: .tryouts) + + try? container.encodeIfPresent(hierarchy, forKey: .hierarchy) } } } diff --git a/Sources/code/platform/models/CategoryRequestBodyPlatformModelClass.swift b/Sources/code/platform/models/CategoryRequestBodyPlatformModelClass.swift index 0cf448233a..73735e95a8 100644 --- a/Sources/code/platform/models/CategoryRequestBodyPlatformModelClass.swift +++ b/Sources/code/platform/models/CategoryRequestBodyPlatformModelClass.swift @@ -10,15 +10,11 @@ public extension PlatformClient { class CategoryRequestBody: Codable { public var media: Media2? - public var tryouts: [String]? - - public var priority: Int? - public var departments: [Int] public var slug: String? - public var hierarchy: [Hierarchy]? + public var name: String public var marketplaces: CategoryMapping? @@ -28,20 +24,20 @@ public extension PlatformClient { public var level: Int - public var name: String + public var priority: Int? - public enum CodingKeys: String, CodingKey { - case media + public var tryouts: [String]? - case tryouts + public var hierarchy: [Hierarchy]? - case priority + public enum CodingKeys: String, CodingKey { + case media case departments case slug - case hierarchy + case name case marketplaces @@ -51,21 +47,21 @@ public extension PlatformClient { case level - case name + case priority + + case tryouts + + case hierarchy } public init(departments: [Int], hierarchy: [Hierarchy]? = nil, isActive: Bool, level: Int, marketplaces: CategoryMapping? = nil, media: Media2? = nil, name: String, priority: Int? = nil, slug: String? = nil, synonyms: [String]? = nil, tryouts: [String]? = nil) { self.media = media - self.tryouts = tryouts - - self.priority = priority - self.departments = departments self.slug = slug - self.hierarchy = hierarchy + self.name = name self.marketplaces = marketplaces @@ -75,7 +71,11 @@ public extension PlatformClient { self.level = level - self.name = name + self.priority = priority + + self.tryouts = tryouts + + self.hierarchy = hierarchy } required public init(from decoder: Decoder) throws { @@ -89,34 +89,40 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + departments = try container.decode([Int].self, forKey: .departments) + do { - tryouts = try container.decode([String].self, forKey: .tryouts) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + do { - priority = try container.decode(Int.self, forKey: .priority) + marketplaces = try container.decode(CategoryMapping.self, forKey: .marketplaces) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - departments = try container.decode([Int].self, forKey: .departments) - do { - slug = try container.decode(String.self, forKey: .slug) + synonyms = try container.decode([String].self, forKey: .synonyms) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + isActive = try container.decode(Bool.self, forKey: .isActive) + + level = try container.decode(Int.self, forKey: .level) + do { - hierarchy = try container.decode([Hierarchy].self, forKey: .hierarchy) + priority = try container.decode(Int.self, forKey: .priority) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -124,7 +130,7 @@ public extension PlatformClient { } catch {} do { - marketplaces = try container.decode(CategoryMapping.self, forKey: .marketplaces) + tryouts = try container.decode([String].self, forKey: .tryouts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -132,18 +138,12 @@ public extension PlatformClient { } catch {} do { - synonyms = try container.decode([String].self, forKey: .synonyms) + hierarchy = try container.decode([Hierarchy].self, forKey: .hierarchy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - isActive = try container.decode(Bool.self, forKey: .isActive) - - level = try container.decode(Int.self, forKey: .level) - - name = try container.decode(String.self, forKey: .name) } public func encode(to encoder: Encoder) throws { @@ -151,15 +151,11 @@ public extension PlatformClient { try? container.encodeIfPresent(media, forKey: .media) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) - - try? container.encodeIfPresent(priority, forKey: .priority) - try? container.encodeIfPresent(departments, forKey: .departments) try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(hierarchy, forKey: .hierarchy) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(marketplaces, forKey: .marketplaces) @@ -169,7 +165,11 @@ public extension PlatformClient { try? container.encodeIfPresent(level, forKey: .level) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(priority, forKey: .priority) + + try? container.encodeIfPresent(tryouts, forKey: .tryouts) + + try? container.encodeIfPresent(hierarchy, forKey: .hierarchy) } } } diff --git a/Sources/code/platform/models/CategoryUpdateResponsePlatformModelClass.swift b/Sources/code/platform/models/CategoryUpdateResponsePlatformModelClass.swift index 4c1228bebf..ef42b0890f 100644 --- a/Sources/code/platform/models/CategoryUpdateResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/CategoryUpdateResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class CategoryUpdateResponse: Codable { - public var message: String? - public var success: Bool? - public enum CodingKeys: String, CodingKey { - case message + public var message: String? + public enum CodingKeys: String, CodingKey { case success + + case message } public init(message: String? = nil, success: Bool? = nil) { - self.message = message - self.success = success + + self.message = message } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - message = try container.decode(String.self, forKey: .message) + success = try container.decode(Bool.self, forKey: .success) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - success = try container.decode(Bool.self, forKey: .success) + message = try container.decode(String.self, forKey: .message) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(success, forKey: .success) + + try? container.encodeIfPresent(message, forKey: .message) } } } diff --git a/Sources/code/platform/models/ChildPlatformModelClass.swift b/Sources/code/platform/models/ChildPlatformModelClass.swift index f576339fcf..9fd8942e52 100644 --- a/Sources/code/platform/models/ChildPlatformModelClass.swift +++ b/Sources/code/platform/models/ChildPlatformModelClass.swift @@ -8,48 +8,48 @@ public extension PlatformClient { */ class Child: Codable { - public var customJson: [String: Any]? + public var action: Action? public var slug: String? - public var uid: Int? + public var name: String? public var banners: ImageUrls? - public var name: String? + public var uid: Int? - public var action: Action? + public var customJson: [String: Any]? public var childs: [SecondLevelChild]? public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + case action case slug - case uid + case name case banners - case name + case uid - case action + case customJson = "_custom_json" case childs } public init(action: Action? = nil, banners: ImageUrls? = nil, childs: [SecondLevelChild]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { - self.customJson = customJson + self.action = action self.slug = slug - self.uid = uid + self.name = name self.banners = banners - self.name = name + self.uid = uid - self.action = action + self.customJson = customJson self.childs = childs } @@ -58,7 +58,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +74,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} do { - action = try container.decode(Action.self, forKey: .action) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -117,17 +117,17 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(action, forKey: .action) try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encodeIfPresent(childs, forKey: .childs) } diff --git a/Sources/code/platform/models/CollectionCreateResponsePlatformModelClass.swift b/Sources/code/platform/models/CollectionCreateResponsePlatformModelClass.swift index 685b73d047..f36e1093c0 100644 --- a/Sources/code/platform/models/CollectionCreateResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/CollectionCreateResponsePlatformModelClass.swift @@ -8,117 +8,117 @@ public extension PlatformClient { */ class CollectionCreateResponse: Codable { - public var allowSort: Bool? - - public var appId: String? - public var tag: [String]? - public var visibleFacetsKeys: [String]? + public var description: String? + + public var badge: [String: Any]? public var slug: String? - public var cron: [String: Any]? + public var meta: [String: Any]? - public var type: String? + public var query: [String: Any]? - public var meta: [String: Any]? + public var allowSort: Bool? - public var allowFacets: Bool? + public var name: String? - public var banners: ImageUrls? + public var cron: [String: Any]? - public var isActive: Bool? + public var banners: ImageUrls? public var schedule: [String: Any]? - public var description: String? + public var allowFacets: Bool? - public var badge: [String: Any]? + public var visibleFacetsKeys: [String]? - public var query: [String: Any]? + public var isActive: Bool? - public var name: String? + public var appId: String? public var logo: BannerImage? - public enum CodingKeys: String, CodingKey { - case allowSort = "allow_sort" - - case appId = "app_id" + public var type: String? + public enum CodingKeys: String, CodingKey { case tag - case visibleFacetsKeys = "visible_facets_keys" + case description + + case badge case slug - case cron + case meta - case type + case query - case meta + case allowSort = "allow_sort" - case allowFacets = "allow_facets" + case name - case banners + case cron - case isActive = "is_active" + case banners case schedule = "_schedule" - case description + case allowFacets = "allow_facets" - case badge + case visibleFacetsKeys = "visible_facets_keys" - case query + case isActive = "is_active" - case name + case appId = "app_id" case logo + + case type } public init(allowFacets: Bool? = nil, allowSort: Bool? = nil, appId: String? = nil, badge: [String: Any]? = nil, banners: ImageUrls? = nil, cron: [String: Any]? = nil, description: String? = nil, isActive: Bool? = nil, logo: BannerImage? = nil, meta: [String: Any]? = nil, name: String? = nil, query: [String: Any]? = nil, slug: String? = nil, tag: [String]? = nil, type: String? = nil, visibleFacetsKeys: [String]? = nil, schedule: [String: Any]? = nil) { - self.allowSort = allowSort - - self.appId = appId - self.tag = tag - self.visibleFacetsKeys = visibleFacetsKeys + self.description = description + + self.badge = badge self.slug = slug - self.cron = cron + self.meta = meta - self.type = type + self.query = query - self.meta = meta + self.allowSort = allowSort - self.allowFacets = allowFacets + self.name = name - self.banners = banners + self.cron = cron - self.isActive = isActive + self.banners = banners self.schedule = schedule - self.description = description + self.allowFacets = allowFacets - self.badge = badge + self.visibleFacetsKeys = visibleFacetsKeys - self.query = query + self.isActive = isActive - self.name = name + self.appId = appId self.logo = logo + + self.type = type } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - allowSort = try container.decode(Bool.self, forKey: .allowSort) + tag = try container.decode([String].self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode([String].self, forKey: .tag) + badge = try container.decode([String: Any].self, forKey: .badge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,7 +142,7 @@ public extension PlatformClient { } catch {} do { - visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - cron = try container.decode([String: Any].self, forKey: .cron) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,7 +166,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + allowSort = try container.decode(Bool.self, forKey: .allowSort) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +182,7 @@ public extension PlatformClient { } catch {} do { - allowFacets = try container.decode(Bool.self, forKey: .allowFacets) + cron = try container.decode([String: Any].self, forKey: .cron) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +198,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + schedule = try container.decode([String: Any].self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +206,7 @@ public extension PlatformClient { } catch {} do { - schedule = try container.decode([String: Any].self, forKey: .schedule) + allowFacets = try container.decode(Bool.self, forKey: .allowFacets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +214,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -222,7 +222,7 @@ public extension PlatformClient { } catch {} do { - badge = try container.decode([String: Any].self, forKey: .badge) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,7 +230,7 @@ public extension PlatformClient { } catch {} do { - query = try container.decode([String: Any].self, forKey: .query) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -238,7 +238,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + logo = try container.decode(BannerImage.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -246,7 +246,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(BannerImage.self, forKey: .logo) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -257,39 +257,39 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(allowSort, forKey: .allowSort) - - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(tag, forKey: .tag) - try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) + try? container.encodeIfPresent(description, forKey: .description) + + try? container.encodeIfPresent(badge, forKey: .badge) try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(cron, forKey: .cron) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(query, forKey: .query) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(allowSort, forKey: .allowSort) - try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(cron, forKey: .cron) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(banners, forKey: .banners) try? container.encodeIfPresent(schedule, forKey: .schedule) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - try? container.encodeIfPresent(query, forKey: .query) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(appId, forKey: .appId) try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/CollectionDetailResponsePlatformModelClass.swift b/Sources/code/platform/models/CollectionDetailResponsePlatformModelClass.swift index 39e4c88ba1..a1d913b370 100644 --- a/Sources/code/platform/models/CollectionDetailResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/CollectionDetailResponsePlatformModelClass.swift @@ -8,117 +8,117 @@ public extension PlatformClient { */ class CollectionDetailResponse: Codable { - public var allowSort: Bool? - - public var appId: String? - public var tag: [String]? - public var visibleFacetsKeys: [String]? + public var description: String? + + public var badge: [String: Any]? public var slug: String? - public var cron: [String: Any]? + public var meta: [String: Any]? - public var type: String? + public var query: [String: Any]? - public var meta: [String: Any]? + public var allowSort: Bool? - public var allowFacets: Bool? + public var name: String? - public var banners: ImageUrls? + public var cron: [String: Any]? - public var isActive: Bool? + public var banners: ImageUrls? public var schedule: [String: Any]? - public var description: String? + public var allowFacets: Bool? - public var badge: [String: Any]? + public var visibleFacetsKeys: [String]? - public var query: [String: Any]? + public var isActive: Bool? - public var name: String? + public var appId: String? public var logo: Media1? - public enum CodingKeys: String, CodingKey { - case allowSort = "allow_sort" - - case appId = "app_id" + public var type: String? + public enum CodingKeys: String, CodingKey { case tag - case visibleFacetsKeys = "visible_facets_keys" + case description + + case badge case slug - case cron + case meta - case type + case query - case meta + case allowSort = "allow_sort" - case allowFacets = "allow_facets" + case name - case banners + case cron - case isActive = "is_active" + case banners case schedule = "_schedule" - case description + case allowFacets = "allow_facets" - case badge + case visibleFacetsKeys = "visible_facets_keys" - case query + case isActive = "is_active" - case name + case appId = "app_id" case logo + + case type } public init(allowFacets: Bool? = nil, allowSort: Bool? = nil, appId: String? = nil, badge: [String: Any]? = nil, banners: ImageUrls? = nil, cron: [String: Any]? = nil, description: String? = nil, isActive: Bool? = nil, logo: Media1? = nil, meta: [String: Any]? = nil, name: String? = nil, query: [String: Any]? = nil, slug: String? = nil, tag: [String]? = nil, type: String? = nil, visibleFacetsKeys: [String]? = nil, schedule: [String: Any]? = nil) { - self.allowSort = allowSort - - self.appId = appId - self.tag = tag - self.visibleFacetsKeys = visibleFacetsKeys + self.description = description + + self.badge = badge self.slug = slug - self.cron = cron + self.meta = meta - self.type = type + self.query = query - self.meta = meta + self.allowSort = allowSort - self.allowFacets = allowFacets + self.name = name - self.banners = banners + self.cron = cron - self.isActive = isActive + self.banners = banners self.schedule = schedule - self.description = description + self.allowFacets = allowFacets - self.badge = badge + self.visibleFacetsKeys = visibleFacetsKeys - self.query = query + self.isActive = isActive - self.name = name + self.appId = appId self.logo = logo + + self.type = type } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - allowSort = try container.decode(Bool.self, forKey: .allowSort) + tag = try container.decode([String].self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode([String].self, forKey: .tag) + badge = try container.decode([String: Any].self, forKey: .badge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,7 +142,7 @@ public extension PlatformClient { } catch {} do { - visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - cron = try container.decode([String: Any].self, forKey: .cron) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,7 +166,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + allowSort = try container.decode(Bool.self, forKey: .allowSort) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +182,7 @@ public extension PlatformClient { } catch {} do { - allowFacets = try container.decode(Bool.self, forKey: .allowFacets) + cron = try container.decode([String: Any].self, forKey: .cron) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +198,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + schedule = try container.decode([String: Any].self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +206,7 @@ public extension PlatformClient { } catch {} do { - schedule = try container.decode([String: Any].self, forKey: .schedule) + allowFacets = try container.decode(Bool.self, forKey: .allowFacets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +214,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -222,7 +222,7 @@ public extension PlatformClient { } catch {} do { - badge = try container.decode([String: Any].self, forKey: .badge) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,7 +230,7 @@ public extension PlatformClient { } catch {} do { - query = try container.decode([String: Any].self, forKey: .query) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -238,7 +238,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + logo = try container.decode(Media1.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -246,7 +246,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(Media1.self, forKey: .logo) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -257,39 +257,39 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(allowSort, forKey: .allowSort) - - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(tag, forKey: .tag) - try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) + try? container.encodeIfPresent(description, forKey: .description) + + try? container.encodeIfPresent(badge, forKey: .badge) try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(cron, forKey: .cron) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(query, forKey: .query) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(allowSort, forKey: .allowSort) - try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(cron, forKey: .cron) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(banners, forKey: .banners) try? container.encodeIfPresent(schedule, forKey: .schedule) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - try? container.encodeIfPresent(query, forKey: .query) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(appId, forKey: .appId) try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/CollectionImagePlatformModelClass.swift b/Sources/code/platform/models/CollectionImagePlatformModelClass.swift index 38fa4aa2ea..ec1df385c3 100644 --- a/Sources/code/platform/models/CollectionImagePlatformModelClass.swift +++ b/Sources/code/platform/models/CollectionImagePlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class CollectionImage: Codable { - public var aspectRatio: String - public var url: String - public enum CodingKeys: String, CodingKey { - case aspectRatio = "aspect_ratio" + public var aspectRatio: String + public enum CodingKeys: String, CodingKey { case url + + case aspectRatio = "aspect_ratio" } public init(aspectRatio: String, url: String) { - self.aspectRatio = aspectRatio - self.url = url + + self.aspectRatio = aspectRatio } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - aspectRatio = try container.decode(String.self, forKey: .aspectRatio) - url = try container.decode(String.self, forKey: .url) + + aspectRatio = try container.decode(String.self, forKey: .aspectRatio) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) - try? container.encodeIfPresent(url, forKey: .url) + + try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) } } } diff --git a/Sources/code/platform/models/CollectionItemRequestPlatformModelClass.swift b/Sources/code/platform/models/CollectionItemRequestPlatformModelClass.swift index 029235ab40..f4ec0bf094 100644 --- a/Sources/code/platform/models/CollectionItemRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/CollectionItemRequestPlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class CollectionItemRequest: Codable { - public var pageSize: Int - public var pageNo: Int - public enum CodingKeys: String, CodingKey { - case pageSize = "page_size" + public var pageSize: Int + public enum CodingKeys: String, CodingKey { case pageNo = "page_no" + + case pageSize = "page_size" } public init(pageNo: Int, pageSize: Int) { - self.pageSize = pageSize - self.pageNo = pageNo + + self.pageSize = pageSize } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - pageSize = try container.decode(Int.self, forKey: .pageSize) - pageNo = try container.decode(Int.self, forKey: .pageNo) + + pageSize = try container.decode(Int.self, forKey: .pageSize) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(pageSize, forKey: .pageSize) - try? container.encodeIfPresent(pageNo, forKey: .pageNo) + + try? container.encodeIfPresent(pageSize, forKey: .pageSize) } } } diff --git a/Sources/code/platform/models/CompanyBrandDetailPlatformModelClass.swift b/Sources/code/platform/models/CompanyBrandDetailPlatformModelClass.swift index 2295705a20..bf2bcb3e57 100644 --- a/Sources/code/platform/models/CompanyBrandDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/CompanyBrandDetailPlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class CompanyBrandDetail: Codable { - public var companyId: Int? + public var totalArticle: Int? public var brandId: Int? - public var brandName: String? + public var companyId: Int? - public var totalArticle: Int? + public var brandName: String? public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + case totalArticle = "total_article" case brandId = "brand_id" - case brandName = "brand_name" + case companyId = "company_id" - case totalArticle = "total_article" + case brandName = "brand_name" } public init(brandId: Int? = nil, brandName: String? = nil, companyId: Int? = nil, totalArticle: Int? = nil) { - self.companyId = companyId + self.totalArticle = totalArticle self.brandId = brandId - self.brandName = brandName + self.companyId = companyId - self.totalArticle = totalArticle + self.brandName = brandName } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - companyId = try container.decode(Int.self, forKey: .companyId) + totalArticle = try container.decode(Int.self, forKey: .totalArticle) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - brandName = try container.decode(String.self, forKey: .brandName) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - totalArticle = try container.decode(Int.self, forKey: .totalArticle) + brandName = try container.decode(String.self, forKey: .brandName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(totalArticle, forKey: .totalArticle) try? container.encodeIfPresent(brandId, forKey: .brandId) - try? container.encodeIfPresent(brandName, forKey: .brandName) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(totalArticle, forKey: .totalArticle) + try? container.encodeIfPresent(brandName, forKey: .brandName) } } } diff --git a/Sources/code/platform/models/CompanyBrandListSerializerPlatformModelClass.swift b/Sources/code/platform/models/CompanyBrandListSerializerPlatformModelClass.swift index 987eef5ec6..e2ec1662ed 100644 --- a/Sources/code/platform/models/CompanyBrandListSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/CompanyBrandListSerializerPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class CompanyBrandListSerializer: Codable { - public var items: [CompanyBrandSerializer]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [CompanyBrandSerializer]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [CompanyBrandSerializer]? = nil, page: Page? = nil) { - self.items = items - self.page = page + + self.items = items } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - items = try container.decode([CompanyBrandSerializer].self, forKey: .items) + page = try container.decode(Page.self, forKey: .page) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - page = try container.decode(Page.self, forKey: .page) + items = try container.decode([CompanyBrandSerializer].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(items, forKey: .items) - try? container.encodeIfPresent(page, forKey: .page) + + try? container.encodeIfPresent(items, forKey: .items) } } } diff --git a/Sources/code/platform/models/CompanyBrandPostRequestSerializerPlatformModelClass.swift b/Sources/code/platform/models/CompanyBrandPostRequestSerializerPlatformModelClass.swift index 2910b75395..4dab556cd2 100644 --- a/Sources/code/platform/models/CompanyBrandPostRequestSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/CompanyBrandPostRequestSerializerPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class CompanyBrandPostRequestSerializer: Codable { public var brands: [Int] - public var company: Int - public var uid: Int? + public var company: Int + public enum CodingKeys: String, CodingKey { case brands - case company - case uid + + case company } public init(brands: [Int], company: Int, uid: Int? = nil) { self.brands = brands - self.company = company - self.uid = uid + + self.company = company } required public init(from decoder: Decoder) throws { @@ -35,8 +35,6 @@ public extension PlatformClient { brands = try container.decode([Int].self, forKey: .brands) - company = try container.decode(Int.self, forKey: .company) - do { uid = try container.decode(Int.self, forKey: .uid) @@ -44,6 +42,8 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + company = try container.decode(Int.self, forKey: .company) } public func encode(to encoder: Encoder) throws { @@ -51,9 +51,9 @@ public extension PlatformClient { try? container.encodeIfPresent(brands, forKey: .brands) - try? container.encodeIfPresent(company, forKey: .company) - try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(company, forKey: .company) } } } diff --git a/Sources/code/platform/models/CompanyBrandSerializerPlatformModelClass.swift b/Sources/code/platform/models/CompanyBrandSerializerPlatformModelClass.swift index d4568ad196..317294982c 100644 --- a/Sources/code/platform/models/CompanyBrandSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/CompanyBrandSerializerPlatformModelClass.swift @@ -8,19 +8,13 @@ public extension PlatformClient { */ class CompanyBrandSerializer: Codable { - public var verifiedOn: String? - - public var createdOn: String? - - public var verifiedBy: UserSerializer1? - public var createdBy: UserSerializer1? - public var brand: GetBrandResponseSerializer? + public var stage: String? public var warnings: [String: Any]? - public var modifiedBy: UserSerializer1? + public var verifiedOn: String? public var rejectReason: String? @@ -28,24 +22,24 @@ public extension PlatformClient { public var modifiedOn: String? - public var stage: String? + public var brand: GetBrandResponseSerializer? - public var uid: Int? + public var verifiedBy: UserSerializer1? - public enum CodingKeys: String, CodingKey { - case verifiedOn = "verified_on" + public var uid: Int? - case createdOn = "created_on" + public var modifiedBy: UserSerializer1? - case verifiedBy = "verified_by" + public var createdOn: String? + public enum CodingKeys: String, CodingKey { case createdBy = "created_by" - case brand + case stage case warnings - case modifiedBy = "modified_by" + case verifiedOn = "verified_on" case rejectReason = "reject_reason" @@ -53,25 +47,25 @@ public extension PlatformClient { case modifiedOn = "modified_on" - case stage + case brand - case uid - } + case verifiedBy = "verified_by" - public init(brand: GetBrandResponseSerializer? = nil, company: GetCompanySerializer? = nil, createdBy: UserSerializer1? = nil, createdOn: String? = nil, modifiedBy: UserSerializer1? = nil, modifiedOn: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSerializer1? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil) { - self.verifiedOn = verifiedOn + case uid - self.createdOn = createdOn + case modifiedBy = "modified_by" - self.verifiedBy = verifiedBy + case createdOn = "created_on" + } + public init(brand: GetBrandResponseSerializer? = nil, company: GetCompanySerializer? = nil, createdBy: UserSerializer1? = nil, createdOn: String? = nil, modifiedBy: UserSerializer1? = nil, modifiedOn: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSerializer1? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil) { self.createdBy = createdBy - self.brand = brand + self.stage = stage self.warnings = warnings - self.modifiedBy = modifiedBy + self.verifiedOn = verifiedOn self.rejectReason = rejectReason @@ -79,16 +73,22 @@ public extension PlatformClient { self.modifiedOn = modifiedOn - self.stage = stage + self.brand = brand + + self.verifiedBy = verifiedBy self.uid = uid + + self.modifiedBy = modifiedBy + + self.createdOn = createdOn } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - verifiedOn = try container.decode(String.self, forKey: .verifiedOn) + createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -96,7 +96,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +104,7 @@ public extension PlatformClient { } catch {} do { - verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) + warnings = try container.decode([String: Any].self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -112,7 +112,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) + verifiedOn = try container.decode(String.self, forKey: .verifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -120,7 +120,7 @@ public extension PlatformClient { } catch {} do { - brand = try container.decode(GetBrandResponseSerializer.self, forKey: .brand) + rejectReason = try container.decode(String.self, forKey: .rejectReason) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +128,7 @@ public extension PlatformClient { } catch {} do { - warnings = try container.decode([String: Any].self, forKey: .warnings) + company = try container.decode(GetCompanySerializer.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -136,7 +136,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,7 +144,7 @@ public extension PlatformClient { } catch {} do { - rejectReason = try container.decode(String.self, forKey: .rejectReason) + brand = try container.decode(GetBrandResponseSerializer.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +152,7 @@ public extension PlatformClient { } catch {} do { - company = try container.decode(GetCompanySerializer.self, forKey: .company) + verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -160,7 +160,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -168,7 +168,7 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +176,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -187,19 +187,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) - - try? container.encodeIfPresent(createdOn, forKey: .createdOn) - - try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(brand, forKey: .brand) + try? container.encodeIfPresent(stage, forKey: .stage) try? container.encodeIfPresent(warnings, forKey: .warnings) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) @@ -207,9 +201,15 @@ public extension PlatformClient { try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(brand, forKey: .brand) + + try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + + try? container.encodeIfPresent(createdOn, forKey: .createdOn) } } } diff --git a/Sources/code/platform/models/CompanyOptInPlatformModelClass.swift b/Sources/code/platform/models/CompanyOptInPlatformModelClass.swift index 2e3c2d55ff..c0aa5b9c02 100644 --- a/Sources/code/platform/models/CompanyOptInPlatformModelClass.swift +++ b/Sources/code/platform/models/CompanyOptInPlatformModelClass.swift @@ -8,74 +8,76 @@ public extension PlatformClient { */ class CompanyOptIn: Codable { - public var companyId: Int - - public var createdBy: [String: Any]? + public var optLevel: String - public var modifiedOn: Int + public var enabled: Bool - public var storeIds: [Int] + public var createdBy: [String: Any]? - public var createdOn: Int + public var platform: String public var modifiedBy: [String: Any]? - public var platform: String - - public var optLevel: String + public var companyId: Int - public var enabled: Bool + public var modifiedOn: Int public var brandIds: [Int] - public enum CodingKeys: String, CodingKey { - case companyId = "company_id" - - case createdBy = "created_by" + public var createdOn: Int - case modifiedOn = "modified_on" + public var storeIds: [Int] - case storeIds = "store_ids" + public enum CodingKeys: String, CodingKey { + case optLevel = "opt_level" - case createdOn = "created_on" + case enabled - case modifiedBy = "modified_by" + case createdBy = "created_by" case platform - case optLevel = "opt_level" + case modifiedBy = "modified_by" - case enabled + case companyId = "company_id" + + case modifiedOn = "modified_on" case brandIds = "brand_ids" + + case createdOn = "created_on" + + case storeIds = "store_ids" } public init(brandIds: [Int], companyId: Int, createdBy: [String: Any]? = nil, createdOn: Int, enabled: Bool, modifiedBy: [String: Any]? = nil, modifiedOn: Int, optLevel: String, platform: String, storeIds: [Int]) { - self.companyId = companyId - - self.createdBy = createdBy + self.optLevel = optLevel - self.modifiedOn = modifiedOn + self.enabled = enabled - self.storeIds = storeIds + self.createdBy = createdBy - self.createdOn = createdOn + self.platform = platform self.modifiedBy = modifiedBy - self.platform = platform - - self.optLevel = optLevel + self.companyId = companyId - self.enabled = enabled + self.modifiedOn = modifiedOn self.brandIds = brandIds + + self.createdOn = createdOn + + self.storeIds = storeIds } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - companyId = try container.decode(Int.self, forKey: .companyId) + optLevel = try container.decode(String.self, forKey: .optLevel) + + enabled = try container.decode(Bool.self, forKey: .enabled) do { createdBy = try container.decode([String: Any].self, forKey: .createdBy) @@ -85,11 +87,7 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - modifiedOn = try container.decode(Int.self, forKey: .modifiedOn) - - storeIds = try container.decode([Int].self, forKey: .storeIds) - - createdOn = try container.decode(Int.self, forKey: .createdOn) + platform = try container.decode(String.self, forKey: .platform) do { modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) @@ -99,37 +97,39 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - platform = try container.decode(String.self, forKey: .platform) - - optLevel = try container.decode(String.self, forKey: .optLevel) + companyId = try container.decode(Int.self, forKey: .companyId) - enabled = try container.decode(Bool.self, forKey: .enabled) + modifiedOn = try container.decode(Int.self, forKey: .modifiedOn) brandIds = try container.decode([Int].self, forKey: .brandIds) + + createdOn = try container.decode(Int.self, forKey: .createdOn) + + storeIds = try container.decode([Int].self, forKey: .storeIds) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) - - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(optLevel, forKey: .optLevel) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(enabled, forKey: .enabled) - try? container.encodeIfPresent(storeIds, forKey: .storeIds) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(platform, forKey: .platform) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(platform, forKey: .platform) - - try? container.encodeIfPresent(optLevel, forKey: .optLevel) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(enabled, forKey: .enabled) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) try? container.encodeIfPresent(brandIds, forKey: .brandIds) + + try? container.encodeIfPresent(createdOn, forKey: .createdOn) + + try? container.encodeIfPresent(storeIds, forKey: .storeIds) } } } diff --git a/Sources/code/platform/models/ConfigurationBucketPointsPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationBucketPointsPlatformModelClass.swift index b09485ab85..7dc3b0cf04 100644 --- a/Sources/code/platform/models/ConfigurationBucketPointsPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationBucketPointsPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class ConfigurationBucketPoints: Codable { - public var display: String? - public var end: Double? public var start: Double? - public enum CodingKeys: String, CodingKey { - case display + public var display: String? + public enum CodingKeys: String, CodingKey { case end case start + + case display } public init(display: String? = nil, end: Double? = nil, start: Double? = nil) { - self.display = display - self.end = end self.start = start + + self.display = display } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - display = try container.decode(String.self, forKey: .display) + end = try container.decode(Double.self, forKey: .end) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - end = try container.decode(Double.self, forKey: .end) + start = try container.decode(Double.self, forKey: .start) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - start = try container.decode(Double.self, forKey: .start) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(end, forKey: .end) try? container.encodeIfPresent(start, forKey: .start) + + try? container.encodeIfPresent(display, forKey: .display) } } } diff --git a/Sources/code/platform/models/ConfigurationListingFilterConfigPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationListingFilterConfigPlatformModelClass.swift index 5fa8f08bd6..e9f58a779f 100644 --- a/Sources/code/platform/models/ConfigurationListingFilterConfigPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationListingFilterConfigPlatformModelClass.swift @@ -8,79 +8,77 @@ public extension PlatformClient { */ class ConfigurationListingFilterConfig: Codable { - public var priority: Int + public var key: String - public var valueConfig: ConfigurationListingFilterValue? + public var name: String? - public var type: String + public var valueConfig: ConfigurationListingFilterValue? public var isActive: Bool - public var key: String - - public var name: String? + public var priority: Int public var logo: String? + public var type: String + public enum CodingKeys: String, CodingKey { - case priority + case key - case valueConfig = "value_config" + case name - case type + case valueConfig = "value_config" case isActive = "is_active" - case key - - case name + case priority case logo + + case type } public init(isActive: Bool, key: String, logo: String? = nil, name: String? = nil, priority: Int, type: String, valueConfig: ConfigurationListingFilterValue? = nil) { - self.priority = priority + self.key = key - self.valueConfig = valueConfig + self.name = name - self.type = type + self.valueConfig = valueConfig self.isActive = isActive - self.key = key - - self.name = name + self.priority = priority self.logo = logo + + self.type = type } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - priority = try container.decode(Int.self, forKey: .priority) + key = try container.decode(String.self, forKey: .key) do { - valueConfig = try container.decode(ConfigurationListingFilterValue.self, forKey: .valueConfig) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - type = try container.decode(String.self, forKey: .type) - - isActive = try container.decode(Bool.self, forKey: .isActive) - - key = try container.decode(String.self, forKey: .key) - do { - name = try container.decode(String.self, forKey: .name) + valueConfig = try container.decode(ConfigurationListingFilterValue.self, forKey: .valueConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + isActive = try container.decode(Bool.self, forKey: .isActive) + + priority = try container.decode(Int.self, forKey: .priority) + do { logo = try container.decode(String.self, forKey: .logo) @@ -88,24 +86,26 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + type = try container.decode(String.self, forKey: .type) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(priority, forKey: .priority) + try? container.encodeIfPresent(key, forKey: .key) - try? container.encodeIfPresent(valueConfig, forKey: .valueConfig) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(valueConfig, forKey: .valueConfig) try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(key, forKey: .key) - - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(priority, forKey: .priority) try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/ConfigurationListingFilterPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationListingFilterPlatformModelClass.swift index c985bf24bf..e5885179c9 100644 --- a/Sources/code/platform/models/ConfigurationListingFilterPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationListingFilterPlatformModelClass.swift @@ -8,25 +8,27 @@ public extension PlatformClient { */ class ConfigurationListingFilter: Codable { - public var attributeConfig: [ConfigurationListingFilterConfig]? - public var allowSingle: Bool - public enum CodingKeys: String, CodingKey { - case attributeConfig = "attribute_config" + public var attributeConfig: [ConfigurationListingFilterConfig]? + public enum CodingKeys: String, CodingKey { case allowSingle = "allow_single" + + case attributeConfig = "attribute_config" } public init(allowSingle: Bool, attributeConfig: [ConfigurationListingFilterConfig]? = nil) { - self.attributeConfig = attributeConfig - self.allowSingle = allowSingle + + self.attributeConfig = attributeConfig } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + allowSingle = try container.decode(Bool.self, forKey: .allowSingle) + do { attributeConfig = try container.decode([ConfigurationListingFilterConfig].self, forKey: .attributeConfig) @@ -34,16 +36,14 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - allowSingle = try container.decode(Bool.self, forKey: .allowSingle) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(attributeConfig, forKey: .attributeConfig) - try? container.encodeIfPresent(allowSingle, forKey: .allowSingle) + + try? container.encodeIfPresent(attributeConfig, forKey: .attributeConfig) } } } diff --git a/Sources/code/platform/models/ConfigurationListingFilterValuePlatformModelClass.swift b/Sources/code/platform/models/ConfigurationListingFilterValuePlatformModelClass.swift index 3e1d2a42fe..a9aa6defb9 100644 --- a/Sources/code/platform/models/ConfigurationListingFilterValuePlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationListingFilterValuePlatformModelClass.swift @@ -8,37 +8,37 @@ public extension PlatformClient { */ class ConfigurationListingFilterValue: Codable { - public var sort: String? - - public var value: String? - public var condition: String? + public var sort: String? + public var bucketPoints: [ConfigurationBucketPoints]? + public var value: String? + public var map: [String: Any]? public enum CodingKeys: String, CodingKey { - case sort - - case value - case condition + case sort + case bucketPoints = "bucket_points" + case value + case map } public init(bucketPoints: [ConfigurationBucketPoints]? = nil, condition: String? = nil, map: [String: Any]? = nil, sort: String? = nil, value: String? = nil) { - self.sort = sort - - self.value = value - self.condition = condition + self.sort = sort + self.bucketPoints = bucketPoints + self.value = value + self.map = map } @@ -46,7 +46,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - sort = try container.decode(String.self, forKey: .sort) + condition = try container.decode(String.self, forKey: .condition) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - value = try container.decode(String.self, forKey: .value) + sort = try container.decode(String.self, forKey: .sort) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - condition = try container.decode(String.self, forKey: .condition) + bucketPoints = try container.decode([ConfigurationBucketPoints].self, forKey: .bucketPoints) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - bucketPoints = try container.decode([ConfigurationBucketPoints].self, forKey: .bucketPoints) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,14 +89,14 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(sort, forKey: .sort) - - try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(condition, forKey: .condition) + try? container.encodeIfPresent(sort, forKey: .sort) + try? container.encodeIfPresent(bucketPoints, forKey: .bucketPoints) + try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(map, forKey: .map) } } diff --git a/Sources/code/platform/models/ConfigurationListingSortConfigPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationListingSortConfigPlatformModelClass.swift index 090764da3c..7431190c1b 100644 --- a/Sources/code/platform/models/ConfigurationListingSortConfigPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationListingSortConfigPlatformModelClass.swift @@ -8,47 +8,43 @@ public extension PlatformClient { */ class ConfigurationListingSortConfig: Codable { - public var priority: Int - - public var isActive: Bool - public var key: String public var name: String? - public var logo: String? + public var isActive: Bool - public enum CodingKeys: String, CodingKey { - case priority + public var priority: Int - case isActive = "is_active" + public var logo: String? + public enum CodingKeys: String, CodingKey { case key case name + case isActive = "is_active" + + case priority + case logo } public init(isActive: Bool, key: String, logo: String? = nil, name: String? = nil, priority: Int) { - self.priority = priority - - self.isActive = isActive - self.key = key self.name = name + self.isActive = isActive + + self.priority = priority + self.logo = logo } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - priority = try container.decode(Int.self, forKey: .priority) - - isActive = try container.decode(Bool.self, forKey: .isActive) - key = try container.decode(String.self, forKey: .key) do { @@ -59,6 +55,10 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + isActive = try container.decode(Bool.self, forKey: .isActive) + + priority = try container.decode(Int.self, forKey: .priority) + do { logo = try container.decode(String.self, forKey: .logo) @@ -71,14 +71,14 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(priority, forKey: .priority) - - try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(key, forKey: .key) try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(priority, forKey: .priority) + try? container.encodeIfPresent(logo, forKey: .logo) } } diff --git a/Sources/code/platform/models/ConfigurationListingSortPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationListingSortPlatformModelClass.swift index 140d6b538c..89f61c4dce 100644 --- a/Sources/code/platform/models/ConfigurationListingSortPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationListingSortPlatformModelClass.swift @@ -8,25 +8,27 @@ public extension PlatformClient { */ class ConfigurationListingSort: Codable { - public var config: [ConfigurationListingSortConfig]? - public var defaultKey: String - public enum CodingKeys: String, CodingKey { - case config + public var config: [ConfigurationListingSortConfig]? + public enum CodingKeys: String, CodingKey { case defaultKey = "default_key" + + case config } public init(config: [ConfigurationListingSortConfig]? = nil, defaultKey: String) { - self.config = config - self.defaultKey = defaultKey + + self.config = config } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + defaultKey = try container.decode(String.self, forKey: .defaultKey) + do { config = try container.decode([ConfigurationListingSortConfig].self, forKey: .config) @@ -34,16 +36,14 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - defaultKey = try container.decode(String.self, forKey: .defaultKey) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(config, forKey: .config) - try? container.encodeIfPresent(defaultKey, forKey: .defaultKey) + + try? container.encodeIfPresent(config, forKey: .config) } } } diff --git a/Sources/code/platform/models/ConfigurationProductConfigPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationProductConfigPlatformModelClass.swift index 751da9f6fd..d74d447b3b 100644 --- a/Sources/code/platform/models/ConfigurationProductConfigPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationProductConfigPlatformModelClass.swift @@ -8,67 +8,67 @@ public extension PlatformClient { */ class ConfigurationProductConfig: Codable { - public var title: String? - - public var priority: Int + public var key: String public var size: ProductSize? - public var isActive: Bool + public var title: String? - public var key: String + public var isActive: Bool public var subtitle: String? + public var priority: Int + public var logo: String? public enum CodingKeys: String, CodingKey { - case title - - case priority + case key case size - case isActive = "is_active" + case title - case key + case isActive = "is_active" case subtitle + case priority + case logo } public init(isActive: Bool, key: String, logo: String? = nil, priority: Int, size: ProductSize? = nil, subtitle: String? = nil, title: String? = nil) { - self.title = title - - self.priority = priority + self.key = key self.size = size - self.isActive = isActive + self.title = title - self.key = key + self.isActive = isActive self.subtitle = subtitle + self.priority = priority + self.logo = logo } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + key = try container.decode(String.self, forKey: .key) + do { - title = try container.decode(String.self, forKey: .title) + size = try container.decode(ProductSize.self, forKey: .size) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - priority = try container.decode(Int.self, forKey: .priority) - do { - size = try container.decode(ProductSize.self, forKey: .size) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,8 +77,6 @@ public extension PlatformClient { isActive = try container.decode(Bool.self, forKey: .isActive) - key = try container.decode(String.self, forKey: .key) - do { subtitle = try container.decode(String.self, forKey: .subtitle) @@ -87,6 +85,8 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + priority = try container.decode(Int.self, forKey: .priority) + do { logo = try container.decode(String.self, forKey: .logo) @@ -99,18 +99,18 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(title, forKey: .title) - - try? container.encodeIfPresent(priority, forKey: .priority) + try? container.encodeIfPresent(key, forKey: .key) try? container.encodeIfPresent(size, forKey: .size) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(subtitle, forKey: .subtitle) + try? container.encodeIfPresent(priority, forKey: .priority) + try? container.encodeIfPresent(logo, forKey: .logo) } } diff --git a/Sources/code/platform/models/ConfigurationProductPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationProductPlatformModelClass.swift index 05ed10d43d..16b870beb3 100644 --- a/Sources/code/platform/models/ConfigurationProductPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationProductPlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class ConfigurationProduct: Codable { - public var variant: ConfigurationProductVariant - public var similar: ConfigurationProductSimilar - public enum CodingKeys: String, CodingKey { - case variant + public var variant: ConfigurationProductVariant + public enum CodingKeys: String, CodingKey { case similar + + case variant } public init(similar: ConfigurationProductSimilar, variant: ConfigurationProductVariant) { - self.variant = variant - self.similar = similar + + self.variant = variant } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - variant = try container.decode(ConfigurationProductVariant.self, forKey: .variant) - similar = try container.decode(ConfigurationProductSimilar.self, forKey: .similar) + + variant = try container.decode(ConfigurationProductVariant.self, forKey: .variant) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(variant, forKey: .variant) - try? container.encodeIfPresent(similar, forKey: .similar) + + try? container.encodeIfPresent(variant, forKey: .variant) } } } diff --git a/Sources/code/platform/models/ConfigurationProductVariantConfigPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationProductVariantConfigPlatformModelClass.swift index 18f2f8db7f..d7b218884e 100644 --- a/Sources/code/platform/models/ConfigurationProductVariantConfigPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationProductVariantConfigPlatformModelClass.swift @@ -8,48 +8,48 @@ public extension PlatformClient { */ class ConfigurationProductVariantConfig: Codable { - public var priority: Int - - public var size: ProductSize - - public var isActive: Bool + public var displayType: String public var key: String + public var size: ProductSize + public var name: String - public var displayType: String + public var isActive: Bool + + public var priority: Int public var logo: String? public enum CodingKeys: String, CodingKey { - case priority - - case size - - case isActive = "is_active" + case displayType = "display_type" case key + case size + case name - case displayType = "display_type" + case isActive = "is_active" + + case priority case logo } public init(displayType: String, isActive: Bool, key: String, logo: String? = nil, name: String, priority: Int, size: ProductSize) { - self.priority = priority - - self.size = size - - self.isActive = isActive + self.displayType = displayType self.key = key + self.size = size + self.name = name - self.displayType = displayType + self.isActive = isActive + + self.priority = priority self.logo = logo } @@ -57,17 +57,17 @@ public extension PlatformClient { required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - priority = try container.decode(Int.self, forKey: .priority) - - size = try container.decode(ProductSize.self, forKey: .size) - - isActive = try container.decode(Bool.self, forKey: .isActive) + displayType = try container.decode(String.self, forKey: .displayType) key = try container.decode(String.self, forKey: .key) + size = try container.decode(ProductSize.self, forKey: .size) + name = try container.decode(String.self, forKey: .name) - displayType = try container.decode(String.self, forKey: .displayType) + isActive = try container.decode(Bool.self, forKey: .isActive) + + priority = try container.decode(Int.self, forKey: .priority) do { logo = try container.decode(String.self, forKey: .logo) @@ -81,17 +81,17 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(priority, forKey: .priority) - - try? container.encodeIfPresent(size, forKey: .size) - - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(displayType, forKey: .displayType) try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(size, forKey: .size) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(displayType, forKey: .displayType) + try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(priority, forKey: .priority) try? container.encodeIfPresent(logo, forKey: .logo) } diff --git a/Sources/code/platform/models/CreateAutocompleteKeywordPlatformModelClass.swift b/Sources/code/platform/models/CreateAutocompleteKeywordPlatformModelClass.swift index ed9758a22a..596b1abfb5 100644 --- a/Sources/code/platform/models/CreateAutocompleteKeywordPlatformModelClass.swift +++ b/Sources/code/platform/models/CreateAutocompleteKeywordPlatformModelClass.swift @@ -8,45 +8,45 @@ public extension PlatformClient { */ class CreateAutocompleteKeyword: Codable { - public var customJson: [String: Any]? - - public var appId: String? - public var words: [String]? public var results: [AutocompleteResult]? public var isActive: Bool? - public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + public var appId: String? - case appId = "app_id" + public var customJson: [String: Any]? + public enum CodingKeys: String, CodingKey { case words case results case isActive = "is_active" - } - public init(appId: String? = nil, isActive: Bool? = nil, results: [AutocompleteResult]? = nil, words: [String]? = nil, customJson: [String: Any]? = nil) { - self.customJson = customJson + case appId = "app_id" - self.appId = appId + case customJson = "_custom_json" + } + public init(appId: String? = nil, isActive: Bool? = nil, results: [AutocompleteResult]? = nil, words: [String]? = nil, customJson: [String: Any]? = nil) { self.words = words self.results = results self.isActive = isActive + + self.appId = appId + + self.customJson = customJson } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + words = try container.decode([String].self, forKey: .words) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + results = try container.decode([AutocompleteResult].self, forKey: .results) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - words = try container.decode([String].self, forKey: .words) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - results = try container.decode([AutocompleteResult].self, forKey: .results) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,15 +89,15 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(customJson, forKey: .customJson) - - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(words, forKey: .words) try? container.encodeIfPresent(results, forKey: .results) try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(appId, forKey: .appId) + + try? container.encodeIfPresent(customJson, forKey: .customJson) } } } diff --git a/Sources/code/platform/models/CreateAutocompleteWordsResponsePlatformModelClass.swift b/Sources/code/platform/models/CreateAutocompleteWordsResponsePlatformModelClass.swift index aafc9b84a1..5a9e3806b2 100644 --- a/Sources/code/platform/models/CreateAutocompleteWordsResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/CreateAutocompleteWordsResponsePlatformModelClass.swift @@ -8,30 +8,30 @@ public extension PlatformClient { */ class CreateAutocompleteWordsResponse: Codable { - public var results: [[String: Any]]? + public var appId: String? public var customJson: [String: Any]? - public var appId: String? + public var results: [[String: Any]]? public var words: [String]? public enum CodingKeys: String, CodingKey { - case results + case appId = "app_id" case customJson = "_custom_json" - case appId = "app_id" + case results case words } public init(appId: String? = nil, results: [[String: Any]]? = nil, words: [String]? = nil, customJson: [String: Any]? = nil) { - self.results = results + self.appId = appId self.customJson = customJson - self.appId = appId + self.results = results self.words = words } @@ -40,7 +40,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - results = try container.decode([[String: Any]].self, forKey: .results) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + results = try container.decode([[String: Any]].self, forKey: .results) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,11 +75,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(results, forKey: .results) + try? container.encodeIfPresent(appId, forKey: .appId) try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encodeIfPresent(results, forKey: .results) try? container.encodeIfPresent(words, forKey: .words) } diff --git a/Sources/code/platform/models/CreateCollectionPlatformModelClass.swift b/Sources/code/platform/models/CreateCollectionPlatformModelClass.swift index 1f11529a3f..eb2f57d2ab 100644 --- a/Sources/code/platform/models/CreateCollectionPlatformModelClass.swift +++ b/Sources/code/platform/models/CreateCollectionPlatformModelClass.swift @@ -8,159 +8,161 @@ public extension PlatformClient { */ class CreateCollection: Codable { - public var customJson: [String: Any]? - - public var visibleFacetsKeys: [String]? - - public var published: Bool? + public var slug: String public var meta: [String: Any]? - public var banners: CollectionBanner + public var schedule: Schedule? - public var query: [String: Any]? + public var visibleFacetsKeys: [String]? - public var createdBy: UserInfo? + public var appId: String - public var modifiedBy: UserInfo? + public var localeLanguage: [String: Any]? - public var type: String + public var logo: CollectionImage - public var sortOn: String? + public var type: String - public var description: String? + public var badge: CollectionBadge? - public var localeLanguage: [String: Any]? + public var seo: SeoDetail? - public var isVisible: Bool? + public var name: String - public var allowSort: Bool? + public var banners: CollectionBanner - public var appId: String + public var isActive: Bool? - public var slug: String + public var allowSort: Bool? - public var allowFacets: Bool? + public var customJson: [String: Any]? - public var schedule: Schedule? + public var description: String? - public var name: String + public var query: [String: Any]? - public var logo: CollectionImage + public var createdBy: UserInfo? public var tags: [String]? - public var seo: SeoDetail? + public var allowFacets: Bool? - public var isActive: Bool? + public var modifiedBy: UserInfo? - public var badge: CollectionBadge? + public var published: Bool? - public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + public var sortOn: String? - case visibleFacetsKeys = "visible_facets_keys" + public var isVisible: Bool? - case published + public enum CodingKeys: String, CodingKey { + case slug case meta - case banners + case schedule = "_schedule" - case query + case visibleFacetsKeys = "visible_facets_keys" - case createdBy = "created_by" + case appId = "app_id" - case modifiedBy = "modified_by" + case localeLanguage = "_locale_language" + + case logo case type - case sortOn = "sort_on" + case badge - case description + case seo - case localeLanguage = "_locale_language" + case name - case isVisible = "is_visible" + case banners + + case isActive = "is_active" case allowSort = "allow_sort" - case appId = "app_id" + case customJson = "_custom_json" - case slug + case description - case allowFacets = "allow_facets" + case query - case schedule = "_schedule" + case createdBy = "created_by" - case name + case tags - case logo + case allowFacets = "allow_facets" - case tags + case modifiedBy = "modified_by" - case seo + case published - case isActive = "is_active" + case sortOn = "sort_on" - case badge + case isVisible = "is_visible" } public init(allowFacets: Bool? = nil, allowSort: Bool? = nil, appId: String, badge: CollectionBadge? = nil, banners: CollectionBanner, createdBy: UserInfo? = nil, description: String? = nil, isActive: Bool? = nil, isVisible: Bool? = nil, logo: CollectionImage, meta: [String: Any]? = nil, modifiedBy: UserInfo? = nil, name: String, published: Bool? = nil, query: [String: Any]? = nil, seo: SeoDetail? = nil, slug: String, sortOn: String? = nil, tags: [String]? = nil, type: String, visibleFacetsKeys: [String]? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil, schedule: Schedule? = nil) { - self.customJson = customJson - - self.visibleFacetsKeys = visibleFacetsKeys - - self.published = published + self.slug = slug self.meta = meta - self.banners = banners + self.schedule = schedule - self.query = query + self.visibleFacetsKeys = visibleFacetsKeys - self.createdBy = createdBy + self.appId = appId - self.modifiedBy = modifiedBy + self.localeLanguage = localeLanguage + + self.logo = logo self.type = type - self.sortOn = sortOn + self.badge = badge - self.description = description + self.seo = seo - self.localeLanguage = localeLanguage + self.name = name - self.isVisible = isVisible + self.banners = banners + + self.isActive = isActive self.allowSort = allowSort - self.appId = appId + self.customJson = customJson - self.slug = slug + self.description = description - self.allowFacets = allowFacets + self.query = query - self.schedule = schedule + self.createdBy = createdBy - self.name = name + self.tags = tags - self.logo = logo + self.allowFacets = allowFacets - self.tags = tags + self.modifiedBy = modifiedBy - self.seo = seo + self.published = published - self.isActive = isActive + self.sortOn = sortOn - self.badge = badge + self.isVisible = isVisible } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + slug = try container.decode(String.self, forKey: .slug) + do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -168,7 +170,7 @@ public extension PlatformClient { } catch {} do { - visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) + schedule = try container.decode(Schedule.self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,25 +178,29 @@ public extension PlatformClient { } catch {} do { - published = try container.decode(Bool.self, forKey: .published) + visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + appId = try container.decode(String.self, forKey: .appId) + do { - meta = try container.decode([String: Any].self, forKey: .meta) + localeLanguage = try container.decode([String: Any].self, forKey: .localeLanguage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - banners = try container.decode(CollectionBanner.self, forKey: .banners) + logo = try container.decode(CollectionImage.self, forKey: .logo) + + type = try container.decode(String.self, forKey: .type) do { - query = try container.decode([String: Any].self, forKey: .query) + badge = try container.decode(CollectionBadge.self, forKey: .badge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -202,25 +208,27 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserInfo.self, forKey: .createdBy) + seo = try container.decode(SeoDetail.self, forKey: .seo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + + banners = try container.decode(CollectionBanner.self, forKey: .banners) + do { - modifiedBy = try container.decode(UserInfo.self, forKey: .modifiedBy) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - type = try container.decode(String.self, forKey: .type) - do { - sortOn = try container.decode(String.self, forKey: .sortOn) + allowSort = try container.decode(Bool.self, forKey: .allowSort) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -228,7 +236,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -236,7 +244,7 @@ public extension PlatformClient { } catch {} do { - localeLanguage = try container.decode([String: Any].self, forKey: .localeLanguage) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -244,7 +252,7 @@ public extension PlatformClient { } catch {} do { - isVisible = try container.decode(Bool.self, forKey: .isVisible) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -252,19 +260,15 @@ public extension PlatformClient { } catch {} do { - allowSort = try container.decode(Bool.self, forKey: .allowSort) + createdBy = try container.decode(UserInfo.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - appId = try container.decode(String.self, forKey: .appId) - - slug = try container.decode(String.self, forKey: .slug) - do { - allowFacets = try container.decode(Bool.self, forKey: .allowFacets) + tags = try container.decode([String].self, forKey: .tags) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -272,19 +276,15 @@ public extension PlatformClient { } catch {} do { - schedule = try container.decode(Schedule.self, forKey: .schedule) + allowFacets = try container.decode(Bool.self, forKey: .allowFacets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - name = try container.decode(String.self, forKey: .name) - - logo = try container.decode(CollectionImage.self, forKey: .logo) - do { - tags = try container.decode([String].self, forKey: .tags) + modifiedBy = try container.decode(UserInfo.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -292,7 +292,7 @@ public extension PlatformClient { } catch {} do { - seo = try container.decode(SeoDetail.self, forKey: .seo) + published = try container.decode(Bool.self, forKey: .published) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -300,7 +300,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + sortOn = try container.decode(String.self, forKey: .sortOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -308,7 +308,7 @@ public extension PlatformClient { } catch {} do { - badge = try container.decode(CollectionBadge.self, forKey: .badge) + isVisible = try container.decode(Bool.self, forKey: .isVisible) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -319,53 +319,53 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(customJson, forKey: .customJson) - - try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - - try? container.encodeIfPresent(published, forKey: .published) + try? container.encodeIfPresent(slug, forKey: .slug) try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(schedule, forKey: .schedule) - try? container.encodeIfPresent(query, forKey: .query) + try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - try? container.encode(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encode(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) + + try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(sortOn, forKey: .sortOn) + try? container.encodeIfPresent(badge, forKey: .badge) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(seo, forKey: .seo) - try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(isVisible, forKey: .isVisible) + try? container.encodeIfPresent(banners, forKey: .banners) + + try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(allowSort, forKey: .allowSort) - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) + try? container.encodeIfPresent(query, forKey: .query) - try? container.encodeIfPresent(schedule, forKey: .schedule) + try? container.encode(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(tags, forKey: .tags) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) - try? container.encodeIfPresent(tags, forKey: .tags) + try? container.encode(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(seo, forKey: .seo) + try? container.encodeIfPresent(published, forKey: .published) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(sortOn, forKey: .sortOn) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(isVisible, forKey: .isVisible) } } } diff --git a/Sources/code/platform/models/CreateSearchKeywordPlatformModelClass.swift b/Sources/code/platform/models/CreateSearchKeywordPlatformModelClass.swift index 400e954d57..b63d514c8c 100644 --- a/Sources/code/platform/models/CreateSearchKeywordPlatformModelClass.swift +++ b/Sources/code/platform/models/CreateSearchKeywordPlatformModelClass.swift @@ -8,53 +8,55 @@ public extension PlatformClient { */ class CreateSearchKeyword: Codable { - public var customJson: [String: Any]? - - public var appId: String? - public var words: [String]? public var result: SearchKeywordResult public var isActive: Bool? - public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + public var appId: String? - case appId = "app_id" + public var customJson: [String: Any]? + public enum CodingKeys: String, CodingKey { case words case result case isActive = "is_active" - } - public init(appId: String? = nil, isActive: Bool? = nil, result: SearchKeywordResult, words: [String]? = nil, customJson: [String: Any]? = nil) { - self.customJson = customJson + case appId = "app_id" - self.appId = appId + case customJson = "_custom_json" + } + public init(appId: String? = nil, isActive: Bool? = nil, result: SearchKeywordResult, words: [String]? = nil, customJson: [String: Any]? = nil) { self.words = words self.result = result self.isActive = isActive + + self.appId = appId + + self.customJson = customJson } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + words = try container.decode([String].self, forKey: .words) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + result = try container.decode(SearchKeywordResult.self, forKey: .result) + do { - appId = try container.decode(String.self, forKey: .appId) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,17 +64,15 @@ public extension PlatformClient { } catch {} do { - words = try container.decode([String].self, forKey: .words) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - result = try container.decode(SearchKeywordResult.self, forKey: .result) - do { - isActive = try container.decode(Bool.self, forKey: .isActive) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -83,15 +83,15 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(customJson, forKey: .customJson) - - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(words, forKey: .words) try? container.encodeIfPresent(result, forKey: .result) try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(appId, forKey: .appId) + + try? container.encodeIfPresent(customJson, forKey: .customJson) } } } diff --git a/Sources/code/platform/models/CreateUpdateAddressSerializerPlatformModelClass.swift b/Sources/code/platform/models/CreateUpdateAddressSerializerPlatformModelClass.swift index 46736d584d..fb27cf29a7 100644 --- a/Sources/code/platform/models/CreateUpdateAddressSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/CreateUpdateAddressSerializerPlatformModelClass.swift @@ -8,6 +8,8 @@ public extension PlatformClient { */ class CreateUpdateAddressSerializer: Codable { + public var pincode: Int + public var country: String public var address1: String @@ -16,21 +18,21 @@ public extension PlatformClient { public var city: String - public var pincode: Int - public var state: String - public var addressType: String + public var countryCode: String? - public var address2: String? + public var latitude: Double - public var countryCode: String? + public var addressType: String public var longitude: Double - public var latitude: Double + public var address2: String? public enum CodingKeys: String, CodingKey { + case pincode + case country case address1 @@ -39,22 +41,22 @@ public extension PlatformClient { case city - case pincode - case state - case addressType = "address_type" + case countryCode = "country_code" - case address2 + case latitude - case countryCode = "country_code" + case addressType = "address_type" case longitude - case latitude + case address2 } public init(address1: String, address2: String? = nil, addressType: String, city: String, country: String, countryCode: String? = nil, landmark: String? = nil, latitude: Double, longitude: Double, pincode: Int, state: String) { + self.pincode = pincode + self.country = country self.address1 = address1 @@ -63,24 +65,24 @@ public extension PlatformClient { self.city = city - self.pincode = pincode - self.state = state - self.addressType = addressType + self.countryCode = countryCode - self.address2 = address2 + self.latitude = latitude - self.countryCode = countryCode + self.addressType = addressType self.longitude = longitude - self.latitude = latitude + self.address2 = address2 } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + pincode = try container.decode(Int.self, forKey: .pincode) + country = try container.decode(String.self, forKey: .country) address1 = try container.decode(String.self, forKey: .address1) @@ -95,36 +97,36 @@ public extension PlatformClient { city = try container.decode(String.self, forKey: .city) - pincode = try container.decode(Int.self, forKey: .pincode) - state = try container.decode(String.self, forKey: .state) - addressType = try container.decode(String.self, forKey: .addressType) - do { - address2 = try container.decode(String.self, forKey: .address2) + countryCode = try container.decode(String.self, forKey: .countryCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + latitude = try container.decode(Double.self, forKey: .latitude) + + addressType = try container.decode(String.self, forKey: .addressType) + + longitude = try container.decode(Double.self, forKey: .longitude) + do { - countryCode = try container.decode(String.self, forKey: .countryCode) + address2 = try container.decode(String.self, forKey: .address2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - longitude = try container.decode(Double.self, forKey: .longitude) - - latitude = try container.decode(Double.self, forKey: .latitude) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(pincode, forKey: .pincode) + try? container.encodeIfPresent(country, forKey: .country) try? container.encodeIfPresent(address1, forKey: .address1) @@ -133,19 +135,17 @@ public extension PlatformClient { try? container.encodeIfPresent(city, forKey: .city) - try? container.encodeIfPresent(pincode, forKey: .pincode) - try? container.encodeIfPresent(state, forKey: .state) - try? container.encodeIfPresent(addressType, forKey: .addressType) + try? container.encodeIfPresent(countryCode, forKey: .countryCode) - try? container.encodeIfPresent(address2, forKey: .address2) + try? container.encodeIfPresent(latitude, forKey: .latitude) - try? container.encodeIfPresent(countryCode, forKey: .countryCode) + try? container.encodeIfPresent(addressType, forKey: .addressType) try? container.encodeIfPresent(longitude, forKey: .longitude) - try? container.encodeIfPresent(latitude, forKey: .latitude) + try? container.encodeIfPresent(address2, forKey: .address2) } } } diff --git a/Sources/code/platform/models/CreateUpdateBrandRequestSerializerPlatformModelClass.swift b/Sources/code/platform/models/CreateUpdateBrandRequestSerializerPlatformModelClass.swift index 1eaf7f3499..cbd2448681 100644 --- a/Sources/code/platform/models/CreateUpdateBrandRequestSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/CreateUpdateBrandRequestSerializerPlatformModelClass.swift @@ -8,75 +8,75 @@ public extension PlatformClient { */ class CreateUpdateBrandRequestSerializer: Codable { - public var localeLanguage: [String: Any]? - - public var description: String? + public var banner: BrandBannerSerializer? public var customJson: [String: Any]? - public var name: String - - public var banner: BrandBannerSerializer? + public var description: String? public var brandTier: String? + public var synonyms: [String]? + + public var name: String + public var companyId: Int? + public var localeLanguage: [String: Any]? + public var logo: String public var uid: Int? - public var synonyms: [String]? - public enum CodingKeys: String, CodingKey { - case localeLanguage = "_locale_language" - - case description + case banner case customJson = "_custom_json" - case name - - case banner + case description case brandTier = "brand_tier" + case synonyms + + case name + case companyId = "company_id" + case localeLanguage = "_locale_language" + case logo case uid - - case synonyms } public init(banner: BrandBannerSerializer? = nil, brandTier: String? = nil, companyId: Int? = nil, description: String? = nil, logo: String, name: String, synonyms: [String]? = nil, uid: Int? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil) { - self.localeLanguage = localeLanguage - - self.description = description + self.banner = banner self.customJson = customJson - self.name = name - - self.banner = banner + self.description = description self.brandTier = brandTier + self.synonyms = synonyms + + self.name = name + self.companyId = companyId + self.localeLanguage = localeLanguage + self.logo = logo self.uid = uid - - self.synonyms = synonyms } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - localeLanguage = try container.decode([String: Any].self, forKey: .localeLanguage) + banner = try container.decode(BrandBannerSerializer.self, forKey: .banner) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,7 +84,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,17 +92,15 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - name = try container.decode(String.self, forKey: .name) - do { - banner = try container.decode(BrandBannerSerializer.self, forKey: .banner) + brandTier = try container.decode(String.self, forKey: .brandTier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,13 +108,15 @@ public extension PlatformClient { } catch {} do { - brandTier = try container.decode(String.self, forKey: .brandTier) + synonyms = try container.decode([String].self, forKey: .synonyms) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + do { companyId = try container.decode(Int.self, forKey: .companyId) @@ -125,18 +125,18 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - logo = try container.decode(String.self, forKey: .logo) - do { - uid = try container.decode(Int.self, forKey: .uid) + localeLanguage = try container.decode([String: Any].self, forKey: .localeLanguage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + logo = try container.decode(String.self, forKey: .logo) + do { - synonyms = try container.decode([String].self, forKey: .synonyms) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -147,25 +147,25 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) - - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(banner, forKey: .banner) try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(name, forKey: .name) - - try? container.encodeIfPresent(banner, forKey: .banner) + try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(brandTier, forKey: .brandTier) + try? container.encodeIfPresent(synonyms, forKey: .synonyms) + + try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) + try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(synonyms, forKey: .synonyms) } } } diff --git a/Sources/code/platform/models/CrossSellingResponsePlatformModelClass.swift b/Sources/code/platform/models/CrossSellingResponsePlatformModelClass.swift index 4de9a2237f..a0f9490ce7 100644 --- a/Sources/code/platform/models/CrossSellingResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/CrossSellingResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class CrossSellingResponse: Codable { - public var data: CrossSellingData? - public var brandDistribution: CatalogInsightBrand? - public enum CodingKeys: String, CodingKey { - case data + public var data: CrossSellingData? + public enum CodingKeys: String, CodingKey { case brandDistribution = "brand_distribution" + + case data } public init(brandDistribution: CatalogInsightBrand? = nil, data: CrossSellingData? = nil) { - self.data = data - self.brandDistribution = brandDistribution + + self.data = data } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - data = try container.decode(CrossSellingData.self, forKey: .data) + brandDistribution = try container.decode(CatalogInsightBrand.self, forKey: .brandDistribution) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - brandDistribution = try container.decode(CatalogInsightBrand.self, forKey: .brandDistribution) + data = try container.decode(CrossSellingData.self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(data, forKey: .data) - try? container.encodeIfPresent(brandDistribution, forKey: .brandDistribution) + + try? container.encodeIfPresent(data, forKey: .data) } } } diff --git a/Sources/code/platform/models/CustomOrderPlatformModelClass.swift b/Sources/code/platform/models/CustomOrderPlatformModelClass.swift index 653d594d2b..5233abc545 100644 --- a/Sources/code/platform/models/CustomOrderPlatformModelClass.swift +++ b/Sources/code/platform/models/CustomOrderPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class CustomOrder: Codable { + public var isCustomOrder: Bool? + public var manufacturingTimeUnit: String? public var manufacturingTime: Int? - public var isCustomOrder: Bool? - public enum CodingKeys: String, CodingKey { + case isCustomOrder = "is_custom_order" + case manufacturingTimeUnit = "manufacturing_time_unit" case manufacturingTime = "manufacturing_time" - - case isCustomOrder = "is_custom_order" } public init(isCustomOrder: Bool? = nil, manufacturingTime: Int? = nil, manufacturingTimeUnit: String? = nil) { + self.isCustomOrder = isCustomOrder + self.manufacturingTimeUnit = manufacturingTimeUnit self.manufacturingTime = manufacturingTime - - self.isCustomOrder = isCustomOrder } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - manufacturingTimeUnit = try container.decode(String.self, forKey: .manufacturingTimeUnit) + isCustomOrder = try container.decode(Bool.self, forKey: .isCustomOrder) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - manufacturingTime = try container.decode(Int.self, forKey: .manufacturingTime) + manufacturingTimeUnit = try container.decode(String.self, forKey: .manufacturingTimeUnit) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - isCustomOrder = try container.decode(Bool.self, forKey: .isCustomOrder) + manufacturingTime = try container.decode(Int.self, forKey: .manufacturingTime) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(isCustomOrder, forKey: .isCustomOrder) + try? container.encodeIfPresent(manufacturingTimeUnit, forKey: .manufacturingTimeUnit) try? container.encodeIfPresent(manufacturingTime, forKey: .manufacturingTime) - - try? container.encodeIfPresent(isCustomOrder, forKey: .isCustomOrder) } } } diff --git a/Sources/code/platform/models/DepartmentCategoryTreePlatformModelClass.swift b/Sources/code/platform/models/DepartmentCategoryTreePlatformModelClass.swift index 4b277e8e37..2cf31eb00e 100644 --- a/Sources/code/platform/models/DepartmentCategoryTreePlatformModelClass.swift +++ b/Sources/code/platform/models/DepartmentCategoryTreePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class DepartmentCategoryTree: Codable { - public var department: String? - public var items: [CategoryItems]? - public enum CodingKeys: String, CodingKey { - case department + public var department: String? + public enum CodingKeys: String, CodingKey { case items + + case department } public init(department: String? = nil, items: [CategoryItems]? = nil) { - self.department = department - self.items = items + + self.department = department } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - department = try container.decode(String.self, forKey: .department) + items = try container.decode([CategoryItems].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - items = try container.decode([CategoryItems].self, forKey: .items) + department = try container.decode(String.self, forKey: .department) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(department, forKey: .department) - try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(department, forKey: .department) } } } diff --git a/Sources/code/platform/models/DepartmentErrorResponsePlatformModelClass.swift b/Sources/code/platform/models/DepartmentErrorResponsePlatformModelClass.swift index 53e7abb9a6..ec361cf392 100644 --- a/Sources/code/platform/models/DepartmentErrorResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/DepartmentErrorResponsePlatformModelClass.swift @@ -8,45 +8,45 @@ public extension PlatformClient { */ class DepartmentErrorResponse: Codable { + public var status: Int? + public var code: String? - public var errors: [String: Any]? + public var meta: [String: Any]? public var message: String? - public var meta: [String: Any]? - - public var status: Int? + public var errors: [String: Any]? public enum CodingKeys: String, CodingKey { + case status + case code - case errors + case meta case message - case meta - - case status + case errors } public init(code: String? = nil, errors: [String: Any]? = nil, message: String? = nil, meta: [String: Any]? = nil, status: Int? = nil) { + self.status = status + self.code = code - self.errors = errors + self.meta = meta self.message = message - self.meta = meta - - self.status = status + self.errors = errors } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - code = try container.decode(String.self, forKey: .code) + status = try container.decode(Int.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - errors = try container.decode([String: Any].self, forKey: .errors) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - message = try container.decode(String.self, forKey: .message) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + message = try container.decode(String.self, forKey: .message) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - status = try container.decode(Int.self, forKey: .status) + errors = try container.decode([String: Any].self, forKey: .errors) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,15 +89,15 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(code, forKey: .code) - try? container.encodeIfPresent(errors, forKey: .errors) + try? container.encodeIfPresent(meta, forKey: .meta) try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(meta, forKey: .meta) - - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(errors, forKey: .errors) } } } diff --git a/Sources/code/platform/models/DepartmentPlatformModelClass.swift b/Sources/code/platform/models/DepartmentPlatformModelClass.swift index 18305a5abb..3dbd6b5363 100644 --- a/Sources/code/platform/models/DepartmentPlatformModelClass.swift +++ b/Sources/code/platform/models/DepartmentPlatformModelClass.swift @@ -8,37 +8,37 @@ public extension PlatformClient { */ class Department: Codable { - public var priorityOrder: Int? - public var slug: String? - public var uid: Int? - public var name: String? + public var priorityOrder: Int? + + public var uid: Int? + public var logo: Media? public enum CodingKeys: String, CodingKey { - case priorityOrder = "priority_order" - case slug - case uid - case name + case priorityOrder = "priority_order" + + case uid + case logo } public init(logo: Media? = nil, name: String? = nil, priorityOrder: Int? = nil, slug: String? = nil, uid: Int? = nil) { - self.priorityOrder = priorityOrder - self.slug = slug - self.uid = uid - self.name = name + self.priorityOrder = priorityOrder + + self.uid = uid + self.logo = logo } @@ -46,7 +46,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - priorityOrder = try container.decode(Int.self, forKey: .priorityOrder) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + priorityOrder = try container.decode(Int.self, forKey: .priorityOrder) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,14 +89,14 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) - try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) + + try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(logo, forKey: .logo) } } diff --git a/Sources/code/platform/models/DocumentPlatformModelClass.swift b/Sources/code/platform/models/DocumentPlatformModelClass.swift index c9b1fa1a8c..d3ea9453dc 100644 --- a/Sources/code/platform/models/DocumentPlatformModelClass.swift +++ b/Sources/code/platform/models/DocumentPlatformModelClass.swift @@ -10,36 +10,36 @@ public extension PlatformClient { class Document: Codable { public var url: String? - public var type: String - public var value: String public var verified: Bool? public var legalName: String? + public var type: String + public enum CodingKeys: String, CodingKey { case url - case type - case value case verified case legalName = "legal_name" + + case type } public init(legalName: String? = nil, type: String, url: String? = nil, value: String, verified: Bool? = nil) { self.url = url - self.type = type - self.value = value self.verified = verified self.legalName = legalName + + self.type = type } required public init(from decoder: Decoder) throws { @@ -53,8 +53,6 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - type = try container.decode(String.self, forKey: .type) - value = try container.decode(String.self, forKey: .value) do { @@ -72,6 +70,8 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + type = try container.decode(String.self, forKey: .type) } public func encode(to encoder: Encoder) throws { @@ -79,13 +79,13 @@ public extension PlatformClient { try? container.encodeIfPresent(url, forKey: .url) - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(value, forKey: .value) try? container.encodeIfPresent(verified, forKey: .verified) try? container.encodeIfPresent(legalName, forKey: .legalName) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/DocumentsObjPlatformModelClass.swift b/Sources/code/platform/models/DocumentsObjPlatformModelClass.swift index 878963edff..bd04e6daed 100644 --- a/Sources/code/platform/models/DocumentsObjPlatformModelClass.swift +++ b/Sources/code/platform/models/DocumentsObjPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class DocumentsObj: Codable { - public var verified: Int? - public var pending: Int? - public enum CodingKeys: String, CodingKey { - case verified + public var verified: Int? + public enum CodingKeys: String, CodingKey { case pending + + case verified } public init(pending: Int? = nil, verified: Int? = nil) { - self.verified = verified - self.pending = pending + + self.verified = verified } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - verified = try container.decode(Int.self, forKey: .verified) + pending = try container.decode(Int.self, forKey: .pending) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - pending = try container.decode(Int.self, forKey: .pending) + verified = try container.decode(Int.self, forKey: .verified) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(verified, forKey: .verified) - try? container.encodeIfPresent(pending, forKey: .pending) + + try? container.encodeIfPresent(verified, forKey: .verified) } } } diff --git a/Sources/code/platform/models/EntityConfigurationPlatformModelClass.swift b/Sources/code/platform/models/EntityConfigurationPlatformModelClass.swift index 869f7ffb6c..8d107225bd 100644 --- a/Sources/code/platform/models/EntityConfigurationPlatformModelClass.swift +++ b/Sources/code/platform/models/EntityConfigurationPlatformModelClass.swift @@ -8,61 +8,61 @@ public extension PlatformClient { */ class EntityConfiguration: Codable { - public var listing: GetCatalogConfigurationDetailsSchemaListing? - - public var appId: String - public var id: String? - public var configId: String? - public var configType: String + public var listing: GetCatalogConfigurationDetailsSchemaListing? + public var product: GetCatalogConfigurationDetailsProduct? - public enum CodingKeys: String, CodingKey { - case listing + public var appId: String - case appId = "app_id" + public var configId: String? + public enum CodingKeys: String, CodingKey { case id - case configId = "config_id" - case configType = "config_type" + case listing + case product - } - public init(appId: String, configId: String? = nil, configType: String, id: String? = nil, listing: GetCatalogConfigurationDetailsSchemaListing? = nil, product: GetCatalogConfigurationDetailsProduct? = nil) { - self.listing = listing + case appId = "app_id" - self.appId = appId + case configId = "config_id" + } + public init(appId: String, configId: String? = nil, configType: String, id: String? = nil, listing: GetCatalogConfigurationDetailsSchemaListing? = nil, product: GetCatalogConfigurationDetailsProduct? = nil) { self.id = id - self.configId = configId - self.configType = configType + self.listing = listing + self.product = product + + self.appId = appId + + self.configId = configId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - listing = try container.decode(GetCatalogConfigurationDetailsSchemaListing.self, forKey: .listing) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - appId = try container.decode(String.self, forKey: .appId) + configType = try container.decode(String.self, forKey: .configType) do { - id = try container.decode(String.self, forKey: .id) + listing = try container.decode(GetCatalogConfigurationDetailsSchemaListing.self, forKey: .listing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,17 +70,17 @@ public extension PlatformClient { } catch {} do { - configId = try container.decode(String.self, forKey: .configId) + product = try container.decode(GetCatalogConfigurationDetailsProduct.self, forKey: .product) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - configType = try container.decode(String.self, forKey: .configType) + appId = try container.decode(String.self, forKey: .appId) do { - product = try container.decode(GetCatalogConfigurationDetailsProduct.self, forKey: .product) + configId = try container.decode(String.self, forKey: .configId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,17 +91,17 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(listing, forKey: .listing) - - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(configId, forKey: .configId) - try? container.encodeIfPresent(configType, forKey: .configType) + try? container.encodeIfPresent(listing, forKey: .listing) + try? container.encodeIfPresent(product, forKey: .product) + + try? container.encodeIfPresent(appId, forKey: .appId) + + try? container.encodeIfPresent(configId, forKey: .configId) } } } diff --git a/Sources/code/platform/models/ErrorCodeDescriptionPlatformModelClass.swift b/Sources/code/platform/models/ErrorCodeDescriptionPlatformModelClass.swift index 5e0b6caa80..5ced9a72f0 100644 --- a/Sources/code/platform/models/ErrorCodeDescriptionPlatformModelClass.swift +++ b/Sources/code/platform/models/ErrorCodeDescriptionPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class ErrorCodeDescription: Codable { public var description: String - public var code: String - public var success: Bool + public var code: String + public enum CodingKeys: String, CodingKey { case description - case code - case success + + case code } public init(code: String, description: String, success: Bool) { self.description = description - self.code = code - self.success = success + + self.code = code } required public init(from decoder: Decoder) throws { @@ -35,9 +35,9 @@ public extension PlatformClient { description = try container.decode(String.self, forKey: .description) - code = try container.decode(String.self, forKey: .code) - success = try container.decode(Bool.self, forKey: .success) + + code = try container.decode(String.self, forKey: .code) } public func encode(to encoder: Encoder) throws { @@ -45,9 +45,9 @@ public extension PlatformClient { try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(code, forKey: .code) - try? container.encodeIfPresent(success, forKey: .success) + + try? container.encodeIfPresent(code, forKey: .code) } } } diff --git a/Sources/code/platform/models/ErrorResponsePlatformModelClass.swift b/Sources/code/platform/models/ErrorResponsePlatformModelClass.swift index c833cfdc61..1b05a3b894 100644 --- a/Sources/code/platform/models/ErrorResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/ErrorResponsePlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class ErrorResponse: Codable { - public var code: String? - - public var message: String? + public var meta: [String: Any]? public var status: Int? - public var meta: [String: Any]? + public var message: String? - public enum CodingKeys: String, CodingKey { - case code + public var code: String? - case message + public enum CodingKeys: String, CodingKey { + case meta case status - case meta + case message + + case code } public init(code: String? = nil, message: String? = nil, meta: [String: Any]? = nil, status: Int? = nil) { - self.code = code - - self.message = message + self.meta = meta self.status = status - self.meta = meta + self.message = message + + self.code = code } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - code = try container.decode(String.self, forKey: .code) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - message = try container.decode(String.self, forKey: .message) + status = try container.decode(Int.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - status = try container.decode(Int.self, forKey: .status) + message = try container.decode(String.self, forKey: .message) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(code, forKey: .code) - - try? container.encodeIfPresent(message, forKey: .message) + try? container.encodeIfPresent(meta, forKey: .meta) try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(message, forKey: .message) + + try? container.encodeIfPresent(code, forKey: .code) } } } diff --git a/Sources/code/platform/models/FilerListPlatformModelClass.swift b/Sources/code/platform/models/FilerListPlatformModelClass.swift index c588877530..bc96d69fd1 100644 --- a/Sources/code/platform/models/FilerListPlatformModelClass.swift +++ b/Sources/code/platform/models/FilerListPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class FilerList: Codable { - public var display: String? - public var value: String? - public enum CodingKeys: String, CodingKey { - case display + public var display: String? + public enum CodingKeys: String, CodingKey { case value + + case display } public init(display: String? = nil, value: String? = nil) { - self.display = display - self.value = value + + self.display = display } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - display = try container.decode(String.self, forKey: .display) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - value = try container.decode(String.self, forKey: .value) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(value, forKey: .value) + + try? container.encodeIfPresent(display, forKey: .display) } } } diff --git a/Sources/code/platform/models/GTINPlatformModelClass.swift b/Sources/code/platform/models/GTINPlatformModelClass.swift index 1702ca2e5c..18d97da2f8 100644 --- a/Sources/code/platform/models/GTINPlatformModelClass.swift +++ b/Sources/code/platform/models/GTINPlatformModelClass.swift @@ -8,31 +8,33 @@ public extension PlatformClient { */ class GTIN: Codable { + public var gtinType: String + public var primary: Bool? public var gtinValue: String - public var gtinType: String - public enum CodingKeys: String, CodingKey { + case gtinType = "gtin_type" + case primary case gtinValue = "gtin_value" - - case gtinType = "gtin_type" } public init(gtinType: String, gtinValue: String, primary: Bool? = nil) { + self.gtinType = gtinType + self.primary = primary self.gtinValue = gtinValue - - self.gtinType = gtinType } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + gtinType = try container.decode(String.self, forKey: .gtinType) + do { primary = try container.decode(Bool.self, forKey: .primary) @@ -42,18 +44,16 @@ public extension PlatformClient { } catch {} gtinValue = try container.decode(String.self, forKey: .gtinValue) - - gtinType = try container.decode(String.self, forKey: .gtinType) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(gtinType, forKey: .gtinType) + try? container.encodeIfPresent(primary, forKey: .primary) try? container.encodeIfPresent(gtinValue, forKey: .gtinValue) - - try? container.encodeIfPresent(gtinType, forKey: .gtinType) } } } diff --git a/Sources/code/platform/models/GenderDetailPlatformModelClass.swift b/Sources/code/platform/models/GenderDetailPlatformModelClass.swift index 7f2051132d..c6d5217357 100644 --- a/Sources/code/platform/models/GenderDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/GenderDetailPlatformModelClass.swift @@ -8,87 +8,87 @@ public extension PlatformClient { */ class GenderDetail: Codable { - public var schema: AttributeMaster? - - public var isNested: Bool? - - public var id: String? - - public var filters: AttributeMasterFilter? - public var departments: [String]? + public var description: String? + public var slug: String? public var meta: AttributeMasterMeta? - public var enabledForEndConsumer: Bool? - - public var details: AttributeMasterDetails? - - public var description: String? + public var id: String? public var name: String? - public var logo: String? + public var enabledForEndConsumer: Bool? - public enum CodingKeys: String, CodingKey { - case schema + public var filters: AttributeMasterFilter? - case isNested = "is_nested" + public var details: AttributeMasterDetails? - case id + public var isNested: Bool? - case filters + public var logo: String? + public var schema: AttributeMaster? + + public enum CodingKeys: String, CodingKey { case departments + case description + case slug case meta + case id + + case name + case enabledForEndConsumer = "enabled_for_end_consumer" - case details + case filters - case description + case details - case name + case isNested = "is_nested" case logo + + case schema } public init(departments: [String]? = nil, description: String? = nil, details: AttributeMasterDetails? = nil, enabledForEndConsumer: Bool? = nil, filters: AttributeMasterFilter? = nil, id: String? = nil, isNested: Bool? = nil, logo: String? = nil, meta: AttributeMasterMeta? = nil, name: String? = nil, schema: AttributeMaster? = nil, slug: String? = nil) { - self.schema = schema - - self.isNested = isNested - - self.id = id - - self.filters = filters - self.departments = departments + self.description = description + self.slug = slug self.meta = meta + self.id = id + + self.name = name + self.enabledForEndConsumer = enabledForEndConsumer - self.details = details + self.filters = filters - self.description = description + self.details = details - self.name = name + self.isNested = isNested self.logo = logo + + self.schema = schema } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - schema = try container.decode(AttributeMaster.self, forKey: .schema) + departments = try container.decode([String].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -96,7 +96,7 @@ public extension PlatformClient { } catch {} do { - isNested = try container.decode(Bool.self, forKey: .isNested) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +104,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -112,7 +112,7 @@ public extension PlatformClient { } catch {} do { - filters = try container.decode(AttributeMasterFilter.self, forKey: .filters) + meta = try container.decode(AttributeMasterMeta.self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -120,7 +120,7 @@ public extension PlatformClient { } catch {} do { - departments = try container.decode([String].self, forKey: .departments) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +128,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -136,7 +136,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode(AttributeMasterMeta.self, forKey: .meta) + enabledForEndConsumer = try container.decode(Bool.self, forKey: .enabledForEndConsumer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,7 +144,7 @@ public extension PlatformClient { } catch {} do { - enabledForEndConsumer = try container.decode(Bool.self, forKey: .enabledForEndConsumer) + filters = try container.decode(AttributeMasterFilter.self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -160,7 +160,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + isNested = try container.decode(Bool.self, forKey: .isNested) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -168,7 +168,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +176,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(String.self, forKey: .logo) + schema = try container.decode(AttributeMaster.self, forKey: .schema) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -187,29 +187,29 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(schema, forKey: .schema) - - try? container.encodeIfPresent(isNested, forKey: .isNested) - - try? container.encodeIfPresent(id, forKey: .id) - - try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(slug, forKey: .slug) try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(id, forKey: .id) + + try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(enabledForEndConsumer, forKey: .enabledForEndConsumer) - try? container.encodeIfPresent(details, forKey: .details) + try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(details, forKey: .details) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(isNested, forKey: .isNested) try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(schema, forKey: .schema) } } } diff --git a/Sources/code/platform/models/GetAddressSerializer1PlatformModelClass.swift b/Sources/code/platform/models/GetAddressSerializer1PlatformModelClass.swift index d50882fa7b..77c4dc3bab 100644 --- a/Sources/code/platform/models/GetAddressSerializer1PlatformModelClass.swift +++ b/Sources/code/platform/models/GetAddressSerializer1PlatformModelClass.swift @@ -8,6 +8,8 @@ public extension PlatformClient { */ class GetAddressSerializer1: Codable { + public var pincode: Int? + public var country: String? public var address1: String? @@ -16,21 +18,21 @@ public extension PlatformClient { public var city: String? - public var pincode: Int? - - public var addressType: String? - public var state: String? - public var address2: String? - public var countryCode: String? + public var latitude: Double? + + public var addressType: String? + public var longitude: Double? - public var latitude: Double? + public var address2: String? public enum CodingKeys: String, CodingKey { + case pincode + case country case address1 @@ -39,22 +41,22 @@ public extension PlatformClient { case city - case pincode - - case addressType = "address_type" - case state - case address2 - case countryCode = "country_code" + case latitude + + case addressType = "address_type" + case longitude - case latitude + case address2 } public init(address1: String? = nil, address2: String? = nil, addressType: String? = nil, city: String? = nil, country: String? = nil, countryCode: String? = nil, landmark: String? = nil, latitude: Double? = nil, longitude: Double? = nil, pincode: Int? = nil, state: String? = nil) { + self.pincode = pincode + self.country = country self.address1 = address1 @@ -63,26 +65,24 @@ public extension PlatformClient { self.city = city - self.pincode = pincode - - self.addressType = addressType - self.state = state - self.address2 = address2 - self.countryCode = countryCode + self.latitude = latitude + + self.addressType = addressType + self.longitude = longitude - self.latitude = latitude + self.address2 = address2 } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - country = try container.decode(String.self, forKey: .country) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - address1 = try container.decode(String.self, forKey: .address1) + country = try container.decode(String.self, forKey: .country) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} do { - landmark = try container.decode(String.self, forKey: .landmark) + address1 = try container.decode(String.self, forKey: .address1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -106,7 +106,7 @@ public extension PlatformClient { } catch {} do { - city = try container.decode(String.self, forKey: .city) + landmark = try container.decode(String.self, forKey: .landmark) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +114,7 @@ public extension PlatformClient { } catch {} do { - pincode = try container.decode(Int.self, forKey: .pincode) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient { } catch {} do { - addressType = try container.decode(String.self, forKey: .addressType) + state = try container.decode(String.self, forKey: .state) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension PlatformClient { } catch {} do { - state = try container.decode(String.self, forKey: .state) + countryCode = try container.decode(String.self, forKey: .countryCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - address2 = try container.decode(String.self, forKey: .address2) + latitude = try container.decode(Double.self, forKey: .latitude) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient { } catch {} do { - countryCode = try container.decode(String.self, forKey: .countryCode) + addressType = try container.decode(String.self, forKey: .addressType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - latitude = try container.decode(Double.self, forKey: .latitude) + address2 = try container.decode(String.self, forKey: .address2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -173,6 +173,8 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(pincode, forKey: .pincode) + try? container.encodeIfPresent(country, forKey: .country) try? container.encodeIfPresent(address1, forKey: .address1) @@ -181,19 +183,17 @@ public extension PlatformClient { try? container.encodeIfPresent(city, forKey: .city) - try? container.encodeIfPresent(pincode, forKey: .pincode) - - try? container.encodeIfPresent(addressType, forKey: .addressType) - try? container.encodeIfPresent(state, forKey: .state) - try? container.encodeIfPresent(address2, forKey: .address2) - try? container.encodeIfPresent(countryCode, forKey: .countryCode) + try? container.encodeIfPresent(latitude, forKey: .latitude) + + try? container.encodeIfPresent(addressType, forKey: .addressType) + try? container.encodeIfPresent(longitude, forKey: .longitude) - try? container.encodeIfPresent(latitude, forKey: .latitude) + try? container.encodeIfPresent(address2, forKey: .address2) } } } diff --git a/Sources/code/platform/models/GetAddressSerializerPlatformModelClass.swift b/Sources/code/platform/models/GetAddressSerializerPlatformModelClass.swift index 5a4687868a..731a154805 100644 --- a/Sources/code/platform/models/GetAddressSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/GetAddressSerializerPlatformModelClass.swift @@ -8,81 +8,81 @@ public extension PlatformClient { */ class GetAddressSerializer: Codable { - public var country: String? + public var landmark: String? - public var address2: String? + public var address1: String? public var addressType: String? - public var longitude: Double? - - public var pincode: Int? + public var address2: String? public var countryCode: String? public var state: String? - public var landmark: String? + public var pincode: Int? + + public var city: String? public var latitude: Double? - public var address1: String? + public var country: String? - public var city: String? + public var longitude: Double? public enum CodingKeys: String, CodingKey { - case country + case landmark - case address2 + case address1 case addressType = "address_type" - case longitude - - case pincode + case address2 case countryCode = "country_code" case state - case landmark + case pincode + + case city case latitude - case address1 + case country - case city + case longitude } public init(address1: String? = nil, address2: String? = nil, addressType: String? = nil, city: String? = nil, country: String? = nil, countryCode: String? = nil, landmark: String? = nil, latitude: Double? = nil, longitude: Double? = nil, pincode: Int? = nil, state: String? = nil) { - self.country = country + self.landmark = landmark - self.address2 = address2 + self.address1 = address1 self.addressType = addressType - self.longitude = longitude - - self.pincode = pincode + self.address2 = address2 self.countryCode = countryCode self.state = state - self.landmark = landmark + self.pincode = pincode + + self.city = city self.latitude = latitude - self.address1 = address1 + self.country = country - self.city = city + self.longitude = longitude } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - country = try container.decode(String.self, forKey: .country) + landmark = try container.decode(String.self, forKey: .landmark) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - address2 = try container.decode(String.self, forKey: .address2) + address1 = try container.decode(String.self, forKey: .address1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -106,7 +106,7 @@ public extension PlatformClient { } catch {} do { - longitude = try container.decode(Double.self, forKey: .longitude) + address2 = try container.decode(String.self, forKey: .address2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +114,7 @@ public extension PlatformClient { } catch {} do { - pincode = try container.decode(Int.self, forKey: .pincode) + countryCode = try container.decode(String.self, forKey: .countryCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient { } catch {} do { - countryCode = try container.decode(String.self, forKey: .countryCode) + state = try container.decode(String.self, forKey: .state) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension PlatformClient { } catch {} do { - state = try container.decode(String.self, forKey: .state) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - landmark = try container.decode(String.self, forKey: .landmark) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ public extension PlatformClient { } catch {} do { - address1 = try container.decode(String.self, forKey: .address1) + country = try container.decode(String.self, forKey: .country) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - city = try container.decode(String.self, forKey: .city) + longitude = try container.decode(Double.self, forKey: .longitude) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -173,27 +173,27 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(country, forKey: .country) + try? container.encodeIfPresent(landmark, forKey: .landmark) - try? container.encodeIfPresent(address2, forKey: .address2) + try? container.encodeIfPresent(address1, forKey: .address1) try? container.encodeIfPresent(addressType, forKey: .addressType) - try? container.encodeIfPresent(longitude, forKey: .longitude) - - try? container.encodeIfPresent(pincode, forKey: .pincode) + try? container.encodeIfPresent(address2, forKey: .address2) try? container.encodeIfPresent(countryCode, forKey: .countryCode) try? container.encodeIfPresent(state, forKey: .state) - try? container.encodeIfPresent(landmark, forKey: .landmark) + try? container.encodeIfPresent(pincode, forKey: .pincode) + + try? container.encodeIfPresent(city, forKey: .city) try? container.encodeIfPresent(latitude, forKey: .latitude) - try? container.encodeIfPresent(address1, forKey: .address1) + try? container.encodeIfPresent(country, forKey: .country) - try? container.encodeIfPresent(city, forKey: .city) + try? container.encodeIfPresent(longitude, forKey: .longitude) } } } diff --git a/Sources/code/platform/models/GetAutocompleteWordsDataPlatformModelClass.swift b/Sources/code/platform/models/GetAutocompleteWordsDataPlatformModelClass.swift index 2fbf8fb0b8..ab8ef47fa3 100644 --- a/Sources/code/platform/models/GetAutocompleteWordsDataPlatformModelClass.swift +++ b/Sources/code/platform/models/GetAutocompleteWordsDataPlatformModelClass.swift @@ -8,45 +8,45 @@ public extension PlatformClient { */ class GetAutocompleteWordsData: Codable { - public var customJson: [String: Any]? - - public var appId: String? - public var words: [String]? public var results: [[String: Any]]? public var uid: String? - public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + public var appId: String? - case appId = "app_id" + public var customJson: [String: Any]? + public enum CodingKeys: String, CodingKey { case words case results case uid - } - public init(appId: String? = nil, results: [[String: Any]]? = nil, uid: String? = nil, words: [String]? = nil, customJson: [String: Any]? = nil) { - self.customJson = customJson + case appId = "app_id" - self.appId = appId + case customJson = "_custom_json" + } + public init(appId: String? = nil, results: [[String: Any]]? = nil, uid: String? = nil, words: [String]? = nil, customJson: [String: Any]? = nil) { self.words = words self.results = results self.uid = uid + + self.appId = appId + + self.customJson = customJson } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + words = try container.decode([String].self, forKey: .words) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + results = try container.decode([[String: Any]].self, forKey: .results) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - words = try container.decode([String].self, forKey: .words) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - results = try container.decode([[String: Any]].self, forKey: .results) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(String.self, forKey: .uid) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,15 +89,15 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(customJson, forKey: .customJson) - - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(words, forKey: .words) try? container.encodeIfPresent(results, forKey: .results) try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(appId, forKey: .appId) + + try? container.encodeIfPresent(customJson, forKey: .customJson) } } } diff --git a/Sources/code/platform/models/GetBrandResponseSerializerPlatformModelClass.swift b/Sources/code/platform/models/GetBrandResponseSerializerPlatformModelClass.swift index 607105ddc2..45bd43fd71 100644 --- a/Sources/code/platform/models/GetBrandResponseSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/GetBrandResponseSerializerPlatformModelClass.swift @@ -8,129 +8,129 @@ public extension PlatformClient { */ class GetBrandResponseSerializer: Codable { - public var verifiedOn: String? - - public var verifiedBy: UserSerializer1? - - public var slugKey: String? - - public var synonyms: [String]? - - public var name: String - - public var createdOn: String? - - public var createdBy: UserSerializer1? - public var banner: BrandBannerSerializer? - public var mode: String? + public var stage: String? + + public var rejectReason: String? public var modifiedOn: String? - public var stage: String? + public var verifiedBy: UserSerializer1? public var uid: Int? - public var localeLanguage: [String: Any]? - public var description: String? - public var customJson: [String: Any]? + public var synonyms: [String]? - public var rejectReason: String? + public var localeLanguage: [String: Any]? - public var warnings: [String: Any]? + public var logo: String? public var modifiedBy: UserSerializer1? - public var logo: String? + public var customJson: [String: Any]? - public enum CodingKeys: String, CodingKey { - case verifiedOn = "verified_on" + public var name: String - case verifiedBy = "verified_by" + public var mode: String? - case slugKey = "slug_key" + public var createdOn: String? - case synonyms + public var createdBy: UserSerializer1? - case name + public var warnings: [String: Any]? - case createdOn = "created_on" + public var verifiedOn: String? - case createdBy = "created_by" + public var slugKey: String? + public enum CodingKeys: String, CodingKey { case banner - case mode + case stage + + case rejectReason = "reject_reason" case modifiedOn = "modified_on" - case stage + case verifiedBy = "verified_by" case uid - case localeLanguage = "_locale_language" - case description - case customJson = "_custom_json" + case synonyms - case rejectReason = "reject_reason" + case localeLanguage = "_locale_language" - case warnings + case logo case modifiedBy = "modified_by" - case logo - } + case customJson = "_custom_json" - public init(banner: BrandBannerSerializer? = nil, createdBy: UserSerializer1? = nil, createdOn: String? = nil, description: String? = nil, logo: String? = nil, mode: String? = nil, modifiedBy: UserSerializer1? = nil, modifiedOn: String? = nil, name: String, rejectReason: String? = nil, slugKey: String? = nil, stage: String? = nil, synonyms: [String]? = nil, uid: Int? = nil, verifiedBy: UserSerializer1? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil) { - self.verifiedOn = verifiedOn + case name - self.verifiedBy = verifiedBy + case mode - self.slugKey = slugKey + case createdOn = "created_on" - self.synonyms = synonyms + case createdBy = "created_by" - self.name = name + case warnings - self.createdOn = createdOn + case verifiedOn = "verified_on" - self.createdBy = createdBy + case slugKey = "slug_key" + } + public init(banner: BrandBannerSerializer? = nil, createdBy: UserSerializer1? = nil, createdOn: String? = nil, description: String? = nil, logo: String? = nil, mode: String? = nil, modifiedBy: UserSerializer1? = nil, modifiedOn: String? = nil, name: String, rejectReason: String? = nil, slugKey: String? = nil, stage: String? = nil, synonyms: [String]? = nil, uid: Int? = nil, verifiedBy: UserSerializer1? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil) { self.banner = banner - self.mode = mode + self.stage = stage + + self.rejectReason = rejectReason self.modifiedOn = modifiedOn - self.stage = stage + self.verifiedBy = verifiedBy self.uid = uid + self.description = description + + self.synonyms = synonyms + self.localeLanguage = localeLanguage - self.description = description + self.logo = logo + + self.modifiedBy = modifiedBy self.customJson = customJson - self.rejectReason = rejectReason + self.name = name + + self.mode = mode + + self.createdOn = createdOn + + self.createdBy = createdBy self.warnings = warnings - self.modifiedBy = modifiedBy + self.verifiedOn = verifiedOn - self.logo = logo + self.slugKey = slugKey } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - verifiedOn = try container.decode(String.self, forKey: .verifiedOn) + banner = try container.decode(BrandBannerSerializer.self, forKey: .banner) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient { } catch {} do { - slugKey = try container.decode(String.self, forKey: .slugKey) + rejectReason = try container.decode(String.self, forKey: .rejectReason) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,17 +154,15 @@ public extension PlatformClient { } catch {} do { - synonyms = try container.decode([String].self, forKey: .synonyms) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - name = try container.decode(String.self, forKey: .name) - do { - createdOn = try container.decode(String.self, forKey: .createdOn) + verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -172,7 +170,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -180,7 +178,7 @@ public extension PlatformClient { } catch {} do { - banner = try container.decode(BrandBannerSerializer.self, forKey: .banner) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -188,7 +186,7 @@ public extension PlatformClient { } catch {} do { - mode = try container.decode(String.self, forKey: .mode) + synonyms = try container.decode([String].self, forKey: .synonyms) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -196,7 +194,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + localeLanguage = try container.decode([String: Any].self, forKey: .localeLanguage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -204,7 +202,7 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -212,7 +210,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -220,15 +218,17 @@ public extension PlatformClient { } catch {} do { - localeLanguage = try container.decode([String: Any].self, forKey: .localeLanguage) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + do { - description = try container.decode(String.self, forKey: .description) + mode = try container.decode(String.self, forKey: .mode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -236,7 +236,7 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -244,7 +244,7 @@ public extension PlatformClient { } catch {} do { - rejectReason = try container.decode(String.self, forKey: .rejectReason) + createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -260,7 +260,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) + verifiedOn = try container.decode(String.self, forKey: .verifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -268,7 +268,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(String.self, forKey: .logo) + slugKey = try container.decode(String.self, forKey: .slugKey) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -279,43 +279,43 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) + try? container.encodeIfPresent(banner, forKey: .banner) - try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) + try? container.encodeIfPresent(stage, forKey: .stage) - try? container.encodeIfPresent(slugKey, forKey: .slugKey) + try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) - try? container.encodeIfPresent(synonyms, forKey: .synonyms) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(banner, forKey: .banner) + try? container.encodeIfPresent(synonyms, forKey: .synonyms) - try? container.encodeIfPresent(mode, forKey: .mode) + try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(mode, forKey: .mode) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) try? container.encodeIfPresent(warnings, forKey: .warnings) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(slugKey, forKey: .slugKey) } } } diff --git a/Sources/code/platform/models/GetCatalogConfigurationDetailsProductPlatformModelClass.swift b/Sources/code/platform/models/GetCatalogConfigurationDetailsProductPlatformModelClass.swift index 330fc7e505..d57b3bf27f 100644 --- a/Sources/code/platform/models/GetCatalogConfigurationDetailsProductPlatformModelClass.swift +++ b/Sources/code/platform/models/GetCatalogConfigurationDetailsProductPlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class GetCatalogConfigurationDetailsProduct: Codable { - public var compare: [String: Any]? - - public var variant: [String: Any]? - public var detail: [String: Any]? public var similar: [String: Any]? - public enum CodingKeys: String, CodingKey { - case compare + public var variant: [String: Any]? - case variant + public var compare: [String: Any]? + public enum CodingKeys: String, CodingKey { case detail case similar - } - public init(compare: [String: Any]? = nil, detail: [String: Any]? = nil, similar: [String: Any]? = nil, variant: [String: Any]? = nil) { - self.compare = compare + case variant - self.variant = variant + case compare + } + public init(compare: [String: Any]? = nil, detail: [String: Any]? = nil, similar: [String: Any]? = nil, variant: [String: Any]? = nil) { self.detail = detail self.similar = similar + + self.variant = variant + + self.compare = compare } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - compare = try container.decode([String: Any].self, forKey: .compare) + detail = try container.decode([String: Any].self, forKey: .detail) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - variant = try container.decode([String: Any].self, forKey: .variant) + similar = try container.decode([String: Any].self, forKey: .similar) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - detail = try container.decode([String: Any].self, forKey: .detail) + variant = try container.decode([String: Any].self, forKey: .variant) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - similar = try container.decode([String: Any].self, forKey: .similar) + compare = try container.decode([String: Any].self, forKey: .compare) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(compare, forKey: .compare) - - try? container.encodeIfPresent(variant, forKey: .variant) - try? container.encodeIfPresent(detail, forKey: .detail) try? container.encodeIfPresent(similar, forKey: .similar) + + try? container.encodeIfPresent(variant, forKey: .variant) + + try? container.encodeIfPresent(compare, forKey: .compare) } } } diff --git a/Sources/code/platform/models/GetCollectionDetailNestPlatformModelClass.swift b/Sources/code/platform/models/GetCollectionDetailNestPlatformModelClass.swift index 1d2025a8ef..4760dfc493 100644 --- a/Sources/code/platform/models/GetCollectionDetailNestPlatformModelClass.swift +++ b/Sources/code/platform/models/GetCollectionDetailNestPlatformModelClass.swift @@ -8,129 +8,129 @@ public extension PlatformClient { */ class GetCollectionDetailNest: Codable { - public var visibleFacetsKeys: [String]? + public var slug: String? - public var cron: [String: Any]? + public var tag: [String]? public var meta: [String: Any]? - public var banners: ImageUrls? - - public var query: [String: Any]? + public var schedule: [String: Any]? - public var type: String? + public var visibleFacetsKeys: [String]? public var uid: String? - public var description: String? - - public var allowSort: Bool? - public var appId: String? - public var slug: String? + public var logo: Media1? - public var allowFacets: Bool? + public var type: String? - public var schedule: [String: Any]? + public var badge: [String: Any]? public var name: String? + public var banners: ImageUrls? + + public var isActive: Bool? + + public var allowSort: Bool? + public var action: Action? - public var logo: Media1? + public var description: String? - public var tag: [String]? + public var query: [String: Any]? - public var isActive: Bool? + public var cron: [String: Any]? - public var badge: [String: Any]? + public var allowFacets: Bool? public enum CodingKeys: String, CodingKey { - case visibleFacetsKeys = "visible_facets_keys" + case slug - case cron + case tag case meta - case banners - - case query + case schedule = "_schedule" - case type + case visibleFacetsKeys = "visible_facets_keys" case uid - case description - - case allowSort = "allow_sort" - case appId = "app_id" - case slug + case logo - case allowFacets = "allow_facets" + case type - case schedule = "_schedule" + case badge case name + case banners + + case isActive = "is_active" + + case allowSort = "allow_sort" + case action - case logo + case description - case tag + case query - case isActive = "is_active" + case cron - case badge + case allowFacets = "allow_facets" } public init(action: Action? = nil, allowFacets: Bool? = nil, allowSort: Bool? = nil, appId: String? = nil, badge: [String: Any]? = nil, banners: ImageUrls? = nil, cron: [String: Any]? = nil, description: String? = nil, isActive: Bool? = nil, logo: Media1? = nil, meta: [String: Any]? = nil, name: String? = nil, query: [String: Any]? = nil, slug: String? = nil, tag: [String]? = nil, type: String? = nil, uid: String? = nil, visibleFacetsKeys: [String]? = nil, schedule: [String: Any]? = nil) { - self.visibleFacetsKeys = visibleFacetsKeys + self.slug = slug - self.cron = cron + self.tag = tag self.meta = meta - self.banners = banners - - self.query = query + self.schedule = schedule - self.type = type + self.visibleFacetsKeys = visibleFacetsKeys self.uid = uid - self.description = description - - self.allowSort = allowSort - self.appId = appId - self.slug = slug + self.logo = logo - self.allowFacets = allowFacets + self.type = type - self.schedule = schedule + self.badge = badge self.name = name + self.banners = banners + + self.isActive = isActive + + self.allowSort = allowSort + self.action = action - self.logo = logo + self.description = description - self.tag = tag + self.query = query - self.isActive = isActive + self.cron = cron - self.badge = badge + self.allowFacets = allowFacets } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - cron = try container.decode([String: Any].self, forKey: .cron) + tag = try container.decode([String].self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ public extension PlatformClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + schedule = try container.decode([String: Any].self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - query = try container.decode([String: Any].self, forKey: .query) + visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +170,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -178,7 +178,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(String.self, forKey: .uid) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,7 +186,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + logo = try container.decode(Media1.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +194,7 @@ public extension PlatformClient { } catch {} do { - allowSort = try container.decode(Bool.self, forKey: .allowSort) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -202,7 +202,7 @@ public extension PlatformClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + badge = try container.decode([String: Any].self, forKey: .badge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -210,7 +210,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +218,7 @@ public extension PlatformClient { } catch {} do { - allowFacets = try container.decode(Bool.self, forKey: .allowFacets) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -226,7 +226,7 @@ public extension PlatformClient { } catch {} do { - schedule = try container.decode([String: Any].self, forKey: .schedule) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -234,7 +234,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + allowSort = try container.decode(Bool.self, forKey: .allowSort) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -250,7 +250,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(Media1.self, forKey: .logo) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -258,7 +258,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode([String].self, forKey: .tag) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -266,7 +266,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + cron = try container.decode([String: Any].self, forKey: .cron) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -274,7 +274,7 @@ public extension PlatformClient { } catch {} do { - badge = try container.decode([String: Any].self, forKey: .badge) + allowFacets = try container.decode(Bool.self, forKey: .allowFacets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -285,43 +285,43 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(cron, forKey: .cron) + try? container.encodeIfPresent(tag, forKey: .tag) try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(banners, forKey: .banners) - - try? container.encodeIfPresent(query, forKey: .query) + try? container.encodeIfPresent(schedule, forKey: .schedule) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(description, forKey: .description) - - try? container.encodeIfPresent(allowSort, forKey: .allowSort) - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) + try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(schedule, forKey: .schedule) + try? container.encodeIfPresent(badge, forKey: .badge) try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(banners, forKey: .banners) + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(allowSort, forKey: .allowSort) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(tag, forKey: .tag) + try? container.encodeIfPresent(query, forKey: .query) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(cron, forKey: .cron) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) } } } diff --git a/Sources/code/platform/models/GetCollectionItemsResponsePlatformModelClass.swift b/Sources/code/platform/models/GetCollectionItemsResponsePlatformModelClass.swift index cc5c2052c2..8854da936f 100644 --- a/Sources/code/platform/models/GetCollectionItemsResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetCollectionItemsResponsePlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class GetCollectionItemsResponse: Codable { - public var filters: [ProductFilters]? - public var page: Page? - public var sortOn: [ProductSortOn]? - public var items: [ProductListingDetail]? - public enum CodingKeys: String, CodingKey { - case filters + public var filters: [ProductFilters]? - case page + public var sortOn: [ProductSortOn]? - case sortOn = "sort_on" + public enum CodingKeys: String, CodingKey { + case page case items + + case filters + + case sortOn = "sort_on" } public init(filters: [ProductFilters]? = nil, items: [ProductListingDetail]? = nil, page: Page? = nil, sortOn: [ProductSortOn]? = nil) { - self.filters = filters - self.page = page - self.sortOn = sortOn - self.items = items + + self.filters = filters + + self.sortOn = sortOn } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - filters = try container.decode([ProductFilters].self, forKey: .filters) + page = try container.decode(Page.self, forKey: .page) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - page = try container.decode(Page.self, forKey: .page) + items = try container.decode([ProductListingDetail].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - sortOn = try container.decode([ProductSortOn].self, forKey: .sortOn) + filters = try container.decode([ProductFilters].self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - items = try container.decode([ProductListingDetail].self, forKey: .items) + sortOn = try container.decode([ProductSortOn].self, forKey: .sortOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(page, forKey: .page) - try? container.encodeIfPresent(sortOn, forKey: .sortOn) - try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(filters, forKey: .filters) + + try? container.encodeIfPresent(sortOn, forKey: .sortOn) } } } diff --git a/Sources/code/platform/models/GetCollectionListingResponsePlatformModelClass.swift b/Sources/code/platform/models/GetCollectionListingResponsePlatformModelClass.swift index 549814f393..1407e03cbf 100644 --- a/Sources/code/platform/models/GetCollectionListingResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetCollectionListingResponsePlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class GetCollectionListingResponse: Codable { - public var filters: CollectionListingFilter? - public var page: Page? public var items: [GetCollectionDetailNest]? - public enum CodingKeys: String, CodingKey { - case filters + public var filters: CollectionListingFilter? + public enum CodingKeys: String, CodingKey { case page case items + + case filters } public init(filters: CollectionListingFilter? = nil, items: [GetCollectionDetailNest]? = nil, page: Page? = nil) { - self.filters = filters - self.page = page self.items = items + + self.filters = filters } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - filters = try container.decode(CollectionListingFilter.self, forKey: .filters) + page = try container.decode(Page.self, forKey: .page) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - page = try container.decode(Page.self, forKey: .page) + items = try container.decode([GetCollectionDetailNest].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - items = try container.decode([GetCollectionDetailNest].self, forKey: .items) + filters = try container.decode(CollectionListingFilter.self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(page, forKey: .page) try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(filters, forKey: .filters) } } } diff --git a/Sources/code/platform/models/GetCollectionQueryOptionResponsePlatformModelClass.swift b/Sources/code/platform/models/GetCollectionQueryOptionResponsePlatformModelClass.swift index e8028b4d9f..fda3105805 100644 --- a/Sources/code/platform/models/GetCollectionQueryOptionResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetCollectionQueryOptionResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class GetCollectionQueryOptionResponse: Codable { - public var filters: [ProductFilters]? - public var sortOn: [ProductSortOn]? - public enum CodingKeys: String, CodingKey { - case filters + public var filters: [ProductFilters]? + public enum CodingKeys: String, CodingKey { case sortOn = "sort_on" + + case filters } public init(filters: [ProductFilters]? = nil, sortOn: [ProductSortOn]? = nil) { - self.filters = filters - self.sortOn = sortOn + + self.filters = filters } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - filters = try container.decode([ProductFilters].self, forKey: .filters) + sortOn = try container.decode([ProductSortOn].self, forKey: .sortOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - sortOn = try container.decode([ProductSortOn].self, forKey: .sortOn) + filters = try container.decode([ProductFilters].self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(sortOn, forKey: .sortOn) + + try? container.encodeIfPresent(filters, forKey: .filters) } } } diff --git a/Sources/code/platform/models/GetCompanyProfileSerializerResponsePlatformModelClass.swift b/Sources/code/platform/models/GetCompanyProfileSerializerResponsePlatformModelClass.swift index cf06bae202..61393c1580 100644 --- a/Sources/code/platform/models/GetCompanyProfileSerializerResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetCompanyProfileSerializerResponsePlatformModelClass.swift @@ -8,141 +8,141 @@ public extension PlatformClient { */ class GetCompanyProfileSerializerResponse: Codable { - public var verifiedOn: String? + public var stage: String? + + public var documents: [Document]? + + public var modifiedOn: String? public var verifiedBy: UserSerializer? - public var businessInfo: String? + public var companyType: String - public var businessCountryInfo: BusinessCountryInfo? + public var businessType: String - public var name: String? + public var uid: Int - public var createdOn: String? + public var businessInfo: String? - public var createdBy: UserSerializer? + public var franchiseEnabled: Bool? - public var documents: [Document]? + public var contactDetails: ContactDetails? - public var mode: String? + public var modifiedBy: UserSerializer? - public var modifiedOn: String? + public var name: String? - public var stage: String? + public var mode: String? - public var uid: Int + public var notificationEmails: [String]? - public var addresses: [GetAddressSerializer]? + public var createdOn: String? public var businessDetails: BusinessDetails? - public var franchiseEnabled: Bool? - - public var contactDetails: ContactDetails? + public var createdBy: UserSerializer? - public var notificationEmails: [String]? + public var businessCountryInfo: BusinessCountryInfo? public var warnings: [String: Any]? - public var modifiedBy: UserSerializer? - - public var businessType: String + public var verifiedOn: String? - public var companyType: String + public var addresses: [GetAddressSerializer]? public enum CodingKeys: String, CodingKey { - case verifiedOn = "verified_on" + case stage + + case documents + + case modifiedOn = "modified_on" case verifiedBy = "verified_by" - case businessInfo = "business_info" + case companyType = "company_type" - case businessCountryInfo = "business_country_info" + case businessType = "business_type" - case name + case uid - case createdOn = "created_on" + case businessInfo = "business_info" - case createdBy = "created_by" + case franchiseEnabled = "franchise_enabled" - case documents + case contactDetails = "contact_details" - case mode + case modifiedBy = "modified_by" - case modifiedOn = "modified_on" + case name - case stage + case mode - case uid + case notificationEmails = "notification_emails" - case addresses + case createdOn = "created_on" case businessDetails = "business_details" - case franchiseEnabled = "franchise_enabled" - - case contactDetails = "contact_details" + case createdBy = "created_by" - case notificationEmails = "notification_emails" + case businessCountryInfo = "business_country_info" case warnings - case modifiedBy = "modified_by" - - case businessType = "business_type" + case verifiedOn = "verified_on" - case companyType = "company_type" + case addresses } public init(addresses: [GetAddressSerializer]? = nil, businessCountryInfo: BusinessCountryInfo? = nil, businessDetails: BusinessDetails? = nil, businessInfo: String? = nil, businessType: String, companyType: String, contactDetails: ContactDetails? = nil, createdBy: UserSerializer? = nil, createdOn: String? = nil, documents: [Document]? = nil, franchiseEnabled: Bool? = nil, mode: String? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, name: String? = nil, notificationEmails: [String]? = nil, stage: String? = nil, uid: Int, verifiedBy: UserSerializer? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil) { - self.verifiedOn = verifiedOn + self.stage = stage + + self.documents = documents + + self.modifiedOn = modifiedOn self.verifiedBy = verifiedBy - self.businessInfo = businessInfo + self.companyType = companyType - self.businessCountryInfo = businessCountryInfo + self.businessType = businessType - self.name = name + self.uid = uid - self.createdOn = createdOn + self.businessInfo = businessInfo - self.createdBy = createdBy + self.franchiseEnabled = franchiseEnabled - self.documents = documents + self.contactDetails = contactDetails - self.mode = mode + self.modifiedBy = modifiedBy - self.modifiedOn = modifiedOn + self.name = name - self.stage = stage + self.mode = mode - self.uid = uid + self.notificationEmails = notificationEmails - self.addresses = addresses + self.createdOn = createdOn self.businessDetails = businessDetails - self.franchiseEnabled = franchiseEnabled - - self.contactDetails = contactDetails + self.createdBy = createdBy - self.notificationEmails = notificationEmails + self.businessCountryInfo = businessCountryInfo self.warnings = warnings - self.modifiedBy = modifiedBy - - self.businessType = businessType + self.verifiedOn = verifiedOn - self.companyType = companyType + self.addresses = addresses } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - verifiedOn = try container.decode(String.self, forKey: .verifiedOn) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - verifiedBy = try container.decode(UserSerializer.self, forKey: .verifiedBy) + documents = try container.decode([Document].self, forKey: .documents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - businessInfo = try container.decode(String.self, forKey: .businessInfo) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,15 +166,21 @@ public extension PlatformClient { } catch {} do { - businessCountryInfo = try container.decode(BusinessCountryInfo.self, forKey: .businessCountryInfo) + verifiedBy = try container.decode(UserSerializer.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + companyType = try container.decode(String.self, forKey: .companyType) + + businessType = try container.decode(String.self, forKey: .businessType) + + uid = try container.decode(Int.self, forKey: .uid) + do { - name = try container.decode(String.self, forKey: .name) + businessInfo = try container.decode(String.self, forKey: .businessInfo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +188,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + franchiseEnabled = try container.decode(Bool.self, forKey: .franchiseEnabled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +196,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + contactDetails = try container.decode(ContactDetails.self, forKey: .contactDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +204,7 @@ public extension PlatformClient { } catch {} do { - documents = try container.decode([Document].self, forKey: .documents) + modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +212,7 @@ public extension PlatformClient { } catch {} do { - mode = try container.decode(String.self, forKey: .mode) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +220,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + mode = try container.decode(String.self, forKey: .mode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -222,17 +228,15 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + notificationEmails = try container.decode([String].self, forKey: .notificationEmails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - uid = try container.decode(Int.self, forKey: .uid) - do { - addresses = try container.decode([GetAddressSerializer].self, forKey: .addresses) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -248,7 +252,7 @@ public extension PlatformClient { } catch {} do { - franchiseEnabled = try container.decode(Bool.self, forKey: .franchiseEnabled) + createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -256,7 +260,7 @@ public extension PlatformClient { } catch {} do { - contactDetails = try container.decode(ContactDetails.self, forKey: .contactDetails) + businessCountryInfo = try container.decode(BusinessCountryInfo.self, forKey: .businessCountryInfo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -264,7 +268,7 @@ public extension PlatformClient { } catch {} do { - notificationEmails = try container.decode([String].self, forKey: .notificationEmails) + warnings = try container.decode([String: Any].self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -272,7 +276,7 @@ public extension PlatformClient { } catch {} do { - warnings = try container.decode([String: Any].self, forKey: .warnings) + verifiedOn = try container.decode(String.self, forKey: .verifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -280,62 +284,58 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + addresses = try container.decode([GetAddressSerializer].self, forKey: .addresses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - businessType = try container.decode(String.self, forKey: .businessType) - - companyType = try container.decode(String.self, forKey: .companyType) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) + try? container.encodeIfPresent(stage, forKey: .stage) + + try? container.encodeIfPresent(documents, forKey: .documents) + + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) - try? container.encodeIfPresent(businessInfo, forKey: .businessInfo) + try? container.encodeIfPresent(companyType, forKey: .companyType) - try? container.encodeIfPresent(businessCountryInfo, forKey: .businessCountryInfo) + try? container.encodeIfPresent(businessType, forKey: .businessType) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(businessInfo, forKey: .businessInfo) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(franchiseEnabled, forKey: .franchiseEnabled) - try? container.encodeIfPresent(documents, forKey: .documents) + try? container.encodeIfPresent(contactDetails, forKey: .contactDetails) - try? container.encodeIfPresent(mode, forKey: .mode) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(mode, forKey: .mode) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) - try? container.encodeIfPresent(addresses, forKey: .addresses) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) try? container.encodeIfPresent(businessDetails, forKey: .businessDetails) - try? container.encodeIfPresent(franchiseEnabled, forKey: .franchiseEnabled) - - try? container.encodeIfPresent(contactDetails, forKey: .contactDetails) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) + try? container.encodeIfPresent(businessCountryInfo, forKey: .businessCountryInfo) try? container.encodeIfPresent(warnings, forKey: .warnings) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - - try? container.encodeIfPresent(businessType, forKey: .businessType) + try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) - try? container.encodeIfPresent(companyType, forKey: .companyType) + try? container.encodeIfPresent(addresses, forKey: .addresses) } } } diff --git a/Sources/code/platform/models/GetCompanySerializerPlatformModelClass.swift b/Sources/code/platform/models/GetCompanySerializerPlatformModelClass.swift index a53f42ad4f..00d39fa50d 100644 --- a/Sources/code/platform/models/GetCompanySerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/GetCompanySerializerPlatformModelClass.swift @@ -8,93 +8,93 @@ public extension PlatformClient { */ class GetCompanySerializer: Codable { - public var businessType: String? + public var companyType: String? - public var createdBy: UserSerializer1? + public var addresses: [GetAddressSerializer]? - public var modifiedOn: String? + public var createdBy: UserSerializer2? - public var createdOn: String? + public var verifiedBy: UserSerializer2? - public var verifiedOn: String? + public var name: String? - public var modifiedBy: UserSerializer1? + public var businessType: String? - public var addresses: [GetAddressSerializer]? + public var verifiedOn: String? - public var verifiedBy: UserSerializer1? + public var modifiedBy: UserSerializer2? - public var uid: Int? + public var rejectReason: String? - public var stage: String? + public var modifiedOn: String? - public var companyType: String? + public var uid: Int? - public var name: String? + public var createdOn: String? - public var rejectReason: String? + public var stage: String? public enum CodingKeys: String, CodingKey { - case businessType = "business_type" + case companyType = "company_type" + + case addresses case createdBy = "created_by" - case modifiedOn = "modified_on" + case verifiedBy = "verified_by" - case createdOn = "created_on" + case name + + case businessType = "business_type" case verifiedOn = "verified_on" case modifiedBy = "modified_by" - case addresses + case rejectReason = "reject_reason" - case verifiedBy = "verified_by" + case modifiedOn = "modified_on" case uid - case stage - - case companyType = "company_type" - - case name + case createdOn = "created_on" - case rejectReason = "reject_reason" + case stage } - public init(addresses: [GetAddressSerializer]? = nil, businessType: String? = nil, companyType: String? = nil, createdBy: UserSerializer1? = nil, createdOn: String? = nil, modifiedBy: UserSerializer1? = nil, modifiedOn: String? = nil, name: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSerializer1? = nil, verifiedOn: String? = nil) { - self.businessType = businessType + public init(addresses: [GetAddressSerializer]? = nil, businessType: String? = nil, companyType: String? = nil, createdBy: UserSerializer2? = nil, createdOn: String? = nil, modifiedBy: UserSerializer2? = nil, modifiedOn: String? = nil, name: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSerializer2? = nil, verifiedOn: String? = nil) { + self.companyType = companyType + + self.addresses = addresses self.createdBy = createdBy - self.modifiedOn = modifiedOn + self.verifiedBy = verifiedBy - self.createdOn = createdOn + self.name = name + + self.businessType = businessType self.verifiedOn = verifiedOn self.modifiedBy = modifiedBy - self.addresses = addresses + self.rejectReason = rejectReason - self.verifiedBy = verifiedBy + self.modifiedOn = modifiedOn self.uid = uid - self.stage = stage - - self.companyType = companyType - - self.name = name + self.createdOn = createdOn - self.rejectReason = rejectReason + self.stage = stage } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - businessType = try container.decode(String.self, forKey: .businessType) + companyType = try container.decode(String.self, forKey: .companyType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,7 +102,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) + addresses = try container.decode([GetAddressSerializer].self, forKey: .addresses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +110,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + createdBy = try container.decode(UserSerializer2.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -118,7 +118,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + verifiedBy = try container.decode(UserSerializer2.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } catch {} do { - verifiedOn = try container.decode(String.self, forKey: .verifiedOn) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) + businessType = try container.decode(String.self, forKey: .businessType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,7 +142,7 @@ public extension PlatformClient { } catch {} do { - addresses = try container.decode([GetAddressSerializer].self, forKey: .addresses) + verifiedOn = try container.decode(String.self, forKey: .verifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) + modifiedBy = try container.decode(UserSerializer2.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + rejectReason = try container.decode(String.self, forKey: .rejectReason) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,7 +166,7 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - companyType = try container.decode(String.self, forKey: .companyType) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +182,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - rejectReason = try container.decode(String.self, forKey: .rejectReason) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -201,31 +201,31 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(businessType, forKey: .businessType) + try? container.encodeIfPresent(companyType, forKey: .companyType) + + try? container.encodeIfPresent(addresses, forKey: .addresses) try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(name, forKey: .name) + + try? container.encodeIfPresent(businessType, forKey: .businessType) try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(addresses, forKey: .addresses) + try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) - try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(stage, forKey: .stage) - - try? container.encodeIfPresent(companyType, forKey: .companyType) - - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) + try? container.encodeIfPresent(stage, forKey: .stage) } } } diff --git a/Sources/code/platform/models/GetDepartmentPlatformModelClass.swift b/Sources/code/platform/models/GetDepartmentPlatformModelClass.swift index 2c96454367..ed13934449 100644 --- a/Sources/code/platform/models/GetDepartmentPlatformModelClass.swift +++ b/Sources/code/platform/models/GetDepartmentPlatformModelClass.swift @@ -8,105 +8,105 @@ public extension PlatformClient { */ class GetDepartment: Codable { - public var createdBy: UserSerializer? + public var pageNo: Int? - public var modifiedOn: String? + public var itemType: String? + + public var slug: String? + + public var name: String? public var search: String? - public var createdOn: String? + public var createdBy: UserSerializer? - public var priorityOrder: Int? + public var synonyms: [String]? public var modifiedBy: UserSerializer? - public var slug: String? - - public var uid: Int? + public var priorityOrder: Int? - public var synonyms: [String]? + public var modifiedOn: String? public var isActive: Bool? - public var pageSize: Int? - - public var pageNo: Int? - - public var itemType: String? + public var uid: Int? - public var name: String? + public var createdOn: String? public var logo: String? + public var pageSize: Int? + public enum CodingKeys: String, CodingKey { - case createdBy = "created_by" + case pageNo = "page_no" - case modifiedOn = "modified_on" + case itemType = "item_type" + + case slug + + case name case search - case createdOn = "created_on" + case createdBy = "created_by" - case priorityOrder = "priority_order" + case synonyms case modifiedBy = "modified_by" - case slug - - case uid + case priorityOrder = "priority_order" - case synonyms + case modifiedOn = "modified_on" case isActive = "is_active" - case pageSize = "page_size" - - case pageNo = "page_no" - - case itemType = "item_type" + case uid - case name + case createdOn = "created_on" case logo + + case pageSize = "page_size" } public init(createdBy: UserSerializer? = nil, createdOn: String? = nil, isActive: Bool? = nil, itemType: String? = nil, logo: String? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, name: String? = nil, pageNo: Int? = nil, pageSize: Int? = nil, priorityOrder: Int? = nil, search: String? = nil, slug: String? = nil, synonyms: [String]? = nil, uid: Int? = nil) { - self.createdBy = createdBy + self.pageNo = pageNo - self.modifiedOn = modifiedOn + self.itemType = itemType + + self.slug = slug + + self.name = name self.search = search - self.createdOn = createdOn + self.createdBy = createdBy - self.priorityOrder = priorityOrder + self.synonyms = synonyms self.modifiedBy = modifiedBy - self.slug = slug - - self.uid = uid + self.priorityOrder = priorityOrder - self.synonyms = synonyms + self.modifiedOn = modifiedOn self.isActive = isActive - self.pageSize = pageSize - - self.pageNo = pageNo - - self.itemType = itemType + self.uid = uid - self.name = name + self.createdOn = createdOn self.logo = logo + + self.pageSize = pageSize } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + pageNo = try container.decode(Int.self, forKey: .pageNo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +114,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient { } catch {} do { - search = try container.decode(String.self, forKey: .search) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - priorityOrder = try container.decode(Int.self, forKey: .priorityOrder) + search = try container.decode(String.self, forKey: .search) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + synonyms = try container.decode([String].self, forKey: .synonyms) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +170,7 @@ public extension PlatformClient { } catch {} do { - synonyms = try container.decode([String].self, forKey: .synonyms) + priorityOrder = try container.decode(Int.self, forKey: .priorityOrder) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -178,7 +178,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,7 +186,7 @@ public extension PlatformClient { } catch {} do { - pageSize = try container.decode(Int.self, forKey: .pageSize) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +194,7 @@ public extension PlatformClient { } catch {} do { - pageNo = try container.decode(Int.self, forKey: .pageNo) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -202,7 +202,7 @@ public extension PlatformClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -210,7 +210,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +218,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(String.self, forKey: .logo) + pageSize = try container.decode(Int.self, forKey: .pageSize) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -229,35 +229,35 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(pageNo, forKey: .pageNo) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(itemType, forKey: .itemType) + + try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(search, forKey: .search) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) + try? container.encodeIfPresent(synonyms, forKey: .synonyms) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(slug, forKey: .slug) - - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) - try? container.encodeIfPresent(synonyms, forKey: .synonyms) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(pageSize, forKey: .pageSize) - - try? container.encodeIfPresent(pageNo, forKey: .pageNo) - - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(pageSize, forKey: .pageSize) } } } diff --git a/Sources/code/platform/models/GetLocationSerializerPlatformModelClass.swift b/Sources/code/platform/models/GetLocationSerializerPlatformModelClass.swift index f910246ed9..4207064efc 100644 --- a/Sources/code/platform/models/GetLocationSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/GetLocationSerializerPlatformModelClass.swift @@ -8,167 +8,165 @@ public extension PlatformClient { */ class GetLocationSerializer: Codable { - public var code: String - - public var customJson: [String: Any]? - - public var createdOn: String? + public var verifiedOn: String? - public var company: GetCompanySerializer? + public var contactNumbers: [SellerPhoneNumber]? - public var verifiedBy: UserSerializer2? + public var notificationEmails: [String]? public var manager: LocationManagerSerializer? - public var integrationType: LocationIntegrationType? - - public var createdBy: UserSerializer2? - - public var contactNumbers: [SellerPhoneNumber]? + public var verifiedBy: UserSerializer1? - public var timing: [LocationDayWiseSerializer]? + public var phoneNumber: String - public var modifiedBy: UserSerializer2? + public var displayName: String public var uid: Int? - public var documents: [Document]? - - public var productReturnConfig: ProductReturnConfigSerializer? - - public var address: GetAddressSerializer + public var timing: [LocationDayWiseSerializer]? - public var phoneNumber: String + public var name: String - public var displayName: String + public var productReturnConfig: ProductReturnConfigSerializer? - public var verifiedOn: String? + public var integrationType: LocationIntegrationType? - public var storeType: String? + public var warnings: [String: Any]? public var gstCredentials: InvoiceDetailsSerializer? - public var name: String - public var modifiedOn: String? - public var notificationEmails: [String]? + public var createdOn: String? - public var warnings: [String: Any]? + public var customJson: [String: Any]? public var stage: String? - public enum CodingKeys: String, CodingKey { - case code + public var code: String - case customJson = "_custom_json" + public var createdBy: UserSerializer1? - case createdOn = "created_on" + public var modifiedBy: UserSerializer1? - case company + public var storeType: String? - case verifiedBy = "verified_by" + public var company: GetCompanySerializer? - case manager + public var documents: [Document]? - case integrationType = "integration_type" + public var address: GetAddressSerializer - case createdBy = "created_by" + public enum CodingKeys: String, CodingKey { + case verifiedOn = "verified_on" case contactNumbers = "contact_numbers" - case timing + case notificationEmails = "notification_emails" - case modifiedBy = "modified_by" + case manager - case uid + case verifiedBy = "verified_by" - case documents + case phoneNumber = "phone_number" - case productReturnConfig = "product_return_config" + case displayName = "display_name" - case address + case uid - case phoneNumber = "phone_number" + case timing - case displayName = "display_name" + case name - case verifiedOn = "verified_on" + case productReturnConfig = "product_return_config" - case storeType = "store_type" + case integrationType = "integration_type" - case gstCredentials = "gst_credentials" + case warnings - case name + case gstCredentials = "gst_credentials" case modifiedOn = "modified_on" - case notificationEmails = "notification_emails" + case createdOn = "created_on" - case warnings + case customJson = "_custom_json" case stage - } - public init(address: GetAddressSerializer, code: String, company: GetCompanySerializer? = nil, contactNumbers: [SellerPhoneNumber]? = nil, createdBy: UserSerializer2? = nil, createdOn: String? = nil, displayName: String, documents: [Document]? = nil, gstCredentials: InvoiceDetailsSerializer? = nil, integrationType: LocationIntegrationType? = nil, manager: LocationManagerSerializer? = nil, modifiedBy: UserSerializer2? = nil, modifiedOn: String? = nil, name: String, notificationEmails: [String]? = nil, phoneNumber: String, productReturnConfig: ProductReturnConfigSerializer? = nil, stage: String? = nil, storeType: String? = nil, timing: [LocationDayWiseSerializer]? = nil, uid: Int? = nil, verifiedBy: UserSerializer2? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { - self.code = code + case code - self.customJson = customJson + case createdBy = "created_by" - self.createdOn = createdOn + case modifiedBy = "modified_by" - self.company = company + case storeType = "store_type" - self.verifiedBy = verifiedBy + case company - self.manager = manager + case documents - self.integrationType = integrationType + case address + } - self.createdBy = createdBy + public init(address: GetAddressSerializer, code: String, company: GetCompanySerializer? = nil, contactNumbers: [SellerPhoneNumber]? = nil, createdBy: UserSerializer1? = nil, createdOn: String? = nil, displayName: String, documents: [Document]? = nil, gstCredentials: InvoiceDetailsSerializer? = nil, integrationType: LocationIntegrationType? = nil, manager: LocationManagerSerializer? = nil, modifiedBy: UserSerializer1? = nil, modifiedOn: String? = nil, name: String, notificationEmails: [String]? = nil, phoneNumber: String, productReturnConfig: ProductReturnConfigSerializer? = nil, stage: String? = nil, storeType: String? = nil, timing: [LocationDayWiseSerializer]? = nil, uid: Int? = nil, verifiedBy: UserSerializer1? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { + self.verifiedOn = verifiedOn self.contactNumbers = contactNumbers - self.timing = timing + self.notificationEmails = notificationEmails - self.modifiedBy = modifiedBy + self.manager = manager - self.uid = uid + self.verifiedBy = verifiedBy - self.documents = documents + self.phoneNumber = phoneNumber - self.productReturnConfig = productReturnConfig + self.displayName = displayName - self.address = address + self.uid = uid - self.phoneNumber = phoneNumber + self.timing = timing - self.displayName = displayName + self.name = name - self.verifiedOn = verifiedOn + self.productReturnConfig = productReturnConfig - self.storeType = storeType + self.integrationType = integrationType - self.gstCredentials = gstCredentials + self.warnings = warnings - self.name = name + self.gstCredentials = gstCredentials self.modifiedOn = modifiedOn - self.notificationEmails = notificationEmails + self.createdOn = createdOn - self.warnings = warnings + self.customJson = customJson self.stage = stage + + self.code = code + + self.createdBy = createdBy + + self.modifiedBy = modifiedBy + + self.storeType = storeType + + self.company = company + + self.documents = documents + + self.address = address } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - code = try container.decode(String.self, forKey: .code) - do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + verifiedOn = try container.decode(String.self, forKey: .verifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +174,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -184,7 +182,7 @@ public extension PlatformClient { } catch {} do { - company = try container.decode(GetCompanySerializer.self, forKey: .company) + notificationEmails = try container.decode([String].self, forKey: .notificationEmails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -192,7 +190,7 @@ public extension PlatformClient { } catch {} do { - verifiedBy = try container.decode(UserSerializer2.self, forKey: .verifiedBy) + manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -200,15 +198,19 @@ public extension PlatformClient { } catch {} do { - manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) + verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + phoneNumber = try container.decode(String.self, forKey: .phoneNumber) + + displayName = try container.decode(String.self, forKey: .displayName) + do { - integrationType = try container.decode(LocationIntegrationType.self, forKey: .integrationType) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -216,15 +218,17 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserSerializer2.self, forKey: .createdBy) + timing = try container.decode([LocationDayWiseSerializer].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + do { - contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) + productReturnConfig = try container.decode(ProductReturnConfigSerializer.self, forKey: .productReturnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -232,7 +236,7 @@ public extension PlatformClient { } catch {} do { - timing = try container.decode([LocationDayWiseSerializer].self, forKey: .timing) + integrationType = try container.decode(LocationIntegrationType.self, forKey: .integrationType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -240,7 +244,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserSerializer2.self, forKey: .modifiedBy) + warnings = try container.decode([String: Any].self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -248,7 +252,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -256,7 +260,7 @@ public extension PlatformClient { } catch {} do { - documents = try container.decode([Document].self, forKey: .documents) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -264,21 +268,15 @@ public extension PlatformClient { } catch {} do { - productReturnConfig = try container.decode(ProductReturnConfigSerializer.self, forKey: .productReturnConfig) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - address = try container.decode(GetAddressSerializer.self, forKey: .address) - - phoneNumber = try container.decode(String.self, forKey: .phoneNumber) - - displayName = try container.decode(String.self, forKey: .displayName) - do { - verifiedOn = try container.decode(String.self, forKey: .verifiedOn) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -286,25 +284,25 @@ public extension PlatformClient { } catch {} do { - storeType = try container.decode(String.self, forKey: .storeType) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + code = try container.decode(String.self, forKey: .code) + do { - gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) + createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - name = try container.decode(String.self, forKey: .name) - do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -312,7 +310,7 @@ public extension PlatformClient { } catch {} do { - notificationEmails = try container.decode([String].self, forKey: .notificationEmails) + storeType = try container.decode(String.self, forKey: .storeType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -320,7 +318,7 @@ public extension PlatformClient { } catch {} do { - warnings = try container.decode([String: Any].self, forKey: .warnings) + company = try container.decode(GetCompanySerializer.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -328,66 +326,68 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + documents = try container.decode([Document].self, forKey: .documents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + address = try container.decode(GetAddressSerializer.self, forKey: .address) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(code, forKey: .code) + try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) - try? container.encodeIfPresent(company, forKey: .company) + try? container.encodeIfPresent(manager, forKey: .manager) try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) - try? container.encodeIfPresent(manager, forKey: .manager) - - try? container.encodeIfPresent(integrationType, forKey: .integrationType) + try? container.encodeIfPresent(phoneNumber, forKey: .phoneNumber) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(displayName, forKey: .displayName) - try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) + try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(timing, forKey: .timing) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(productReturnConfig, forKey: .productReturnConfig) - try? container.encodeIfPresent(documents, forKey: .documents) + try? container.encodeIfPresent(integrationType, forKey: .integrationType) - try? container.encodeIfPresent(productReturnConfig, forKey: .productReturnConfig) + try? container.encodeIfPresent(warnings, forKey: .warnings) - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(gstCredentials, forKey: .gstCredentials) - try? container.encodeIfPresent(phoneNumber, forKey: .phoneNumber) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(storeType, forKey: .storeType) + try? container.encodeIfPresent(stage, forKey: .stage) - try? container.encodeIfPresent(gstCredentials, forKey: .gstCredentials) + try? container.encodeIfPresent(code, forKey: .code) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) + try? container.encodeIfPresent(storeType, forKey: .storeType) - try? container.encodeIfPresent(warnings, forKey: .warnings) + try? container.encodeIfPresent(company, forKey: .company) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(documents, forKey: .documents) + + try? container.encodeIfPresent(address, forKey: .address) } } } diff --git a/Sources/code/platform/models/GetProductBundleCreateResponsePlatformModelClass.swift b/Sources/code/platform/models/GetProductBundleCreateResponsePlatformModelClass.swift index 77c4ceae96..0fa945fe27 100644 --- a/Sources/code/platform/models/GetProductBundleCreateResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetProductBundleCreateResponsePlatformModelClass.swift @@ -8,96 +8,96 @@ public extension PlatformClient { */ class GetProductBundleCreateResponse: Codable { - public var companyId: Int? + public var choice: String - public var sameStoreAssignment: Bool? + public var slug: String - public var modifiedOn: String? + public var meta: [String: Any]? - public var pageVisibility: [String]? + public var products: [ProductBundleItem] + + public var id: String? + + public var name: String public var createdBy: [String: Any]? - public var createdOn: String? + public var sameStoreAssignment: Bool? - public var id: String? + public var pageVisibility: [String]? public var modifiedBy: [String: Any]? - public var slug: String - - public var meta: [String: Any]? + public var companyId: Int? - public var choice: String + public var modifiedOn: String? public var isActive: Bool - public var products: [ProductBundleItem] - - public var name: String + public var createdOn: String? public var logo: String? public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + case choice - case sameStoreAssignment = "same_store_assignment" + case slug - case modifiedOn = "modified_on" + case meta - case pageVisibility = "page_visibility" + case products + + case id + + case name case createdBy = "created_by" - case createdOn = "created_on" + case sameStoreAssignment = "same_store_assignment" - case id + case pageVisibility = "page_visibility" case modifiedBy = "modified_by" - case slug - - case meta + case companyId = "company_id" - case choice + case modifiedOn = "modified_on" case isActive = "is_active" - case products - - case name + case createdOn = "created_on" case logo } public init(choice: String, companyId: Int? = nil, createdBy: [String: Any]? = nil, createdOn: String? = nil, id: String? = nil, isActive: Bool, logo: String? = nil, meta: [String: Any]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String, pageVisibility: [String]? = nil, products: [ProductBundleItem], sameStoreAssignment: Bool? = nil, slug: String) { - self.companyId = companyId + self.choice = choice - self.sameStoreAssignment = sameStoreAssignment + self.slug = slug - self.modifiedOn = modifiedOn + self.meta = meta - self.pageVisibility = pageVisibility + self.products = products + + self.id = id + + self.name = name self.createdBy = createdBy - self.createdOn = createdOn + self.sameStoreAssignment = sameStoreAssignment - self.id = id + self.pageVisibility = pageVisibility self.modifiedBy = modifiedBy - self.slug = slug - - self.meta = meta + self.companyId = companyId - self.choice = choice + self.modifiedOn = modifiedOn self.isActive = isActive - self.products = products - - self.name = name + self.createdOn = createdOn self.logo = logo } @@ -105,24 +105,32 @@ public extension PlatformClient { required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + choice = try container.decode(String.self, forKey: .choice) + + slug = try container.decode(String.self, forKey: .slug) + do { - companyId = try container.decode(Int.self, forKey: .companyId) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + products = try container.decode([ProductBundleItem].self, forKey: .products) + do { - sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +138,7 @@ public extension PlatformClient { } catch {} do { - pageVisibility = try container.decode([String].self, forKey: .pageVisibility) + sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +146,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + pageVisibility = try container.decode([String].self, forKey: .pageVisibility) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +154,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +162,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,31 +170,23 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - slug = try container.decode(String.self, forKey: .slug) + isActive = try container.decode(Bool.self, forKey: .isActive) do { - meta = try container.decode([String: Any].self, forKey: .meta) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - choice = try container.decode(String.self, forKey: .choice) - - isActive = try container.decode(Bool.self, forKey: .isActive) - - products = try container.decode([ProductBundleItem].self, forKey: .products) - - name = try container.decode(String.self, forKey: .name) - do { logo = try container.decode(String.self, forKey: .logo) @@ -199,33 +199,33 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(choice, forKey: .choice) - try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) + try? container.encodeIfPresent(products, forKey: .products) + + try? container.encodeIfPresent(id, forKey: .id) + + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(slug, forKey: .slug) - - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(choice, forKey: .choice) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(products, forKey: .products) - - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) try? container.encode(logo, forKey: .logo) } diff --git a/Sources/code/platform/models/GetProductBundleResponsePlatformModelClass.swift b/Sources/code/platform/models/GetProductBundleResponsePlatformModelClass.swift index 4239f043ad..8f47c9feb3 100644 --- a/Sources/code/platform/models/GetProductBundleResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetProductBundleResponsePlatformModelClass.swift @@ -8,66 +8,66 @@ public extension PlatformClient { */ class GetProductBundleResponse: Codable { - public var companyId: Int? - - public var pageVisibility: [String]? - - public var sameStoreAssignment: Bool? + public var choice: String? public var slug: String? + public var products: [GetProducts]? + public var meta: [String: Any]? - public var choice: String? + public var name: String? - public var isActive: Bool? + public var pageVisibility: [String]? - public var products: [GetProducts]? + public var sameStoreAssignment: Bool? - public var name: String? + public var companyId: Int? + + public var isActive: Bool? public var logo: String? public enum CodingKeys: String, CodingKey { - case companyId = "company_id" - - case pageVisibility = "page_visibility" - - case sameStoreAssignment = "same_store_assignment" + case choice case slug + case products + case meta - case choice + case name - case isActive = "is_active" + case pageVisibility = "page_visibility" - case products + case sameStoreAssignment = "same_store_assignment" - case name + case companyId = "company_id" + + case isActive = "is_active" case logo } public init(choice: String? = nil, companyId: Int? = nil, isActive: Bool? = nil, logo: String? = nil, meta: [String: Any]? = nil, name: String? = nil, pageVisibility: [String]? = nil, products: [GetProducts]? = nil, sameStoreAssignment: Bool? = nil, slug: String? = nil) { - self.companyId = companyId - - self.pageVisibility = pageVisibility - - self.sameStoreAssignment = sameStoreAssignment + self.choice = choice self.slug = slug + self.products = products + self.meta = meta - self.choice = choice + self.name = name - self.isActive = isActive + self.pageVisibility = pageVisibility - self.products = products + self.sameStoreAssignment = sameStoreAssignment - self.name = name + self.companyId = companyId + + self.isActive = isActive self.logo = logo } @@ -76,7 +76,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - companyId = try container.decode(Int.self, forKey: .companyId) + choice = try container.decode(String.self, forKey: .choice) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,7 +84,7 @@ public extension PlatformClient { } catch {} do { - pageVisibility = try container.decode([String].self, forKey: .pageVisibility) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +92,7 @@ public extension PlatformClient { } catch {} do { - sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) + products = try container.decode([GetProducts].self, forKey: .products) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -100,7 +100,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -108,7 +108,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,7 +116,7 @@ public extension PlatformClient { } catch {} do { - choice = try container.decode(String.self, forKey: .choice) + pageVisibility = try container.decode([String].self, forKey: .pageVisibility) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -124,7 +124,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -132,7 +132,7 @@ public extension PlatformClient { } catch {} do { - products = try container.decode([GetProducts].self, forKey: .products) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -140,7 +140,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -159,23 +159,23 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) - - try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) - - try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) + try? container.encodeIfPresent(choice, forKey: .choice) try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(products, forKey: .products) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(choice, forKey: .choice) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) - try? container.encodeIfPresent(products, forKey: .products) + try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(companyId, forKey: .companyId) + + try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(logo, forKey: .logo) } diff --git a/Sources/code/platform/models/GetProductsPlatformModelClass.swift b/Sources/code/platform/models/GetProductsPlatformModelClass.swift index 59e53ceaed..2a59425ba6 100644 --- a/Sources/code/platform/models/GetProductsPlatformModelClass.swift +++ b/Sources/code/platform/models/GetProductsPlatformModelClass.swift @@ -10,60 +10,60 @@ public extension PlatformClient { class GetProducts: Codable { public var maxQuantity: Int? - public var allowRemove: Bool? - - public var autoSelect: Bool? - public var minQuantity: Int? + public var autoAddToCart: Bool? + public var price: Price? + public var productDetails: LimitedProductData? + public var productUid: Int? - public var autoAddToCart: Bool? + public var allowRemove: Bool? - public var sizes: [Size]? + public var autoSelect: Bool? - public var productDetails: LimitedProductData? + public var sizes: [Size]? public enum CodingKeys: String, CodingKey { case maxQuantity = "max_quantity" - case allowRemove = "allow_remove" - - case autoSelect = "auto_select" - case minQuantity = "min_quantity" + case autoAddToCart = "auto_add_to_cart" + case price + case productDetails = "product_details" + case productUid = "product_uid" - case autoAddToCart = "auto_add_to_cart" + case allowRemove = "allow_remove" - case sizes + case autoSelect = "auto_select" - case productDetails = "product_details" + case sizes } public init(allowRemove: Bool? = nil, autoAddToCart: Bool? = nil, autoSelect: Bool? = nil, maxQuantity: Int? = nil, minQuantity: Int? = nil, price: Price? = nil, productDetails: LimitedProductData? = nil, productUid: Int? = nil, sizes: [Size]? = nil) { self.maxQuantity = maxQuantity - self.allowRemove = allowRemove - - self.autoSelect = autoSelect - self.minQuantity = minQuantity + self.autoAddToCart = autoAddToCart + self.price = price + self.productDetails = productDetails + self.productUid = productUid - self.autoAddToCart = autoAddToCart + self.allowRemove = allowRemove - self.sizes = sizes + self.autoSelect = autoSelect - self.productDetails = productDetails + self.sizes = sizes } required public init(from decoder: Decoder) throws { @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - allowRemove = try container.decode(Bool.self, forKey: .allowRemove) + minQuantity = try container.decode(Int.self, forKey: .minQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,7 +86,7 @@ public extension PlatformClient { } catch {} do { - autoSelect = try container.decode(Bool.self, forKey: .autoSelect) + autoAddToCart = try container.decode(Bool.self, forKey: .autoAddToCart) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -94,7 +94,7 @@ public extension PlatformClient { } catch {} do { - minQuantity = try container.decode(Int.self, forKey: .minQuantity) + price = try container.decode(Price.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,7 +102,7 @@ public extension PlatformClient { } catch {} do { - price = try container.decode(Price.self, forKey: .price) + productDetails = try container.decode(LimitedProductData.self, forKey: .productDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -118,7 +118,7 @@ public extension PlatformClient { } catch {} do { - autoAddToCart = try container.decode(Bool.self, forKey: .autoAddToCart) + allowRemove = try container.decode(Bool.self, forKey: .allowRemove) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } catch {} do { - sizes = try container.decode([Size].self, forKey: .sizes) + autoSelect = try container.decode(Bool.self, forKey: .autoSelect) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - productDetails = try container.decode(LimitedProductData.self, forKey: .productDetails) + sizes = try container.decode([Size].self, forKey: .sizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -147,21 +147,21 @@ public extension PlatformClient { try? container.encodeIfPresent(maxQuantity, forKey: .maxQuantity) - try? container.encodeIfPresent(allowRemove, forKey: .allowRemove) - - try? container.encodeIfPresent(autoSelect, forKey: .autoSelect) - try? container.encodeIfPresent(minQuantity, forKey: .minQuantity) + try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) + try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(productDetails, forKey: .productDetails) + try? container.encodeIfPresent(productUid, forKey: .productUid) - try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) + try? container.encodeIfPresent(allowRemove, forKey: .allowRemove) - try? container.encodeIfPresent(sizes, forKey: .sizes) + try? container.encodeIfPresent(autoSelect, forKey: .autoSelect) - try? container.encodeIfPresent(productDetails, forKey: .productDetails) + try? container.encodeIfPresent(sizes, forKey: .sizes) } } } diff --git a/Sources/code/platform/models/GetSearchWordsDataPlatformModelClass.swift b/Sources/code/platform/models/GetSearchWordsDataPlatformModelClass.swift index 21fcfe44ce..14aab83b79 100644 --- a/Sources/code/platform/models/GetSearchWordsDataPlatformModelClass.swift +++ b/Sources/code/platform/models/GetSearchWordsDataPlatformModelClass.swift @@ -8,45 +8,45 @@ public extension PlatformClient { */ class GetSearchWordsData: Codable { - public var customJson: [String: Any]? - - public var appId: String? - public var words: [String]? public var result: [String: Any]? public var uid: String? - public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + public var appId: String? - case appId = "app_id" + public var customJson: [String: Any]? + public enum CodingKeys: String, CodingKey { case words case result case uid - } - public init(appId: String? = nil, result: [String: Any]? = nil, uid: String? = nil, words: [String]? = nil, customJson: [String: Any]? = nil) { - self.customJson = customJson + case appId = "app_id" - self.appId = appId + case customJson = "_custom_json" + } + public init(appId: String? = nil, result: [String: Any]? = nil, uid: String? = nil, words: [String]? = nil, customJson: [String: Any]? = nil) { self.words = words self.result = result self.uid = uid + + self.appId = appId + + self.customJson = customJson } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + words = try container.decode([String].self, forKey: .words) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + result = try container.decode([String: Any].self, forKey: .result) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - words = try container.decode([String].self, forKey: .words) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - result = try container.decode([String: Any].self, forKey: .result) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(String.self, forKey: .uid) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,15 +89,15 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(customJson, forKey: .customJson) - - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(words, forKey: .words) try? container.encodeIfPresent(result, forKey: .result) try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(appId, forKey: .appId) + + try? container.encodeIfPresent(customJson, forKey: .customJson) } } } diff --git a/Sources/code/platform/models/GlobalValidationPlatformModelClass.swift b/Sources/code/platform/models/GlobalValidationPlatformModelClass.swift index 984560bf6d..4c212396a3 100644 --- a/Sources/code/platform/models/GlobalValidationPlatformModelClass.swift +++ b/Sources/code/platform/models/GlobalValidationPlatformModelClass.swift @@ -8,51 +8,51 @@ public extension PlatformClient { */ class GlobalValidation: Codable { - public var title: String? - - public var properties: Properties? - public var definitions: [String: Any]? - public var type: String? - public var required: [String]? + public var properties: Properties? + public var description: String? - public enum CodingKeys: String, CodingKey { - case title + public var title: String? - case properties + public var type: String? + public enum CodingKeys: String, CodingKey { case definitions - case type - case required + case properties + case description - } - public init(definitions: [String: Any]? = nil, description: String? = nil, properties: Properties? = nil, required: [String]? = nil, title: String? = nil, type: String? = nil) { - self.title = title + case title - self.properties = properties + case type + } + public init(definitions: [String: Any]? = nil, description: String? = nil, properties: Properties? = nil, required: [String]? = nil, title: String? = nil, type: String? = nil) { self.definitions = definitions - self.type = type - self.required = required + self.properties = properties + self.description = description + + self.title = title + + self.type = type } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - title = try container.decode(String.self, forKey: .title) + definitions = try container.decode([String: Any].self, forKey: .definitions) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,7 +60,7 @@ public extension PlatformClient { } catch {} do { - properties = try container.decode(Properties.self, forKey: .properties) + required = try container.decode([String].self, forKey: .required) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ public extension PlatformClient { } catch {} do { - definitions = try container.decode([String: Any].self, forKey: .definitions) + properties = try container.decode(Properties.self, forKey: .properties) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -76,7 +76,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,7 +84,7 @@ public extension PlatformClient { } catch {} do { - required = try container.decode([String].self, forKey: .required) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +92,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -103,17 +103,17 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(title, forKey: .title) - - try? container.encodeIfPresent(properties, forKey: .properties) - try? container.encodeIfPresent(definitions, forKey: .definitions) - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(required, forKey: .required) + try? container.encodeIfPresent(properties, forKey: .properties) + try? container.encodeIfPresent(description, forKey: .description) + + try? container.encodeIfPresent(title, forKey: .title) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/HSNCodesResponsePlatformModelClass.swift b/Sources/code/platform/models/HSNCodesResponsePlatformModelClass.swift index 0cb3fe58fb..5f42debe70 100644 --- a/Sources/code/platform/models/HSNCodesResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/HSNCodesResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class HSNCodesResponse: Codable { - public var message: String? - public var data: HSNData? - public enum CodingKeys: String, CodingKey { - case message + public var message: String? + public enum CodingKeys: String, CodingKey { case data + + case message } public init(data: HSNData? = nil, message: String? = nil) { - self.message = message - self.data = data + + self.message = message } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - message = try container.decode(String.self, forKey: .message) + data = try container.decode(HSNData.self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - data = try container.decode(HSNData.self, forKey: .data) + message = try container.decode(String.self, forKey: .message) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(data, forKey: .data) + + try? container.encodeIfPresent(message, forKey: .message) } } } diff --git a/Sources/code/platform/models/HSNDataPlatformModelClass.swift b/Sources/code/platform/models/HSNDataPlatformModelClass.swift index eb3e9f6c7f..7351fcce1c 100644 --- a/Sources/code/platform/models/HSNDataPlatformModelClass.swift +++ b/Sources/code/platform/models/HSNDataPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class HSNData: Codable { - public var hsnCode: [String]? - public var countryOfOrigin: [String]? - public enum CodingKeys: String, CodingKey { - case hsnCode = "hsn_code" + public var hsnCode: [String]? + public enum CodingKeys: String, CodingKey { case countryOfOrigin = "country_of_origin" + + case hsnCode = "hsn_code" } public init(countryOfOrigin: [String]? = nil, hsnCode: [String]? = nil) { - self.hsnCode = hsnCode - self.countryOfOrigin = countryOfOrigin + + self.hsnCode = hsnCode } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - hsnCode = try container.decode([String].self, forKey: .hsnCode) + countryOfOrigin = try container.decode([String].self, forKey: .countryOfOrigin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - countryOfOrigin = try container.decode([String].self, forKey: .countryOfOrigin) + hsnCode = try container.decode([String].self, forKey: .hsnCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) - try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) + + try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) } } } diff --git a/Sources/code/platform/models/HierarchyPlatformModelClass.swift b/Sources/code/platform/models/HierarchyPlatformModelClass.swift index a3e6b5db71..82e94e0214 100644 --- a/Sources/code/platform/models/HierarchyPlatformModelClass.swift +++ b/Sources/code/platform/models/HierarchyPlatformModelClass.swift @@ -8,45 +8,45 @@ public extension PlatformClient { */ class Hierarchy: Codable { - public var department: Int - public var l2: Int + public var department: Int + public var l1: Int public enum CodingKeys: String, CodingKey { - case department - case l2 + case department + case l1 } public init(department: Int, l1: Int, l2: Int) { - self.department = department - self.l2 = l2 + self.department = department + self.l1 = l1 } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - department = try container.decode(Int.self, forKey: .department) - l2 = try container.decode(Int.self, forKey: .l2) + department = try container.decode(Int.self, forKey: .department) + l1 = try container.decode(Int.self, forKey: .l1) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(department, forKey: .department) - try? container.encodeIfPresent(l2, forKey: .l2) + try? container.encodeIfPresent(department, forKey: .department) + try? container.encodeIfPresent(l1, forKey: .l1) } } diff --git a/Sources/code/platform/models/HsnCodesObjectPlatformModelClass.swift b/Sources/code/platform/models/HsnCodesObjectPlatformModelClass.swift index bc094134ae..c08099b32e 100644 --- a/Sources/code/platform/models/HsnCodesObjectPlatformModelClass.swift +++ b/Sources/code/platform/models/HsnCodesObjectPlatformModelClass.swift @@ -8,81 +8,81 @@ public extension PlatformClient { */ class HsnCodesObject: Codable { - public var companyId: Int? + public var threshold1: Double? - public var hsnCode: String? + public var tax1: Double? - public var modifiedOn: String? + public var taxOnEsp: Bool? - public var taxOnMrp: Bool? + public var hs2Code: String? - public var threshold1: Double? + public var taxOnMrp: Bool? public var id: String? - public var tax2: Double? - public var threshold2: Double? - public var tax1: Double? + public var companyId: Int? - public var taxOnEsp: Bool? + public var modifiedOn: String? - public var hs2Code: String? + public var hsnCode: String? + + public var tax2: Double? public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + case threshold1 - case hsnCode = "hsn_code" + case tax1 - case modifiedOn = "modified_on" + case taxOnEsp = "tax_on_esp" - case taxOnMrp = "tax_on_mrp" + case hs2Code = "hs2_code" - case threshold1 + case taxOnMrp = "tax_on_mrp" case id - case tax2 - case threshold2 - case tax1 + case companyId = "company_id" - case taxOnEsp = "tax_on_esp" + case modifiedOn = "modified_on" - case hs2Code = "hs2_code" + case hsnCode = "hsn_code" + + case tax2 } public init(companyId: Int? = nil, hs2Code: String? = nil, hsnCode: String? = nil, id: String? = nil, modifiedOn: String? = nil, tax1: Double? = nil, tax2: Double? = nil, taxOnEsp: Bool? = nil, taxOnMrp: Bool? = nil, threshold1: Double? = nil, threshold2: Double? = nil) { - self.companyId = companyId + self.threshold1 = threshold1 - self.hsnCode = hsnCode + self.tax1 = tax1 - self.modifiedOn = modifiedOn + self.taxOnEsp = taxOnEsp - self.taxOnMrp = taxOnMrp + self.hs2Code = hs2Code - self.threshold1 = threshold1 + self.taxOnMrp = taxOnMrp self.id = id - self.tax2 = tax2 - self.threshold2 = threshold2 - self.tax1 = tax1 + self.companyId = companyId - self.taxOnEsp = taxOnEsp + self.modifiedOn = modifiedOn - self.hs2Code = hs2Code + self.hsnCode = hsnCode + + self.tax2 = tax2 } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - companyId = try container.decode(Int.self, forKey: .companyId) + threshold1 = try container.decode(Double.self, forKey: .threshold1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - hsnCode = try container.decode(String.self, forKey: .hsnCode) + tax1 = try container.decode(Double.self, forKey: .tax1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + taxOnEsp = try container.decode(Bool.self, forKey: .taxOnEsp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -106,7 +106,7 @@ public extension PlatformClient { } catch {} do { - taxOnMrp = try container.decode(Bool.self, forKey: .taxOnMrp) + hs2Code = try container.decode(String.self, forKey: .hs2Code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +114,7 @@ public extension PlatformClient { } catch {} do { - threshold1 = try container.decode(Double.self, forKey: .threshold1) + taxOnMrp = try container.decode(Bool.self, forKey: .taxOnMrp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension PlatformClient { } catch {} do { - tax2 = try container.decode(Double.self, forKey: .tax2) + threshold2 = try container.decode(Double.self, forKey: .threshold2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - threshold2 = try container.decode(Double.self, forKey: .threshold2) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient { } catch {} do { - tax1 = try container.decode(Double.self, forKey: .tax1) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ public extension PlatformClient { } catch {} do { - taxOnEsp = try container.decode(Bool.self, forKey: .taxOnEsp) + hsnCode = try container.decode(String.self, forKey: .hsnCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - hs2Code = try container.decode(String.self, forKey: .hs2Code) + tax2 = try container.decode(Double.self, forKey: .tax2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -173,27 +173,27 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(threshold1, forKey: .threshold1) - try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) + try? container.encodeIfPresent(tax1, forKey: .tax1) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(taxOnEsp, forKey: .taxOnEsp) - try? container.encodeIfPresent(taxOnMrp, forKey: .taxOnMrp) + try? container.encodeIfPresent(hs2Code, forKey: .hs2Code) - try? container.encodeIfPresent(threshold1, forKey: .threshold1) + try? container.encodeIfPresent(taxOnMrp, forKey: .taxOnMrp) try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(tax2, forKey: .tax2) - try? container.encodeIfPresent(threshold2, forKey: .threshold2) - try? container.encodeIfPresent(tax1, forKey: .tax1) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(taxOnEsp, forKey: .taxOnEsp) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(hs2Code, forKey: .hs2Code) + try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) + + try? container.encodeIfPresent(tax2, forKey: .tax2) } } } diff --git a/Sources/code/platform/models/HsnUpsertPlatformModelClass.swift b/Sources/code/platform/models/HsnUpsertPlatformModelClass.swift index aac74196a8..0bf329c1c6 100644 --- a/Sources/code/platform/models/HsnUpsertPlatformModelClass.swift +++ b/Sources/code/platform/models/HsnUpsertPlatformModelClass.swift @@ -8,89 +8,89 @@ public extension PlatformClient { */ class HsnUpsert: Codable { - public var companyId: Int + public var threshold1: Double - public var hsnCode: String + public var tax1: Double - public var taxOnMrp: Bool + public var taxOnEsp: Bool? - public var threshold1: Double + public var hs2Code: String - public var tax2: Double? + public var taxOnMrp: Bool public var threshold2: Double? - public var uid: Int? + public var companyId: Int - public var tax1: Double + public var hsnCode: String - public var taxOnEsp: Bool? + public var tax2: Double? - public var hs2Code: String + public var uid: Int? public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + case threshold1 - case hsnCode = "hsn_code" + case tax1 - case taxOnMrp = "tax_on_mrp" + case taxOnEsp = "tax_on_esp" - case threshold1 + case hs2Code = "hs2_code" - case tax2 + case taxOnMrp = "tax_on_mrp" case threshold2 - case uid + case companyId = "company_id" - case tax1 + case hsnCode = "hsn_code" - case taxOnEsp = "tax_on_esp" + case tax2 - case hs2Code = "hs2_code" + case uid } public init(companyId: Int, hs2Code: String, hsnCode: String, tax1: Double, tax2: Double? = nil, taxOnEsp: Bool? = nil, taxOnMrp: Bool, threshold1: Double, threshold2: Double? = nil, uid: Int? = nil) { - self.companyId = companyId + self.threshold1 = threshold1 - self.hsnCode = hsnCode + self.tax1 = tax1 - self.taxOnMrp = taxOnMrp + self.taxOnEsp = taxOnEsp - self.threshold1 = threshold1 + self.hs2Code = hs2Code - self.tax2 = tax2 + self.taxOnMrp = taxOnMrp self.threshold2 = threshold2 - self.uid = uid + self.companyId = companyId - self.tax1 = tax1 + self.hsnCode = hsnCode - self.taxOnEsp = taxOnEsp + self.tax2 = tax2 - self.hs2Code = hs2Code + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - companyId = try container.decode(Int.self, forKey: .companyId) - - hsnCode = try container.decode(String.self, forKey: .hsnCode) - - taxOnMrp = try container.decode(Bool.self, forKey: .taxOnMrp) - threshold1 = try container.decode(Double.self, forKey: .threshold1) + tax1 = try container.decode(Double.self, forKey: .tax1) + do { - tax2 = try container.decode(Double.self, forKey: .tax2) + taxOnEsp = try container.decode(Bool.self, forKey: .taxOnEsp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + hs2Code = try container.decode(String.self, forKey: .hs2Code) + + taxOnMrp = try container.decode(Bool.self, forKey: .taxOnMrp) + do { threshold2 = try container.decode(Double.self, forKey: .threshold2) @@ -99,49 +99,49 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + companyId = try container.decode(Int.self, forKey: .companyId) + + hsnCode = try container.decode(String.self, forKey: .hsnCode) + do { - uid = try container.decode(Int.self, forKey: .uid) + tax2 = try container.decode(Double.self, forKey: .tax2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - tax1 = try container.decode(Double.self, forKey: .tax1) - do { - taxOnEsp = try container.decode(Bool.self, forKey: .taxOnEsp) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - hs2Code = try container.decode(String.self, forKey: .hs2Code) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(threshold1, forKey: .threshold1) - try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) + try? container.encodeIfPresent(tax1, forKey: .tax1) - try? container.encodeIfPresent(taxOnMrp, forKey: .taxOnMrp) + try? container.encodeIfPresent(taxOnEsp, forKey: .taxOnEsp) - try? container.encodeIfPresent(threshold1, forKey: .threshold1) + try? container.encode(hs2Code, forKey: .hs2Code) - try? container.encodeIfPresent(tax2, forKey: .tax2) + try? container.encodeIfPresent(taxOnMrp, forKey: .taxOnMrp) try? container.encodeIfPresent(threshold2, forKey: .threshold2) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(tax1, forKey: .tax1) + try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) - try? container.encodeIfPresent(taxOnEsp, forKey: .taxOnEsp) + try? container.encodeIfPresent(tax2, forKey: .tax2) - try? container.encode(hs2Code, forKey: .hs2Code) + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/platform/models/IfscCodeResponsePlatformModelClass.swift b/Sources/code/platform/models/IfscCodeResponsePlatformModelClass.swift index 0b9f6d2899..5b1571a4c9 100644 --- a/Sources/code/platform/models/IfscCodeResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/IfscCodeResponsePlatformModelClass.swift @@ -8,32 +8,32 @@ public extension PlatformClient { */ class IfscCodeResponse: Codable { - public var bankName: String + public var branchName: String public var success: Bool? - public var branchName: String + public var bankName: String public enum CodingKeys: String, CodingKey { - case bankName = "bank_name" + case branchName = "branch_name" case success - case branchName = "branch_name" + case bankName = "bank_name" } public init(bankName: String, branchName: String, success: Bool? = nil) { - self.bankName = bankName + self.branchName = branchName self.success = success - self.branchName = branchName + self.bankName = bankName } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - bankName = try container.decode(String.self, forKey: .bankName) + branchName = try container.decode(String.self, forKey: .branchName) do { success = try container.decode(Bool.self, forKey: .success) @@ -43,17 +43,17 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - branchName = try container.decode(String.self, forKey: .branchName) + bankName = try container.decode(String.self, forKey: .bankName) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(bankName, forKey: .bankName) + try? container.encodeIfPresent(branchName, forKey: .branchName) try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(branchName, forKey: .branchName) + try? container.encodeIfPresent(bankName, forKey: .bankName) } } } diff --git a/Sources/code/platform/models/ImagePlatformModelClass.swift b/Sources/code/platform/models/ImagePlatformModelClass.swift index 9c78cd86d4..3fb9c75d6b 100644 --- a/Sources/code/platform/models/ImagePlatformModelClass.swift +++ b/Sources/code/platform/models/ImagePlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class Image: Codable { - public var aspectRatio: String? - - public var secureUrl: String? + public var url: String? public var aspectRatioF: Double? - public var url: String? + public var secureUrl: String? - public enum CodingKeys: String, CodingKey { - case aspectRatio = "aspect_ratio" + public var aspectRatio: String? - case secureUrl = "secure_url" + public enum CodingKeys: String, CodingKey { + case url case aspectRatioF = "aspect_ratio_f" - case url + case secureUrl = "secure_url" + + case aspectRatio = "aspect_ratio" } public init(aspectRatio: String? = nil, aspectRatioF: Double? = nil, secureUrl: String? = nil, url: String? = nil) { - self.aspectRatio = aspectRatio - - self.secureUrl = secureUrl + self.url = url self.aspectRatioF = aspectRatioF - self.url = url + self.secureUrl = secureUrl + + self.aspectRatio = aspectRatio } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - aspectRatio = try container.decode(String.self, forKey: .aspectRatio) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - secureUrl = try container.decode(String.self, forKey: .secureUrl) + aspectRatioF = try container.decode(Double.self, forKey: .aspectRatioF) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - aspectRatioF = try container.decode(Double.self, forKey: .aspectRatioF) + secureUrl = try container.decode(String.self, forKey: .secureUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + aspectRatio = try container.decode(String.self, forKey: .aspectRatio) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) - - try? container.encodeIfPresent(secureUrl, forKey: .secureUrl) + try? container.encodeIfPresent(url, forKey: .url) try? container.encodeIfPresent(aspectRatioF, forKey: .aspectRatioF) - try? container.encodeIfPresent(url, forKey: .url) + try? container.encodeIfPresent(secureUrl, forKey: .secureUrl) + + try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) } } } diff --git a/Sources/code/platform/models/IntentAppPlatformModelClass.swift b/Sources/code/platform/models/IntentAppPlatformModelClass.swift index f48c111535..ef8f5acda7 100644 --- a/Sources/code/platform/models/IntentAppPlatformModelClass.swift +++ b/Sources/code/platform/models/IntentAppPlatformModelClass.swift @@ -12,18 +12,18 @@ public extension PlatformClient { public var packageName: String? - public var code: String? - public var displayName: String? + public var code: String? + public enum CodingKeys: String, CodingKey { case logos case packageName = "package_name" - case code - case displayName = "display_name" + + case code } public init(code: String? = nil, displayName: String? = nil, logos: PaymentModeLogo? = nil, packageName: String? = nil) { @@ -31,9 +31,9 @@ public extension PlatformClient { self.packageName = packageName - self.code = code - self.displayName = displayName + + self.code = code } required public init(from decoder: Decoder) throws { @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - code = try container.decode(String.self, forKey: .code) + displayName = try container.decode(String.self, forKey: .displayName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - displayName = try container.decode(String.self, forKey: .displayName) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -79,9 +79,9 @@ public extension PlatformClient { try? container.encode(packageName, forKey: .packageName) - try? container.encode(code, forKey: .code) - try? container.encode(displayName, forKey: .displayName) + + try? container.encode(code, forKey: .code) } } } diff --git a/Sources/code/platform/models/InvSizePlatformModelClass.swift b/Sources/code/platform/models/InvSizePlatformModelClass.swift index e09fe95761..34c9dc0d22 100644 --- a/Sources/code/platform/models/InvSizePlatformModelClass.swift +++ b/Sources/code/platform/models/InvSizePlatformModelClass.swift @@ -8,129 +8,129 @@ public extension PlatformClient { */ class InvSize: Codable { - public var itemLength: Double? + public var isSet: Bool? - public var size: String + public var currency: String - public var quantity: Int + public var size: String - public var expirationDate: String? + public var itemWeightUnitOfMeasure: String? public var price: Double - public var isSet: Bool? + public var priceTransfer: Double? + + public var expirationDate: String? + + public var priceEffective: Double public var itemHeight: Double? - public var itemWidth: Double? + public var itemDimensionsUnitOfMeasure: String? public var itemWeight: Double? - public var itemWeightUnitOfMeasure: String? + public var identifiers: [GTIN] - public var storeCode: String + public var quantity: Int public var set: InventorySet? - public var identifiers: [GTIN] - - public var priceTransfer: Double? - - public var currency: String + public var storeCode: String - public var priceEffective: Double + public var itemLength: Double? - public var itemDimensionsUnitOfMeasure: String? + public var itemWidth: Double? public enum CodingKeys: String, CodingKey { - case itemLength = "item_length" + case isSet = "is_set" - case size + case currency - case quantity + case size - case expirationDate = "expiration_date" + case itemWeightUnitOfMeasure = "item_weight_unit_of_measure" case price - case isSet = "is_set" + case priceTransfer = "price_transfer" + + case expirationDate = "expiration_date" + + case priceEffective = "price_effective" case itemHeight = "item_height" - case itemWidth = "item_width" + case itemDimensionsUnitOfMeasure = "item_dimensions_unit_of_measure" case itemWeight = "item_weight" - case itemWeightUnitOfMeasure = "item_weight_unit_of_measure" + case identifiers - case storeCode = "store_code" + case quantity case set - case identifiers - - case priceTransfer = "price_transfer" - - case currency + case storeCode = "store_code" - case priceEffective = "price_effective" + case itemLength = "item_length" - case itemDimensionsUnitOfMeasure = "item_dimensions_unit_of_measure" + case itemWidth = "item_width" } public init(currency: String, expirationDate: String? = nil, identifiers: [GTIN], isSet: Bool? = nil, itemDimensionsUnitOfMeasure: String? = nil, itemHeight: Double? = nil, itemLength: Double? = nil, itemWeight: Double? = nil, itemWeightUnitOfMeasure: String? = nil, itemWidth: Double? = nil, price: Double, priceEffective: Double, priceTransfer: Double? = nil, quantity: Int, set: InventorySet? = nil, size: String, storeCode: String) { - self.itemLength = itemLength + self.isSet = isSet - self.size = size + self.currency = currency - self.quantity = quantity + self.size = size - self.expirationDate = expirationDate + self.itemWeightUnitOfMeasure = itemWeightUnitOfMeasure self.price = price - self.isSet = isSet + self.priceTransfer = priceTransfer + + self.expirationDate = expirationDate + + self.priceEffective = priceEffective self.itemHeight = itemHeight - self.itemWidth = itemWidth + self.itemDimensionsUnitOfMeasure = itemDimensionsUnitOfMeasure self.itemWeight = itemWeight - self.itemWeightUnitOfMeasure = itemWeightUnitOfMeasure + self.identifiers = identifiers - self.storeCode = storeCode + self.quantity = quantity self.set = set - self.identifiers = identifiers - - self.priceTransfer = priceTransfer - - self.currency = currency + self.storeCode = storeCode - self.priceEffective = priceEffective + self.itemLength = itemLength - self.itemDimensionsUnitOfMeasure = itemDimensionsUnitOfMeasure + self.itemWidth = itemWidth } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - itemLength = try container.decode(Double.self, forKey: .itemLength) + isSet = try container.decode(Bool.self, forKey: .isSet) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - size = try container.decode(String.self, forKey: .size) + currency = try container.decode(String.self, forKey: .currency) - quantity = try container.decode(Int.self, forKey: .quantity) + size = try container.decode(String.self, forKey: .size) do { - expirationDate = try container.decode(String.self, forKey: .expirationDate) + itemWeightUnitOfMeasure = try container.decode(String.self, forKey: .itemWeightUnitOfMeasure) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -140,7 +140,7 @@ public extension PlatformClient { price = try container.decode(Double.self, forKey: .price) do { - isSet = try container.decode(Bool.self, forKey: .isSet) + priceTransfer = try container.decode(Double.self, forKey: .priceTransfer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -148,15 +148,17 @@ public extension PlatformClient { } catch {} do { - itemHeight = try container.decode(Double.self, forKey: .itemHeight) + expirationDate = try container.decode(String.self, forKey: .expirationDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + priceEffective = try container.decode(Double.self, forKey: .priceEffective) + do { - itemWidth = try container.decode(Double.self, forKey: .itemWidth) + itemHeight = try container.decode(Double.self, forKey: .itemHeight) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -164,7 +166,7 @@ public extension PlatformClient { } catch {} do { - itemWeight = try container.decode(Double.self, forKey: .itemWeight) + itemDimensionsUnitOfMeasure = try container.decode(String.self, forKey: .itemDimensionsUnitOfMeasure) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -172,14 +174,16 @@ public extension PlatformClient { } catch {} do { - itemWeightUnitOfMeasure = try container.decode(String.self, forKey: .itemWeightUnitOfMeasure) + itemWeight = try container.decode(Double.self, forKey: .itemWeight) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - storeCode = try container.decode(String.self, forKey: .storeCode) + identifiers = try container.decode([GTIN].self, forKey: .identifiers) + + quantity = try container.decode(Int.self, forKey: .quantity) do { set = try container.decode(InventorySet.self, forKey: .set) @@ -189,22 +193,18 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - identifiers = try container.decode([GTIN].self, forKey: .identifiers) + storeCode = try container.decode(String.self, forKey: .storeCode) do { - priceTransfer = try container.decode(Double.self, forKey: .priceTransfer) + itemLength = try container.decode(Double.self, forKey: .itemLength) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - currency = try container.decode(String.self, forKey: .currency) - - priceEffective = try container.decode(Double.self, forKey: .priceEffective) - do { - itemDimensionsUnitOfMeasure = try container.decode(String.self, forKey: .itemDimensionsUnitOfMeasure) + itemWidth = try container.decode(Double.self, forKey: .itemWidth) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -215,39 +215,39 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(itemLength, forKey: .itemLength) + try? container.encodeIfPresent(isSet, forKey: .isSet) - try? container.encodeIfPresent(size, forKey: .size) + try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(size, forKey: .size) - try? container.encodeIfPresent(expirationDate, forKey: .expirationDate) + try? container.encode(itemWeightUnitOfMeasure, forKey: .itemWeightUnitOfMeasure) try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(isSet, forKey: .isSet) + try? container.encode(priceTransfer, forKey: .priceTransfer) + + try? container.encodeIfPresent(expirationDate, forKey: .expirationDate) + + try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) try? container.encode(itemHeight, forKey: .itemHeight) - try? container.encode(itemWidth, forKey: .itemWidth) + try? container.encode(itemDimensionsUnitOfMeasure, forKey: .itemDimensionsUnitOfMeasure) try? container.encode(itemWeight, forKey: .itemWeight) - try? container.encode(itemWeightUnitOfMeasure, forKey: .itemWeightUnitOfMeasure) + try? container.encodeIfPresent(identifiers, forKey: .identifiers) - try? container.encodeIfPresent(storeCode, forKey: .storeCode) + try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(set, forKey: .set) - try? container.encodeIfPresent(identifiers, forKey: .identifiers) - - try? container.encode(priceTransfer, forKey: .priceTransfer) - - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(storeCode, forKey: .storeCode) - try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + try? container.encode(itemLength, forKey: .itemLength) - try? container.encode(itemDimensionsUnitOfMeasure, forKey: .itemDimensionsUnitOfMeasure) + try? container.encode(itemWidth, forKey: .itemWidth) } } } diff --git a/Sources/code/platform/models/InventoryBulkRequestPlatformModelClass.swift b/Sources/code/platform/models/InventoryBulkRequestPlatformModelClass.swift index c748146bd0..e99ffb3caa 100644 --- a/Sources/code/platform/models/InventoryBulkRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryBulkRequestPlatformModelClass.swift @@ -8,39 +8,37 @@ public extension PlatformClient { */ class InventoryBulkRequest: Codable { - public var companyId: Int - public var user: [String: Any]? - public var batchId: String + public var companyId: Int public var sizes: [Size1] - public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + public var batchId: String + public enum CodingKeys: String, CodingKey { case user - case batchId = "batch_id" + case companyId = "company_id" case sizes + + case batchId = "batch_id" } public init(batchId: String, companyId: Int, sizes: [Size1], user: [String: Any]? = nil) { - self.companyId = companyId - self.user = user - self.batchId = batchId + self.companyId = companyId self.sizes = sizes + + self.batchId = batchId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - companyId = try container.decode(Int.self, forKey: .companyId) - do { user = try container.decode([String: Any].self, forKey: .user) @@ -49,21 +47,23 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - batchId = try container.decode(String.self, forKey: .batchId) + companyId = try container.decode(Int.self, forKey: .companyId) sizes = try container.decode([Size1].self, forKey: .sizes) + + batchId = try container.decode(String.self, forKey: .batchId) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(user, forKey: .user) - try? container.encodeIfPresent(batchId, forKey: .batchId) + try? container.encodeIfPresent(companyId, forKey: .companyId) try? container.encodeIfPresent(sizes, forKey: .sizes) + + try? container.encodeIfPresent(batchId, forKey: .batchId) } } } diff --git a/Sources/code/platform/models/InventoryExportJobPlatformModelClass.swift b/Sources/code/platform/models/InventoryExportJobPlatformModelClass.swift index 9f242f9542..d5e5f59b63 100644 --- a/Sources/code/platform/models/InventoryExportJobPlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryExportJobPlatformModelClass.swift @@ -8,57 +8,57 @@ public extension PlatformClient { */ class InventoryExportJob: Codable { - public var requestParams: [String: Any]? + public var status: String? public var url: String? - public var triggerOn: String? - - public var taskId: String - public var sellerId: Int + public var triggerOn: String? + public var completedOn: String? - public var status: String? + public var requestParams: [String: Any]? + + public var taskId: String public enum CodingKeys: String, CodingKey { - case requestParams = "request_params" + case status case url - case triggerOn = "trigger_on" - - case taskId = "task_id" - case sellerId = "seller_id" + case triggerOn = "trigger_on" + case completedOn = "completed_on" - case status + case requestParams = "request_params" + + case taskId = "task_id" } public init(completedOn: String? = nil, requestParams: [String: Any]? = nil, sellerId: Int, status: String? = nil, taskId: String, triggerOn: String? = nil, url: String? = nil) { - self.requestParams = requestParams + self.status = status self.url = url - self.triggerOn = triggerOn - - self.taskId = taskId - self.sellerId = sellerId + self.triggerOn = triggerOn + self.completedOn = completedOn - self.status = status + self.requestParams = requestParams + + self.taskId = taskId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - requestParams = try container.decode([String: Any].self, forKey: .requestParams) + status = try container.decode(String.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -73,6 +73,8 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + sellerId = try container.decode(Int.self, forKey: .sellerId) + do { triggerOn = try container.decode(String.self, forKey: .triggerOn) @@ -81,10 +83,6 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - taskId = try container.decode(String.self, forKey: .taskId) - - sellerId = try container.decode(Int.self, forKey: .sellerId) - do { completedOn = try container.decode(String.self, forKey: .completedOn) @@ -94,30 +92,32 @@ public extension PlatformClient { } catch {} do { - status = try container.decode(String.self, forKey: .status) + requestParams = try container.decode([String: Any].self, forKey: .requestParams) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + taskId = try container.decode(String.self, forKey: .taskId) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(requestParams, forKey: .requestParams) + try? container.encodeIfPresent(status, forKey: .status) try? container.encodeIfPresent(url, forKey: .url) - try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) - - try? container.encodeIfPresent(taskId, forKey: .taskId) - try? container.encodeIfPresent(sellerId, forKey: .sellerId) + try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) + try? container.encodeIfPresent(completedOn, forKey: .completedOn) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(requestParams, forKey: .requestParams) + + try? container.encodeIfPresent(taskId, forKey: .taskId) } } } diff --git a/Sources/code/platform/models/InventoryExportRequestPlatformModelClass.swift b/Sources/code/platform/models/InventoryExportRequestPlatformModelClass.swift index d1fdf754cf..42f58ecb98 100644 --- a/Sources/code/platform/models/InventoryExportRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryExportRequestPlatformModelClass.swift @@ -8,25 +8,25 @@ public extension PlatformClient { */ class InventoryExportRequest: Codable { - public var brand: [Int]? - public var store: [Int]? + public var brand: [Int]? + public var type: String? public enum CodingKeys: String, CodingKey { - case brand - case store + case brand + case type } public init(brand: [Int]? = nil, store: [Int]? = nil, type: String? = nil) { - self.brand = brand - self.store = store + self.brand = brand + self.type = type } @@ -34,7 +34,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - brand = try container.decode([Int].self, forKey: .brand) + store = try container.decode([Int].self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - store = try container.decode([Int].self, forKey: .store) + brand = try container.decode([Int].self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,10 +61,10 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(store, forKey: .store) + try? container.encodeIfPresent(brand, forKey: .brand) + try? container.encode(type, forKey: .type) } } diff --git a/Sources/code/platform/models/InventoryExportResponsePlatformModelClass.swift b/Sources/code/platform/models/InventoryExportResponsePlatformModelClass.swift index 0bdb5e4c0e..0309845e1c 100644 --- a/Sources/code/platform/models/InventoryExportResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryExportResponsePlatformModelClass.swift @@ -8,51 +8,53 @@ public extension PlatformClient { */ class InventoryExportResponse: Codable { - public var requestParams: [String: Any]? + public var status: String? - public var triggerOn: String? + public var sellerId: Int - public var taskId: String + public var triggerOn: String? - public var sellerId: Int + public var requestParams: [String: Any]? - public var status: String? + public var taskId: String public enum CodingKeys: String, CodingKey { - case requestParams = "request_params" + case status - case triggerOn = "trigger_on" + case sellerId = "seller_id" - case taskId = "task_id" + case triggerOn = "trigger_on" - case sellerId = "seller_id" + case requestParams = "request_params" - case status + case taskId = "task_id" } public init(requestParams: [String: Any]? = nil, sellerId: Int, status: String? = nil, taskId: String, triggerOn: String? = nil) { - self.requestParams = requestParams + self.status = status - self.triggerOn = triggerOn + self.sellerId = sellerId - self.taskId = taskId + self.triggerOn = triggerOn - self.sellerId = sellerId + self.requestParams = requestParams - self.status = status + self.taskId = taskId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - requestParams = try container.decode([String: Any].self, forKey: .requestParams) + status = try container.decode(String.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + sellerId = try container.decode(Int.self, forKey: .sellerId) + do { triggerOn = try container.decode(String.self, forKey: .triggerOn) @@ -61,31 +63,29 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - taskId = try container.decode(String.self, forKey: .taskId) - - sellerId = try container.decode(Int.self, forKey: .sellerId) - do { - status = try container.decode(String.self, forKey: .status) + requestParams = try container.decode([String: Any].self, forKey: .requestParams) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + taskId = try container.decode(String.self, forKey: .taskId) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(requestParams, forKey: .requestParams) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) + try? container.encodeIfPresent(sellerId, forKey: .sellerId) - try? container.encodeIfPresent(taskId, forKey: .taskId) + try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) - try? container.encodeIfPresent(sellerId, forKey: .sellerId) + try? container.encodeIfPresent(requestParams, forKey: .requestParams) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(taskId, forKey: .taskId) } } } diff --git a/Sources/code/platform/models/InventoryRequestPlatformModelClass.swift b/Sources/code/platform/models/InventoryRequestPlatformModelClass.swift index 7c70eed23b..1aefd78d2d 100644 --- a/Sources/code/platform/models/InventoryRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryRequestPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class InventoryRequest: Codable { public var companyId: Int - public var item: ItemQuery - public var sizes: [InvSize] + public var item: ItemQuery + public enum CodingKeys: String, CodingKey { case companyId = "company_id" - case item - case sizes + + case item } public init(companyId: Int, item: ItemQuery, sizes: [InvSize]) { self.companyId = companyId - self.item = item - self.sizes = sizes + + self.item = item } required public init(from decoder: Decoder) throws { @@ -35,9 +35,9 @@ public extension PlatformClient { companyId = try container.decode(Int.self, forKey: .companyId) - item = try container.decode(ItemQuery.self, forKey: .item) - sizes = try container.decode([InvSize].self, forKey: .sizes) + + item = try container.decode(ItemQuery.self, forKey: .item) } public func encode(to encoder: Encoder) throws { @@ -45,9 +45,9 @@ public extension PlatformClient { try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(item, forKey: .item) - try? container.encodeIfPresent(sizes, forKey: .sizes) + + try? container.encodeIfPresent(item, forKey: .item) } } } diff --git a/Sources/code/platform/models/InventoryResponsePlatformModelClass.swift b/Sources/code/platform/models/InventoryResponsePlatformModelClass.swift index 492cf81821..f760d92d11 100644 --- a/Sources/code/platform/models/InventoryResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryResponsePlatformModelClass.swift @@ -8,93 +8,93 @@ public extension PlatformClient { */ class InventoryResponse: Codable { - public var itemId: Int? + public var currency: String? public var inventoryUpdatedOn: String? - public var quantity: Int? + public var sellableQuantity: Int? + + public var store: [String: Any]? public var size: String? public var price: Int? - public var currency: String? - - public var uid: String? - - public var sellableQuantity: Int? + public var priceTransfer: Int? public var identifiers: [String: Any]? - public var priceTransfer: Int? + public var priceEffective: Int? - public var sellerIdentifier: Int? + public var quantity: Int? - public var priceEffective: Int? + public var uid: String? - public var store: [String: Any]? + public var itemId: Int? + + public var sellerIdentifier: Int? public enum CodingKeys: String, CodingKey { - case itemId = "item_id" + case currency case inventoryUpdatedOn = "inventory_updated_on" - case quantity + case sellableQuantity = "sellable_quantity" + + case store case size case price - case currency - - case uid - - case sellableQuantity = "sellable_quantity" + case priceTransfer = "price_transfer" case identifiers - case priceTransfer = "price_transfer" + case priceEffective = "price_effective" - case sellerIdentifier = "seller_identifier" + case quantity - case priceEffective = "price_effective" + case uid - case store + case itemId = "item_id" + + case sellerIdentifier = "seller_identifier" } public init(currency: String? = nil, identifiers: [String: Any]? = nil, inventoryUpdatedOn: String? = nil, itemId: Int? = nil, price: Int? = nil, priceEffective: Int? = nil, priceTransfer: Int? = nil, quantity: Int? = nil, sellableQuantity: Int? = nil, sellerIdentifier: Int? = nil, size: String? = nil, store: [String: Any]? = nil, uid: String? = nil) { - self.itemId = itemId + self.currency = currency self.inventoryUpdatedOn = inventoryUpdatedOn - self.quantity = quantity + self.sellableQuantity = sellableQuantity + + self.store = store self.size = size self.price = price - self.currency = currency - - self.uid = uid - - self.sellableQuantity = sellableQuantity + self.priceTransfer = priceTransfer self.identifiers = identifiers - self.priceTransfer = priceTransfer + self.priceEffective = priceEffective - self.sellerIdentifier = sellerIdentifier + self.quantity = quantity - self.priceEffective = priceEffective + self.uid = uid - self.store = store + self.itemId = itemId + + self.sellerIdentifier = sellerIdentifier } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - itemId = try container.decode(Int.self, forKey: .itemId) + currency = try container.decode(String.self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +110,7 @@ public extension PlatformClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + sellableQuantity = try container.decode(Int.self, forKey: .sellableQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -118,7 +118,7 @@ public extension PlatformClient { } catch {} do { - size = try container.decode(String.self, forKey: .size) + store = try container.decode([String: Any].self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } catch {} do { - price = try container.decode(Int.self, forKey: .price) + size = try container.decode(String.self, forKey: .size) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - currency = try container.decode(String.self, forKey: .currency) + price = try container.decode(Int.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,7 +142,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(String.self, forKey: .uid) + priceTransfer = try container.decode(Int.self, forKey: .priceTransfer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - sellableQuantity = try container.decode(Int.self, forKey: .sellableQuantity) + identifiers = try container.decode([String: Any].self, forKey: .identifiers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - identifiers = try container.decode([String: Any].self, forKey: .identifiers) + priceEffective = try container.decode(Int.self, forKey: .priceEffective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,7 +166,7 @@ public extension PlatformClient { } catch {} do { - priceTransfer = try container.decode(Int.self, forKey: .priceTransfer) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - sellerIdentifier = try container.decode(Int.self, forKey: .sellerIdentifier) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +182,7 @@ public extension PlatformClient { } catch {} do { - priceEffective = try container.decode(Int.self, forKey: .priceEffective) + itemId = try container.decode(Int.self, forKey: .itemId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - store = try container.decode([String: Any].self, forKey: .store) + sellerIdentifier = try container.decode(Int.self, forKey: .sellerIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -201,31 +201,31 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(itemId, forKey: .itemId) + try? container.encodeIfPresent(currency, forKey: .currency) try? container.encodeIfPresent(inventoryUpdatedOn, forKey: .inventoryUpdatedOn) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(sellableQuantity, forKey: .sellableQuantity) + + try? container.encodeIfPresent(store, forKey: .store) try? container.encodeIfPresent(size, forKey: .size) try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(currency, forKey: .currency) - - try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(sellableQuantity, forKey: .sellableQuantity) + try? container.encodeIfPresent(priceTransfer, forKey: .priceTransfer) try? container.encodeIfPresent(identifiers, forKey: .identifiers) - try? container.encodeIfPresent(priceTransfer, forKey: .priceTransfer) + try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) - try? container.encodeIfPresent(sellerIdentifier, forKey: .sellerIdentifier) + try? container.encodeIfPresent(quantity, forKey: .quantity) - try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(store, forKey: .store) + try? container.encodeIfPresent(itemId, forKey: .itemId) + + try? container.encodeIfPresent(sellerIdentifier, forKey: .sellerIdentifier) } } } diff --git a/Sources/code/platform/models/InventoryValidationResponsePlatformModelClass.swift b/Sources/code/platform/models/InventoryValidationResponsePlatformModelClass.swift index 455b74de1e..35f1b2adf5 100644 --- a/Sources/code/platform/models/InventoryValidationResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryValidationResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class InventoryValidationResponse: Codable { - public var message: String? - public var data: [String: Any]? - public enum CodingKeys: String, CodingKey { - case message + public var message: String? + public enum CodingKeys: String, CodingKey { case data + + case message } public init(data: [String: Any]? = nil, message: String? = nil) { - self.message = message - self.data = data + + self.message = message } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - message = try container.decode(String.self, forKey: .message) + data = try container.decode([String: Any].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - data = try container.decode([String: Any].self, forKey: .data) + message = try container.decode(String.self, forKey: .message) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(data, forKey: .data) + + try? container.encodeIfPresent(message, forKey: .message) } } } diff --git a/Sources/code/platform/models/InvoiceCredSerializerPlatformModelClass.swift b/Sources/code/platform/models/InvoiceCredSerializerPlatformModelClass.swift index 86bd2497d6..38d770c4d3 100644 --- a/Sources/code/platform/models/InvoiceCredSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/InvoiceCredSerializerPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class InvoiceCredSerializer: Codable { - public var username: String? + public var password: String? public var enabled: Bool? - public var password: String? + public var username: String? public enum CodingKeys: String, CodingKey { - case username + case password case enabled - case password + case username } public init(enabled: Bool? = nil, password: String? = nil, username: String? = nil) { - self.username = username + self.password = password self.enabled = enabled - self.password = password + self.username = username } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - username = try container.decode(String.self, forKey: .username) + password = try container.decode(String.self, forKey: .password) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - password = try container.decode(String.self, forKey: .password) + username = try container.decode(String.self, forKey: .username) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(username, forKey: .username) + try? container.encodeIfPresent(password, forKey: .password) try? container.encodeIfPresent(enabled, forKey: .enabled) - try? container.encodeIfPresent(password, forKey: .password) + try? container.encodeIfPresent(username, forKey: .username) } } } diff --git a/Sources/code/platform/models/ItemQueryPlatformModelClass.swift b/Sources/code/platform/models/ItemQueryPlatformModelClass.swift index c25e9bdad8..d623b52276 100644 --- a/Sources/code/platform/models/ItemQueryPlatformModelClass.swift +++ b/Sources/code/platform/models/ItemQueryPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class ItemQuery: Codable { + public var itemCode: String? + public var uid: Int? public var brandUid: Int? - public var itemCode: String? - public enum CodingKeys: String, CodingKey { + case itemCode = "item_code" + case uid case brandUid = "brand_uid" - - case itemCode = "item_code" } public init(brandUid: Int? = nil, itemCode: String? = nil, uid: Int? = nil) { + self.itemCode = itemCode + self.uid = uid self.brandUid = brandUid - - self.itemCode = itemCode } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - uid = try container.decode(Int.self, forKey: .uid) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - brandUid = try container.decode(Int.self, forKey: .brandUid) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + brandUid = try container.decode(Int.self, forKey: .brandUid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(brandUid, forKey: .brandUid) - - try? container.encodeIfPresent(itemCode, forKey: .itemCode) } } } diff --git a/Sources/code/platform/models/ItemsPlatformModelClass.swift b/Sources/code/platform/models/ItemsPlatformModelClass.swift index b35f695330..14bbf9ba87 100644 --- a/Sources/code/platform/models/ItemsPlatformModelClass.swift +++ b/Sources/code/platform/models/ItemsPlatformModelClass.swift @@ -8,117 +8,117 @@ public extension PlatformClient { */ class Items: Codable { - public var companyId: Int? + public var cancelled: Int? - public var createdBy: UserCommon? + public var failedRecords: [String]? - public var modifiedOn: String? + public var trackingUrl: String? - public var filePath: String? + public var id: String? - public var total: Int? + public var createdBy: UserCommon? - public var createdOn: String? + public var failed: Int? + + public var total: Int? public var succeed: Int? - public var cancelled: Int? + public var filePath: String? - public var id: String? + public var cancelledRecords: [String]? public var modifiedBy: UserCommon? - public var trackingUrl: String? - - public var failedRecords: [String]? + public var retry: Int? - public var failed: Int? + public var companyId: Int? - public var stage: String? + public var modifiedOn: String? public var isActive: Bool? - public var cancelledRecords: [String]? + public var createdOn: String? - public var retry: Int? + public var stage: String? public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + case cancelled - case createdBy = "created_by" + case failedRecords = "failed_records" - case modifiedOn = "modified_on" + case trackingUrl = "tracking_url" - case filePath = "file_path" + case id - case total + case createdBy = "created_by" - case createdOn = "created_on" + case failed + + case total case succeed - case cancelled + case filePath = "file_path" - case id + case cancelledRecords = "cancelled_records" case modifiedBy = "modified_by" - case trackingUrl = "tracking_url" - - case failedRecords = "failed_records" + case retry - case failed + case companyId = "company_id" - case stage + case modifiedOn = "modified_on" case isActive = "is_active" - case cancelledRecords = "cancelled_records" + case createdOn = "created_on" - case retry + case stage } public init(cancelled: Int? = nil, cancelledRecords: [String]? = nil, companyId: Int? = nil, createdBy: UserCommon? = nil, createdOn: String? = nil, failed: Int? = nil, failedRecords: [String]? = nil, filePath: String? = nil, id: String? = nil, isActive: Bool? = nil, modifiedBy: UserCommon? = nil, modifiedOn: String? = nil, retry: Int? = nil, stage: String? = nil, succeed: Int? = nil, total: Int? = nil, trackingUrl: String? = nil) { - self.companyId = companyId + self.cancelled = cancelled - self.createdBy = createdBy + self.failedRecords = failedRecords - self.modifiedOn = modifiedOn + self.trackingUrl = trackingUrl - self.filePath = filePath + self.id = id - self.total = total + self.createdBy = createdBy - self.createdOn = createdOn + self.failed = failed + + self.total = total self.succeed = succeed - self.cancelled = cancelled + self.filePath = filePath - self.id = id + self.cancelledRecords = cancelledRecords self.modifiedBy = modifiedBy - self.trackingUrl = trackingUrl - - self.failedRecords = failedRecords + self.retry = retry - self.failed = failed + self.companyId = companyId - self.stage = stage + self.modifiedOn = modifiedOn self.isActive = isActive - self.cancelledRecords = cancelledRecords + self.createdOn = createdOn - self.retry = retry + self.stage = stage } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - companyId = try container.decode(Int.self, forKey: .companyId) + cancelled = try container.decode(Int.self, forKey: .cancelled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserCommon.self, forKey: .createdBy) + failedRecords = try container.decode([String].self, forKey: .failedRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + trackingUrl = try container.decode(String.self, forKey: .trackingUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,7 +142,7 @@ public extension PlatformClient { } catch {} do { - filePath = try container.decode(String.self, forKey: .filePath) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - total = try container.decode(Int.self, forKey: .total) + createdBy = try container.decode(UserCommon.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + failed = try container.decode(Int.self, forKey: .failed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,7 +166,7 @@ public extension PlatformClient { } catch {} do { - succeed = try container.decode(Int.self, forKey: .succeed) + total = try container.decode(Int.self, forKey: .total) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - cancelled = try container.decode(Int.self, forKey: .cancelled) + succeed = try container.decode(Int.self, forKey: .succeed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +182,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + filePath = try container.decode(String.self, forKey: .filePath) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserCommon.self, forKey: .modifiedBy) + cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +198,7 @@ public extension PlatformClient { } catch {} do { - trackingUrl = try container.decode(String.self, forKey: .trackingUrl) + modifiedBy = try container.decode(UserCommon.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +206,7 @@ public extension PlatformClient { } catch {} do { - failedRecords = try container.decode([String].self, forKey: .failedRecords) + retry = try container.decode(Int.self, forKey: .retry) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +214,7 @@ public extension PlatformClient { } catch {} do { - failed = try container.decode(Int.self, forKey: .failed) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -222,7 +222,7 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -238,7 +238,7 @@ public extension PlatformClient { } catch {} do { - cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -246,7 +246,7 @@ public extension PlatformClient { } catch {} do { - retry = try container.decode(Int.self, forKey: .retry) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -257,39 +257,39 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(cancelled, forKey: .cancelled) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(trackingUrl, forKey: .trackingUrl) - try? container.encodeIfPresent(filePath, forKey: .filePath) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(total, forKey: .total) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(failed, forKey: .failed) + + try? container.encodeIfPresent(total, forKey: .total) try? container.encodeIfPresent(succeed, forKey: .succeed) - try? container.encodeIfPresent(cancelled, forKey: .cancelled) + try? container.encodeIfPresent(filePath, forKey: .filePath) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(trackingUrl, forKey: .trackingUrl) - - try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) + try? container.encodeIfPresent(retry, forKey: .retry) - try? container.encodeIfPresent(failed, forKey: .failed) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(retry, forKey: .retry) + try? container.encodeIfPresent(stage, forKey: .stage) } } } diff --git a/Sources/code/platform/models/LimitedProductDataPlatformModelClass.swift b/Sources/code/platform/models/LimitedProductDataPlatformModelClass.swift index 030691869f..483cbe748c 100644 --- a/Sources/code/platform/models/LimitedProductDataPlatformModelClass.swift +++ b/Sources/code/platform/models/LimitedProductDataPlatformModelClass.swift @@ -8,87 +8,87 @@ public extension PlatformClient { */ class LimitedProductData: Codable { - public var shortDescription: String? - - public var itemCode: String? - - public var quantity: Int? + public var slug: String? - public var identifier: [String: Any]? + public var attributes: [String: Any]? public var price: [String: Any]? - public var slug: String? + public var name: String? - public var uid: Int? + public var sizes: [String]? public var countryOfOrigin: String? - public var sizes: [String]? + public var itemCode: String? - public var name: String? + public var quantity: Int? - public var attributes: [String: Any]? + public var uid: Int? public var images: [String]? - public enum CodingKeys: String, CodingKey { - case shortDescription = "short_description" + public var shortDescription: String? - case itemCode = "item_code" + public var identifier: [String: Any]? - case quantity + public enum CodingKeys: String, CodingKey { + case slug - case identifier + case attributes case price - case slug + case name - case uid + case sizes case countryOfOrigin = "country_of_origin" - case sizes + case itemCode = "item_code" - case name + case quantity - case attributes + case uid case images - } - public init(attributes: [String: Any]? = nil, countryOfOrigin: String? = nil, identifier: [String: Any]? = nil, images: [String]? = nil, itemCode: String? = nil, name: String? = nil, price: [String: Any]? = nil, quantity: Int? = nil, shortDescription: String? = nil, sizes: [String]? = nil, slug: String? = nil, uid: Int? = nil) { - self.shortDescription = shortDescription + case shortDescription = "short_description" - self.itemCode = itemCode + case identifier + } - self.quantity = quantity + public init(attributes: [String: Any]? = nil, countryOfOrigin: String? = nil, identifier: [String: Any]? = nil, images: [String]? = nil, itemCode: String? = nil, name: String? = nil, price: [String: Any]? = nil, quantity: Int? = nil, shortDescription: String? = nil, sizes: [String]? = nil, slug: String? = nil, uid: Int? = nil) { + self.slug = slug - self.identifier = identifier + self.attributes = attributes self.price = price - self.slug = slug + self.name = name - self.uid = uid + self.sizes = sizes self.countryOfOrigin = countryOfOrigin - self.sizes = sizes + self.itemCode = itemCode - self.name = name + self.quantity = quantity - self.attributes = attributes + self.uid = uid self.images = images + + self.shortDescription = shortDescription + + self.identifier = identifier } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -96,7 +96,7 @@ public extension PlatformClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + attributes = try container.decode([String: Any].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +104,7 @@ public extension PlatformClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + price = try container.decode([String: Any].self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -112,7 +112,7 @@ public extension PlatformClient { } catch {} do { - identifier = try container.decode([String: Any].self, forKey: .identifier) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -120,7 +120,7 @@ public extension PlatformClient { } catch {} do { - price = try container.decode([String: Any].self, forKey: .price) + sizes = try container.decode([String].self, forKey: .sizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +128,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -136,7 +136,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,7 +144,7 @@ public extension PlatformClient { } catch {} do { - countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +152,7 @@ public extension PlatformClient { } catch {} do { - sizes = try container.decode([String].self, forKey: .sizes) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -160,7 +160,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + images = try container.decode([String].self, forKey: .images) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -168,7 +168,7 @@ public extension PlatformClient { } catch {} do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +176,7 @@ public extension PlatformClient { } catch {} do { - images = try container.decode([String].self, forKey: .images) + identifier = try container.decode([String: Any].self, forKey: .identifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -187,29 +187,29 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - - try? container.encodeIfPresent(itemCode, forKey: .itemCode) - - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(identifier, forKey: .identifier) + try? container.encodeIfPresent(attributes, forKey: .attributes) try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(sizes, forKey: .sizes) try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) - try? container.encodeIfPresent(sizes, forKey: .sizes) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(quantity, forKey: .quantity) - try? container.encodeIfPresent(attributes, forKey: .attributes) + try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(images, forKey: .images) + + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + + try? container.encodeIfPresent(identifier, forKey: .identifier) } } } diff --git a/Sources/code/platform/models/LocationDayWiseSerializerPlatformModelClass.swift b/Sources/code/platform/models/LocationDayWiseSerializerPlatformModelClass.swift index 99333df87a..6dbbff5f75 100644 --- a/Sources/code/platform/models/LocationDayWiseSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/LocationDayWiseSerializerPlatformModelClass.swift @@ -8,39 +8,37 @@ public extension PlatformClient { */ class LocationDayWiseSerializer: Codable { - public var weekday: String - public var closing: LocationTimingSerializer? + public var open: Bool + public var opening: LocationTimingSerializer? - public var open: Bool + public var weekday: String public enum CodingKeys: String, CodingKey { - case weekday - case closing + case open + case opening - case open + case weekday } public init(closing: LocationTimingSerializer? = nil, open: Bool, opening: LocationTimingSerializer? = nil, weekday: String) { - self.weekday = weekday - self.closing = closing + self.open = open + self.opening = opening - self.open = open + self.weekday = weekday } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - weekday = try container.decode(String.self, forKey: .weekday) - do { closing = try container.decode(LocationTimingSerializer.self, forKey: .closing) @@ -49,6 +47,8 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + open = try container.decode(Bool.self, forKey: .open) + do { opening = try container.decode(LocationTimingSerializer.self, forKey: .opening) @@ -57,19 +57,19 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - open = try container.decode(Bool.self, forKey: .open) + weekday = try container.decode(String.self, forKey: .weekday) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(weekday, forKey: .weekday) - try? container.encodeIfPresent(closing, forKey: .closing) + try? container.encodeIfPresent(open, forKey: .open) + try? container.encodeIfPresent(opening, forKey: .opening) - try? container.encodeIfPresent(open, forKey: .open) + try? container.encodeIfPresent(weekday, forKey: .weekday) } } } diff --git a/Sources/code/platform/models/LocationIntegrationTypePlatformModelClass.swift b/Sources/code/platform/models/LocationIntegrationTypePlatformModelClass.swift index e6acdae78a..1deb7d0e04 100644 --- a/Sources/code/platform/models/LocationIntegrationTypePlatformModelClass.swift +++ b/Sources/code/platform/models/LocationIntegrationTypePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class LocationIntegrationType: Codable { - public var order: String? - public var inventory: String? - public enum CodingKeys: String, CodingKey { - case order + public var order: String? + public enum CodingKeys: String, CodingKey { case inventory + + case order } public init(inventory: String? = nil, order: String? = nil) { - self.order = order - self.inventory = inventory + + self.order = order } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - order = try container.decode(String.self, forKey: .order) + inventory = try container.decode(String.self, forKey: .inventory) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - inventory = try container.decode(String.self, forKey: .inventory) + order = try container.decode(String.self, forKey: .order) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(order, forKey: .order) - try? container.encodeIfPresent(inventory, forKey: .inventory) + + try? container.encodeIfPresent(order, forKey: .order) } } } diff --git a/Sources/code/platform/models/LocationManagerSerializerPlatformModelClass.swift b/Sources/code/platform/models/LocationManagerSerializerPlatformModelClass.swift index 33498109de..1777976d45 100644 --- a/Sources/code/platform/models/LocationManagerSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/LocationManagerSerializerPlatformModelClass.swift @@ -8,33 +8,31 @@ public extension PlatformClient { */ class LocationManagerSerializer: Codable { - public var mobileNo: SellerPhoneNumber - public var name: String? + public var mobileNo: SellerPhoneNumber + public var email: String? public enum CodingKeys: String, CodingKey { - case mobileNo = "mobile_no" - case name + case mobileNo = "mobile_no" + case email } public init(email: String? = nil, mobileNo: SellerPhoneNumber, name: String? = nil) { - self.mobileNo = mobileNo - self.name = name + self.mobileNo = mobileNo + self.email = email } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - mobileNo = try container.decode(SellerPhoneNumber.self, forKey: .mobileNo) - do { name = try container.decode(String.self, forKey: .name) @@ -43,6 +41,8 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + mobileNo = try container.decode(SellerPhoneNumber.self, forKey: .mobileNo) + do { email = try container.decode(String.self, forKey: .email) @@ -55,10 +55,10 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(mobileNo, forKey: .mobileNo) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(mobileNo, forKey: .mobileNo) + try? container.encodeIfPresent(email, forKey: .email) } } diff --git a/Sources/code/platform/models/LocationSerializerPlatformModelClass.swift b/Sources/code/platform/models/LocationSerializerPlatformModelClass.swift index e6c83ba128..c92b13d5c1 100644 --- a/Sources/code/platform/models/LocationSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/LocationSerializerPlatformModelClass.swift @@ -8,139 +8,135 @@ public extension PlatformClient { */ class LocationSerializer: Codable { - public var code: String + public var warnings: [String: Any]? - public var storeType: String? + public var address: GetAddressSerializer1 - public var displayName: String + public var stage: String? public var customJson: [String: Any]? - public var name: String - - public var notificationEmails: [String]? + public var gstCredentials: InvoiceDetailsSerializer? public var documents: [Document]? - public var contactNumbers: [SellerPhoneNumber]? + public var code: String - public var warnings: [String: Any]? + public var displayName: String - public var manager: LocationManagerSerializer? + public var timing: [LocationDayWiseSerializer]? - public var company: Int + public var name: String - public var gstCredentials: InvoiceDetailsSerializer? + public var company: Int public var productReturnConfig: ProductReturnConfigSerializer? - public var stage: String? + public var notificationEmails: [String]? - public var timing: [LocationDayWiseSerializer]? + public var manager: LocationManagerSerializer? - public var uid: Int? + public var contactNumbers: [SellerPhoneNumber]? - public var address: GetAddressSerializer1 + public var storeType: String? + + public var uid: Int? public enum CodingKeys: String, CodingKey { - case code + case warnings - case storeType = "store_type" + case address - case displayName = "display_name" + case stage case customJson = "_custom_json" - case name - - case notificationEmails = "notification_emails" + case gstCredentials = "gst_credentials" case documents - case contactNumbers = "contact_numbers" + case code - case warnings + case displayName = "display_name" - case manager + case timing - case company + case name - case gstCredentials = "gst_credentials" + case company case productReturnConfig = "product_return_config" - case stage + case notificationEmails = "notification_emails" - case timing + case manager - case uid + case contactNumbers = "contact_numbers" - case address + case storeType = "store_type" + + case uid } public init(address: GetAddressSerializer1, code: String, company: Int, contactNumbers: [SellerPhoneNumber]? = nil, displayName: String, documents: [Document]? = nil, gstCredentials: InvoiceDetailsSerializer? = nil, manager: LocationManagerSerializer? = nil, name: String, notificationEmails: [String]? = nil, productReturnConfig: ProductReturnConfigSerializer? = nil, stage: String? = nil, storeType: String? = nil, timing: [LocationDayWiseSerializer]? = nil, uid: Int? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { - self.code = code + self.warnings = warnings - self.storeType = storeType + self.address = address - self.displayName = displayName + self.stage = stage self.customJson = customJson - self.name = name - - self.notificationEmails = notificationEmails + self.gstCredentials = gstCredentials self.documents = documents - self.contactNumbers = contactNumbers + self.code = code - self.warnings = warnings + self.displayName = displayName - self.manager = manager + self.timing = timing - self.company = company + self.name = name - self.gstCredentials = gstCredentials + self.company = company self.productReturnConfig = productReturnConfig - self.stage = stage + self.notificationEmails = notificationEmails - self.timing = timing + self.manager = manager - self.uid = uid + self.contactNumbers = contactNumbers - self.address = address + self.storeType = storeType + + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - code = try container.decode(String.self, forKey: .code) - do { - storeType = try container.decode(String.self, forKey: .storeType) + warnings = try container.decode([String: Any].self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - displayName = try container.decode(String.self, forKey: .displayName) + address = try container.decode(GetAddressSerializer1.self, forKey: .address) do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - name = try container.decode(String.self, forKey: .name) - do { - notificationEmails = try container.decode([String].self, forKey: .notificationEmails) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -148,7 +144,7 @@ public extension PlatformClient { } catch {} do { - documents = try container.decode([Document].self, forKey: .documents) + gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -156,33 +152,39 @@ public extension PlatformClient { } catch {} do { - contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) + documents = try container.decode([Document].self, forKey: .documents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + code = try container.decode(String.self, forKey: .code) + + displayName = try container.decode(String.self, forKey: .displayName) + do { - warnings = try container.decode([String: Any].self, forKey: .warnings) + timing = try container.decode([LocationDayWiseSerializer].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + + company = try container.decode(Int.self, forKey: .company) + do { - manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) + productReturnConfig = try container.decode(ProductReturnConfigSerializer.self, forKey: .productReturnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - company = try container.decode(Int.self, forKey: .company) - do { - gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) + notificationEmails = try container.decode([String].self, forKey: .notificationEmails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +192,7 @@ public extension PlatformClient { } catch {} do { - productReturnConfig = try container.decode(ProductReturnConfigSerializer.self, forKey: .productReturnConfig) + manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +200,7 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +208,7 @@ public extension PlatformClient { } catch {} do { - timing = try container.decode([LocationDayWiseSerializer].self, forKey: .timing) + storeType = try container.decode(String.self, forKey: .storeType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -220,46 +222,44 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - address = try container.decode(GetAddressSerializer1.self, forKey: .address) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(code, forKey: .code) + try? container.encodeIfPresent(warnings, forKey: .warnings) - try? container.encodeIfPresent(storeType, forKey: .storeType) + try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(stage, forKey: .stage) try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(name, forKey: .name) - - try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) + try? container.encodeIfPresent(gstCredentials, forKey: .gstCredentials) try? container.encodeIfPresent(documents, forKey: .documents) - try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) + try? container.encodeIfPresent(code, forKey: .code) - try? container.encodeIfPresent(warnings, forKey: .warnings) + try? container.encodeIfPresent(displayName, forKey: .displayName) - try? container.encodeIfPresent(manager, forKey: .manager) + try? container.encodeIfPresent(timing, forKey: .timing) - try? container.encodeIfPresent(company, forKey: .company) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(gstCredentials, forKey: .gstCredentials) + try? container.encodeIfPresent(company, forKey: .company) try? container.encodeIfPresent(productReturnConfig, forKey: .productReturnConfig) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) - try? container.encodeIfPresent(timing, forKey: .timing) + try? container.encodeIfPresent(manager, forKey: .manager) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(storeType, forKey: .storeType) + + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/platform/models/LocationTimingSerializerPlatformModelClass.swift b/Sources/code/platform/models/LocationTimingSerializerPlatformModelClass.swift index 4a090e2186..bcd0d6fa9d 100644 --- a/Sources/code/platform/models/LocationTimingSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/LocationTimingSerializerPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class LocationTimingSerializer: Codable { - public var hour: Int? - public var minute: Int? - public enum CodingKeys: String, CodingKey { - case hour + public var hour: Int? + public enum CodingKeys: String, CodingKey { case minute + + case hour } public init(hour: Int? = nil, minute: Int? = nil) { - self.hour = hour - self.minute = minute + + self.hour = hour } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - hour = try container.decode(Int.self, forKey: .hour) + minute = try container.decode(Int.self, forKey: .minute) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - minute = try container.decode(Int.self, forKey: .minute) + hour = try container.decode(Int.self, forKey: .hour) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(hour, forKey: .hour) - try? container.encodeIfPresent(minute, forKey: .minute) + + try? container.encodeIfPresent(hour, forKey: .hour) } } } diff --git a/Sources/code/platform/models/LogoPlatformModelClass.swift b/Sources/code/platform/models/LogoPlatformModelClass.swift index 46b065a64d..18086a0834 100644 --- a/Sources/code/platform/models/LogoPlatformModelClass.swift +++ b/Sources/code/platform/models/LogoPlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class Logo: Codable { - public var aspectRatio: String? - - public var secureUrl: String? + public var url: String? public var aspectRatioF: Int? - public var url: String? + public var secureUrl: String? - public enum CodingKeys: String, CodingKey { - case aspectRatio = "aspect_ratio" + public var aspectRatio: String? - case secureUrl = "secure_url" + public enum CodingKeys: String, CodingKey { + case url case aspectRatioF = "aspect_ratio_f" - case url + case secureUrl = "secure_url" + + case aspectRatio = "aspect_ratio" } public init(aspectRatio: String? = nil, aspectRatioF: Int? = nil, secureUrl: String? = nil, url: String? = nil) { - self.aspectRatio = aspectRatio - - self.secureUrl = secureUrl + self.url = url self.aspectRatioF = aspectRatioF - self.url = url + self.secureUrl = secureUrl + + self.aspectRatio = aspectRatio } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - aspectRatio = try container.decode(String.self, forKey: .aspectRatio) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - secureUrl = try container.decode(String.self, forKey: .secureUrl) + aspectRatioF = try container.decode(Int.self, forKey: .aspectRatioF) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - aspectRatioF = try container.decode(Int.self, forKey: .aspectRatioF) + secureUrl = try container.decode(String.self, forKey: .secureUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + aspectRatio = try container.decode(String.self, forKey: .aspectRatio) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) - - try? container.encodeIfPresent(secureUrl, forKey: .secureUrl) + try? container.encodeIfPresent(url, forKey: .url) try? container.encodeIfPresent(aspectRatioF, forKey: .aspectRatioF) - try? container.encodeIfPresent(url, forKey: .url) + try? container.encodeIfPresent(secureUrl, forKey: .secureUrl) + + try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) } } } diff --git a/Sources/code/platform/models/Media1PlatformModelClass.swift b/Sources/code/platform/models/Media1PlatformModelClass.swift index 58f3152a30..b1b5eb88b5 100644 --- a/Sources/code/platform/models/Media1PlatformModelClass.swift +++ b/Sources/code/platform/models/Media1PlatformModelClass.swift @@ -8,58 +8,58 @@ public extension PlatformClient { */ class Media1: Codable { - public var type: String? - public var meta: [String: Any]? public var url: String - public enum CodingKeys: String, CodingKey { - case type + public var type: String? + public enum CodingKeys: String, CodingKey { case meta case url + + case type } public init(meta: [String: Any]? = nil, type: String? = nil, url: String) { - self.type = type - self.meta = meta self.url = url + + self.type = type } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - type = try container.decode(String.self, forKey: .type) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + url = try container.decode(String.self, forKey: .url) + do { - meta = try container.decode([String: Any].self, forKey: .meta) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - url = try container.decode(String.self, forKey: .url) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(meta, forKey: .meta) try? container.encodeIfPresent(url, forKey: .url) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/Media2PlatformModelClass.swift b/Sources/code/platform/models/Media2PlatformModelClass.swift index 12909d0b65..56e4d8877a 100644 --- a/Sources/code/platform/models/Media2PlatformModelClass.swift +++ b/Sources/code/platform/models/Media2PlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class Media2: Codable { public var portrait: String - public var landscape: String - public var logo: String + public var landscape: String + public enum CodingKeys: String, CodingKey { case portrait - case landscape - case logo + + case landscape } public init(landscape: String, logo: String, portrait: String) { self.portrait = portrait - self.landscape = landscape - self.logo = logo + + self.landscape = landscape } required public init(from decoder: Decoder) throws { @@ -35,9 +35,9 @@ public extension PlatformClient { portrait = try container.decode(String.self, forKey: .portrait) - landscape = try container.decode(String.self, forKey: .landscape) - logo = try container.decode(String.self, forKey: .logo) + + landscape = try container.decode(String.self, forKey: .landscape) } public func encode(to encoder: Encoder) throws { @@ -45,9 +45,9 @@ public extension PlatformClient { try? container.encodeIfPresent(portrait, forKey: .portrait) - try? container.encodeIfPresent(landscape, forKey: .landscape) - try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(landscape, forKey: .landscape) } } } diff --git a/Sources/code/platform/models/MediaPlatformModelClass.swift b/Sources/code/platform/models/MediaPlatformModelClass.swift index 1ea10720aa..1e82deae06 100644 --- a/Sources/code/platform/models/MediaPlatformModelClass.swift +++ b/Sources/code/platform/models/MediaPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class Media: Codable { - public var type: String? - public var url: String? - public enum CodingKeys: String, CodingKey { - case type + public var type: String? + public enum CodingKeys: String, CodingKey { case url + + case type } public init(type: String? = nil, url: String? = nil) { - self.type = type - self.url = url + + self.type = type } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - type = try container.decode(String.self, forKey: .type) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(url, forKey: .url) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/MetaDataListingFilterMetaResponsePlatformModelClass.swift b/Sources/code/platform/models/MetaDataListingFilterMetaResponsePlatformModelClass.swift index 9d3183ac6f..9498d4da6a 100644 --- a/Sources/code/platform/models/MetaDataListingFilterMetaResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/MetaDataListingFilterMetaResponsePlatformModelClass.swift @@ -12,18 +12,18 @@ public extension PlatformClient { public var filterTypes: [String]? - public var units: [[String: Any]]? - public var key: String? + public var units: [[String: Any]]? + public enum CodingKeys: String, CodingKey { case display case filterTypes = "filter_types" - case units - case key + + case units } public init(display: String? = nil, filterTypes: [String]? = nil, key: String? = nil, units: [[String: Any]]? = nil) { @@ -31,9 +31,9 @@ public extension PlatformClient { self.filterTypes = filterTypes - self.units = units - self.key = key + + self.units = units } required public init(from decoder: Decoder) throws { @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - units = try container.decode([[String: Any]].self, forKey: .units) + key = try container.decode(String.self, forKey: .key) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - key = try container.decode(String.self, forKey: .key) + units = try container.decode([[String: Any]].self, forKey: .units) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -79,9 +79,9 @@ public extension PlatformClient { try? container.encodeIfPresent(filterTypes, forKey: .filterTypes) - try? container.encodeIfPresent(units, forKey: .units) - try? container.encodeIfPresent(key, forKey: .key) + + try? container.encodeIfPresent(units, forKey: .units) } } } diff --git a/Sources/code/platform/models/MetaPlatformModelClass.swift b/Sources/code/platform/models/MetaPlatformModelClass.swift index 82b295a846..bb7fb50d45 100644 --- a/Sources/code/platform/models/MetaPlatformModelClass.swift +++ b/Sources/code/platform/models/MetaPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class Meta: Codable { - public var headers: [String: Any]? - public var values: [[String: Any]]? public var unit: String? - public enum CodingKeys: String, CodingKey { - case headers + public var headers: [String: Any]? + public enum CodingKeys: String, CodingKey { case values case unit + + case headers } public init(headers: [String: Any]? = nil, unit: String? = nil, values: [[String: Any]]? = nil) { - self.headers = headers - self.values = values self.unit = unit + + self.headers = headers } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - headers = try container.decode([String: Any].self, forKey: .headers) + values = try container.decode([[String: Any]].self, forKey: .values) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - values = try container.decode([[String: Any]].self, forKey: .values) + unit = try container.decode(String.self, forKey: .unit) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - unit = try container.decode(String.self, forKey: .unit) + headers = try container.decode([String: Any].self, forKey: .headers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(headers, forKey: .headers) - try? container.encodeIfPresent(values, forKey: .values) try? container.encodeIfPresent(unit, forKey: .unit) + + try? container.encodeIfPresent(headers, forKey: .headers) } } } diff --git a/Sources/code/platform/models/MetricsSerializerPlatformModelClass.swift b/Sources/code/platform/models/MetricsSerializerPlatformModelClass.swift index ca87410f6a..f698251dcf 100644 --- a/Sources/code/platform/models/MetricsSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/MetricsSerializerPlatformModelClass.swift @@ -10,48 +10,48 @@ public extension PlatformClient { class MetricsSerializer: Codable { public var storeDocuments: DocumentsObj? + public var stage: String? + public var store: DocumentsObj? public var brand: DocumentsObj? public var companyDocuments: DocumentsObj? - public var stage: String? + public var uid: Int? public var product: DocumentsObj? - public var uid: Int? - public enum CodingKeys: String, CodingKey { case storeDocuments = "store_documents" + case stage + case store case brand case companyDocuments = "company_documents" - case stage + case uid case product - - case uid } public init(brand: DocumentsObj? = nil, companyDocuments: DocumentsObj? = nil, product: DocumentsObj? = nil, stage: String? = nil, store: DocumentsObj? = nil, storeDocuments: DocumentsObj? = nil, uid: Int? = nil) { self.storeDocuments = storeDocuments + self.stage = stage + self.store = store self.brand = brand self.companyDocuments = companyDocuments - self.stage = stage + self.uid = uid self.product = product - - self.uid = uid } required public init(from decoder: Decoder) throws { @@ -66,7 +66,7 @@ public extension PlatformClient { } catch {} do { - store = try container.decode(DocumentsObj.self, forKey: .store) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +74,7 @@ public extension PlatformClient { } catch {} do { - brand = try container.decode(DocumentsObj.self, forKey: .brand) + store = try container.decode(DocumentsObj.self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -82,7 +82,7 @@ public extension PlatformClient { } catch {} do { - companyDocuments = try container.decode(DocumentsObj.self, forKey: .companyDocuments) + brand = try container.decode(DocumentsObj.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + companyDocuments = try container.decode(DocumentsObj.self, forKey: .companyDocuments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} do { - product = try container.decode(DocumentsObj.self, forKey: .product) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -106,7 +106,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + product = try container.decode(DocumentsObj.self, forKey: .product) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -119,17 +119,17 @@ public extension PlatformClient { try? container.encodeIfPresent(storeDocuments, forKey: .storeDocuments) + try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(store, forKey: .store) try? container.encodeIfPresent(brand, forKey: .brand) try? container.encodeIfPresent(companyDocuments, forKey: .companyDocuments) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(product, forKey: .product) - - try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/platform/models/MultiTenderPaymentMetaPlatformModelClass.swift b/Sources/code/platform/models/MultiTenderPaymentMetaPlatformModelClass.swift index 7bf690e8d5..15602d7a99 100644 --- a/Sources/code/platform/models/MultiTenderPaymentMetaPlatformModelClass.swift +++ b/Sources/code/platform/models/MultiTenderPaymentMetaPlatformModelClass.swift @@ -8,37 +8,37 @@ public extension PlatformClient { */ class MultiTenderPaymentMeta: Codable { - public var paymentId: String? - - public var extraMeta: [String: Any]? - public var paymentGateway: String? + public var paymentId: String? + public var currentStatus: String? + public var extraMeta: [String: Any]? + public var orderId: String? public enum CodingKeys: String, CodingKey { - case paymentId = "payment_id" - - case extraMeta = "extra_meta" - case paymentGateway = "payment_gateway" + case paymentId = "payment_id" + case currentStatus = "current_status" + case extraMeta = "extra_meta" + case orderId = "order_id" } public init(currentStatus: String? = nil, extraMeta: [String: Any]? = nil, orderId: String? = nil, paymentGateway: String? = nil, paymentId: String? = nil) { - self.paymentId = paymentId - - self.extraMeta = extraMeta - self.paymentGateway = paymentGateway + self.paymentId = paymentId + self.currentStatus = currentStatus + self.extraMeta = extraMeta + self.orderId = orderId } @@ -46,7 +46,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - paymentId = try container.decode(String.self, forKey: .paymentId) + paymentGateway = try container.decode(String.self, forKey: .paymentGateway) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - extraMeta = try container.decode([String: Any].self, forKey: .extraMeta) + paymentId = try container.decode(String.self, forKey: .paymentId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - paymentGateway = try container.decode(String.self, forKey: .paymentGateway) + currentStatus = try container.decode(String.self, forKey: .currentStatus) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - currentStatus = try container.decode(String.self, forKey: .currentStatus) + extraMeta = try container.decode([String: Any].self, forKey: .extraMeta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,14 +89,14 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(paymentId, forKey: .paymentId) - - try? container.encode(extraMeta, forKey: .extraMeta) - try? container.encodeIfPresent(paymentGateway, forKey: .paymentGateway) + try? container.encodeIfPresent(paymentId, forKey: .paymentId) + try? container.encodeIfPresent(currentStatus, forKey: .currentStatus) + try? container.encode(extraMeta, forKey: .extraMeta) + try? container.encodeIfPresent(orderId, forKey: .orderId) } } diff --git a/Sources/code/platform/models/MultiTenderPaymentMethodPlatformModelClass.swift b/Sources/code/platform/models/MultiTenderPaymentMethodPlatformModelClass.swift index 0a99611f45..d0cc3a9d0a 100644 --- a/Sources/code/platform/models/MultiTenderPaymentMethodPlatformModelClass.swift +++ b/Sources/code/platform/models/MultiTenderPaymentMethodPlatformModelClass.swift @@ -8,49 +8,47 @@ public extension PlatformClient { */ class MultiTenderPaymentMethod: Codable { - public var name: String? - - public var amount: Double - public var meta: MultiTenderPaymentMeta? - public var mode: String + public var name: String? - public enum CodingKeys: String, CodingKey { - case name + public var mode: String - case amount + public var amount: Double + public enum CodingKeys: String, CodingKey { case meta + case name + case mode + + case amount } public init(amount: Double, meta: MultiTenderPaymentMeta? = nil, mode: String, name: String? = nil) { - self.name = name - - self.amount = amount - self.meta = meta + self.name = name + self.mode = mode + + self.amount = amount } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + meta = try container.decode(MultiTenderPaymentMeta.self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - amount = try container.decode(Double.self, forKey: .amount) - do { - meta = try container.decode(MultiTenderPaymentMeta.self, forKey: .meta) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -58,18 +56,20 @@ public extension PlatformClient { } catch {} mode = try container.decode(String.self, forKey: .mode) + + amount = try container.decode(Double.self, forKey: .amount) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) - - try? container.encodeIfPresent(amount, forKey: .amount) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(mode, forKey: .mode) + + try? container.encodeIfPresent(amount, forKey: .amount) } } } diff --git a/Sources/code/platform/models/NotFoundResourceErrorPlatformModelClass.swift b/Sources/code/platform/models/NotFoundResourceErrorPlatformModelClass.swift index 0ae5e269a8..ffae8e9432 100644 --- a/Sources/code/platform/models/NotFoundResourceErrorPlatformModelClass.swift +++ b/Sources/code/platform/models/NotFoundResourceErrorPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class NotFoundResourceError: Codable { public var description: String - public var code: String - public var success: Bool + public var code: String + public enum CodingKeys: String, CodingKey { case description - case code - case success + + case code } public init(code: String, description: String, success: Bool) { self.description = description - self.code = code - self.success = success + + self.code = code } required public init(from decoder: Decoder) throws { @@ -35,9 +35,9 @@ public extension PlatformClient { description = try container.decode(String.self, forKey: .description) - code = try container.decode(String.self, forKey: .code) - success = try container.decode(Bool.self, forKey: .success) + + code = try container.decode(String.self, forKey: .code) } public func encode(to encoder: Encoder) throws { @@ -45,9 +45,9 @@ public extension PlatformClient { try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(code, forKey: .code) - try? container.encodeIfPresent(success, forKey: .success) + + try? container.encodeIfPresent(code, forKey: .code) } } } diff --git a/Sources/code/platform/models/OptInPostRequestPlatformModelClass.swift b/Sources/code/platform/models/OptInPostRequestPlatformModelClass.swift index 154d9bf8ca..a886638678 100644 --- a/Sources/code/platform/models/OptInPostRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/OptInPostRequestPlatformModelClass.swift @@ -10,29 +10,29 @@ public extension PlatformClient { class OptInPostRequest: Codable { public var brandIds: [Int]? - public var enabled: Bool? - public var optLevel: String + public var enabled: Bool? + public var storeIds: [Int]? public enum CodingKeys: String, CodingKey { case brandIds = "brand_ids" - case enabled - case optLevel = "opt_level" + case enabled + case storeIds = "store_ids" } public init(brandIds: [Int]? = nil, enabled: Bool? = nil, optLevel: String, storeIds: [Int]? = nil) { self.brandIds = brandIds - self.enabled = enabled - self.optLevel = optLevel + self.enabled = enabled + self.storeIds = storeIds } @@ -47,6 +47,8 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + optLevel = try container.decode(String.self, forKey: .optLevel) + do { enabled = try container.decode(Bool.self, forKey: .enabled) @@ -55,8 +57,6 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - optLevel = try container.decode(String.self, forKey: .optLevel) - do { storeIds = try container.decode([Int].self, forKey: .storeIds) @@ -71,10 +71,10 @@ public extension PlatformClient { try? container.encodeIfPresent(brandIds, forKey: .brandIds) - try? container.encodeIfPresent(enabled, forKey: .enabled) - try? container.encodeIfPresent(optLevel, forKey: .optLevel) + try? container.encodeIfPresent(enabled, forKey: .enabled) + try? container.encodeIfPresent(storeIds, forKey: .storeIds) } } diff --git a/Sources/code/platform/models/OptinCompanyDetailPlatformModelClass.swift b/Sources/code/platform/models/OptinCompanyDetailPlatformModelClass.swift index 47688fdf5a..00d56bde0b 100644 --- a/Sources/code/platform/models/OptinCompanyDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/OptinCompanyDetailPlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class OptinCompanyDetail: Codable { - public var uid: Int? + public var companyType: String? - public var businessType: String? + public var uid: Int? public var name: String? - public var companyType: String? + public var businessType: String? public enum CodingKeys: String, CodingKey { - case uid + case companyType = "company_type" - case businessType = "business_type" + case uid case name - case companyType = "company_type" + case businessType = "business_type" } public init(businessType: String? = nil, companyType: String? = nil, name: String? = nil, uid: Int? = nil) { - self.uid = uid + self.companyType = companyType - self.businessType = businessType + self.uid = uid self.name = name - self.companyType = companyType + self.businessType = businessType } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - uid = try container.decode(Int.self, forKey: .uid) + companyType = try container.decode(String.self, forKey: .companyType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - businessType = try container.decode(String.self, forKey: .businessType) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - companyType = try container.decode(String.self, forKey: .companyType) + businessType = try container.decode(String.self, forKey: .businessType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(companyType, forKey: .companyType) - try? container.encodeIfPresent(businessType, forKey: .businessType) + try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(companyType, forKey: .companyType) + try? container.encodeIfPresent(businessType, forKey: .businessType) } } } diff --git a/Sources/code/platform/models/OptinCompanyMetricsPlatformModelClass.swift b/Sources/code/platform/models/OptinCompanyMetricsPlatformModelClass.swift index 51cced298a..be186f43ef 100644 --- a/Sources/code/platform/models/OptinCompanyMetricsPlatformModelClass.swift +++ b/Sources/code/platform/models/OptinCompanyMetricsPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class OptinCompanyMetrics: Codable { - public var brand: Int? - public var store: Int? public var company: String? - public enum CodingKeys: String, CodingKey { - case brand + public var brand: Int? + public enum CodingKeys: String, CodingKey { case store case company + + case brand } public init(brand: Int? = nil, company: String? = nil, store: Int? = nil) { - self.brand = brand - self.store = store self.company = company + + self.brand = brand } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - brand = try container.decode(Int.self, forKey: .brand) + store = try container.decode(Int.self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - store = try container.decode(Int.self, forKey: .store) + company = try container.decode(String.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - company = try container.decode(String.self, forKey: .company) + brand = try container.decode(Int.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(store, forKey: .store) try? container.encodeIfPresent(company, forKey: .company) + + try? container.encodeIfPresent(brand, forKey: .brand) } } } diff --git a/Sources/code/platform/models/OrderBeneficiaryDetailsPlatformModelClass.swift b/Sources/code/platform/models/OrderBeneficiaryDetailsPlatformModelClass.swift index 51bd6a3331..f8496b3c85 100644 --- a/Sources/code/platform/models/OrderBeneficiaryDetailsPlatformModelClass.swift +++ b/Sources/code/platform/models/OrderBeneficiaryDetailsPlatformModelClass.swift @@ -8,135 +8,137 @@ public extension PlatformClient { */ class OrderBeneficiaryDetails: Codable { + public var isActive: Bool + public var title: String - public var accountNo: String + public var ifscCode: String - public var accountHolder: String + public var createdOn: String - public var delightsUserName: String? + public var mobile: Bool? public var displayName: String - public var createdOn: String + public var comment: Bool? public var branchName: Bool? public var transferMode: String - public var ifscCode: String - - public var mobile: Bool? - - public var id: Int + public var delightsUserName: String? public var beneficiaryId: String - public var bankName: String + public var subtitle: String - public var address: String + public var modifiedOn: String - public var subtitle: String + public var address: String - public var isActive: Bool + public var accountHolder: String - public var modifiedOn: String + public var bankName: String public var email: String - public var comment: Bool? + public var accountNo: String + + public var id: Int public enum CodingKeys: String, CodingKey { + case isActive = "is_active" + case title - case accountNo = "account_no" + case ifscCode = "ifsc_code" - case accountHolder = "account_holder" + case createdOn = "created_on" - case delightsUserName = "delights_user_name" + case mobile case displayName = "display_name" - case createdOn = "created_on" + case comment case branchName = "branch_name" case transferMode = "transfer_mode" - case ifscCode = "ifsc_code" - - case mobile - - case id + case delightsUserName = "delights_user_name" case beneficiaryId = "beneficiary_id" - case bankName = "bank_name" + case subtitle - case address + case modifiedOn = "modified_on" - case subtitle + case address - case isActive = "is_active" + case accountHolder = "account_holder" - case modifiedOn = "modified_on" + case bankName = "bank_name" case email - case comment + case accountNo = "account_no" + + case id } public init(accountHolder: String, accountNo: String, address: String, bankName: String, beneficiaryId: String, branchName: Bool? = nil, comment: Bool? = nil, createdOn: String, delightsUserName: String? = nil, displayName: String, email: String, id: Int, ifscCode: String, isActive: Bool, mobile: Bool? = nil, modifiedOn: String, subtitle: String, title: String, transferMode: String) { + self.isActive = isActive + self.title = title - self.accountNo = accountNo + self.ifscCode = ifscCode - self.accountHolder = accountHolder + self.createdOn = createdOn - self.delightsUserName = delightsUserName + self.mobile = mobile self.displayName = displayName - self.createdOn = createdOn + self.comment = comment self.branchName = branchName self.transferMode = transferMode - self.ifscCode = ifscCode - - self.mobile = mobile - - self.id = id + self.delightsUserName = delightsUserName self.beneficiaryId = beneficiaryId - self.bankName = bankName + self.subtitle = subtitle - self.address = address + self.modifiedOn = modifiedOn - self.subtitle = subtitle + self.address = address - self.isActive = isActive + self.accountHolder = accountHolder - self.modifiedOn = modifiedOn + self.bankName = bankName self.email = email - self.comment = comment + self.accountNo = accountNo + + self.id = id } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + isActive = try container.decode(Bool.self, forKey: .isActive) + title = try container.decode(String.self, forKey: .title) - accountNo = try container.decode(String.self, forKey: .accountNo) + ifscCode = try container.decode(String.self, forKey: .ifscCode) - accountHolder = try container.decode(String.self, forKey: .accountHolder) + createdOn = try container.decode(String.self, forKey: .createdOn) do { - delightsUserName = try container.decode(String.self, forKey: .delightsUserName) + mobile = try container.decode(Bool.self, forKey: .mobile) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -145,7 +147,13 @@ public extension PlatformClient { displayName = try container.decode(String.self, forKey: .displayName) - createdOn = try container.decode(String.self, forKey: .createdOn) + do { + comment = try container.decode(Bool.self, forKey: .comment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch {} do { branchName = try container.decode(Bool.self, forKey: .branchName) @@ -157,81 +165,73 @@ public extension PlatformClient { transferMode = try container.decode(String.self, forKey: .transferMode) - ifscCode = try container.decode(String.self, forKey: .ifscCode) - do { - mobile = try container.decode(Bool.self, forKey: .mobile) + delightsUserName = try container.decode(String.self, forKey: .delightsUserName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - id = try container.decode(Int.self, forKey: .id) - beneficiaryId = try container.decode(String.self, forKey: .beneficiaryId) - bankName = try container.decode(String.self, forKey: .bankName) + subtitle = try container.decode(String.self, forKey: .subtitle) - address = try container.decode(String.self, forKey: .address) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) - subtitle = try container.decode(String.self, forKey: .subtitle) + address = try container.decode(String.self, forKey: .address) - isActive = try container.decode(Bool.self, forKey: .isActive) + accountHolder = try container.decode(String.self, forKey: .accountHolder) - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + bankName = try container.decode(String.self, forKey: .bankName) email = try container.decode(String.self, forKey: .email) - do { - comment = try container.decode(Bool.self, forKey: .comment) + accountNo = try container.decode(String.self, forKey: .accountNo) - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch {} + id = try container.decode(Int.self, forKey: .id) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(accountNo, forKey: .accountNo) + try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) - try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encode(delightsUserName, forKey: .delightsUserName) + try? container.encodeIfPresent(mobile, forKey: .mobile) try? container.encodeIfPresent(displayName, forKey: .displayName) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(comment, forKey: .comment) try? container.encodeIfPresent(branchName, forKey: .branchName) try? container.encodeIfPresent(transferMode, forKey: .transferMode) - try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) - - try? container.encodeIfPresent(mobile, forKey: .mobile) - - try? container.encodeIfPresent(id, forKey: .id) + try? container.encode(delightsUserName, forKey: .delightsUserName) try? container.encodeIfPresent(beneficiaryId, forKey: .beneficiaryId) - try? container.encodeIfPresent(bankName, forKey: .bankName) + try? container.encodeIfPresent(subtitle, forKey: .subtitle) - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(subtitle, forKey: .subtitle) + try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(bankName, forKey: .bankName) try? container.encodeIfPresent(email, forKey: .email) - try? container.encodeIfPresent(comment, forKey: .comment) + try? container.encodeIfPresent(accountNo, forKey: .accountNo) + + try? container.encodeIfPresent(id, forKey: .id) } } } diff --git a/Sources/code/platform/models/OrderBeneficiaryResponsePlatformModelClass.swift b/Sources/code/platform/models/OrderBeneficiaryResponsePlatformModelClass.swift index 96dbb6a3f5..8588dbc04d 100644 --- a/Sources/code/platform/models/OrderBeneficiaryResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/OrderBeneficiaryResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class OrderBeneficiaryResponse: Codable { - public var beneficiaries: [OrderBeneficiaryDetails]? - public var showBeneficiaryDetails: Bool? - public enum CodingKeys: String, CodingKey { - case beneficiaries + public var beneficiaries: [OrderBeneficiaryDetails]? + public enum CodingKeys: String, CodingKey { case showBeneficiaryDetails = "show_beneficiary_details" + + case beneficiaries } public init(beneficiaries: [OrderBeneficiaryDetails]? = nil, showBeneficiaryDetails: Bool? = nil) { - self.beneficiaries = beneficiaries - self.showBeneficiaryDetails = showBeneficiaryDetails + + self.beneficiaries = beneficiaries } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - beneficiaries = try container.decode([OrderBeneficiaryDetails].self, forKey: .beneficiaries) + showBeneficiaryDetails = try container.decode(Bool.self, forKey: .showBeneficiaryDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - showBeneficiaryDetails = try container.decode(Bool.self, forKey: .showBeneficiaryDetails) + beneficiaries = try container.decode([OrderBeneficiaryDetails].self, forKey: .beneficiaries) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(beneficiaries, forKey: .beneficiaries) - try? container.encodeIfPresent(showBeneficiaryDetails, forKey: .showBeneficiaryDetails) + + try? container.encode(beneficiaries, forKey: .beneficiaries) } } } diff --git a/Sources/code/platform/models/OrderQuantityPlatformModelClass.swift b/Sources/code/platform/models/OrderQuantityPlatformModelClass.swift index 1c06bb5064..4f9fc2b340 100644 --- a/Sources/code/platform/models/OrderQuantityPlatformModelClass.swift +++ b/Sources/code/platform/models/OrderQuantityPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class OrderQuantity: Codable { - public var maximum: Int? + public var isSet: Bool? public var minimum: Int? - public var isSet: Bool? + public var maximum: Int? public enum CodingKeys: String, CodingKey { - case maximum + case isSet = "is_set" case minimum - case isSet = "is_set" + case maximum } public init(isSet: Bool? = nil, maximum: Int? = nil, minimum: Int? = nil) { - self.maximum = maximum + self.isSet = isSet self.minimum = minimum - self.isSet = isSet + self.maximum = maximum } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - maximum = try container.decode(Int.self, forKey: .maximum) + isSet = try container.decode(Bool.self, forKey: .isSet) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - isSet = try container.decode(Bool.self, forKey: .isSet) + maximum = try container.decode(Int.self, forKey: .maximum) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(maximum, forKey: .maximum) + try? container.encodeIfPresent(isSet, forKey: .isSet) try? container.encodeIfPresent(minimum, forKey: .minimum) - try? container.encodeIfPresent(isSet, forKey: .isSet) + try? container.encodeIfPresent(maximum, forKey: .maximum) } } } diff --git a/Sources/code/platform/models/PTErrorResponsePlatformModelClass.swift b/Sources/code/platform/models/PTErrorResponsePlatformModelClass.swift index fbce78c96f..e58c909dd5 100644 --- a/Sources/code/platform/models/PTErrorResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/PTErrorResponsePlatformModelClass.swift @@ -8,45 +8,45 @@ public extension PlatformClient { */ class PTErrorResponse: Codable { + public var status: Int? + public var code: String? - public var errors: [String: Any]? + public var meta: [String: Any]? public var message: String? - public var meta: [String: Any]? - - public var status: Int? + public var errors: [String: Any]? public enum CodingKeys: String, CodingKey { + case status + case code - case errors + case meta case message - case meta - - case status + case errors } public init(code: String? = nil, errors: [String: Any]? = nil, message: String? = nil, meta: [String: Any]? = nil, status: Int? = nil) { + self.status = status + self.code = code - self.errors = errors + self.meta = meta self.message = message - self.meta = meta - - self.status = status + self.errors = errors } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - code = try container.decode(String.self, forKey: .code) + status = try container.decode(Int.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - errors = try container.decode([String: Any].self, forKey: .errors) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - message = try container.decode(String.self, forKey: .message) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + message = try container.decode(String.self, forKey: .message) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - status = try container.decode(Int.self, forKey: .status) + errors = try container.decode([String: Any].self, forKey: .errors) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,15 +89,15 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(code, forKey: .code) - try? container.encodeIfPresent(errors, forKey: .errors) + try? container.encodeIfPresent(meta, forKey: .meta) try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(meta, forKey: .meta) - - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(errors, forKey: .errors) } } } diff --git a/Sources/code/platform/models/PageResponsePlatformModelClass.swift b/Sources/code/platform/models/PageResponsePlatformModelClass.swift index e12b426029..6692fcbe0c 100644 --- a/Sources/code/platform/models/PageResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/PageResponsePlatformModelClass.swift @@ -8,45 +8,45 @@ public extension PlatformClient { */ class PageResponse: Codable { + public var itemTotal: Int? + + public var size: Int? + public var current: String? public var hasPrevious: Bool? public var hasNext: Bool? - public var size: Int? + public enum CodingKeys: String, CodingKey { + case itemTotal = "item_total" - public var itemTotal: Int? + case size - public enum CodingKeys: String, CodingKey { case current case hasPrevious = "has_previous" case hasNext = "has_next" - - case size - - case itemTotal = "item_total" } public init(current: String? = nil, hasNext: Bool? = nil, hasPrevious: Bool? = nil, itemTotal: Int? = nil, size: Int? = nil) { + self.itemTotal = itemTotal + + self.size = size + self.current = current self.hasPrevious = hasPrevious self.hasNext = hasNext - - self.size = size - - self.itemTotal = itemTotal } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - current = try container.decode(String.self, forKey: .current) + itemTotal = try container.decode(Int.self, forKey: .itemTotal) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - hasPrevious = try container.decode(Bool.self, forKey: .hasPrevious) + size = try container.decode(Int.self, forKey: .size) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - hasNext = try container.decode(Bool.self, forKey: .hasNext) + current = try container.decode(String.self, forKey: .current) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - size = try container.decode(Int.self, forKey: .size) + hasPrevious = try container.decode(Bool.self, forKey: .hasPrevious) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - itemTotal = try container.decode(Int.self, forKey: .itemTotal) + hasNext = try container.decode(Bool.self, forKey: .hasNext) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,15 +89,15 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(itemTotal, forKey: .itemTotal) + + try? container.encodeIfPresent(size, forKey: .size) + try? container.encodeIfPresent(current, forKey: .current) try? container.encodeIfPresent(hasPrevious, forKey: .hasPrevious) try? container.encodeIfPresent(hasNext, forKey: .hasNext) - - try? container.encodeIfPresent(size, forKey: .size) - - try? container.encodeIfPresent(itemTotal, forKey: .itemTotal) } } } diff --git a/Sources/code/platform/models/PaymentConfirmationResponsePlatformModelClass.swift b/Sources/code/platform/models/PaymentConfirmationResponsePlatformModelClass.swift index 83d706a429..12d09f858a 100644 --- a/Sources/code/platform/models/PaymentConfirmationResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/PaymentConfirmationResponsePlatformModelClass.swift @@ -8,46 +8,46 @@ public extension PlatformClient { */ class PaymentConfirmationResponse: Codable { + public var orderId: String + public var success: Bool public var message: String - public var orderId: String - public enum CodingKeys: String, CodingKey { + case orderId = "order_id" + case success case message - - case orderId = "order_id" } public init(message: String, orderId: String, success: Bool) { + self.orderId = orderId + self.success = success self.message = message - - self.orderId = orderId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + orderId = try container.decode(String.self, forKey: .orderId) + success = try container.decode(Bool.self, forKey: .success) message = try container.decode(String.self, forKey: .message) - - orderId = try container.decode(String.self, forKey: .orderId) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(orderId, forKey: .orderId) + try? container.encodeIfPresent(success, forKey: .success) try? container.encodeIfPresent(message, forKey: .message) - - try? container.encodeIfPresent(orderId, forKey: .orderId) } } } diff --git a/Sources/code/platform/models/PaymentGatewayConfigPlatformModelClass.swift b/Sources/code/platform/models/PaymentGatewayConfigPlatformModelClass.swift index 7bdc097fe5..f4464161bc 100644 --- a/Sources/code/platform/models/PaymentGatewayConfigPlatformModelClass.swift +++ b/Sources/code/platform/models/PaymentGatewayConfigPlatformModelClass.swift @@ -8,51 +8,45 @@ public extension PlatformClient { */ class PaymentGatewayConfig: Codable { - public var key: String - public var merchantSalt: String + public var isActive: Bool? + public var secret: String - public var configType: String + public var key: String - public var isActive: Bool? + public var configType: String public enum CodingKeys: String, CodingKey { - case key - case merchantSalt = "merchant_salt" + case isActive = "is_active" + case secret - case configType = "config_type" + case key - case isActive = "is_active" + case configType = "config_type" } public init(configType: String, isActive: Bool? = nil, key: String, merchantSalt: String, secret: String) { - self.key = key - self.merchantSalt = merchantSalt + self.isActive = isActive + self.secret = secret - self.configType = configType + self.key = key - self.isActive = isActive + self.configType = configType } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - key = try container.decode(String.self, forKey: .key) - merchantSalt = try container.decode(String.self, forKey: .merchantSalt) - secret = try container.decode(String.self, forKey: .secret) - - configType = try container.decode(String.self, forKey: .configType) - do { isActive = try container.decode(Bool.self, forKey: .isActive) @@ -60,20 +54,26 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + secret = try container.decode(String.self, forKey: .secret) + + key = try container.decode(String.self, forKey: .key) + + configType = try container.decode(String.self, forKey: .configType) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(key, forKey: .key) - try? container.encodeIfPresent(merchantSalt, forKey: .merchantSalt) + try? container.encode(isActive, forKey: .isActive) + try? container.encodeIfPresent(secret, forKey: .secret) - try? container.encodeIfPresent(configType, forKey: .configType) + try? container.encodeIfPresent(key, forKey: .key) - try? container.encode(isActive, forKey: .isActive) + try? container.encodeIfPresent(configType, forKey: .configType) } } } diff --git a/Sources/code/platform/models/PaymentGatewayConfigResponsePlatformModelClass.swift b/Sources/code/platform/models/PaymentGatewayConfigResponsePlatformModelClass.swift index a5188c3c16..b14fc8ef7f 100644 --- a/Sources/code/platform/models/PaymentGatewayConfigResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/PaymentGatewayConfigResponsePlatformModelClass.swift @@ -8,51 +8,55 @@ public extension PlatformClient { */ class PaymentGatewayConfigResponse: Codable { + public var success: Bool + public var displayFields: [String] + public var created: Bool + public var aggregators: [[String: Any]]? public var appId: String - public var created: Bool - - public var success: Bool - public var excludedFields: [String] public enum CodingKeys: String, CodingKey { + case success + case displayFields = "display_fields" + case created + case aggregators case appId = "app_id" - case created - - case success - case excludedFields = "excluded_fields" } public init(aggregators: [[String: Any]]? = nil, appId: String, created: Bool, displayFields: [String], excludedFields: [String], success: Bool) { + self.success = success + self.displayFields = displayFields + self.created = created + self.aggregators = aggregators self.appId = appId - self.created = created - - self.success = success - self.excludedFields = excludedFields } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + success = try container.decode(Bool.self, forKey: .success) + displayFields = try container.decode([String].self, forKey: .displayFields) + created = try container.decode(Bool.self, forKey: .created) + do { aggregators = try container.decode([[String: Any]].self, forKey: .aggregators) @@ -63,26 +67,22 @@ public extension PlatformClient { appId = try container.decode(String.self, forKey: .appId) - created = try container.decode(Bool.self, forKey: .created) - - success = try container.decode(Bool.self, forKey: .success) - excludedFields = try container.decode([String].self, forKey: .excludedFields) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(success, forKey: .success) + try? container.encodeIfPresent(displayFields, forKey: .displayFields) + try? container.encodeIfPresent(created, forKey: .created) + try? container.encodeIfPresent(aggregators, forKey: .aggregators) try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(created, forKey: .created) - - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(excludedFields, forKey: .excludedFields) } } diff --git a/Sources/code/platform/models/PaymentModeListPlatformModelClass.swift b/Sources/code/platform/models/PaymentModeListPlatformModelClass.swift index 41aa9af63d..97052af3ea 100644 --- a/Sources/code/platform/models/PaymentModeListPlatformModelClass.swift +++ b/Sources/code/platform/models/PaymentModeListPlatformModelClass.swift @@ -8,189 +8,189 @@ public extension PlatformClient { */ class PaymentModeList: Codable { - public var name: String? - - public var expYear: Int? - - public var intentApp: [IntentApp]? - - public var intentAppErrorDictList: [IntentAppErrorList]? - public var merchantCode: String? - public var cardIsin: String? - - public var intentAppErrorList: [String]? - - public var aggregatorName: String - - public var displayName: String? - - public var cardToken: String? - public var cardIssuer: String? - public var cardBrand: String? + public var cardNumber: String? - public var retryCount: Int? + public var cardBrandImage: String? - public var cardId: String? + public var cardIsin: String? public var logoUrl: PaymentModeLogo? - public var fyndVpa: String? + public var intentAppErrorList: [String]? - public var cardReference: String? + public var expYear: Int? - public var expMonth: Int? + public var fyndVpa: String? public var cardFingerprint: String? - public var timeout: Int? + public var expired: Bool? - public var cardType: String? + public var cardId: String? - public var nickname: String? + public var expMonth: Int? - public var expired: Bool? + public var displayName: String? - public var intentFlow: Bool? + public var intentAppErrorDictList: [IntentAppErrorList]? - public var cardBrandImage: String? + public var cardBrand: String? public var displayPriority: Int? - public var code: String? + public var intentFlow: Bool? - public var cardNumber: String? + public var nickname: String? public var cardName: String? - public enum CodingKeys: String, CodingKey { - case name + public var aggregatorName: String - case expYear = "exp_year" + public var timeout: Int? - case intentApp = "intent_app" + public var cardReference: String? - case intentAppErrorDictList = "intent_app_error_dict_list" + public var name: String? - case merchantCode = "merchant_code" + public var code: String? - case cardIsin = "card_isin" + public var retryCount: Int? - case intentAppErrorList = "intent_app_error_list" + public var intentApp: [IntentApp]? - case aggregatorName = "aggregator_name" + public var cardType: String? - case displayName = "display_name" + public var cardToken: String? - case cardToken = "card_token" + public enum CodingKeys: String, CodingKey { + case merchantCode = "merchant_code" case cardIssuer = "card_issuer" - case cardBrand = "card_brand" + case cardNumber = "card_number" - case retryCount = "retry_count" + case cardBrandImage = "card_brand_image" - case cardId = "card_id" + case cardIsin = "card_isin" case logoUrl = "logo_url" - case fyndVpa = "fynd_vpa" + case intentAppErrorList = "intent_app_error_list" - case cardReference = "card_reference" + case expYear = "exp_year" - case expMonth = "exp_month" + case fyndVpa = "fynd_vpa" case cardFingerprint = "card_fingerprint" - case timeout + case expired - case cardType = "card_type" + case cardId = "card_id" - case nickname + case expMonth = "exp_month" - case expired + case displayName = "display_name" - case intentFlow = "intent_flow" + case intentAppErrorDictList = "intent_app_error_dict_list" - case cardBrandImage = "card_brand_image" + case cardBrand = "card_brand" case displayPriority = "display_priority" - case code + case intentFlow = "intent_flow" - case cardNumber = "card_number" + case nickname case cardName = "card_name" - } - public init(aggregatorName: String, cardBrand: String? = nil, cardBrandImage: String? = nil, cardFingerprint: String? = nil, cardId: String? = nil, cardIsin: String? = nil, cardIssuer: String? = nil, cardName: String? = nil, cardNumber: String? = nil, cardReference: String? = nil, cardToken: String? = nil, cardType: String? = nil, code: String? = nil, displayName: String? = nil, displayPriority: Int? = nil, expired: Bool? = nil, expMonth: Int? = nil, expYear: Int? = nil, fyndVpa: String? = nil, intentApp: [IntentApp]? = nil, intentAppErrorDictList: [IntentAppErrorList]? = nil, intentAppErrorList: [String]? = nil, intentFlow: Bool? = nil, logoUrl: PaymentModeLogo? = nil, merchantCode: String? = nil, name: String? = nil, nickname: String? = nil, retryCount: Int? = nil, timeout: Int? = nil) { - self.name = name + case aggregatorName = "aggregator_name" - self.expYear = expYear + case timeout - self.intentApp = intentApp + case cardReference = "card_reference" - self.intentAppErrorDictList = intentAppErrorDictList + case name - self.merchantCode = merchantCode + case code - self.cardIsin = cardIsin + case retryCount = "retry_count" - self.intentAppErrorList = intentAppErrorList + case intentApp = "intent_app" - self.aggregatorName = aggregatorName + case cardType = "card_type" - self.displayName = displayName + case cardToken = "card_token" + } - self.cardToken = cardToken + public init(aggregatorName: String, cardBrand: String? = nil, cardBrandImage: String? = nil, cardFingerprint: String? = nil, cardId: String? = nil, cardIsin: String? = nil, cardIssuer: String? = nil, cardName: String? = nil, cardNumber: String? = nil, cardReference: String? = nil, cardToken: String? = nil, cardType: String? = nil, code: String? = nil, displayName: String? = nil, displayPriority: Int? = nil, expired: Bool? = nil, expMonth: Int? = nil, expYear: Int? = nil, fyndVpa: String? = nil, intentApp: [IntentApp]? = nil, intentAppErrorDictList: [IntentAppErrorList]? = nil, intentAppErrorList: [String]? = nil, intentFlow: Bool? = nil, logoUrl: PaymentModeLogo? = nil, merchantCode: String? = nil, name: String? = nil, nickname: String? = nil, retryCount: Int? = nil, timeout: Int? = nil) { + self.merchantCode = merchantCode self.cardIssuer = cardIssuer - self.cardBrand = cardBrand + self.cardNumber = cardNumber - self.retryCount = retryCount + self.cardBrandImage = cardBrandImage - self.cardId = cardId + self.cardIsin = cardIsin self.logoUrl = logoUrl + self.intentAppErrorList = intentAppErrorList + + self.expYear = expYear + self.fyndVpa = fyndVpa - self.cardReference = cardReference + self.cardFingerprint = cardFingerprint + + self.expired = expired + + self.cardId = cardId self.expMonth = expMonth - self.cardFingerprint = cardFingerprint + self.displayName = displayName - self.timeout = timeout + self.intentAppErrorDictList = intentAppErrorDictList - self.cardType = cardType + self.cardBrand = cardBrand + + self.displayPriority = displayPriority + + self.intentFlow = intentFlow self.nickname = nickname - self.expired = expired + self.cardName = cardName - self.intentFlow = intentFlow + self.aggregatorName = aggregatorName - self.cardBrandImage = cardBrandImage + self.timeout = timeout - self.displayPriority = displayPriority + self.cardReference = cardReference + + self.name = name self.code = code - self.cardNumber = cardNumber + self.retryCount = retryCount - self.cardName = cardName + self.intentApp = intentApp + + self.cardType = cardType + + self.cardToken = cardToken } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + merchantCode = try container.decode(String.self, forKey: .merchantCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +198,7 @@ public extension PlatformClient { } catch {} do { - expYear = try container.decode(Int.self, forKey: .expYear) + cardIssuer = try container.decode(String.self, forKey: .cardIssuer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +206,7 @@ public extension PlatformClient { } catch {} do { - intentApp = try container.decode([IntentApp].self, forKey: .intentApp) + cardNumber = try container.decode(String.self, forKey: .cardNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +214,7 @@ public extension PlatformClient { } catch {} do { - intentAppErrorDictList = try container.decode([IntentAppErrorList].self, forKey: .intentAppErrorDictList) + cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -222,7 +222,7 @@ public extension PlatformClient { } catch {} do { - merchantCode = try container.decode(String.self, forKey: .merchantCode) + cardIsin = try container.decode(String.self, forKey: .cardIsin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,7 +230,7 @@ public extension PlatformClient { } catch {} do { - cardIsin = try container.decode(String.self, forKey: .cardIsin) + logoUrl = try container.decode(PaymentModeLogo.self, forKey: .logoUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -245,10 +245,8 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - aggregatorName = try container.decode(String.self, forKey: .aggregatorName) - do { - displayName = try container.decode(String.self, forKey: .displayName) + expYear = try container.decode(Int.self, forKey: .expYear) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -256,7 +254,7 @@ public extension PlatformClient { } catch {} do { - cardToken = try container.decode(String.self, forKey: .cardToken) + fyndVpa = try container.decode(String.self, forKey: .fyndVpa) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -264,7 +262,7 @@ public extension PlatformClient { } catch {} do { - cardIssuer = try container.decode(String.self, forKey: .cardIssuer) + cardFingerprint = try container.decode(String.self, forKey: .cardFingerprint) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -272,7 +270,7 @@ public extension PlatformClient { } catch {} do { - cardBrand = try container.decode(String.self, forKey: .cardBrand) + expired = try container.decode(Bool.self, forKey: .expired) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -280,7 +278,7 @@ public extension PlatformClient { } catch {} do { - retryCount = try container.decode(Int.self, forKey: .retryCount) + cardId = try container.decode(String.self, forKey: .cardId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -288,7 +286,7 @@ public extension PlatformClient { } catch {} do { - cardId = try container.decode(String.self, forKey: .cardId) + expMonth = try container.decode(Int.self, forKey: .expMonth) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -296,7 +294,7 @@ public extension PlatformClient { } catch {} do { - logoUrl = try container.decode(PaymentModeLogo.self, forKey: .logoUrl) + displayName = try container.decode(String.self, forKey: .displayName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -304,7 +302,7 @@ public extension PlatformClient { } catch {} do { - fyndVpa = try container.decode(String.self, forKey: .fyndVpa) + intentAppErrorDictList = try container.decode([IntentAppErrorList].self, forKey: .intentAppErrorDictList) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -312,7 +310,7 @@ public extension PlatformClient { } catch {} do { - cardReference = try container.decode(String.self, forKey: .cardReference) + cardBrand = try container.decode(String.self, forKey: .cardBrand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -320,7 +318,7 @@ public extension PlatformClient { } catch {} do { - expMonth = try container.decode(Int.self, forKey: .expMonth) + displayPriority = try container.decode(Int.self, forKey: .displayPriority) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -328,7 +326,7 @@ public extension PlatformClient { } catch {} do { - cardFingerprint = try container.decode(String.self, forKey: .cardFingerprint) + intentFlow = try container.decode(Bool.self, forKey: .intentFlow) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -336,7 +334,7 @@ public extension PlatformClient { } catch {} do { - timeout = try container.decode(Int.self, forKey: .timeout) + nickname = try container.decode(String.self, forKey: .nickname) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -344,15 +342,17 @@ public extension PlatformClient { } catch {} do { - cardType = try container.decode(String.self, forKey: .cardType) + cardName = try container.decode(String.self, forKey: .cardName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + aggregatorName = try container.decode(String.self, forKey: .aggregatorName) + do { - nickname = try container.decode(String.self, forKey: .nickname) + timeout = try container.decode(Int.self, forKey: .timeout) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -360,7 +360,7 @@ public extension PlatformClient { } catch {} do { - expired = try container.decode(Bool.self, forKey: .expired) + cardReference = try container.decode(String.self, forKey: .cardReference) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -368,7 +368,7 @@ public extension PlatformClient { } catch {} do { - intentFlow = try container.decode(Bool.self, forKey: .intentFlow) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -376,7 +376,7 @@ public extension PlatformClient { } catch {} do { - cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -384,7 +384,7 @@ public extension PlatformClient { } catch {} do { - displayPriority = try container.decode(Int.self, forKey: .displayPriority) + retryCount = try container.decode(Int.self, forKey: .retryCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -392,7 +392,7 @@ public extension PlatformClient { } catch {} do { - code = try container.decode(String.self, forKey: .code) + intentApp = try container.decode([IntentApp].self, forKey: .intentApp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -400,7 +400,7 @@ public extension PlatformClient { } catch {} do { - cardNumber = try container.decode(String.self, forKey: .cardNumber) + cardType = try container.decode(String.self, forKey: .cardType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -408,7 +408,7 @@ public extension PlatformClient { } catch {} do { - cardName = try container.decode(String.self, forKey: .cardName) + cardToken = try container.decode(String.self, forKey: .cardToken) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -419,63 +419,63 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(name, forKey: .name) - - try? container.encode(expYear, forKey: .expYear) + try? container.encode(merchantCode, forKey: .merchantCode) - try? container.encode(intentApp, forKey: .intentApp) + try? container.encode(cardIssuer, forKey: .cardIssuer) - try? container.encode(intentAppErrorDictList, forKey: .intentAppErrorDictList) + try? container.encode(cardNumber, forKey: .cardNumber) - try? container.encode(merchantCode, forKey: .merchantCode) + try? container.encode(cardBrandImage, forKey: .cardBrandImage) try? container.encode(cardIsin, forKey: .cardIsin) - try? container.encode(intentAppErrorList, forKey: .intentAppErrorList) - - try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) + try? container.encode(logoUrl, forKey: .logoUrl) - try? container.encode(displayName, forKey: .displayName) + try? container.encode(intentAppErrorList, forKey: .intentAppErrorList) - try? container.encode(cardToken, forKey: .cardToken) + try? container.encode(expYear, forKey: .expYear) - try? container.encode(cardIssuer, forKey: .cardIssuer) + try? container.encode(fyndVpa, forKey: .fyndVpa) - try? container.encode(cardBrand, forKey: .cardBrand) + try? container.encode(cardFingerprint, forKey: .cardFingerprint) - try? container.encode(retryCount, forKey: .retryCount) + try? container.encode(expired, forKey: .expired) try? container.encode(cardId, forKey: .cardId) - try? container.encode(logoUrl, forKey: .logoUrl) - - try? container.encode(fyndVpa, forKey: .fyndVpa) + try? container.encode(expMonth, forKey: .expMonth) - try? container.encode(cardReference, forKey: .cardReference) + try? container.encode(displayName, forKey: .displayName) - try? container.encode(expMonth, forKey: .expMonth) + try? container.encode(intentAppErrorDictList, forKey: .intentAppErrorDictList) - try? container.encode(cardFingerprint, forKey: .cardFingerprint) + try? container.encode(cardBrand, forKey: .cardBrand) - try? container.encode(timeout, forKey: .timeout) + try? container.encode(displayPriority, forKey: .displayPriority) - try? container.encode(cardType, forKey: .cardType) + try? container.encode(intentFlow, forKey: .intentFlow) try? container.encode(nickname, forKey: .nickname) - try? container.encode(expired, forKey: .expired) + try? container.encode(cardName, forKey: .cardName) - try? container.encode(intentFlow, forKey: .intentFlow) + try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) - try? container.encode(cardBrandImage, forKey: .cardBrandImage) + try? container.encode(timeout, forKey: .timeout) - try? container.encode(displayPriority, forKey: .displayPriority) + try? container.encode(cardReference, forKey: .cardReference) + + try? container.encode(name, forKey: .name) try? container.encode(code, forKey: .code) - try? container.encode(cardNumber, forKey: .cardNumber) + try? container.encode(retryCount, forKey: .retryCount) - try? container.encode(cardName, forKey: .cardName) + try? container.encode(intentApp, forKey: .intentApp) + + try? container.encode(cardType, forKey: .cardType) + + try? container.encode(cardToken, forKey: .cardToken) } } } diff --git a/Sources/code/platform/models/PaymentModeLogoPlatformModelClass.swift b/Sources/code/platform/models/PaymentModeLogoPlatformModelClass.swift index 93e3128b7a..093b9e7414 100644 --- a/Sources/code/platform/models/PaymentModeLogoPlatformModelClass.swift +++ b/Sources/code/platform/models/PaymentModeLogoPlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class PaymentModeLogo: Codable { - public var large: String - public var small: String - public enum CodingKeys: String, CodingKey { - case large + public var large: String + public enum CodingKeys: String, CodingKey { case small + + case large } public init(large: String, small: String) { - self.large = large - self.small = small + + self.large = large } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - large = try container.decode(String.self, forKey: .large) - small = try container.decode(String.self, forKey: .small) + + large = try container.decode(String.self, forKey: .large) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(large, forKey: .large) - try? container.encodeIfPresent(small, forKey: .small) + + try? container.encodeIfPresent(large, forKey: .large) } } } diff --git a/Sources/code/platform/models/PaymentOptionsResponsePlatformModelClass.swift b/Sources/code/platform/models/PaymentOptionsResponsePlatformModelClass.swift index c280dc1c1e..20aaf33da7 100644 --- a/Sources/code/platform/models/PaymentOptionsResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/PaymentOptionsResponsePlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class PaymentOptionsResponse: Codable { - public var success: Bool - public var paymentOptions: PaymentOptions - public enum CodingKeys: String, CodingKey { - case success + public var success: Bool + public enum CodingKeys: String, CodingKey { case paymentOptions = "payment_options" + + case success } public init(paymentOptions: PaymentOptions, success: Bool) { - self.success = success - self.paymentOptions = paymentOptions + + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - success = try container.decode(Bool.self, forKey: .success) - paymentOptions = try container.decode(PaymentOptions.self, forKey: .paymentOptions) + + success = try container.decode(Bool.self, forKey: .success) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(paymentOptions, forKey: .paymentOptions) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/platform/models/PayoutBankDetailsPlatformModelClass.swift b/Sources/code/platform/models/PayoutBankDetailsPlatformModelClass.swift index 3cea2a41c1..454747e53c 100644 --- a/Sources/code/platform/models/PayoutBankDetailsPlatformModelClass.swift +++ b/Sources/code/platform/models/PayoutBankDetailsPlatformModelClass.swift @@ -8,75 +8,75 @@ public extension PlatformClient { */ class PayoutBankDetails: Codable { - public var country: String? + public var pincode: Int? - public var state: String? + public var city: String? - public var accountNo: String? + public var state: String? public var branchName: String? public var accountHolder: String? - public var city: String? + public var bankName: String? - public var ifscCode: String + public var accountType: String - public var pincode: Int? + public var accountNo: String? - public var accountType: String + public var ifscCode: String - public var bankName: String? + public var country: String? public enum CodingKeys: String, CodingKey { - case country + case pincode - case state + case city - case accountNo = "account_no" + case state case branchName = "branch_name" case accountHolder = "account_holder" - case city + case bankName = "bank_name" - case ifscCode = "ifsc_code" + case accountType = "account_type" - case pincode + case accountNo = "account_no" - case accountType = "account_type" + case ifscCode = "ifsc_code" - case bankName = "bank_name" + case country } public init(accountHolder: String? = nil, accountNo: String? = nil, accountType: String, bankName: String? = nil, branchName: String? = nil, city: String? = nil, country: String? = nil, ifscCode: String, pincode: Int? = nil, state: String? = nil) { - self.country = country + self.pincode = pincode - self.state = state + self.city = city - self.accountNo = accountNo + self.state = state self.branchName = branchName self.accountHolder = accountHolder - self.city = city + self.bankName = bankName - self.ifscCode = ifscCode + self.accountType = accountType - self.pincode = pincode + self.accountNo = accountNo - self.accountType = accountType + self.ifscCode = ifscCode - self.bankName = bankName + self.country = country } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - country = try container.decode(String.self, forKey: .country) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,7 +84,7 @@ public extension PlatformClient { } catch {} do { - state = try container.decode(String.self, forKey: .state) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +92,7 @@ public extension PlatformClient { } catch {} do { - accountNo = try container.decode(String.self, forKey: .accountNo) + state = try container.decode(String.self, forKey: .state) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,27 +116,27 @@ public extension PlatformClient { } catch {} do { - city = try container.decode(String.self, forKey: .city) + bankName = try container.decode(String.self, forKey: .bankName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - ifscCode = try container.decode(String.self, forKey: .ifscCode) + accountType = try container.decode(String.self, forKey: .accountType) do { - pincode = try container.decode(Int.self, forKey: .pincode) + accountNo = try container.decode(String.self, forKey: .accountNo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - accountType = try container.decode(String.self, forKey: .accountType) + ifscCode = try container.decode(String.self, forKey: .ifscCode) do { - bankName = try container.decode(String.self, forKey: .bankName) + country = try container.decode(String.self, forKey: .country) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -147,25 +147,25 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(country, forKey: .country) + try? container.encodeIfPresent(pincode, forKey: .pincode) - try? container.encodeIfPresent(state, forKey: .state) + try? container.encodeIfPresent(city, forKey: .city) - try? container.encodeIfPresent(accountNo, forKey: .accountNo) + try? container.encodeIfPresent(state, forKey: .state) try? container.encodeIfPresent(branchName, forKey: .branchName) try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) - try? container.encodeIfPresent(city, forKey: .city) + try? container.encodeIfPresent(bankName, forKey: .bankName) - try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) + try? container.encodeIfPresent(accountType, forKey: .accountType) - try? container.encodeIfPresent(pincode, forKey: .pincode) + try? container.encodeIfPresent(accountNo, forKey: .accountNo) - try? container.encodeIfPresent(accountType, forKey: .accountType) + try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) - try? container.encodeIfPresent(bankName, forKey: .bankName) + try? container.encodeIfPresent(country, forKey: .country) } } } diff --git a/Sources/code/platform/models/PayoutRequestPlatformModelClass.swift b/Sources/code/platform/models/PayoutRequestPlatformModelClass.swift index f23a8d10d9..88394670cb 100644 --- a/Sources/code/platform/models/PayoutRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/PayoutRequestPlatformModelClass.swift @@ -8,76 +8,76 @@ public extension PlatformClient { */ class PayoutRequest: Codable { - public var uniqueExternalId: String - - public var aggregator: String - public var transferType: String + public var users: [String: Any] + public var isActive: Bool public var bankDetails: PayoutBankDetails - public var users: [String: Any] - - public enum CodingKeys: String, CodingKey { - case uniqueExternalId = "unique_external_id" + public var uniqueExternalId: String - case aggregator + public var aggregator: String + public enum CodingKeys: String, CodingKey { case transferType = "transfer_type" + case users + case isActive = "is_active" case bankDetails = "bank_details" - case users + case uniqueExternalId = "unique_external_id" + + case aggregator } public init(aggregator: String, bankDetails: PayoutBankDetails, isActive: Bool, transferType: String, uniqueExternalId: String, users: [String: Any]) { - self.uniqueExternalId = uniqueExternalId - - self.aggregator = aggregator - self.transferType = transferType + self.users = users + self.isActive = isActive self.bankDetails = bankDetails - self.users = users + self.uniqueExternalId = uniqueExternalId + + self.aggregator = aggregator } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - uniqueExternalId = try container.decode(String.self, forKey: .uniqueExternalId) - - aggregator = try container.decode(String.self, forKey: .aggregator) - transferType = try container.decode(String.self, forKey: .transferType) + users = try container.decode([String: Any].self, forKey: .users) + isActive = try container.decode(Bool.self, forKey: .isActive) bankDetails = try container.decode(PayoutBankDetails.self, forKey: .bankDetails) - users = try container.decode([String: Any].self, forKey: .users) + uniqueExternalId = try container.decode(String.self, forKey: .uniqueExternalId) + + aggregator = try container.decode(String.self, forKey: .aggregator) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(uniqueExternalId, forKey: .uniqueExternalId) - - try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encodeIfPresent(transferType, forKey: .transferType) + try? container.encodeIfPresent(users, forKey: .users) + try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(bankDetails, forKey: .bankDetails) - try? container.encodeIfPresent(users, forKey: .users) + try? container.encodeIfPresent(uniqueExternalId, forKey: .uniqueExternalId) + + try? container.encodeIfPresent(aggregator, forKey: .aggregator) } } } diff --git a/Sources/code/platform/models/PayoutResponsePlatformModelClass.swift b/Sources/code/platform/models/PayoutResponsePlatformModelClass.swift index fded769c93..e05b200ceb 100644 --- a/Sources/code/platform/models/PayoutResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/PayoutResponsePlatformModelClass.swift @@ -10,66 +10,66 @@ public extension PlatformClient { class PayoutResponse: Codable { public var uniqueTransferNo: String - public var aggregator: String + public var success: Bool - public var created: Bool + public var transferType: String - public var success: Bool + public var payouts: [String: Any] - public var paymentStatus: String + public var created: Bool - public var transferType: String + public var users: [String: Any] public var isActive: Bool public var bankDetails: [String: Any] - public var payouts: [String: Any] + public var aggregator: String - public var users: [String: Any] + public var paymentStatus: String public enum CodingKeys: String, CodingKey { case uniqueTransferNo = "unique_transfer_no" - case aggregator + case success - case created + case transferType = "transfer_type" - case success + case payouts - case paymentStatus = "payment_status" + case created - case transferType = "transfer_type" + case users case isActive = "is_active" case bankDetails = "bank_details" - case payouts + case aggregator - case users + case paymentStatus = "payment_status" } public init(aggregator: String, bankDetails: [String: Any], created: Bool, isActive: Bool, paymentStatus: String, payouts: [String: Any], success: Bool, transferType: String, uniqueTransferNo: String, users: [String: Any]) { self.uniqueTransferNo = uniqueTransferNo - self.aggregator = aggregator + self.success = success - self.created = created + self.transferType = transferType - self.success = success + self.payouts = payouts - self.paymentStatus = paymentStatus + self.created = created - self.transferType = transferType + self.users = users self.isActive = isActive self.bankDetails = bankDetails - self.payouts = payouts + self.aggregator = aggregator - self.users = users + self.paymentStatus = paymentStatus } required public init(from decoder: Decoder) throws { @@ -77,23 +77,23 @@ public extension PlatformClient { uniqueTransferNo = try container.decode(String.self, forKey: .uniqueTransferNo) - aggregator = try container.decode(String.self, forKey: .aggregator) + success = try container.decode(Bool.self, forKey: .success) - created = try container.decode(Bool.self, forKey: .created) + transferType = try container.decode(String.self, forKey: .transferType) - success = try container.decode(Bool.self, forKey: .success) + payouts = try container.decode([String: Any].self, forKey: .payouts) - paymentStatus = try container.decode(String.self, forKey: .paymentStatus) + created = try container.decode(Bool.self, forKey: .created) - transferType = try container.decode(String.self, forKey: .transferType) + users = try container.decode([String: Any].self, forKey: .users) isActive = try container.decode(Bool.self, forKey: .isActive) bankDetails = try container.decode([String: Any].self, forKey: .bankDetails) - payouts = try container.decode([String: Any].self, forKey: .payouts) + aggregator = try container.decode(String.self, forKey: .aggregator) - users = try container.decode([String: Any].self, forKey: .users) + paymentStatus = try container.decode(String.self, forKey: .paymentStatus) } public func encode(to encoder: Encoder) throws { @@ -101,23 +101,23 @@ public extension PlatformClient { try? container.encodeIfPresent(uniqueTransferNo, forKey: .uniqueTransferNo) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) + try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(created, forKey: .created) + try? container.encodeIfPresent(transferType, forKey: .transferType) - try? container.encodeIfPresent(success, forKey: .success) + try? container.encodeIfPresent(payouts, forKey: .payouts) - try? container.encodeIfPresent(paymentStatus, forKey: .paymentStatus) + try? container.encodeIfPresent(created, forKey: .created) - try? container.encodeIfPresent(transferType, forKey: .transferType) + try? container.encodeIfPresent(users, forKey: .users) try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(bankDetails, forKey: .bankDetails) - try? container.encodeIfPresent(payouts, forKey: .payouts) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encodeIfPresent(users, forKey: .users) + try? container.encodeIfPresent(paymentStatus, forKey: .paymentStatus) } } } diff --git a/Sources/code/platform/models/PayoutsResponsePlatformModelClass.swift b/Sources/code/platform/models/PayoutsResponsePlatformModelClass.swift index 3fc212a640..7ee754b51f 100644 --- a/Sources/code/platform/models/PayoutsResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/PayoutsResponsePlatformModelClass.swift @@ -8,86 +8,86 @@ public extension PlatformClient { */ class PayoutsResponse: Codable { - public var uniqueTransferNo: [String: Any] - - public var moreAttributes: [String: Any] + public var payoutsAggregators: [[String: Any]] - public var customers: [String: Any] + public var uniqueTransferNo: [String: Any] public var transferType: String - public var isDefault: Bool + public var moreAttributes: [String: Any] public var isActive: Bool - public var payoutsAggregators: [[String: Any]] + public var customers: [String: Any] - public enum CodingKeys: String, CodingKey { - case uniqueTransferNo = "unique_transfer_no" + public var isDefault: Bool - case moreAttributes = "more_attributes" + public enum CodingKeys: String, CodingKey { + case payoutsAggregators = "payouts_aggregators" - case customers + case uniqueTransferNo = "unique_transfer_no" case transferType = "transfer_type" - case isDefault = "is_default" + case moreAttributes = "more_attributes" case isActive = "is_active" - case payoutsAggregators = "payouts_aggregators" + case customers + + case isDefault = "is_default" } public init(customers: [String: Any], isActive: Bool, isDefault: Bool, moreAttributes: [String: Any], payoutsAggregators: [[String: Any]], transferType: String, uniqueTransferNo: [String: Any]) { - self.uniqueTransferNo = uniqueTransferNo - - self.moreAttributes = moreAttributes + self.payoutsAggregators = payoutsAggregators - self.customers = customers + self.uniqueTransferNo = uniqueTransferNo self.transferType = transferType - self.isDefault = isDefault + self.moreAttributes = moreAttributes self.isActive = isActive - self.payoutsAggregators = payoutsAggregators + self.customers = customers + + self.isDefault = isDefault } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - uniqueTransferNo = try container.decode([String: Any].self, forKey: .uniqueTransferNo) - - moreAttributes = try container.decode([String: Any].self, forKey: .moreAttributes) + payoutsAggregators = try container.decode([[String: Any]].self, forKey: .payoutsAggregators) - customers = try container.decode([String: Any].self, forKey: .customers) + uniqueTransferNo = try container.decode([String: Any].self, forKey: .uniqueTransferNo) transferType = try container.decode(String.self, forKey: .transferType) - isDefault = try container.decode(Bool.self, forKey: .isDefault) + moreAttributes = try container.decode([String: Any].self, forKey: .moreAttributes) isActive = try container.decode(Bool.self, forKey: .isActive) - payoutsAggregators = try container.decode([[String: Any]].self, forKey: .payoutsAggregators) + customers = try container.decode([String: Any].self, forKey: .customers) + + isDefault = try container.decode(Bool.self, forKey: .isDefault) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(uniqueTransferNo, forKey: .uniqueTransferNo) - - try? container.encodeIfPresent(moreAttributes, forKey: .moreAttributes) + try? container.encodeIfPresent(payoutsAggregators, forKey: .payoutsAggregators) - try? container.encodeIfPresent(customers, forKey: .customers) + try? container.encodeIfPresent(uniqueTransferNo, forKey: .uniqueTransferNo) try? container.encodeIfPresent(transferType, forKey: .transferType) - try? container.encodeIfPresent(isDefault, forKey: .isDefault) + try? container.encodeIfPresent(moreAttributes, forKey: .moreAttributes) try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(payoutsAggregators, forKey: .payoutsAggregators) + try? container.encodeIfPresent(customers, forKey: .customers) + + try? container.encodeIfPresent(isDefault, forKey: .isDefault) } } } diff --git a/Sources/code/platform/models/Price1PlatformModelClass.swift b/Sources/code/platform/models/Price1PlatformModelClass.swift index 6b7915fe13..e98b6466a1 100644 --- a/Sources/code/platform/models/Price1PlatformModelClass.swift +++ b/Sources/code/platform/models/Price1PlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class Price1: Codable { - public var min: Double? + public var currencyCode: String? public var max: Double? - public var currencySymbol: String? + public var min: Double? - public var currencyCode: String? + public var currencySymbol: String? public enum CodingKeys: String, CodingKey { - case min + case currencyCode = "currency_code" case max - case currencySymbol = "currency_symbol" + case min - case currencyCode = "currency_code" + case currencySymbol = "currency_symbol" } public init(currencyCode: String? = nil, currencySymbol: String? = nil, max: Double? = nil, min: Double? = nil) { - self.min = min + self.currencyCode = currencyCode self.max = max - self.currencySymbol = currencySymbol + self.min = min - self.currencyCode = currencyCode + self.currencySymbol = currencySymbol } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - min = try container.decode(Double.self, forKey: .min) + currencyCode = try container.decode(String.self, forKey: .currencyCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - currencySymbol = try container.decode(String.self, forKey: .currencySymbol) + min = try container.decode(Double.self, forKey: .min) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - currencyCode = try container.decode(String.self, forKey: .currencyCode) + currencySymbol = try container.decode(String.self, forKey: .currencySymbol) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(min, forKey: .min) + try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) try? container.encodeIfPresent(max, forKey: .max) - try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) + try? container.encodeIfPresent(min, forKey: .min) - try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) + try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) } } } diff --git a/Sources/code/platform/models/PricePlatformModelClass.swift b/Sources/code/platform/models/PricePlatformModelClass.swift index 82d2862832..7c5fde0358 100644 --- a/Sources/code/platform/models/PricePlatformModelClass.swift +++ b/Sources/code/platform/models/PricePlatformModelClass.swift @@ -8,45 +8,45 @@ public extension PlatformClient { */ class Price: Codable { - public var maxMarked: Double? - - public var minEffective: Double? + public var currency: String? public var maxEffective: Double? - public var currency: String? - public var minMarked: Double? - public enum CodingKeys: String, CodingKey { - case maxMarked = "max_marked" - - case minEffective = "min_effective" + public var maxMarked: Double? - case maxEffective = "max_effective" + public var minEffective: Double? + public enum CodingKeys: String, CodingKey { case currency + case maxEffective = "max_effective" + case minMarked = "min_marked" + + case maxMarked = "max_marked" + + case minEffective = "min_effective" } public init(currency: String? = nil, maxEffective: Double? = nil, maxMarked: Double? = nil, minEffective: Double? = nil, minMarked: Double? = nil) { - self.maxMarked = maxMarked - - self.minEffective = minEffective + self.currency = currency self.maxEffective = maxEffective - self.currency = currency - self.minMarked = minMarked + + self.maxMarked = maxMarked + + self.minEffective = minEffective } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - maxMarked = try container.decode(Double.self, forKey: .maxMarked) + currency = try container.decode(String.self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - minEffective = try container.decode(Double.self, forKey: .minEffective) + maxEffective = try container.decode(Double.self, forKey: .maxEffective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - maxEffective = try container.decode(Double.self, forKey: .maxEffective) + minMarked = try container.decode(Double.self, forKey: .minMarked) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - currency = try container.decode(String.self, forKey: .currency) + maxMarked = try container.decode(Double.self, forKey: .maxMarked) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - minMarked = try container.decode(Double.self, forKey: .minMarked) + minEffective = try container.decode(Double.self, forKey: .minEffective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,15 +89,15 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(maxMarked, forKey: .maxMarked) - - try? container.encodeIfPresent(minEffective, forKey: .minEffective) + try? container.encodeIfPresent(currency, forKey: .currency) try? container.encodeIfPresent(maxEffective, forKey: .maxEffective) - try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encodeIfPresent(minMarked, forKey: .minMarked) + + try? container.encodeIfPresent(maxMarked, forKey: .maxMarked) + + try? container.encodeIfPresent(minEffective, forKey: .minEffective) } } } diff --git a/Sources/code/platform/models/ProductBrandPlatformModelClass.swift b/Sources/code/platform/models/ProductBrandPlatformModelClass.swift index 16279db500..90fe6c0c82 100644 --- a/Sources/code/platform/models/ProductBrandPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBrandPlatformModelClass.swift @@ -12,18 +12,18 @@ public extension PlatformClient { public var name: String? - public var action: Action? - public var logo: Media1? + public var action: Action? + public enum CodingKeys: String, CodingKey { case uid case name - case action - case logo + + case action } public init(action: Action? = nil, logo: Media1? = nil, name: String? = nil, uid: Int? = nil) { @@ -31,9 +31,9 @@ public extension PlatformClient { self.name = name - self.action = action - self.logo = logo + + self.action = action } required public init(from decoder: Decoder) throws { @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - action = try container.decode(Action.self, forKey: .action) + logo = try container.decode(Media1.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(Media1.self, forKey: .logo) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -79,9 +79,9 @@ public extension PlatformClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(action, forKey: .action) } } } diff --git a/Sources/code/platform/models/ProductBulkAssetsPlatformModelClass.swift b/Sources/code/platform/models/ProductBulkAssetsPlatformModelClass.swift index c0d751caee..2bedf1acc0 100644 --- a/Sources/code/platform/models/ProductBulkAssetsPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBulkAssetsPlatformModelClass.swift @@ -8,31 +8,35 @@ public extension PlatformClient { */ class ProductBulkAssets: Codable { - public var companyId: Int? - public var user: [String: Any] public var url: String - public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + public var companyId: Int? + public enum CodingKeys: String, CodingKey { case user case url + + case companyId = "company_id" } public init(companyId: Int? = nil, url: String, user: [String: Any]) { - self.companyId = companyId - self.user = user self.url = url + + self.companyId = companyId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + user = try container.decode([String: Any].self, forKey: .user) + + url = try container.decode(String.self, forKey: .url) + do { companyId = try container.decode(Int.self, forKey: .companyId) @@ -40,20 +44,16 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - user = try container.decode([String: Any].self, forKey: .user) - - url = try container.decode(String.self, forKey: .url) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(user, forKey: .user) try? container.encodeIfPresent(url, forKey: .url) + + try? container.encodeIfPresent(companyId, forKey: .companyId) } } } diff --git a/Sources/code/platform/models/ProductBulkRequestPlatformModelClass.swift b/Sources/code/platform/models/ProductBulkRequestPlatformModelClass.swift index c96dfcac3c..0a186308bd 100644 --- a/Sources/code/platform/models/ProductBulkRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBulkRequestPlatformModelClass.swift @@ -8,111 +8,111 @@ public extension PlatformClient { */ class ProductBulkRequest: Codable { - public var companyId: Int? + public var cancelled: Int? - public var createdBy: UserDetail? + public var failedRecords: [String]? - public var modifiedOn: String? + public var failed: Int? + + public var createdBy: UserDetail? public var total: Int? - public var templateTag: String? + public var succeed: Int? - public var createdOn: String? + public var cancelledRecords: [String]? public var filePath: String? - public var succeed: Int? - - public var cancelled: Int? - public var modifiedBy: UserDetail? - public var template: ProductTemplate? + public var companyId: Int? - public var failedRecords: [String]? + public var template: ProductTemplate? - public var failed: Int? + public var modifiedOn: String? - public var stage: String? + public var templateTag: String? public var isActive: Bool? - public var cancelledRecords: [String]? + public var createdOn: String? + + public var stage: String? public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + case cancelled - case createdBy = "created_by" + case failedRecords = "failed_records" - case modifiedOn = "modified_on" + case failed + + case createdBy = "created_by" case total - case templateTag = "template_tag" + case succeed - case createdOn = "created_on" + case cancelledRecords = "cancelled_records" case filePath = "file_path" - case succeed - - case cancelled - case modifiedBy = "modified_by" - case template + case companyId = "company_id" - case failedRecords = "failed_records" + case template - case failed + case modifiedOn = "modified_on" - case stage + case templateTag = "template_tag" case isActive = "is_active" - case cancelledRecords = "cancelled_records" + case createdOn = "created_on" + + case stage } public init(cancelled: Int? = nil, cancelledRecords: [String]? = nil, companyId: Int? = nil, createdBy: UserDetail? = nil, createdOn: String? = nil, failed: Int? = nil, failedRecords: [String]? = nil, filePath: String? = nil, isActive: Bool? = nil, modifiedBy: UserDetail? = nil, modifiedOn: String? = nil, stage: String? = nil, succeed: Int? = nil, template: ProductTemplate? = nil, templateTag: String? = nil, total: Int? = nil) { - self.companyId = companyId + self.cancelled = cancelled - self.createdBy = createdBy + self.failedRecords = failedRecords - self.modifiedOn = modifiedOn + self.failed = failed + + self.createdBy = createdBy self.total = total - self.templateTag = templateTag + self.succeed = succeed - self.createdOn = createdOn + self.cancelledRecords = cancelledRecords self.filePath = filePath - self.succeed = succeed - - self.cancelled = cancelled - self.modifiedBy = modifiedBy - self.template = template + self.companyId = companyId - self.failedRecords = failedRecords + self.template = template - self.failed = failed + self.modifiedOn = modifiedOn - self.stage = stage + self.templateTag = templateTag self.isActive = isActive - self.cancelledRecords = cancelledRecords + self.createdOn = createdOn + + self.stage = stage } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - companyId = try container.decode(Int.self, forKey: .companyId) + cancelled = try container.decode(Int.self, forKey: .cancelled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -120,7 +120,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserDetail.self, forKey: .createdBy) + failedRecords = try container.decode([String].self, forKey: .failedRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +128,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + failed = try container.decode(Int.self, forKey: .failed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -136,7 +136,7 @@ public extension PlatformClient { } catch {} do { - total = try container.decode(Int.self, forKey: .total) + createdBy = try container.decode(UserDetail.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,7 +144,7 @@ public extension PlatformClient { } catch {} do { - templateTag = try container.decode(String.self, forKey: .templateTag) + total = try container.decode(Int.self, forKey: .total) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +152,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + succeed = try container.decode(Int.self, forKey: .succeed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -160,7 +160,7 @@ public extension PlatformClient { } catch {} do { - filePath = try container.decode(String.self, forKey: .filePath) + cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -168,7 +168,7 @@ public extension PlatformClient { } catch {} do { - succeed = try container.decode(Int.self, forKey: .succeed) + filePath = try container.decode(String.self, forKey: .filePath) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +176,7 @@ public extension PlatformClient { } catch {} do { - cancelled = try container.decode(Int.self, forKey: .cancelled) + modifiedBy = try container.decode(UserDetail.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -184,7 +184,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserDetail.self, forKey: .modifiedBy) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -200,7 +200,7 @@ public extension PlatformClient { } catch {} do { - failedRecords = try container.decode([String].self, forKey: .failedRecords) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -208,7 +208,7 @@ public extension PlatformClient { } catch {} do { - failed = try container.decode(Int.self, forKey: .failed) + templateTag = try container.decode(String.self, forKey: .templateTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -216,7 +216,7 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -224,7 +224,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -232,7 +232,7 @@ public extension PlatformClient { } catch {} do { - cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -243,37 +243,37 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(cancelled, forKey: .cancelled) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(failed, forKey: .failed) + + try? container.encodeIfPresent(createdBy, forKey: .createdBy) try? container.encodeIfPresent(total, forKey: .total) - try? container.encodeIfPresent(templateTag, forKey: .templateTag) + try? container.encodeIfPresent(succeed, forKey: .succeed) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) try? container.encodeIfPresent(filePath, forKey: .filePath) - try? container.encodeIfPresent(succeed, forKey: .succeed) - - try? container.encodeIfPresent(cancelled, forKey: .cancelled) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(template, forKey: .template) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) + try? container.encodeIfPresent(template, forKey: .template) - try? container.encodeIfPresent(failed, forKey: .failed) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(templateTag, forKey: .templateTag) try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) + + try? container.encodeIfPresent(stage, forKey: .stage) } } } diff --git a/Sources/code/platform/models/ProductBundleItemPlatformModelClass.swift b/Sources/code/platform/models/ProductBundleItemPlatformModelClass.swift index 87d20d3e9e..47f21bf6c4 100644 --- a/Sources/code/platform/models/ProductBundleItemPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBundleItemPlatformModelClass.swift @@ -10,42 +10,42 @@ public extension PlatformClient { class ProductBundleItem: Codable { public var maxQuantity: Int - public var allowRemove: Bool? - - public var autoSelect: Bool? - public var minQuantity: Int + public var autoAddToCart: Bool? + public var productUid: Int - public var autoAddToCart: Bool? + public var allowRemove: Bool? + + public var autoSelect: Bool? public enum CodingKeys: String, CodingKey { case maxQuantity = "max_quantity" - case allowRemove = "allow_remove" - - case autoSelect = "auto_select" - case minQuantity = "min_quantity" + case autoAddToCart = "auto_add_to_cart" + case productUid = "product_uid" - case autoAddToCart = "auto_add_to_cart" + case allowRemove = "allow_remove" + + case autoSelect = "auto_select" } public init(allowRemove: Bool? = nil, autoAddToCart: Bool? = nil, autoSelect: Bool? = nil, maxQuantity: Int, minQuantity: Int, productUid: Int) { self.maxQuantity = maxQuantity - self.allowRemove = allowRemove - - self.autoSelect = autoSelect - self.minQuantity = minQuantity + self.autoAddToCart = autoAddToCart + self.productUid = productUid - self.autoAddToCart = autoAddToCart + self.allowRemove = allowRemove + + self.autoSelect = autoSelect } required public init(from decoder: Decoder) throws { @@ -53,28 +53,28 @@ public extension PlatformClient { maxQuantity = try container.decode(Int.self, forKey: .maxQuantity) + minQuantity = try container.decode(Int.self, forKey: .minQuantity) + do { - allowRemove = try container.decode(Bool.self, forKey: .allowRemove) + autoAddToCart = try container.decode(Bool.self, forKey: .autoAddToCart) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + productUid = try container.decode(Int.self, forKey: .productUid) + do { - autoSelect = try container.decode(Bool.self, forKey: .autoSelect) + allowRemove = try container.decode(Bool.self, forKey: .allowRemove) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - minQuantity = try container.decode(Int.self, forKey: .minQuantity) - - productUid = try container.decode(Int.self, forKey: .productUid) - do { - autoAddToCart = try container.decode(Bool.self, forKey: .autoAddToCart) + autoSelect = try container.decode(Bool.self, forKey: .autoSelect) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -87,15 +87,15 @@ public extension PlatformClient { try? container.encodeIfPresent(maxQuantity, forKey: .maxQuantity) - try? container.encodeIfPresent(allowRemove, forKey: .allowRemove) - - try? container.encodeIfPresent(autoSelect, forKey: .autoSelect) - try? container.encodeIfPresent(minQuantity, forKey: .minQuantity) + try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) + try? container.encodeIfPresent(productUid, forKey: .productUid) - try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) + try? container.encodeIfPresent(allowRemove, forKey: .allowRemove) + + try? container.encodeIfPresent(autoSelect, forKey: .autoSelect) } } } diff --git a/Sources/code/platform/models/ProductBundleRequestPlatformModelClass.swift b/Sources/code/platform/models/ProductBundleRequestPlatformModelClass.swift index 7eaf9ac408..ca9091b007 100644 --- a/Sources/code/platform/models/ProductBundleRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBundleRequestPlatformModelClass.swift @@ -8,84 +8,84 @@ public extension PlatformClient { */ class ProductBundleRequest: Codable { - public var sameStoreAssignment: Bool? + public var choice: String - public var modifiedOn: String? + public var slug: String - public var pageVisibility: [String]? + public var meta: [String: Any]? - public var createdBy: [String: Any]? + public var products: [ProductBundleItem] - public var createdOn: String? + public var name: String - public var modifiedBy: [String: Any]? + public var createdBy: [String: Any]? - public var slug: String + public var sameStoreAssignment: Bool? - public var meta: [String: Any]? + public var pageVisibility: [String]? - public var choice: String + public var modifiedBy: [String: Any]? - public var isActive: Bool + public var modifiedOn: String? - public var products: [ProductBundleItem] + public var isActive: Bool - public var name: String + public var createdOn: String? public var logo: String? public enum CodingKeys: String, CodingKey { - case sameStoreAssignment = "same_store_assignment" + case choice - case modifiedOn = "modified_on" + case slug - case pageVisibility = "page_visibility" + case meta - case createdBy = "created_by" + case products - case createdOn = "created_on" + case name - case modifiedBy = "modified_by" + case createdBy = "created_by" - case slug + case sameStoreAssignment = "same_store_assignment" - case meta + case pageVisibility = "page_visibility" - case choice + case modifiedBy = "modified_by" - case isActive = "is_active" + case modifiedOn = "modified_on" - case products + case isActive = "is_active" - case name + case createdOn = "created_on" case logo } public init(choice: String, createdBy: [String: Any]? = nil, createdOn: String? = nil, isActive: Bool, logo: String? = nil, meta: [String: Any]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String, pageVisibility: [String]? = nil, products: [ProductBundleItem], sameStoreAssignment: Bool? = nil, slug: String) { - self.sameStoreAssignment = sameStoreAssignment + self.choice = choice - self.modifiedOn = modifiedOn + self.slug = slug - self.pageVisibility = pageVisibility + self.meta = meta - self.createdBy = createdBy + self.products = products - self.createdOn = createdOn + self.name = name - self.modifiedBy = modifiedBy + self.createdBy = createdBy - self.slug = slug + self.sameStoreAssignment = sameStoreAssignment - self.meta = meta + self.pageVisibility = pageVisibility - self.choice = choice + self.modifiedBy = modifiedBy - self.isActive = isActive + self.modifiedOn = modifiedOn - self.products = products + self.isActive = isActive - self.name = name + self.createdOn = createdOn self.logo = logo } @@ -93,16 +93,24 @@ public extension PlatformClient { required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + choice = try container.decode(String.self, forKey: .choice) + + slug = try container.decode(String.self, forKey: .slug) + do { - sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + products = try container.decode([ProductBundleItem].self, forKey: .products) + + name = try container.decode(String.self, forKey: .name) + do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +118,7 @@ public extension PlatformClient { } catch {} do { - pageVisibility = try container.decode([String].self, forKey: .pageVisibility) + sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -118,7 +126,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + pageVisibility = try container.decode([String].self, forKey: .pageVisibility) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +134,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,31 +142,23 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - slug = try container.decode(String.self, forKey: .slug) + isActive = try container.decode(Bool.self, forKey: .isActive) do { - meta = try container.decode([String: Any].self, forKey: .meta) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - choice = try container.decode(String.self, forKey: .choice) - - isActive = try container.decode(Bool.self, forKey: .isActive) - - products = try container.decode([ProductBundleItem].self, forKey: .products) - - name = try container.decode(String.self, forKey: .name) - do { logo = try container.decode(String.self, forKey: .logo) @@ -171,29 +171,29 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) + try? container.encodeIfPresent(choice, forKey: .choice) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(products, forKey: .products) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) - try? container.encodeIfPresent(choice, forKey: .choice) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(products, forKey: .products) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) try? container.encode(logo, forKey: .logo) } diff --git a/Sources/code/platform/models/ProductBundleUpdateRequestPlatformModelClass.swift b/Sources/code/platform/models/ProductBundleUpdateRequestPlatformModelClass.swift index 458ccb8174..bb85730252 100644 --- a/Sources/code/platform/models/ProductBundleUpdateRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBundleUpdateRequestPlatformModelClass.swift @@ -8,72 +8,72 @@ public extension PlatformClient { */ class ProductBundleUpdateRequest: Codable { - public var sameStoreAssignment: Bool? + public var choice: String - public var modifiedOn: String? + public var slug: String - public var pageVisibility: [String]? + public var meta: [String: Any]? - public var modifiedBy: [String: Any]? + public var products: [ProductBundleItem] - public var slug: String + public var name: String - public var meta: [String: Any]? + public var sameStoreAssignment: Bool? - public var choice: String + public var pageVisibility: [String]? - public var isActive: Bool + public var modifiedBy: [String: Any]? - public var products: [ProductBundleItem] + public var modifiedOn: String? - public var name: String + public var isActive: Bool public var logo: String? public enum CodingKeys: String, CodingKey { - case sameStoreAssignment = "same_store_assignment" + case choice - case modifiedOn = "modified_on" + case slug - case pageVisibility = "page_visibility" + case meta - case modifiedBy = "modified_by" + case products - case slug + case name - case meta + case sameStoreAssignment = "same_store_assignment" - case choice + case pageVisibility = "page_visibility" - case isActive = "is_active" + case modifiedBy = "modified_by" - case products + case modifiedOn = "modified_on" - case name + case isActive = "is_active" case logo } public init(choice: String, isActive: Bool, logo: String? = nil, meta: [String: Any]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String, pageVisibility: [String]? = nil, products: [ProductBundleItem], sameStoreAssignment: Bool? = nil, slug: String) { - self.sameStoreAssignment = sameStoreAssignment + self.choice = choice - self.modifiedOn = modifiedOn + self.slug = slug - self.pageVisibility = pageVisibility + self.meta = meta - self.modifiedBy = modifiedBy + self.products = products - self.slug = slug + self.name = name - self.meta = meta + self.sameStoreAssignment = sameStoreAssignment - self.choice = choice + self.pageVisibility = pageVisibility - self.isActive = isActive + self.modifiedBy = modifiedBy - self.products = products + self.modifiedOn = modifiedOn - self.name = name + self.isActive = isActive self.logo = logo } @@ -81,16 +81,24 @@ public extension PlatformClient { required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + choice = try container.decode(String.self, forKey: .choice) + + slug = try container.decode(String.self, forKey: .slug) + do { - sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + products = try container.decode([ProductBundleItem].self, forKey: .products) + + name = try container.decode(String.self, forKey: .name) + do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -113,24 +121,16 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - slug = try container.decode(String.self, forKey: .slug) - do { - meta = try container.decode([String: Any].self, forKey: .meta) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - choice = try container.decode(String.self, forKey: .choice) - isActive = try container.decode(Bool.self, forKey: .isActive) - products = try container.decode([ProductBundleItem].self, forKey: .products) - - name = try container.decode(String.self, forKey: .name) - do { logo = try container.decode(String.self, forKey: .logo) @@ -143,25 +143,25 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) + try? container.encodeIfPresent(choice, forKey: .choice) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(products, forKey: .products) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) - try? container.encodeIfPresent(choice, forKey: .choice) + try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(products, forKey: .products) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encode(logo, forKey: .logo) } diff --git a/Sources/code/platform/models/ProductCreateUpdatePlatformModelClass.swift b/Sources/code/platform/models/ProductCreateUpdatePlatformModelClass.swift index 2a6898fc30..9cdb248d23 100644 --- a/Sources/code/platform/models/ProductCreateUpdatePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductCreateUpdatePlatformModelClass.swift @@ -8,287 +8,283 @@ public extension PlatformClient { */ class ProductCreateUpdate: Codable { - public var hsnCode: String - - public var changeRequestId: String? - - public var customJson: [String: Any]? - - public var itemCode: String + public var currency: String - public var trader: [Trader] + public var customOrder: CustomOrder? - public var countryOfOrigin: String + public var itemType: String - public var productGroupTag: [String]? + public var slug: String - public var itemType: String + public var requester: String? - public var variants: [String: Any]? + public var changeRequestId: String? - public var companyId: Int + public var teaserTag: TeaserTag? - public var shortDescription: String? + public var returnConfig: ReturnConfig public var isDependent: Bool? - public var sizeGuide: String? + public var productGroupTag: [String]? - public var templateTag: String + public var departments: [Int] - public var highlights: [String]? + public var isSet: Bool? - public var returnConfig: ReturnConfig + public var noOfBoxes: Int? public var bulkJobId: String? + public var productPublish: ProductPublish? + public var uid: Int? - public var description: String? + public var moq: OrderQuantity? - public var departments: [Int] + public var name: String - public var slug: String + public var multiSize: Bool? - public var noOfBoxes: Int? + public var itemCode: String - public var customOrder: CustomOrder? + public var brandUid: Int - public var teaserTag: TeaserTag? + public var isActive: Bool? - public var name: String + public var countryOfOrigin: String - public var action: String? + public var shortDescription: String? - public var isImageLessProduct: Bool? + public var customJson: [String: Any]? public var media: [Media1]? - public var tags: [String]? - - public var requester: String? + public var action: String? - public var moq: OrderQuantity? + public var description: String? - public var multiSize: Bool? + public var highlights: [String]? - public var isSet: Bool? + public var categorySlug: String - public var currency: String + public var isImageLessProduct: Bool? - public var productPublish: ProductPublish? + public var tags: [String]? - public var categorySlug: String + public var sizeGuide: String? - public var isActive: Bool? + public var companyId: Int - public var brandUid: Int + public var templateTag: String - public enum CodingKeys: String, CodingKey { - case hsnCode = "hsn_code" + public var variants: [String: Any]? - case changeRequestId = "change_request_id" + public var hsnCode: String - case customJson = "_custom_json" + public var trader: [Trader] - case itemCode = "item_code" + public enum CodingKeys: String, CodingKey { + case currency - case trader + case customOrder = "custom_order" - case countryOfOrigin = "country_of_origin" + case itemType = "item_type" - case productGroupTag = "product_group_tag" + case slug - case itemType = "item_type" + case requester - case variants + case changeRequestId = "change_request_id" - case companyId = "company_id" + case teaserTag = "teaser_tag" - case shortDescription = "short_description" + case returnConfig = "return_config" case isDependent = "is_dependent" - case sizeGuide = "size_guide" + case productGroupTag = "product_group_tag" - case templateTag = "template_tag" + case departments - case highlights + case isSet = "is_set" - case returnConfig = "return_config" + case noOfBoxes = "no_of_boxes" case bulkJobId = "bulk_job_id" + case productPublish = "product_publish" + case uid - case description + case moq - case departments + case name - case slug + case multiSize = "multi_size" - case noOfBoxes = "no_of_boxes" + case itemCode = "item_code" - case customOrder = "custom_order" + case brandUid = "brand_uid" - case teaserTag = "teaser_tag" + case isActive = "is_active" - case name + case countryOfOrigin = "country_of_origin" - case action + case shortDescription = "short_description" - case isImageLessProduct = "is_image_less_product" + case customJson = "_custom_json" case media - case tags - - case requester + case action - case moq + case description - case multiSize = "multi_size" + case highlights - case isSet = "is_set" + case categorySlug = "category_slug" - case currency + case isImageLessProduct = "is_image_less_product" - case productPublish = "product_publish" + case tags - case categorySlug = "category_slug" + case sizeGuide = "size_guide" - case isActive = "is_active" + case companyId = "company_id" - case brandUid = "brand_uid" - } + case templateTag = "template_tag" - public init(action: String? = nil, brandUid: Int, bulkJobId: String? = nil, categorySlug: String, changeRequestId: String? = nil, companyId: Int, countryOfOrigin: String, currency: String, customOrder: CustomOrder? = nil, departments: [Int], description: String? = nil, highlights: [String]? = nil, hsnCode: String, isActive: Bool? = nil, isDependent: Bool? = nil, isImageLessProduct: Bool? = nil, isSet: Bool? = nil, itemCode: String, itemType: String, media: [Media1]? = nil, moq: OrderQuantity? = nil, multiSize: Bool? = nil, name: String, noOfBoxes: Int? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublish? = nil, requester: String? = nil, returnConfig: ReturnConfig, shortDescription: String? = nil, sizeGuide: String? = nil, slug: String, tags: [String]? = nil, teaserTag: TeaserTag? = nil, templateTag: String, trader: [Trader], uid: Int? = nil, variants: [String: Any]? = nil, customJson: [String: Any]? = nil) { - self.hsnCode = hsnCode + case variants - self.changeRequestId = changeRequestId + case hsnCode = "hsn_code" - self.customJson = customJson + case trader + } - self.itemCode = itemCode + public init(action: String? = nil, brandUid: Int, bulkJobId: String? = nil, categorySlug: String, changeRequestId: String? = nil, companyId: Int, countryOfOrigin: String, currency: String, customOrder: CustomOrder? = nil, departments: [Int], description: String? = nil, highlights: [String]? = nil, hsnCode: String, isActive: Bool? = nil, isDependent: Bool? = nil, isImageLessProduct: Bool? = nil, isSet: Bool? = nil, itemCode: String, itemType: String, media: [Media1]? = nil, moq: OrderQuantity? = nil, multiSize: Bool? = nil, name: String, noOfBoxes: Int? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublish? = nil, requester: String? = nil, returnConfig: ReturnConfig, shortDescription: String? = nil, sizeGuide: String? = nil, slug: String, tags: [String]? = nil, teaserTag: TeaserTag? = nil, templateTag: String, trader: [Trader], uid: Int? = nil, variants: [String: Any]? = nil, customJson: [String: Any]? = nil) { + self.currency = currency - self.trader = trader + self.customOrder = customOrder - self.countryOfOrigin = countryOfOrigin + self.itemType = itemType - self.productGroupTag = productGroupTag + self.slug = slug - self.itemType = itemType + self.requester = requester - self.variants = variants + self.changeRequestId = changeRequestId - self.companyId = companyId + self.teaserTag = teaserTag - self.shortDescription = shortDescription + self.returnConfig = returnConfig self.isDependent = isDependent - self.sizeGuide = sizeGuide + self.productGroupTag = productGroupTag - self.templateTag = templateTag + self.departments = departments - self.highlights = highlights + self.isSet = isSet - self.returnConfig = returnConfig + self.noOfBoxes = noOfBoxes self.bulkJobId = bulkJobId + self.productPublish = productPublish + self.uid = uid - self.description = description + self.moq = moq - self.departments = departments + self.name = name - self.slug = slug + self.multiSize = multiSize - self.noOfBoxes = noOfBoxes + self.itemCode = itemCode - self.customOrder = customOrder + self.brandUid = brandUid - self.teaserTag = teaserTag + self.isActive = isActive - self.name = name + self.countryOfOrigin = countryOfOrigin - self.action = action + self.shortDescription = shortDescription - self.isImageLessProduct = isImageLessProduct + self.customJson = customJson self.media = media - self.tags = tags + self.action = action - self.requester = requester + self.description = description - self.moq = moq + self.highlights = highlights - self.multiSize = multiSize + self.categorySlug = categorySlug - self.isSet = isSet + self.isImageLessProduct = isImageLessProduct - self.currency = currency + self.tags = tags - self.productPublish = productPublish + self.sizeGuide = sizeGuide - self.categorySlug = categorySlug + self.companyId = companyId - self.isActive = isActive + self.templateTag = templateTag - self.brandUid = brandUid + self.variants = variants + + self.hsnCode = hsnCode + + self.trader = trader } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - hsnCode = try container.decode(String.self, forKey: .hsnCode) + currency = try container.decode(String.self, forKey: .currency) do { - changeRequestId = try container.decode(String.self, forKey: .changeRequestId) + customOrder = try container.decode(CustomOrder.self, forKey: .customOrder) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + itemType = try container.decode(String.self, forKey: .itemType) + + slug = try container.decode(String.self, forKey: .slug) + do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + requester = try container.decode(String.self, forKey: .requester) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - itemCode = try container.decode(String.self, forKey: .itemCode) - - trader = try container.decode([Trader].self, forKey: .trader) - - countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) - do { - productGroupTag = try container.decode([String].self, forKey: .productGroupTag) + changeRequestId = try container.decode(String.self, forKey: .changeRequestId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - itemType = try container.decode(String.self, forKey: .itemType) - do { - variants = try container.decode([String: Any].self, forKey: .variants) + teaserTag = try container.decode(TeaserTag.self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - companyId = try container.decode(Int.self, forKey: .companyId) + returnConfig = try container.decode(ReturnConfig.self, forKey: .returnConfig) do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + isDependent = try container.decode(Bool.self, forKey: .isDependent) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -296,33 +292,31 @@ public extension PlatformClient { } catch {} do { - isDependent = try container.decode(Bool.self, forKey: .isDependent) + productGroupTag = try container.decode([String].self, forKey: .productGroupTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + departments = try container.decode([Int].self, forKey: .departments) + do { - sizeGuide = try container.decode(String.self, forKey: .sizeGuide) + isSet = try container.decode(Bool.self, forKey: .isSet) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - templateTag = try container.decode(String.self, forKey: .templateTag) - do { - highlights = try container.decode([String].self, forKey: .highlights) + noOfBoxes = try container.decode(Int.self, forKey: .noOfBoxes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - returnConfig = try container.decode(ReturnConfig.self, forKey: .returnConfig) - do { bulkJobId = try container.decode(String.self, forKey: .bulkJobId) @@ -332,7 +326,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + productPublish = try container.decode(ProductPublish.self, forKey: .productPublish) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -340,45 +334,47 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - departments = try container.decode([Int].self, forKey: .departments) - - slug = try container.decode(String.self, forKey: .slug) - do { - noOfBoxes = try container.decode(Int.self, forKey: .noOfBoxes) + moq = try container.decode(OrderQuantity.self, forKey: .moq) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + do { - customOrder = try container.decode(CustomOrder.self, forKey: .customOrder) + multiSize = try container.decode(Bool.self, forKey: .multiSize) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + itemCode = try container.decode(String.self, forKey: .itemCode) + + brandUid = try container.decode(Int.self, forKey: .brandUid) + do { - teaserTag = try container.decode(TeaserTag.self, forKey: .teaserTag) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - name = try container.decode(String.self, forKey: .name) + countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) do { - action = try container.decode(String.self, forKey: .action) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -386,7 +382,7 @@ public extension PlatformClient { } catch {} do { - isImageLessProduct = try container.decode(Bool.self, forKey: .isImageLessProduct) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -402,7 +398,7 @@ public extension PlatformClient { } catch {} do { - tags = try container.decode([String].self, forKey: .tags) + action = try container.decode(String.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -410,7 +406,7 @@ public extension PlatformClient { } catch {} do { - requester = try container.decode(String.self, forKey: .requester) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -418,15 +414,17 @@ public extension PlatformClient { } catch {} do { - moq = try container.decode(OrderQuantity.self, forKey: .moq) + highlights = try container.decode([String].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + categorySlug = try container.decode(String.self, forKey: .categorySlug) + do { - multiSize = try container.decode(Bool.self, forKey: .multiSize) + isImageLessProduct = try container.decode(Bool.self, forKey: .isImageLessProduct) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -434,114 +432,116 @@ public extension PlatformClient { } catch {} do { - isSet = try container.decode(Bool.self, forKey: .isSet) + tags = try container.decode([String].self, forKey: .tags) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - currency = try container.decode(String.self, forKey: .currency) - do { - productPublish = try container.decode(ProductPublish.self, forKey: .productPublish) + sizeGuide = try container.decode(String.self, forKey: .sizeGuide) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - categorySlug = try container.decode(String.self, forKey: .categorySlug) + companyId = try container.decode(Int.self, forKey: .companyId) + + templateTag = try container.decode(String.self, forKey: .templateTag) do { - isActive = try container.decode(Bool.self, forKey: .isActive) + variants = try container.decode([String: Any].self, forKey: .variants) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - brandUid = try container.decode(Int.self, forKey: .brandUid) + hsnCode = try container.decode(String.self, forKey: .hsnCode) + + trader = try container.decode([Trader].self, forKey: .trader) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) - - try? container.encode(changeRequestId, forKey: .changeRequestId) - - try? container.encodeIfPresent(customJson, forKey: .customJson) - - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encodeIfPresent(trader, forKey: .trader) + try? container.encodeIfPresent(customOrder, forKey: .customOrder) - try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(productGroupTag, forKey: .productGroupTag) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(requester, forKey: .requester) - try? container.encodeIfPresent(variants, forKey: .variants) + try? container.encode(changeRequestId, forKey: .changeRequestId) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(returnConfig, forKey: .returnConfig) try? container.encodeIfPresent(isDependent, forKey: .isDependent) - try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) + try? container.encodeIfPresent(productGroupTag, forKey: .productGroupTag) - try? container.encodeIfPresent(templateTag, forKey: .templateTag) + try? container.encodeIfPresent(departments, forKey: .departments) - try? container.encode(highlights, forKey: .highlights) + try? container.encodeIfPresent(isSet, forKey: .isSet) - try? container.encodeIfPresent(returnConfig, forKey: .returnConfig) + try? container.encodeIfPresent(noOfBoxes, forKey: .noOfBoxes) try? container.encodeIfPresent(bulkJobId, forKey: .bulkJobId) + try? container.encodeIfPresent(productPublish, forKey: .productPublish) + try? container.encode(uid, forKey: .uid) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(moq, forKey: .moq) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(multiSize, forKey: .multiSize) - try? container.encodeIfPresent(noOfBoxes, forKey: .noOfBoxes) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(customOrder, forKey: .customOrder) + try? container.encodeIfPresent(brandUid, forKey: .brandUid) - try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(isImageLessProduct, forKey: .isImageLessProduct) + try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encode(media, forKey: .media) - try? container.encodeIfPresent(tags, forKey: .tags) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(requester, forKey: .requester) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(moq, forKey: .moq) + try? container.encode(highlights, forKey: .highlights) - try? container.encodeIfPresent(multiSize, forKey: .multiSize) + try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) - try? container.encodeIfPresent(isSet, forKey: .isSet) + try? container.encodeIfPresent(isImageLessProduct, forKey: .isImageLessProduct) - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(tags, forKey: .tags) - try? container.encodeIfPresent(productPublish, forKey: .productPublish) + try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) - try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(templateTag, forKey: .templateTag) - try? container.encodeIfPresent(brandUid, forKey: .brandUid) + try? container.encodeIfPresent(variants, forKey: .variants) + + try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) + + try? container.encodeIfPresent(trader, forKey: .trader) } } } diff --git a/Sources/code/platform/models/ProductDetailGroupedAttributePlatformModelClass.swift b/Sources/code/platform/models/ProductDetailGroupedAttributePlatformModelClass.swift index 95a5441ea8..bd38ae609a 100644 --- a/Sources/code/platform/models/ProductDetailGroupedAttributePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductDetailGroupedAttributePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ProductDetailGroupedAttribute: Codable { - public var details: [ProductDetailAttribute]? - public var title: String? - public enum CodingKeys: String, CodingKey { - case details + public var details: [ProductDetailAttribute]? + public enum CodingKeys: String, CodingKey { case title + + case details } public init(details: [ProductDetailAttribute]? = nil, title: String? = nil) { - self.details = details - self.title = title + + self.details = details } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - details = try container.decode([ProductDetailAttribute].self, forKey: .details) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - title = try container.decode(String.self, forKey: .title) + details = try container.decode([ProductDetailAttribute].self, forKey: .details) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(details, forKey: .details) - try? container.encodeIfPresent(title, forKey: .title) + + try? container.encodeIfPresent(details, forKey: .details) } } } diff --git a/Sources/code/platform/models/ProductDetailPlatformModelClass.swift b/Sources/code/platform/models/ProductDetailPlatformModelClass.swift index a045462420..c50eab5390 100644 --- a/Sources/code/platform/models/ProductDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductDetailPlatformModelClass.swift @@ -8,161 +8,163 @@ public extension PlatformClient { */ class ProductDetail: Codable { - public var color: String? + public var itemType: String? - public var itemCode: String? + public var slug: String - public var ratingCount: Int? + public var teaserTag: [String: Any]? - public var brand: ProductBrand? + public var productOnlineDate: String? - public var itemType: String? + public var hasVariant: Bool? public var rating: Double? public var attributes: [String: Any]? - public var similars: [String]? - public var promoMeta: [String: Any]? - public var shortDescription: String? + public var uid: Int? - public var highlights: [String]? + public var color: String? + + public var tryouts: [String]? public var type: String? - public var uid: Int? + public var name: String? - public var description: String? + public var itemCode: String? - public var medias: [Media1]? + public var groupedAttributes: [ProductDetailGroupedAttribute]? - public var productOnlineDate: String? + public var shortDescription: String? - public var tryouts: [String]? + public var ratingCount: Int? - public var slug: String + public var description: String? - public var imageNature: String? + public var highlights: [String]? - public var teaserTag: [String: Any]? + public var brand: ProductBrand? - public var name: String? + public var medias: [Media1]? - public var hasVariant: Bool? + public var similars: [String]? - public var groupedAttributes: [ProductDetailGroupedAttribute]? + public var imageNature: String? public enum CodingKeys: String, CodingKey { - case color + case itemType = "item_type" - case itemCode = "item_code" + case slug - case ratingCount = "rating_count" + case teaserTag = "teaser_tag" - case brand + case productOnlineDate = "product_online_date" - case itemType = "item_type" + case hasVariant = "has_variant" case rating case attributes - case similars - case promoMeta = "promo_meta" - case shortDescription = "short_description" + case uid - case highlights + case color + + case tryouts case type - case uid + case name - case description + case itemCode = "item_code" - case medias + case groupedAttributes = "grouped_attributes" - case productOnlineDate = "product_online_date" + case shortDescription = "short_description" - case tryouts + case ratingCount = "rating_count" - case slug + case description - case imageNature = "image_nature" + case highlights - case teaserTag = "teaser_tag" + case brand - case name + case medias - case hasVariant = "has_variant" + case similars - case groupedAttributes = "grouped_attributes" + case imageNature = "image_nature" } public init(attributes: [String: Any]? = nil, brand: ProductBrand? = nil, color: String? = nil, description: String? = nil, groupedAttributes: [ProductDetailGroupedAttribute]? = nil, hasVariant: Bool? = nil, highlights: [String]? = nil, imageNature: String? = nil, itemCode: String? = nil, itemType: String? = nil, medias: [Media1]? = nil, name: String? = nil, productOnlineDate: String? = nil, promoMeta: [String: Any]? = nil, rating: Double? = nil, ratingCount: Int? = nil, shortDescription: String? = nil, similars: [String]? = nil, slug: String, teaserTag: [String: Any]? = nil, tryouts: [String]? = nil, type: String? = nil, uid: Int? = nil) { - self.color = color + self.itemType = itemType - self.itemCode = itemCode + self.slug = slug - self.ratingCount = ratingCount + self.teaserTag = teaserTag - self.brand = brand + self.productOnlineDate = productOnlineDate - self.itemType = itemType + self.hasVariant = hasVariant self.rating = rating self.attributes = attributes - self.similars = similars - self.promoMeta = promoMeta - self.shortDescription = shortDescription + self.uid = uid - self.highlights = highlights + self.color = color + + self.tryouts = tryouts self.type = type - self.uid = uid + self.name = name - self.description = description + self.itemCode = itemCode - self.medias = medias + self.groupedAttributes = groupedAttributes - self.productOnlineDate = productOnlineDate + self.shortDescription = shortDescription - self.tryouts = tryouts + self.ratingCount = ratingCount - self.slug = slug + self.description = description - self.imageNature = imageNature + self.highlights = highlights - self.teaserTag = teaserTag + self.brand = brand - self.name = name + self.medias = medias - self.hasVariant = hasVariant + self.similars = similars - self.groupedAttributes = groupedAttributes + self.imageNature = imageNature } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - color = try container.decode(String.self, forKey: .color) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + slug = try container.decode(String.self, forKey: .slug) + do { - itemCode = try container.decode(String.self, forKey: .itemCode) + teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +172,7 @@ public extension PlatformClient { } catch {} do { - ratingCount = try container.decode(Int.self, forKey: .ratingCount) + productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -178,7 +180,7 @@ public extension PlatformClient { } catch {} do { - brand = try container.decode(ProductBrand.self, forKey: .brand) + hasVariant = try container.decode(Bool.self, forKey: .hasVariant) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,7 +188,7 @@ public extension PlatformClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + rating = try container.decode(Double.self, forKey: .rating) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +196,7 @@ public extension PlatformClient { } catch {} do { - rating = try container.decode(Double.self, forKey: .rating) + attributes = try container.decode([String: Any].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -202,7 +204,7 @@ public extension PlatformClient { } catch {} do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -210,7 +212,7 @@ public extension PlatformClient { } catch {} do { - similars = try container.decode([String].self, forKey: .similars) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +220,7 @@ public extension PlatformClient { } catch {} do { - promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -226,7 +228,7 @@ public extension PlatformClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + tryouts = try container.decode([String].self, forKey: .tryouts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -234,7 +236,7 @@ public extension PlatformClient { } catch {} do { - highlights = try container.decode([String].self, forKey: .highlights) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -242,7 +244,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -250,7 +252,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -258,7 +260,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -266,7 +268,7 @@ public extension PlatformClient { } catch {} do { - medias = try container.decode([Media1].self, forKey: .medias) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -274,7 +276,7 @@ public extension PlatformClient { } catch {} do { - productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + ratingCount = try container.decode(Int.self, forKey: .ratingCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -282,17 +284,15 @@ public extension PlatformClient { } catch {} do { - tryouts = try container.decode([String].self, forKey: .tryouts) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - slug = try container.decode(String.self, forKey: .slug) - do { - imageNature = try container.decode(String.self, forKey: .imageNature) + highlights = try container.decode([String].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -300,7 +300,7 @@ public extension PlatformClient { } catch {} do { - teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) + brand = try container.decode(ProductBrand.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -308,7 +308,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + medias = try container.decode([Media1].self, forKey: .medias) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -316,7 +316,7 @@ public extension PlatformClient { } catch {} do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + similars = try container.decode([String].self, forKey: .similars) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -324,7 +324,7 @@ public extension PlatformClient { } catch {} do { - groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) + imageNature = try container.decode(String.self, forKey: .imageNature) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -335,51 +335,51 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(color, forKey: .color) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) - try? container.encodeIfPresent(brand, forKey: .brand) + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) try? container.encodeIfPresent(rating, forKey: .rating) try? container.encodeIfPresent(attributes, forKey: .attributes) - try? container.encodeIfPresent(similars, forKey: .similars) - try? container.encodeIfPresent(promoMeta, forKey: .promoMeta) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(highlights, forKey: .highlights) + try? container.encodeIfPresent(color, forKey: .color) + + try? container.encodeIfPresent(tryouts, forKey: .tryouts) try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(medias, forKey: .medias) + try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(highlights, forKey: .highlights) - try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(medias, forKey: .medias) - try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + try? container.encodeIfPresent(similars, forKey: .similars) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(imageNature, forKey: .imageNature) } } } diff --git a/Sources/code/platform/models/ProductDownloadItemsDataPlatformModelClass.swift b/Sources/code/platform/models/ProductDownloadItemsDataPlatformModelClass.swift index dc8f58aa78..24ec7c3a04 100644 --- a/Sources/code/platform/models/ProductDownloadItemsDataPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductDownloadItemsDataPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class ProductDownloadItemsData: Codable { public var brand: [String]? - public var type: String? - public var templates: [String]? + public var type: String? + public enum CodingKeys: String, CodingKey { case brand - case type - case templates + + case type } public init(brand: [String]? = nil, templates: [String]? = nil, type: String? = nil) { self.brand = brand - self.type = type - self.templates = templates + + self.type = type } required public init(from decoder: Decoder) throws { @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + templates = try container.decode([String].self, forKey: .templates) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - templates = try container.decode([String].self, forKey: .templates) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,9 +63,9 @@ public extension PlatformClient { try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(templates, forKey: .templates) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/ProductDownloadsItemsPlatformModelClass.swift b/Sources/code/platform/models/ProductDownloadsItemsPlatformModelClass.swift index 4695c1b0ff..b9de48d8ed 100644 --- a/Sources/code/platform/models/ProductDownloadsItemsPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductDownloadsItemsPlatformModelClass.swift @@ -8,75 +8,75 @@ public extension PlatformClient { */ class ProductDownloadsItems: Codable { - public var createdBy: VerifiedBy? + public var status: String? - public var url: String? + public var data: ProductDownloadItemsData? - public var id: String? + public var url: String? public var templateTags: [String: Any]? - public var data: ProductDownloadItemsData? + public var sellerId: Double? - public var triggerOn: String? + public var id: String? - public var taskId: String? + public var createdBy: VerifiedBy? - public var sellerId: Double? + public var triggerOn: String? public var completedOn: String? - public var status: String? + public var taskId: String? public enum CodingKeys: String, CodingKey { - case createdBy = "created_by" + case status - case url + case data - case id + case url case templateTags = "template_tags" - case data + case sellerId = "seller_id" - case triggerOn = "trigger_on" + case id - case taskId = "task_id" + case createdBy = "created_by" - case sellerId = "seller_id" + case triggerOn = "trigger_on" case completedOn = "completed_on" - case status + case taskId = "task_id" } public init(completedOn: String? = nil, createdBy: VerifiedBy? = nil, data: ProductDownloadItemsData? = nil, id: String? = nil, sellerId: Double? = nil, status: String? = nil, taskId: String? = nil, templateTags: [String: Any]? = nil, triggerOn: String? = nil, url: String? = nil) { - self.createdBy = createdBy + self.status = status - self.url = url + self.data = data - self.id = id + self.url = url self.templateTags = templateTags - self.data = data + self.sellerId = sellerId - self.triggerOn = triggerOn + self.id = id - self.taskId = taskId + self.createdBy = createdBy - self.sellerId = sellerId + self.triggerOn = triggerOn self.completedOn = completedOn - self.status = status + self.taskId = taskId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - createdBy = try container.decode(VerifiedBy.self, forKey: .createdBy) + status = try container.decode(String.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,7 +84,7 @@ public extension PlatformClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + data = try container.decode(ProductDownloadItemsData.self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +92,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -108,7 +108,7 @@ public extension PlatformClient { } catch {} do { - data = try container.decode(ProductDownloadItemsData.self, forKey: .data) + sellerId = try container.decode(Double.self, forKey: .sellerId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,7 +116,7 @@ public extension PlatformClient { } catch {} do { - triggerOn = try container.decode(String.self, forKey: .triggerOn) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -124,7 +124,7 @@ public extension PlatformClient { } catch {} do { - taskId = try container.decode(String.self, forKey: .taskId) + createdBy = try container.decode(VerifiedBy.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -132,7 +132,7 @@ public extension PlatformClient { } catch {} do { - sellerId = try container.decode(Double.self, forKey: .sellerId) + triggerOn = try container.decode(String.self, forKey: .triggerOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -148,7 +148,7 @@ public extension PlatformClient { } catch {} do { - status = try container.decode(String.self, forKey: .status) + taskId = try container.decode(String.self, forKey: .taskId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -159,25 +159,25 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(url, forKey: .url) + try? container.encodeIfPresent(data, forKey: .data) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(url, forKey: .url) try? container.encodeIfPresent(templateTags, forKey: .templateTags) - try? container.encodeIfPresent(data, forKey: .data) + try? container.encodeIfPresent(sellerId, forKey: .sellerId) - try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(taskId, forKey: .taskId) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(sellerId, forKey: .sellerId) + try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) try? container.encodeIfPresent(completedOn, forKey: .completedOn) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(taskId, forKey: .taskId) } } } diff --git a/Sources/code/platform/models/ProductFiltersKeyPlatformModelClass.swift b/Sources/code/platform/models/ProductFiltersKeyPlatformModelClass.swift index 31d9d28c0b..3ebe730a76 100644 --- a/Sources/code/platform/models/ProductFiltersKeyPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductFiltersKeyPlatformModelClass.swift @@ -8,39 +8,37 @@ public extension PlatformClient { */ class ProductFiltersKey: Codable { - public var display: String - public var kind: String? public var name: String + public var display: String + public var logo: String? public enum CodingKeys: String, CodingKey { - case display - case kind case name + case display + case logo } public init(display: String, kind: String? = nil, logo: String? = nil, name: String) { - self.display = display - self.kind = kind self.name = name + self.display = display + self.logo = logo } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - display = try container.decode(String.self, forKey: .display) - do { kind = try container.decode(String.self, forKey: .kind) @@ -51,6 +49,8 @@ public extension PlatformClient { name = try container.decode(String.self, forKey: .name) + display = try container.decode(String.self, forKey: .display) + do { logo = try container.decode(String.self, forKey: .logo) @@ -63,12 +63,12 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(kind, forKey: .kind) try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(display, forKey: .display) + try? container.encodeIfPresent(logo, forKey: .logo) } } diff --git a/Sources/code/platform/models/ProductFiltersValuePlatformModelClass.swift b/Sources/code/platform/models/ProductFiltersValuePlatformModelClass.swift index f48ae2b0f3..be3235c46b 100644 --- a/Sources/code/platform/models/ProductFiltersValuePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductFiltersValuePlatformModelClass.swift @@ -8,89 +8,87 @@ public extension PlatformClient { */ class ProductFiltersValue: Codable { - public var display: String + public var displayFormat: String? public var count: Int? - public var currencySymbol: String? + public var selectedMax: Int? public var min: Int? - public var queryFormat: String? + public var isSelected: Bool - public var max: Int? + public var currencyCode: String? - public var selectedMax: Int? + public var currencySymbol: String? - public var displayFormat: String? + public var queryFormat: String? - public var selectedMin: Int? + public var display: String public var value: String - public var isSelected: Bool + public var max: Int? - public var currencyCode: String? + public var selectedMin: Int? public enum CodingKeys: String, CodingKey { - case display + case displayFormat = "display_format" case count - case currencySymbol = "currency_symbol" + case selectedMax = "selected_max" case min - case queryFormat = "query_format" + case isSelected = "is_selected" - case max + case currencyCode = "currency_code" - case selectedMax = "selected_max" + case currencySymbol = "currency_symbol" - case displayFormat = "display_format" + case queryFormat = "query_format" - case selectedMin = "selected_min" + case display case value - case isSelected = "is_selected" + case max - case currencyCode = "currency_code" + case selectedMin = "selected_min" } public init(count: Int? = nil, currencyCode: String? = nil, currencySymbol: String? = nil, display: String, displayFormat: String? = nil, isSelected: Bool, max: Int? = nil, min: Int? = nil, queryFormat: String? = nil, selectedMax: Int? = nil, selectedMin: Int? = nil, value: String) { - self.display = display + self.displayFormat = displayFormat self.count = count - self.currencySymbol = currencySymbol + self.selectedMax = selectedMax self.min = min - self.queryFormat = queryFormat + self.isSelected = isSelected - self.max = max + self.currencyCode = currencyCode - self.selectedMax = selectedMax + self.currencySymbol = currencySymbol - self.displayFormat = displayFormat + self.queryFormat = queryFormat - self.selectedMin = selectedMin + self.display = display self.value = value - self.isSelected = isSelected + self.max = max - self.currencyCode = currencyCode + self.selectedMin = selectedMin } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - display = try container.decode(String.self, forKey: .display) - do { - count = try container.decode(Int.self, forKey: .count) + displayFormat = try container.decode(String.self, forKey: .displayFormat) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +96,7 @@ public extension PlatformClient { } catch {} do { - currencySymbol = try container.decode(String.self, forKey: .currencySymbol) + count = try container.decode(Int.self, forKey: .count) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -106,7 +104,7 @@ public extension PlatformClient { } catch {} do { - min = try container.decode(Int.self, forKey: .min) + selectedMax = try container.decode(Int.self, forKey: .selectedMax) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,15 +112,17 @@ public extension PlatformClient { } catch {} do { - queryFormat = try container.decode(String.self, forKey: .queryFormat) + min = try container.decode(Int.self, forKey: .min) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + isSelected = try container.decode(Bool.self, forKey: .isSelected) + do { - max = try container.decode(Int.self, forKey: .max) + currencyCode = try container.decode(String.self, forKey: .currencyCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension PlatformClient { } catch {} do { - selectedMax = try container.decode(Int.self, forKey: .selectedMax) + currencySymbol = try container.decode(String.self, forKey: .currencySymbol) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,27 +138,27 @@ public extension PlatformClient { } catch {} do { - displayFormat = try container.decode(String.self, forKey: .displayFormat) + queryFormat = try container.decode(String.self, forKey: .queryFormat) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + display = try container.decode(String.self, forKey: .display) + + value = try container.decode(String.self, forKey: .value) + do { - selectedMin = try container.decode(Int.self, forKey: .selectedMin) + max = try container.decode(Int.self, forKey: .max) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - value = try container.decode(String.self, forKey: .value) - - isSelected = try container.decode(Bool.self, forKey: .isSelected) - do { - currencyCode = try container.decode(String.self, forKey: .currencyCode) + selectedMin = try container.decode(Int.self, forKey: .selectedMin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -169,29 +169,29 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(display, forKey: .display) + try? container.encodeIfPresent(displayFormat, forKey: .displayFormat) try? container.encodeIfPresent(count, forKey: .count) - try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) + try? container.encodeIfPresent(selectedMax, forKey: .selectedMax) try? container.encodeIfPresent(min, forKey: .min) - try? container.encodeIfPresent(queryFormat, forKey: .queryFormat) + try? container.encodeIfPresent(isSelected, forKey: .isSelected) - try? container.encodeIfPresent(max, forKey: .max) + try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) - try? container.encodeIfPresent(selectedMax, forKey: .selectedMax) + try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) - try? container.encodeIfPresent(displayFormat, forKey: .displayFormat) + try? container.encodeIfPresent(queryFormat, forKey: .queryFormat) - try? container.encodeIfPresent(selectedMin, forKey: .selectedMin) + try? container.encodeIfPresent(display, forKey: .display) try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(isSelected, forKey: .isSelected) + try? container.encodeIfPresent(max, forKey: .max) - try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) + try? container.encodeIfPresent(selectedMin, forKey: .selectedMin) } } } diff --git a/Sources/code/platform/models/ProductListingDetailPlatformModelClass.swift b/Sources/code/platform/models/ProductListingDetailPlatformModelClass.swift index 2827c6f08b..0962463b3a 100644 --- a/Sources/code/platform/models/ProductListingDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductListingDetailPlatformModelClass.swift @@ -8,179 +8,181 @@ public extension PlatformClient { */ class ProductListingDetail: Codable { - public var color: String? + public var itemType: String? - public var itemCode: String? + public var slug: String - public var ratingCount: Int? + public var price: ProductListingPrice? - public var brand: ProductBrand? + public var teaserTag: [String: Any]? - public var itemType: String? + public var productOnlineDate: String? - public var sellable: Bool? + public var hasVariant: Bool? public var rating: Double? - public var attributes: [String: Any]? + public var sellable: Bool? - public var similars: [String]? + public var attributes: [String: Any]? public var promoMeta: [String: Any]? - public var shortDescription: String? + public var uid: Int? - public var discount: String? + public var color: String? - public var highlights: [String]? + public var tryouts: [String]? public var type: String? - public var uid: Int? + public var name: String? - public var description: String? + public var itemCode: String? - public var medias: [Media1]? + public var groupedAttributes: [ProductDetailGroupedAttribute]? - public var productOnlineDate: String? + public var shortDescription: String? - public var tryouts: [String]? + public var discount: String? - public var price: ProductListingPrice? + public var ratingCount: Int? - public var slug: String + public var description: String? - public var imageNature: String? + public var highlights: [String]? - public var teaserTag: [String: Any]? + public var brand: ProductBrand? - public var name: String? + public var medias: [Media1]? - public var hasVariant: Bool? + public var similars: [String]? - public var groupedAttributes: [ProductDetailGroupedAttribute]? + public var imageNature: String? public enum CodingKeys: String, CodingKey { - case color + case itemType = "item_type" - case itemCode = "item_code" + case slug - case ratingCount = "rating_count" + case price - case brand + case teaserTag = "teaser_tag" - case itemType = "item_type" + case productOnlineDate = "product_online_date" - case sellable + case hasVariant = "has_variant" case rating - case attributes + case sellable - case similars + case attributes case promoMeta = "promo_meta" - case shortDescription = "short_description" + case uid - case discount + case color - case highlights + case tryouts case type - case uid + case name - case description + case itemCode = "item_code" - case medias + case groupedAttributes = "grouped_attributes" - case productOnlineDate = "product_online_date" + case shortDescription = "short_description" - case tryouts + case discount - case price + case ratingCount = "rating_count" - case slug + case description - case imageNature = "image_nature" + case highlights - case teaserTag = "teaser_tag" + case brand - case name + case medias - case hasVariant = "has_variant" + case similars - case groupedAttributes = "grouped_attributes" + case imageNature = "image_nature" } public init(attributes: [String: Any]? = nil, brand: ProductBrand? = nil, color: String? = nil, description: String? = nil, discount: String? = nil, groupedAttributes: [ProductDetailGroupedAttribute]? = nil, hasVariant: Bool? = nil, highlights: [String]? = nil, imageNature: String? = nil, itemCode: String? = nil, itemType: String? = nil, medias: [Media1]? = nil, name: String? = nil, price: ProductListingPrice? = nil, productOnlineDate: String? = nil, promoMeta: [String: Any]? = nil, rating: Double? = nil, ratingCount: Int? = nil, sellable: Bool? = nil, shortDescription: String? = nil, similars: [String]? = nil, slug: String, teaserTag: [String: Any]? = nil, tryouts: [String]? = nil, type: String? = nil, uid: Int? = nil) { - self.color = color + self.itemType = itemType - self.itemCode = itemCode + self.slug = slug - self.ratingCount = ratingCount + self.price = price - self.brand = brand + self.teaserTag = teaserTag - self.itemType = itemType + self.productOnlineDate = productOnlineDate - self.sellable = sellable + self.hasVariant = hasVariant self.rating = rating - self.attributes = attributes + self.sellable = sellable - self.similars = similars + self.attributes = attributes self.promoMeta = promoMeta - self.shortDescription = shortDescription + self.uid = uid - self.discount = discount + self.color = color - self.highlights = highlights + self.tryouts = tryouts self.type = type - self.uid = uid + self.name = name - self.description = description + self.itemCode = itemCode - self.medias = medias + self.groupedAttributes = groupedAttributes - self.productOnlineDate = productOnlineDate + self.shortDescription = shortDescription - self.tryouts = tryouts + self.discount = discount - self.price = price + self.ratingCount = ratingCount - self.slug = slug + self.description = description - self.imageNature = imageNature + self.highlights = highlights - self.teaserTag = teaserTag + self.brand = brand - self.name = name + self.medias = medias - self.hasVariant = hasVariant + self.similars = similars - self.groupedAttributes = groupedAttributes + self.imageNature = imageNature } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - color = try container.decode(String.self, forKey: .color) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + slug = try container.decode(String.self, forKey: .slug) + do { - itemCode = try container.decode(String.self, forKey: .itemCode) + price = try container.decode(ProductListingPrice.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -188,7 +190,7 @@ public extension PlatformClient { } catch {} do { - ratingCount = try container.decode(Int.self, forKey: .ratingCount) + teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -196,7 +198,7 @@ public extension PlatformClient { } catch {} do { - brand = try container.decode(ProductBrand.self, forKey: .brand) + productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -204,7 +206,7 @@ public extension PlatformClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + hasVariant = try container.decode(Bool.self, forKey: .hasVariant) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -212,7 +214,7 @@ public extension PlatformClient { } catch {} do { - sellable = try container.decode(Bool.self, forKey: .sellable) + rating = try container.decode(Double.self, forKey: .rating) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -220,7 +222,7 @@ public extension PlatformClient { } catch {} do { - rating = try container.decode(Double.self, forKey: .rating) + sellable = try container.decode(Bool.self, forKey: .sellable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -236,7 +238,7 @@ public extension PlatformClient { } catch {} do { - similars = try container.decode([String].self, forKey: .similars) + promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -244,7 +246,7 @@ public extension PlatformClient { } catch {} do { - promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -252,7 +254,7 @@ public extension PlatformClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -260,7 +262,7 @@ public extension PlatformClient { } catch {} do { - discount = try container.decode(String.self, forKey: .discount) + tryouts = try container.decode([String].self, forKey: .tryouts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -268,7 +270,7 @@ public extension PlatformClient { } catch {} do { - highlights = try container.decode([String].self, forKey: .highlights) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -276,7 +278,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -284,7 +286,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -292,7 +294,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -300,7 +302,7 @@ public extension PlatformClient { } catch {} do { - medias = try container.decode([Media1].self, forKey: .medias) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -308,7 +310,7 @@ public extension PlatformClient { } catch {} do { - productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -316,7 +318,7 @@ public extension PlatformClient { } catch {} do { - tryouts = try container.decode([String].self, forKey: .tryouts) + ratingCount = try container.decode(Int.self, forKey: .ratingCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -324,17 +326,15 @@ public extension PlatformClient { } catch {} do { - price = try container.decode(ProductListingPrice.self, forKey: .price) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - slug = try container.decode(String.self, forKey: .slug) - do { - imageNature = try container.decode(String.self, forKey: .imageNature) + highlights = try container.decode([String].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -342,7 +342,7 @@ public extension PlatformClient { } catch {} do { - teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) + brand = try container.decode(ProductBrand.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -350,7 +350,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + medias = try container.decode([Media1].self, forKey: .medias) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -358,7 +358,7 @@ public extension PlatformClient { } catch {} do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + similars = try container.decode([String].self, forKey: .similars) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -366,7 +366,7 @@ public extension PlatformClient { } catch {} do { - groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) + imageNature = try container.decode(String.self, forKey: .imageNature) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -377,57 +377,57 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(color, forKey: .color) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(brand, forKey: .brand) + try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) - try? container.encodeIfPresent(sellable, forKey: .sellable) + try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) try? container.encodeIfPresent(rating, forKey: .rating) - try? container.encodeIfPresent(attributes, forKey: .attributes) + try? container.encodeIfPresent(sellable, forKey: .sellable) - try? container.encodeIfPresent(similars, forKey: .similars) + try? container.encodeIfPresent(attributes, forKey: .attributes) try? container.encodeIfPresent(promoMeta, forKey: .promoMeta) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(discount, forKey: .discount) + try? container.encodeIfPresent(color, forKey: .color) - try? container.encodeIfPresent(highlights, forKey: .highlights) + try? container.encodeIfPresent(tryouts, forKey: .tryouts) try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(medias, forKey: .medias) + try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) + try? container.encodeIfPresent(discount, forKey: .discount) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(highlights, forKey: .highlights) - try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(medias, forKey: .medias) - try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + try? container.encodeIfPresent(similars, forKey: .similars) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(imageNature, forKey: .imageNature) } } } diff --git a/Sources/code/platform/models/ProductPlatformModelClass.swift b/Sources/code/platform/models/ProductPlatformModelClass.swift index d70cb9c628..e1e6f6e2f4 100644 --- a/Sources/code/platform/models/ProductPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductPlatformModelClass.swift @@ -8,237 +8,237 @@ public extension PlatformClient { */ class Product: Codable { - public var color: String? + public var currency: String? - public var hsnCode: String? + public var customOrder: [String: Any]? - public var customJson: [String: Any]? + public var itemType: String? - public var primaryColor: String? + public var slug: String? - public var itemCode: String? + public var id: String? - public var countryOfOrigin: String? + public var primaryColor: String? + + public var categoryUid: Int? public var sizes: [[String: Any]]? - public var brand: Brand? + public var images: [Image]? - public var itemType: String? + public var isDependent: Bool? - public var variants: [String: Any]? + public var departments: [Int]? - public var shortDescription: String? + public var isSet: Bool? - public var isDependent: Bool? + public var productPublish: ProductPublished? - public var allSizes: [[String: Any]]? + public var l3Mapping: [String]? - public var sizeGuide: String? + public var uid: Int? - public var templateTag: String? + public var color: String? - public var highlights: [String]? + public var moq: [String: Any]? - public var id: String? + public var name: String? - public var uid: Int? + public var isPhysical: Bool? - public var description: String? + public var multiSize: Bool? - public var departments: [Int]? + public var itemCode: String? - public var slug: String? + public var brandUid: Int? - public var imageNature: String? + public var isActive: Bool? - public var customOrder: [String: Any]? + public var countryOfOrigin: String? - public var name: String? + public var shortDescription: String? - public var images: [Image]? + public var customJson: [String: Any]? public var media: [Media1]? - public var moq: [String: Any]? - - public var categoryUid: Int? + public var description: String? - public var l3Mapping: [String]? + public var highlights: [String]? - public var currency: String? + public var categorySlug: String? - public var isSet: Bool? + public var sizeGuide: String? - public var productPublish: ProductPublished? + public var brand: Brand? - public var isPhysical: Bool? + public var templateTag: String? - public var multiSize: Bool? + public var variants: [String: Any]? - public var categorySlug: String? + public var hsnCode: String? - public var isActive: Bool? + public var allSizes: [[String: Any]]? - public var brandUid: Int? + public var imageNature: String? public enum CodingKeys: String, CodingKey { - case color + case currency - case hsnCode = "hsn_code" + case customOrder = "custom_order" - case customJson = "_custom_json" + case itemType = "item_type" - case primaryColor = "primary_color" + case slug - case itemCode = "item_code" + case id - case countryOfOrigin = "country_of_origin" + case primaryColor = "primary_color" + + case categoryUid = "category_uid" case sizes - case brand + case images - case itemType = "item_type" + case isDependent = "is_dependent" - case variants + case departments - case shortDescription = "short_description" + case isSet = "is_set" - case isDependent = "is_dependent" + case productPublish = "product_publish" - case allSizes = "all_sizes" + case l3Mapping = "l3_mapping" - case sizeGuide = "size_guide" + case uid - case templateTag = "template_tag" + case color - case highlights + case moq - case id + case name - case uid + case isPhysical = "is_physical" - case description + case multiSize = "multi_size" - case departments + case itemCode = "item_code" - case slug + case brandUid = "brand_uid" - case imageNature = "image_nature" + case isActive = "is_active" - case customOrder = "custom_order" + case countryOfOrigin = "country_of_origin" - case name + case shortDescription = "short_description" - case images + case customJson = "_custom_json" case media - case moq - - case categoryUid = "category_uid" + case description - case l3Mapping = "l3_mapping" + case highlights - case currency + case categorySlug = "category_slug" - case isSet = "is_set" + case sizeGuide = "size_guide" - case productPublish = "product_publish" + case brand - case isPhysical = "is_physical" + case templateTag = "template_tag" - case multiSize = "multi_size" + case variants - case categorySlug = "category_slug" + case hsnCode = "hsn_code" - case isActive = "is_active" + case allSizes = "all_sizes" - case brandUid = "brand_uid" + case imageNature = "image_nature" } public init(allSizes: [[String: Any]]? = nil, brand: Brand? = nil, brandUid: Int? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, countryOfOrigin: String? = nil, currency: String? = nil, customOrder: [String: Any]? = nil, departments: [Int]? = nil, description: String? = nil, highlights: [String]? = nil, hsnCode: String? = nil, id: String? = nil, images: [Image]? = nil, imageNature: String? = nil, isActive: Bool? = nil, isDependent: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media1]? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, primaryColor: String? = nil, productPublish: ProductPublished? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, templateTag: String? = nil, uid: Int? = nil, variants: [String: Any]? = nil, customJson: [String: Any]? = nil) { - self.color = color + self.currency = currency - self.hsnCode = hsnCode + self.customOrder = customOrder - self.customJson = customJson + self.itemType = itemType - self.primaryColor = primaryColor + self.slug = slug - self.itemCode = itemCode + self.id = id - self.countryOfOrigin = countryOfOrigin + self.primaryColor = primaryColor + + self.categoryUid = categoryUid self.sizes = sizes - self.brand = brand + self.images = images - self.itemType = itemType + self.isDependent = isDependent - self.variants = variants + self.departments = departments - self.shortDescription = shortDescription + self.isSet = isSet - self.isDependent = isDependent + self.productPublish = productPublish - self.allSizes = allSizes + self.l3Mapping = l3Mapping - self.sizeGuide = sizeGuide + self.uid = uid - self.templateTag = templateTag + self.color = color - self.highlights = highlights + self.moq = moq - self.id = id + self.name = name - self.uid = uid + self.isPhysical = isPhysical - self.description = description + self.multiSize = multiSize - self.departments = departments + self.itemCode = itemCode - self.slug = slug + self.brandUid = brandUid - self.imageNature = imageNature + self.isActive = isActive - self.customOrder = customOrder + self.countryOfOrigin = countryOfOrigin - self.name = name + self.shortDescription = shortDescription - self.images = images + self.customJson = customJson self.media = media - self.moq = moq - - self.categoryUid = categoryUid + self.description = description - self.l3Mapping = l3Mapping + self.highlights = highlights - self.currency = currency + self.categorySlug = categorySlug - self.isSet = isSet + self.sizeGuide = sizeGuide - self.productPublish = productPublish + self.brand = brand - self.isPhysical = isPhysical + self.templateTag = templateTag - self.multiSize = multiSize + self.variants = variants - self.categorySlug = categorySlug + self.hsnCode = hsnCode - self.isActive = isActive + self.allSizes = allSizes - self.brandUid = brandUid + self.imageNature = imageNature } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - color = try container.decode(String.self, forKey: .color) + currency = try container.decode(String.self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -246,7 +246,7 @@ public extension PlatformClient { } catch {} do { - hsnCode = try container.decode(String.self, forKey: .hsnCode) + customOrder = try container.decode([String: Any].self, forKey: .customOrder) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -254,7 +254,7 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -262,7 +262,7 @@ public extension PlatformClient { } catch {} do { - primaryColor = try container.decode(String.self, forKey: .primaryColor) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -270,7 +270,7 @@ public extension PlatformClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -278,7 +278,7 @@ public extension PlatformClient { } catch {} do { - countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) + primaryColor = try container.decode(String.self, forKey: .primaryColor) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -286,7 +286,7 @@ public extension PlatformClient { } catch {} do { - sizes = try container.decode([[String: Any]].self, forKey: .sizes) + categoryUid = try container.decode(Int.self, forKey: .categoryUid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -294,7 +294,7 @@ public extension PlatformClient { } catch {} do { - brand = try container.decode(Brand.self, forKey: .brand) + sizes = try container.decode([[String: Any]].self, forKey: .sizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -302,7 +302,7 @@ public extension PlatformClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + images = try container.decode([Image].self, forKey: .images) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -310,7 +310,7 @@ public extension PlatformClient { } catch {} do { - variants = try container.decode([String: Any].self, forKey: .variants) + isDependent = try container.decode(Bool.self, forKey: .isDependent) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -318,7 +318,7 @@ public extension PlatformClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + departments = try container.decode([Int].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -326,7 +326,7 @@ public extension PlatformClient { } catch {} do { - isDependent = try container.decode(Bool.self, forKey: .isDependent) + isSet = try container.decode(Bool.self, forKey: .isSet) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -334,7 +334,7 @@ public extension PlatformClient { } catch {} do { - allSizes = try container.decode([[String: Any]].self, forKey: .allSizes) + productPublish = try container.decode(ProductPublished.self, forKey: .productPublish) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -342,7 +342,7 @@ public extension PlatformClient { } catch {} do { - sizeGuide = try container.decode(String.self, forKey: .sizeGuide) + l3Mapping = try container.decode([String].self, forKey: .l3Mapping) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -350,7 +350,7 @@ public extension PlatformClient { } catch {} do { - templateTag = try container.decode(String.self, forKey: .templateTag) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -358,7 +358,7 @@ public extension PlatformClient { } catch {} do { - highlights = try container.decode([String].self, forKey: .highlights) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -366,7 +366,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + moq = try container.decode([String: Any].self, forKey: .moq) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -374,7 +374,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -382,7 +382,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + isPhysical = try container.decode(Bool.self, forKey: .isPhysical) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -390,7 +390,7 @@ public extension PlatformClient { } catch {} do { - departments = try container.decode([Int].self, forKey: .departments) + multiSize = try container.decode(Bool.self, forKey: .multiSize) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -398,7 +398,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -406,7 +406,7 @@ public extension PlatformClient { } catch {} do { - imageNature = try container.decode(String.self, forKey: .imageNature) + brandUid = try container.decode(Int.self, forKey: .brandUid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -414,7 +414,7 @@ public extension PlatformClient { } catch {} do { - customOrder = try container.decode([String: Any].self, forKey: .customOrder) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -422,7 +422,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -430,7 +430,7 @@ public extension PlatformClient { } catch {} do { - images = try container.decode([Image].self, forKey: .images) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -438,7 +438,7 @@ public extension PlatformClient { } catch {} do { - media = try container.decode([Media1].self, forKey: .media) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -446,7 +446,7 @@ public extension PlatformClient { } catch {} do { - moq = try container.decode([String: Any].self, forKey: .moq) + media = try container.decode([Media1].self, forKey: .media) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -454,7 +454,7 @@ public extension PlatformClient { } catch {} do { - categoryUid = try container.decode(Int.self, forKey: .categoryUid) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -462,7 +462,7 @@ public extension PlatformClient { } catch {} do { - l3Mapping = try container.decode([String].self, forKey: .l3Mapping) + highlights = try container.decode([String].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -470,7 +470,7 @@ public extension PlatformClient { } catch {} do { - currency = try container.decode(String.self, forKey: .currency) + categorySlug = try container.decode(String.self, forKey: .categorySlug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -478,7 +478,7 @@ public extension PlatformClient { } catch {} do { - isSet = try container.decode(Bool.self, forKey: .isSet) + sizeGuide = try container.decode(String.self, forKey: .sizeGuide) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -486,7 +486,7 @@ public extension PlatformClient { } catch {} do { - productPublish = try container.decode(ProductPublished.self, forKey: .productPublish) + brand = try container.decode(Brand.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -494,7 +494,7 @@ public extension PlatformClient { } catch {} do { - isPhysical = try container.decode(Bool.self, forKey: .isPhysical) + templateTag = try container.decode(String.self, forKey: .templateTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -502,7 +502,7 @@ public extension PlatformClient { } catch {} do { - multiSize = try container.decode(Bool.self, forKey: .multiSize) + variants = try container.decode([String: Any].self, forKey: .variants) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -510,7 +510,7 @@ public extension PlatformClient { } catch {} do { - categorySlug = try container.decode(String.self, forKey: .categorySlug) + hsnCode = try container.decode(String.self, forKey: .hsnCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -518,7 +518,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + allSizes = try container.decode([[String: Any]].self, forKey: .allSizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -526,7 +526,7 @@ public extension PlatformClient { } catch {} do { - brandUid = try container.decode(Int.self, forKey: .brandUid) + imageNature = try container.decode(String.self, forKey: .imageNature) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -537,79 +537,79 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(color, forKey: .color) + try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) + try? container.encodeIfPresent(customOrder, forKey: .customOrder) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(primaryColor, forKey: .primaryColor) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) + try? container.encodeIfPresent(primaryColor, forKey: .primaryColor) + + try? container.encodeIfPresent(categoryUid, forKey: .categoryUid) try? container.encodeIfPresent(sizes, forKey: .sizes) - try? container.encodeIfPresent(brand, forKey: .brand) + try? container.encodeIfPresent(images, forKey: .images) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(isDependent, forKey: .isDependent) - try? container.encodeIfPresent(variants, forKey: .variants) + try? container.encodeIfPresent(departments, forKey: .departments) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(isSet, forKey: .isSet) - try? container.encodeIfPresent(isDependent, forKey: .isDependent) + try? container.encodeIfPresent(productPublish, forKey: .productPublish) - try? container.encodeIfPresent(allSizes, forKey: .allSizes) + try? container.encodeIfPresent(l3Mapping, forKey: .l3Mapping) - try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(templateTag, forKey: .templateTag) + try? container.encodeIfPresent(color, forKey: .color) - try? container.encodeIfPresent(highlights, forKey: .highlights) + try? container.encodeIfPresent(moq, forKey: .moq) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(isPhysical, forKey: .isPhysical) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(multiSize, forKey: .multiSize) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(brandUid, forKey: .brandUid) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(customOrder, forKey: .customOrder) + try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(images, forKey: .images) + try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encodeIfPresent(media, forKey: .media) - try? container.encodeIfPresent(moq, forKey: .moq) - - try? container.encodeIfPresent(categoryUid, forKey: .categoryUid) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(l3Mapping, forKey: .l3Mapping) + try? container.encodeIfPresent(highlights, forKey: .highlights) - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) - try? container.encodeIfPresent(isSet, forKey: .isSet) + try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) - try? container.encodeIfPresent(productPublish, forKey: .productPublish) + try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(isPhysical, forKey: .isPhysical) + try? container.encodeIfPresent(templateTag, forKey: .templateTag) - try? container.encodeIfPresent(multiSize, forKey: .multiSize) + try? container.encodeIfPresent(variants, forKey: .variants) - try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) + try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(allSizes, forKey: .allSizes) - try? container.encodeIfPresent(brandUid, forKey: .brandUid) + try? container.encodeIfPresent(imageNature, forKey: .imageNature) } } } diff --git a/Sources/code/platform/models/ProductPublishPlatformModelClass.swift b/Sources/code/platform/models/ProductPublishPlatformModelClass.swift index bcb866bb87..15c86951d7 100644 --- a/Sources/code/platform/models/ProductPublishPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductPublishPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ProductPublish: Codable { - public var productOnlineDate: String? - public var isSet: Bool? - public enum CodingKeys: String, CodingKey { - case productOnlineDate = "product_online_date" + public var productOnlineDate: String? + public enum CodingKeys: String, CodingKey { case isSet = "is_set" + + case productOnlineDate = "product_online_date" } public init(isSet: Bool? = nil, productOnlineDate: String? = nil) { - self.productOnlineDate = productOnlineDate - self.isSet = isSet + + self.productOnlineDate = productOnlineDate } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + isSet = try container.decode(Bool.self, forKey: .isSet) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - isSet = try container.decode(Bool.self, forKey: .isSet) + productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) - try? container.encodeIfPresent(isSet, forKey: .isSet) + + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) } } } diff --git a/Sources/code/platform/models/ProductPublishedPlatformModelClass.swift b/Sources/code/platform/models/ProductPublishedPlatformModelClass.swift index a0f4e8e50c..4a441d7cb7 100644 --- a/Sources/code/platform/models/ProductPublishedPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductPublishedPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ProductPublished: Codable { - public var productOnlineDate: Int? - public var isSet: Bool? - public enum CodingKeys: String, CodingKey { - case productOnlineDate = "product_online_date" + public var productOnlineDate: Int? + public enum CodingKeys: String, CodingKey { case isSet = "is_set" + + case productOnlineDate = "product_online_date" } public init(isSet: Bool? = nil, productOnlineDate: Int? = nil) { - self.productOnlineDate = productOnlineDate - self.isSet = isSet + + self.productOnlineDate = productOnlineDate } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - productOnlineDate = try container.decode(Int.self, forKey: .productOnlineDate) + isSet = try container.decode(Bool.self, forKey: .isSet) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - isSet = try container.decode(Bool.self, forKey: .isSet) + productOnlineDate = try container.decode(Int.self, forKey: .productOnlineDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) - try? container.encodeIfPresent(isSet, forKey: .isSet) + + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) } } } diff --git a/Sources/code/platform/models/ProductReturnConfigSerializerPlatformModelClass.swift b/Sources/code/platform/models/ProductReturnConfigSerializerPlatformModelClass.swift index 3639ca3852..4f40733a0a 100644 --- a/Sources/code/platform/models/ProductReturnConfigSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductReturnConfigSerializerPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ProductReturnConfigSerializer: Codable { - public var onSameStore: Bool? - public var storeUid: Int? - public enum CodingKeys: String, CodingKey { - case onSameStore = "on_same_store" + public var onSameStore: Bool? + public enum CodingKeys: String, CodingKey { case storeUid = "store_uid" + + case onSameStore = "on_same_store" } public init(onSameStore: Bool? = nil, storeUid: Int? = nil) { - self.onSameStore = onSameStore - self.storeUid = storeUid + + self.onSameStore = onSameStore } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - onSameStore = try container.decode(Bool.self, forKey: .onSameStore) + storeUid = try container.decode(Int.self, forKey: .storeUid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - storeUid = try container.decode(Int.self, forKey: .storeUid) + onSameStore = try container.decode(Bool.self, forKey: .onSameStore) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(onSameStore, forKey: .onSameStore) - try? container.encodeIfPresent(storeUid, forKey: .storeUid) + + try? container.encodeIfPresent(onSameStore, forKey: .onSameStore) } } } diff --git a/Sources/code/platform/models/ProductSizeDeleteResponsePlatformModelClass.swift b/Sources/code/platform/models/ProductSizeDeleteResponsePlatformModelClass.swift index aa5728f523..7302df104f 100644 --- a/Sources/code/platform/models/ProductSizeDeleteResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductSizeDeleteResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ProductSizeDeleteResponse: Codable { - public var success: Bool? - public var data: ProductSizeDeleteDataResponse? - public enum CodingKeys: String, CodingKey { - case success + public var success: Bool? + public enum CodingKeys: String, CodingKey { case data + + case success } public init(data: ProductSizeDeleteDataResponse? = nil, success: Bool? = nil) { - self.success = success - self.data = data + + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - success = try container.decode(Bool.self, forKey: .success) + data = try container.decode(ProductSizeDeleteDataResponse.self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - data = try container.decode(ProductSizeDeleteDataResponse.self, forKey: .data) + success = try container.decode(Bool.self, forKey: .success) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(data, forKey: .data) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/platform/models/ProductSizePlatformModelClass.swift b/Sources/code/platform/models/ProductSizePlatformModelClass.swift index 25f137fe20..f88435b874 100644 --- a/Sources/code/platform/models/ProductSizePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductSizePlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class ProductSize: Codable { - public var min: Int - public var max: Int - public enum CodingKeys: String, CodingKey { - case min + public var min: Int + public enum CodingKeys: String, CodingKey { case max + + case min } public init(max: Int, min: Int) { - self.min = min - self.max = max + + self.min = min } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - min = try container.decode(Int.self, forKey: .min) - max = try container.decode(Int.self, forKey: .max) + + min = try container.decode(Int.self, forKey: .min) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(min, forKey: .min) - try? container.encodeIfPresent(max, forKey: .max) + + try? container.encodeIfPresent(min, forKey: .min) } } } diff --git a/Sources/code/platform/models/ProductTemplatePlatformModelClass.swift b/Sources/code/platform/models/ProductTemplatePlatformModelClass.swift index 14e31cb47d..f116fb05d2 100644 --- a/Sources/code/platform/models/ProductTemplatePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductTemplatePlatformModelClass.swift @@ -8,111 +8,113 @@ public extension PlatformClient { */ class ProductTemplate: Codable { - public var createdBy: [String: Any]? - - public var modifiedOn: String? - - public var categories: [String]? + public var isExpirable: Bool public var tag: String? - public var isArchived: Bool? + public var description: String? - public var createdOn: String? + public var slug: String - public var modifiedBy: [String: Any]? + public var categories: [String]? - public var departments: [String]? + public var name: String? - public var slug: String + public var attributes: [String]? public var isPhysical: Bool - public var isActive: Bool? + public var createdBy: [String: Any]? - public var description: String? + public var modifiedBy: [String: Any]? - public var isExpirable: Bool + public var modifiedOn: String? - public var name: String? + public var isArchived: Bool? - public var attributes: [String]? + public var isActive: Bool? - public var logo: String? + public var createdOn: String? - public enum CodingKeys: String, CodingKey { - case createdBy = "created_by" + public var logo: String? - case modifiedOn = "modified_on" + public var departments: [String]? - case categories + public enum CodingKeys: String, CodingKey { + case isExpirable = "is_expirable" case tag - case isArchived = "is_archived" + case description - case createdOn = "created_on" + case slug - case modifiedBy = "modified_by" + case categories - case departments + case name - case slug + case attributes case isPhysical = "is_physical" - case isActive = "is_active" + case createdBy = "created_by" - case description + case modifiedBy = "modified_by" - case isExpirable = "is_expirable" + case modifiedOn = "modified_on" - case name + case isArchived = "is_archived" - case attributes + case isActive = "is_active" + + case createdOn = "created_on" case logo + + case departments } public init(attributes: [String]? = nil, categories: [String]? = nil, createdBy: [String: Any]? = nil, createdOn: String? = nil, departments: [String]? = nil, description: String? = nil, isActive: Bool? = nil, isArchived: Bool? = nil, isExpirable: Bool, isPhysical: Bool, logo: String? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String? = nil, slug: String, tag: String? = nil) { - self.createdBy = createdBy - - self.modifiedOn = modifiedOn - - self.categories = categories + self.isExpirable = isExpirable self.tag = tag - self.isArchived = isArchived + self.description = description - self.createdOn = createdOn + self.slug = slug - self.modifiedBy = modifiedBy + self.categories = categories - self.departments = departments + self.name = name - self.slug = slug + self.attributes = attributes self.isPhysical = isPhysical - self.isActive = isActive + self.createdBy = createdBy - self.description = description + self.modifiedBy = modifiedBy - self.isExpirable = isExpirable + self.modifiedOn = modifiedOn - self.name = name + self.isArchived = isArchived - self.attributes = attributes + self.isActive = isActive + + self.createdOn = createdOn self.logo = logo + + self.departments = departments } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + isExpirable = try container.decode(Bool.self, forKey: .isExpirable) + do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + tag = try container.decode(String.self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -120,13 +122,15 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + slug = try container.decode(String.self, forKey: .slug) + do { categories = try container.decode([String].self, forKey: .categories) @@ -136,7 +140,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode(String.self, forKey: .tag) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,15 +148,17 @@ public extension PlatformClient { } catch {} do { - isArchived = try container.decode(Bool.self, forKey: .isArchived) + attributes = try container.decode([String].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + isPhysical = try container.decode(Bool.self, forKey: .isPhysical) + do { - createdOn = try container.decode(String.self, forKey: .createdOn) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -168,19 +174,15 @@ public extension PlatformClient { } catch {} do { - departments = try container.decode([String].self, forKey: .departments) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - slug = try container.decode(String.self, forKey: .slug) - - isPhysical = try container.decode(Bool.self, forKey: .isPhysical) - do { - isActive = try container.decode(Bool.self, forKey: .isActive) + isArchived = try container.decode(Bool.self, forKey: .isArchived) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -188,17 +190,15 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - isExpirable = try container.decode(Bool.self, forKey: .isExpirable) - do { - name = try container.decode(String.self, forKey: .name) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +206,7 @@ public extension PlatformClient { } catch {} do { - attributes = try container.decode([String].self, forKey: .attributes) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +214,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(String.self, forKey: .logo) + departments = try container.decode([String].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -225,37 +225,37 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - - try? container.encode(categories, forKey: .categories) + try? container.encodeIfPresent(isExpirable, forKey: .isExpirable) try? container.encodeIfPresent(tag, forKey: .tag) - try? container.encodeIfPresent(isArchived, forKey: .isArchived) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encode(categories, forKey: .categories) - try? container.encode(departments, forKey: .departments) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encode(attributes, forKey: .attributes) try? container.encodeIfPresent(isPhysical, forKey: .isPhysical) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(isExpirable, forKey: .isExpirable) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(isArchived, forKey: .isArchived) - try? container.encode(attributes, forKey: .attributes) + try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(createdOn, forKey: .createdOn) try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encode(departments, forKey: .departments) } } } diff --git a/Sources/code/platform/models/PropertiesPlatformModelClass.swift b/Sources/code/platform/models/PropertiesPlatformModelClass.swift index 66a4d902d4..a3a8a635f3 100644 --- a/Sources/code/platform/models/PropertiesPlatformModelClass.swift +++ b/Sources/code/platform/models/PropertiesPlatformModelClass.swift @@ -8,195 +8,195 @@ public extension PlatformClient { */ class Properties: Codable { - public var hsnCode: [String: Any]? + public var currency: [String: Any]? - public var itemCode: [String: Any]? + public var customOrder: [String: Any]? - public var trader: [String: Any]? + public var itemType: [String: Any]? - public var countryOfOrigin: [String: Any]? + public var slug: [String: Any]? - public var sizes: [String: Any]? + public var teaserTag: [String: Any]? - public var productGroupTag: [String: Any]? + public var returnConfig: [String: Any]? - public var itemType: [String: Any]? + public var sizes: [String: Any]? - public var variants: [String: Any]? + public var isDependent: [String: Any]? - public var traderType: [String: Any]? + public var productGroupTag: [String: Any]? - public var shortDescription: [String: Any]? + public var noOfBoxes: [String: Any]? - public var isDependent: [String: Any]? + public var command: [String: Any]? - public var sizeGuide: [String: Any]? + public var productPublish: [String: Any]? - public var highlights: [String: Any]? + public var moq: [String: Any]? - public var returnConfig: [String: Any]? + public var name: [String: Any]? - public var description: [String: Any]? + public var multiSize: [String: Any]? - public var slug: [String: Any]? + public var itemCode: [String: Any]? - public var customOrder: [String: Any]? + public var brandUid: [String: Any]? - public var noOfBoxes: [String: Any]? + public var isActive: [String: Any]? - public var teaserTag: [String: Any]? + public var countryOfOrigin: [String: Any]? - public var name: [String: Any]? + public var shortDescription: [String: Any]? public var media: [String: Any]? - public var tags: [String: Any]? + public var description: [String: Any]? - public var command: [String: Any]? + public var highlights: [String: Any]? - public var moq: [String: Any]? + public var tags: [String: Any]? - public var multiSize: [String: Any]? + public var categorySlug: [String: Any]? - public var currency: [String: Any]? + public var traderType: [String: Any]? - public var productPublish: [String: Any]? + public var sizeGuide: [String: Any]? - public var categorySlug: [String: Any]? + public var hsnCode: [String: Any]? - public var isActive: [String: Any]? + public var variants: [String: Any]? - public var brandUid: [String: Any]? + public var trader: [String: Any]? public enum CodingKeys: String, CodingKey { - case hsnCode = "hsn_code" + case currency - case itemCode = "item_code" + case customOrder = "custom_order" - case trader + case itemType = "item_type" - case countryOfOrigin = "country_of_origin" + case slug - case sizes + case teaserTag = "teaser_tag" - case productGroupTag = "product_group_tag" + case returnConfig = "return_config" - case itemType = "item_type" + case sizes - case variants + case isDependent = "is_dependent" - case traderType = "trader_type" + case productGroupTag = "product_group_tag" - case shortDescription = "short_description" + case noOfBoxes = "no_of_boxes" - case isDependent = "is_dependent" + case command - case sizeGuide = "size_guide" + case productPublish = "product_publish" - case highlights + case moq - case returnConfig = "return_config" + case name - case description + case multiSize = "multi_size" - case slug + case itemCode = "item_code" - case customOrder = "custom_order" + case brandUid = "brand_uid" - case noOfBoxes = "no_of_boxes" + case isActive = "is_active" - case teaserTag = "teaser_tag" + case countryOfOrigin = "country_of_origin" - case name + case shortDescription = "short_description" case media - case tags + case description - case command + case highlights - case moq + case tags - case multiSize = "multi_size" + case categorySlug = "category_slug" - case currency + case traderType = "trader_type" - case productPublish = "product_publish" + case sizeGuide = "size_guide" - case categorySlug = "category_slug" + case hsnCode = "hsn_code" - case isActive = "is_active" + case variants - case brandUid = "brand_uid" + case trader } public init(brandUid: [String: Any]? = nil, categorySlug: [String: Any]? = nil, command: [String: Any]? = nil, countryOfOrigin: [String: Any]? = nil, currency: [String: Any]? = nil, customOrder: [String: Any]? = nil, description: [String: Any]? = nil, highlights: [String: Any]? = nil, hsnCode: [String: Any]? = nil, isActive: [String: Any]? = nil, isDependent: [String: Any]? = nil, itemCode: [String: Any]? = nil, itemType: [String: Any]? = nil, media: [String: Any]? = nil, moq: [String: Any]? = nil, multiSize: [String: Any]? = nil, name: [String: Any]? = nil, noOfBoxes: [String: Any]? = nil, productGroupTag: [String: Any]? = nil, productPublish: [String: Any]? = nil, returnConfig: [String: Any]? = nil, shortDescription: [String: Any]? = nil, sizes: [String: Any]? = nil, sizeGuide: [String: Any]? = nil, slug: [String: Any]? = nil, tags: [String: Any]? = nil, teaserTag: [String: Any]? = nil, trader: [String: Any]? = nil, traderType: [String: Any]? = nil, variants: [String: Any]? = nil) { - self.hsnCode = hsnCode + self.currency = currency - self.itemCode = itemCode + self.customOrder = customOrder - self.trader = trader + self.itemType = itemType - self.countryOfOrigin = countryOfOrigin + self.slug = slug - self.sizes = sizes + self.teaserTag = teaserTag - self.productGroupTag = productGroupTag + self.returnConfig = returnConfig - self.itemType = itemType + self.sizes = sizes - self.variants = variants + self.isDependent = isDependent - self.traderType = traderType + self.productGroupTag = productGroupTag - self.shortDescription = shortDescription + self.noOfBoxes = noOfBoxes - self.isDependent = isDependent + self.command = command - self.sizeGuide = sizeGuide + self.productPublish = productPublish - self.highlights = highlights + self.moq = moq - self.returnConfig = returnConfig + self.name = name - self.description = description + self.multiSize = multiSize - self.slug = slug + self.itemCode = itemCode - self.customOrder = customOrder + self.brandUid = brandUid - self.noOfBoxes = noOfBoxes + self.isActive = isActive - self.teaserTag = teaserTag + self.countryOfOrigin = countryOfOrigin - self.name = name + self.shortDescription = shortDescription self.media = media - self.tags = tags + self.description = description - self.command = command + self.highlights = highlights - self.moq = moq + self.tags = tags - self.multiSize = multiSize + self.categorySlug = categorySlug - self.currency = currency + self.traderType = traderType - self.productPublish = productPublish + self.sizeGuide = sizeGuide - self.categorySlug = categorySlug + self.hsnCode = hsnCode - self.isActive = isActive + self.variants = variants - self.brandUid = brandUid + self.trader = trader } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - hsnCode = try container.decode([String: Any].self, forKey: .hsnCode) + currency = try container.decode([String: Any].self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -204,7 +204,7 @@ public extension PlatformClient { } catch {} do { - itemCode = try container.decode([String: Any].self, forKey: .itemCode) + customOrder = try container.decode([String: Any].self, forKey: .customOrder) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -212,7 +212,7 @@ public extension PlatformClient { } catch {} do { - trader = try container.decode([String: Any].self, forKey: .trader) + itemType = try container.decode([String: Any].self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -220,7 +220,7 @@ public extension PlatformClient { } catch {} do { - countryOfOrigin = try container.decode([String: Any].self, forKey: .countryOfOrigin) + slug = try container.decode([String: Any].self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -228,7 +228,7 @@ public extension PlatformClient { } catch {} do { - sizes = try container.decode([String: Any].self, forKey: .sizes) + teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -236,7 +236,7 @@ public extension PlatformClient { } catch {} do { - productGroupTag = try container.decode([String: Any].self, forKey: .productGroupTag) + returnConfig = try container.decode([String: Any].self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -244,7 +244,7 @@ public extension PlatformClient { } catch {} do { - itemType = try container.decode([String: Any].self, forKey: .itemType) + sizes = try container.decode([String: Any].self, forKey: .sizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -252,7 +252,7 @@ public extension PlatformClient { } catch {} do { - variants = try container.decode([String: Any].self, forKey: .variants) + isDependent = try container.decode([String: Any].self, forKey: .isDependent) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -260,7 +260,7 @@ public extension PlatformClient { } catch {} do { - traderType = try container.decode([String: Any].self, forKey: .traderType) + productGroupTag = try container.decode([String: Any].self, forKey: .productGroupTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -268,7 +268,7 @@ public extension PlatformClient { } catch {} do { - shortDescription = try container.decode([String: Any].self, forKey: .shortDescription) + noOfBoxes = try container.decode([String: Any].self, forKey: .noOfBoxes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -276,7 +276,7 @@ public extension PlatformClient { } catch {} do { - isDependent = try container.decode([String: Any].self, forKey: .isDependent) + command = try container.decode([String: Any].self, forKey: .command) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -284,7 +284,7 @@ public extension PlatformClient { } catch {} do { - sizeGuide = try container.decode([String: Any].self, forKey: .sizeGuide) + productPublish = try container.decode([String: Any].self, forKey: .productPublish) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -292,7 +292,7 @@ public extension PlatformClient { } catch {} do { - highlights = try container.decode([String: Any].self, forKey: .highlights) + moq = try container.decode([String: Any].self, forKey: .moq) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -300,7 +300,7 @@ public extension PlatformClient { } catch {} do { - returnConfig = try container.decode([String: Any].self, forKey: .returnConfig) + name = try container.decode([String: Any].self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -308,7 +308,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode([String: Any].self, forKey: .description) + multiSize = try container.decode([String: Any].self, forKey: .multiSize) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -316,7 +316,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode([String: Any].self, forKey: .slug) + itemCode = try container.decode([String: Any].self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -324,7 +324,7 @@ public extension PlatformClient { } catch {} do { - customOrder = try container.decode([String: Any].self, forKey: .customOrder) + brandUid = try container.decode([String: Any].self, forKey: .brandUid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -332,7 +332,7 @@ public extension PlatformClient { } catch {} do { - noOfBoxes = try container.decode([String: Any].self, forKey: .noOfBoxes) + isActive = try container.decode([String: Any].self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -340,7 +340,7 @@ public extension PlatformClient { } catch {} do { - teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) + countryOfOrigin = try container.decode([String: Any].self, forKey: .countryOfOrigin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -348,7 +348,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode([String: Any].self, forKey: .name) + shortDescription = try container.decode([String: Any].self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -364,7 +364,7 @@ public extension PlatformClient { } catch {} do { - tags = try container.decode([String: Any].self, forKey: .tags) + description = try container.decode([String: Any].self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -372,7 +372,7 @@ public extension PlatformClient { } catch {} do { - command = try container.decode([String: Any].self, forKey: .command) + highlights = try container.decode([String: Any].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -380,7 +380,7 @@ public extension PlatformClient { } catch {} do { - moq = try container.decode([String: Any].self, forKey: .moq) + tags = try container.decode([String: Any].self, forKey: .tags) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -388,7 +388,7 @@ public extension PlatformClient { } catch {} do { - multiSize = try container.decode([String: Any].self, forKey: .multiSize) + categorySlug = try container.decode([String: Any].self, forKey: .categorySlug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -396,7 +396,7 @@ public extension PlatformClient { } catch {} do { - currency = try container.decode([String: Any].self, forKey: .currency) + traderType = try container.decode([String: Any].self, forKey: .traderType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -404,7 +404,7 @@ public extension PlatformClient { } catch {} do { - productPublish = try container.decode([String: Any].self, forKey: .productPublish) + sizeGuide = try container.decode([String: Any].self, forKey: .sizeGuide) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -412,7 +412,7 @@ public extension PlatformClient { } catch {} do { - categorySlug = try container.decode([String: Any].self, forKey: .categorySlug) + hsnCode = try container.decode([String: Any].self, forKey: .hsnCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -420,7 +420,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode([String: Any].self, forKey: .isActive) + variants = try container.decode([String: Any].self, forKey: .variants) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -428,7 +428,7 @@ public extension PlatformClient { } catch {} do { - brandUid = try container.decode([String: Any].self, forKey: .brandUid) + trader = try container.decode([String: Any].self, forKey: .trader) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -439,65 +439,65 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) + try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(customOrder, forKey: .customOrder) - try? container.encodeIfPresent(trader, forKey: .trader) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(sizes, forKey: .sizes) + try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) - try? container.encodeIfPresent(productGroupTag, forKey: .productGroupTag) + try? container.encodeIfPresent(returnConfig, forKey: .returnConfig) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(sizes, forKey: .sizes) - try? container.encodeIfPresent(variants, forKey: .variants) + try? container.encodeIfPresent(isDependent, forKey: .isDependent) - try? container.encodeIfPresent(traderType, forKey: .traderType) + try? container.encodeIfPresent(productGroupTag, forKey: .productGroupTag) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(noOfBoxes, forKey: .noOfBoxes) - try? container.encodeIfPresent(isDependent, forKey: .isDependent) + try? container.encodeIfPresent(command, forKey: .command) - try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) + try? container.encodeIfPresent(productPublish, forKey: .productPublish) - try? container.encodeIfPresent(highlights, forKey: .highlights) + try? container.encodeIfPresent(moq, forKey: .moq) - try? container.encodeIfPresent(returnConfig, forKey: .returnConfig) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(multiSize, forKey: .multiSize) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(customOrder, forKey: .customOrder) + try? container.encodeIfPresent(brandUid, forKey: .brandUid) - try? container.encodeIfPresent(noOfBoxes, forKey: .noOfBoxes) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) try? container.encodeIfPresent(media, forKey: .media) - try? container.encodeIfPresent(tags, forKey: .tags) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(command, forKey: .command) + try? container.encodeIfPresent(highlights, forKey: .highlights) - try? container.encodeIfPresent(moq, forKey: .moq) + try? container.encodeIfPresent(tags, forKey: .tags) - try? container.encodeIfPresent(multiSize, forKey: .multiSize) + try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(traderType, forKey: .traderType) - try? container.encodeIfPresent(productPublish, forKey: .productPublish) + try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) - try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) + try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(variants, forKey: .variants) - try? container.encodeIfPresent(brandUid, forKey: .brandUid) + try? container.encodeIfPresent(trader, forKey: .trader) } } } diff --git a/Sources/code/platform/models/RefundAccountResponsePlatformModelClass.swift b/Sources/code/platform/models/RefundAccountResponsePlatformModelClass.swift index 048798ce64..7ccc310ac4 100644 --- a/Sources/code/platform/models/RefundAccountResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/RefundAccountResponsePlatformModelClass.swift @@ -8,68 +8,68 @@ public extension PlatformClient { */ class RefundAccountResponse: Codable { + public var data: [String: Any]? + public var isVerifiedFlag: Bool? public var success: Bool public var message: String - public var data: [String: Any]? - public enum CodingKeys: String, CodingKey { + case data + case isVerifiedFlag = "is_verified_flag" case success case message - - case data } public init(data: [String: Any]? = nil, isVerifiedFlag: Bool? = nil, message: String, success: Bool) { + self.data = data + self.isVerifiedFlag = isVerifiedFlag self.success = success self.message = message - - self.data = data } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - isVerifiedFlag = try container.decode(Bool.self, forKey: .isVerifiedFlag) + data = try container.decode([String: Any].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - success = try container.decode(Bool.self, forKey: .success) - - message = try container.decode(String.self, forKey: .message) - do { - data = try container.decode([String: Any].self, forKey: .data) + isVerifiedFlag = try container.decode(Bool.self, forKey: .isVerifiedFlag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + success = try container.decode(Bool.self, forKey: .success) + + message = try container.decode(String.self, forKey: .message) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(data, forKey: .data) + try? container.encodeIfPresent(isVerifiedFlag, forKey: .isVerifiedFlag) try? container.encodeIfPresent(success, forKey: .success) try? container.encodeIfPresent(message, forKey: .message) - - try? container.encodeIfPresent(data, forKey: .data) } } } diff --git a/Sources/code/platform/models/RootPaymentModePlatformModelClass.swift b/Sources/code/platform/models/RootPaymentModePlatformModelClass.swift index 4ab8816c5b..17b0fa63b6 100644 --- a/Sources/code/platform/models/RootPaymentModePlatformModelClass.swift +++ b/Sources/code/platform/models/RootPaymentModePlatformModelClass.swift @@ -8,67 +8,63 @@ public extension PlatformClient { */ class RootPaymentMode: Codable { - public var name: String + public var aggregatorName: String? + + public var anonymousEnable: Bool? public var addCardEnabled: Bool? - public var displayPriority: Int + public var name: String - public var anonymousEnable: Bool? + public var displayPriority: Int public var list: [PaymentModeList]? - public var aggregatorName: String? - public var displayName: String public enum CodingKeys: String, CodingKey { - case name + case aggregatorName = "aggregator_name" + + case anonymousEnable = "anonymous_enable" case addCardEnabled = "add_card_enabled" - case displayPriority = "display_priority" + case name - case anonymousEnable = "anonymous_enable" + case displayPriority = "display_priority" case list - case aggregatorName = "aggregator_name" - case displayName = "display_name" } public init(addCardEnabled: Bool? = nil, aggregatorName: String? = nil, anonymousEnable: Bool? = nil, displayName: String, displayPriority: Int, list: [PaymentModeList]? = nil, name: String) { - self.name = name + self.aggregatorName = aggregatorName + + self.anonymousEnable = anonymousEnable self.addCardEnabled = addCardEnabled - self.displayPriority = displayPriority + self.name = name - self.anonymousEnable = anonymousEnable + self.displayPriority = displayPriority self.list = list - self.aggregatorName = aggregatorName - self.displayName = displayName } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decode(String.self, forKey: .name) - do { - addCardEnabled = try container.decode(Bool.self, forKey: .addCardEnabled) + aggregatorName = try container.decode(String.self, forKey: .aggregatorName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - displayPriority = try container.decode(Int.self, forKey: .displayPriority) - do { anonymousEnable = try container.decode(Bool.self, forKey: .anonymousEnable) @@ -78,15 +74,19 @@ public extension PlatformClient { } catch {} do { - list = try container.decode([PaymentModeList].self, forKey: .list) + addCardEnabled = try container.decode(Bool.self, forKey: .addCardEnabled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + + displayPriority = try container.decode(Int.self, forKey: .displayPriority) + do { - aggregatorName = try container.decode(String.self, forKey: .aggregatorName) + list = try container.decode([PaymentModeList].self, forKey: .list) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -99,18 +99,18 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encode(aggregatorName, forKey: .aggregatorName) + + try? container.encode(anonymousEnable, forKey: .anonymousEnable) try? container.encode(addCardEnabled, forKey: .addCardEnabled) - try? container.encodeIfPresent(displayPriority, forKey: .displayPriority) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encode(anonymousEnable, forKey: .anonymousEnable) + try? container.encodeIfPresent(displayPriority, forKey: .displayPriority) try? container.encodeIfPresent(list, forKey: .list) - try? container.encode(aggregatorName, forKey: .aggregatorName) - try? container.encodeIfPresent(displayName, forKey: .displayName) } } diff --git a/Sources/code/platform/models/SaveSubscriptionSetupIntentResponsePlatformModelClass.swift b/Sources/code/platform/models/SaveSubscriptionSetupIntentResponsePlatformModelClass.swift index fee49c9394..86c3227cd9 100644 --- a/Sources/code/platform/models/SaveSubscriptionSetupIntentResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/SaveSubscriptionSetupIntentResponsePlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class SaveSubscriptionSetupIntentResponse: Codable { - public var success: Bool - public var data: [String: Any] - public enum CodingKeys: String, CodingKey { - case success + public var success: Bool + public enum CodingKeys: String, CodingKey { case data + + case success } public init(data: [String: Any], success: Bool) { - self.success = success - self.data = data + + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - success = try container.decode(Bool.self, forKey: .success) - data = try container.decode([String: Any].self, forKey: .data) + + success = try container.decode(Bool.self, forKey: .success) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(data, forKey: .data) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/platform/models/SecondLevelChildPlatformModelClass.swift b/Sources/code/platform/models/SecondLevelChildPlatformModelClass.swift index aa531a781d..477832488b 100644 --- a/Sources/code/platform/models/SecondLevelChildPlatformModelClass.swift +++ b/Sources/code/platform/models/SecondLevelChildPlatformModelClass.swift @@ -8,48 +8,48 @@ public extension PlatformClient { */ class SecondLevelChild: Codable { - public var customJson: [String: Any]? + public var action: Action? public var slug: String? - public var uid: Int? + public var name: String? public var banners: ImageUrls? - public var name: String? + public var uid: Int? - public var action: Action? + public var customJson: [String: Any]? public var childs: [ThirdLevelChild]? public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + case action case slug - case uid + case name case banners - case name + case uid - case action + case customJson = "_custom_json" case childs } public init(action: Action? = nil, banners: ImageUrls? = nil, childs: [ThirdLevelChild]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { - self.customJson = customJson + self.action = action self.slug = slug - self.uid = uid + self.name = name self.banners = banners - self.name = name + self.uid = uid - self.action = action + self.customJson = customJson self.childs = childs } @@ -58,7 +58,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +74,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} do { - action = try container.decode(Action.self, forKey: .action) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -117,17 +117,17 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(action, forKey: .action) try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encodeIfPresent(childs, forKey: .childs) } diff --git a/Sources/code/platform/models/SellerPhoneNumberPlatformModelClass.swift b/Sources/code/platform/models/SellerPhoneNumberPlatformModelClass.swift index 676bfcec21..8b6fdc15bb 100644 --- a/Sources/code/platform/models/SellerPhoneNumberPlatformModelClass.swift +++ b/Sources/code/platform/models/SellerPhoneNumberPlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class SellerPhoneNumber: Codable { - public var countryCode: Int - public var number: String - public enum CodingKeys: String, CodingKey { - case countryCode = "country_code" + public var countryCode: Int + public enum CodingKeys: String, CodingKey { case number + + case countryCode = "country_code" } public init(countryCode: Int, number: String) { - self.countryCode = countryCode - self.number = number + + self.countryCode = countryCode } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - countryCode = try container.decode(Int.self, forKey: .countryCode) - number = try container.decode(String.self, forKey: .number) + + countryCode = try container.decode(Int.self, forKey: .countryCode) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(countryCode, forKey: .countryCode) - try? container.encodeIfPresent(number, forKey: .number) + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) } } } diff --git a/Sources/code/platform/models/Size1PlatformModelClass.swift b/Sources/code/platform/models/Size1PlatformModelClass.swift index 5032ab4736..fb028f3460 100644 --- a/Sources/code/platform/models/Size1PlatformModelClass.swift +++ b/Sources/code/platform/models/Size1PlatformModelClass.swift @@ -8,129 +8,131 @@ public extension PlatformClient { */ class Size1: Codable { - public var itemLength: Double? + public var isSet: Bool? + + public var currency: String public var size: String? - public var quantity: Int + public var itemWeightUnitOfMeasure: String? - public var expirationDate: String? + public var sellerIdentifier: String public var price: Double - public var isSet: Bool? - - public var itemHeight: Double? + public var priceTransfer: Double? - public var itemWidth: Double? + public var expirationDate: String? - public var itemWeight: Double? + public var priceEffective: Double - public var itemWeightUnitOfMeasure: String? + public var itemHeight: Double? - public var storeCode: String + public var itemDimensionsUnitOfMeasure: String? - public var set: InventorySet? + public var itemWeight: Double? public var identifiers: [[String: Any]]? - public var priceTransfer: Double? + public var quantity: Int - public var currency: String + public var set: InventorySet? - public var sellerIdentifier: String + public var storeCode: String - public var priceEffective: Double + public var itemLength: Double? - public var itemDimensionsUnitOfMeasure: String? + public var itemWidth: Double? public enum CodingKeys: String, CodingKey { - case itemLength = "item_length" + case isSet = "is_set" + + case currency case size - case quantity + case itemWeightUnitOfMeasure = "item_weight_unit_of_measure" - case expirationDate = "expiration_date" + case sellerIdentifier = "seller_identifier" case price - case isSet = "is_set" - - case itemHeight = "item_height" + case priceTransfer = "price_transfer" - case itemWidth = "item_width" + case expirationDate = "expiration_date" - case itemWeight = "item_weight" + case priceEffective = "price_effective" - case itemWeightUnitOfMeasure = "item_weight_unit_of_measure" + case itemHeight = "item_height" - case storeCode = "store_code" + case itemDimensionsUnitOfMeasure = "item_dimensions_unit_of_measure" - case set + case itemWeight = "item_weight" case identifiers - case priceTransfer = "price_transfer" + case quantity - case currency + case set - case sellerIdentifier = "seller_identifier" + case storeCode = "store_code" - case priceEffective = "price_effective" + case itemLength = "item_length" - case itemDimensionsUnitOfMeasure = "item_dimensions_unit_of_measure" + case itemWidth = "item_width" } public init(currency: String, expirationDate: String? = nil, identifiers: [[String: Any]]? = nil, isSet: Bool? = nil, itemDimensionsUnitOfMeasure: String? = nil, itemHeight: Double? = nil, itemLength: Double? = nil, itemWeight: Double? = nil, itemWeightUnitOfMeasure: String? = nil, itemWidth: Double? = nil, price: Double, priceEffective: Double, priceTransfer: Double? = nil, quantity: Int, sellerIdentifier: String, set: InventorySet? = nil, size: String? = nil, storeCode: String) { - self.itemLength = itemLength + self.isSet = isSet + + self.currency = currency self.size = size - self.quantity = quantity + self.itemWeightUnitOfMeasure = itemWeightUnitOfMeasure - self.expirationDate = expirationDate + self.sellerIdentifier = sellerIdentifier self.price = price - self.isSet = isSet - - self.itemHeight = itemHeight + self.priceTransfer = priceTransfer - self.itemWidth = itemWidth + self.expirationDate = expirationDate - self.itemWeight = itemWeight + self.priceEffective = priceEffective - self.itemWeightUnitOfMeasure = itemWeightUnitOfMeasure + self.itemHeight = itemHeight - self.storeCode = storeCode + self.itemDimensionsUnitOfMeasure = itemDimensionsUnitOfMeasure - self.set = set + self.itemWeight = itemWeight self.identifiers = identifiers - self.priceTransfer = priceTransfer + self.quantity = quantity - self.currency = currency + self.set = set - self.sellerIdentifier = sellerIdentifier + self.storeCode = storeCode - self.priceEffective = priceEffective + self.itemLength = itemLength - self.itemDimensionsUnitOfMeasure = itemDimensionsUnitOfMeasure + self.itemWidth = itemWidth } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - itemLength = try container.decode(Double.self, forKey: .itemLength) + isSet = try container.decode(Bool.self, forKey: .isSet) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + currency = try container.decode(String.self, forKey: .currency) + do { size = try container.decode(String.self, forKey: .size) @@ -139,20 +141,20 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - quantity = try container.decode(Int.self, forKey: .quantity) - do { - expirationDate = try container.decode(String.self, forKey: .expirationDate) + itemWeightUnitOfMeasure = try container.decode(String.self, forKey: .itemWeightUnitOfMeasure) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + sellerIdentifier = try container.decode(String.self, forKey: .sellerIdentifier) + price = try container.decode(Double.self, forKey: .price) do { - isSet = try container.decode(Bool.self, forKey: .isSet) + priceTransfer = try container.decode(Double.self, forKey: .priceTransfer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -160,15 +162,17 @@ public extension PlatformClient { } catch {} do { - itemHeight = try container.decode(Double.self, forKey: .itemHeight) + expirationDate = try container.decode(String.self, forKey: .expirationDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + priceEffective = try container.decode(Double.self, forKey: .priceEffective) + do { - itemWidth = try container.decode(Double.self, forKey: .itemWidth) + itemHeight = try container.decode(Double.self, forKey: .itemHeight) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +180,7 @@ public extension PlatformClient { } catch {} do { - itemWeight = try container.decode(Double.self, forKey: .itemWeight) + itemDimensionsUnitOfMeasure = try container.decode(String.self, forKey: .itemDimensionsUnitOfMeasure) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -184,47 +188,43 @@ public extension PlatformClient { } catch {} do { - itemWeightUnitOfMeasure = try container.decode(String.self, forKey: .itemWeightUnitOfMeasure) + itemWeight = try container.decode(Double.self, forKey: .itemWeight) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - storeCode = try container.decode(String.self, forKey: .storeCode) - do { - set = try container.decode(InventorySet.self, forKey: .set) + identifiers = try container.decode([[String: Any]].self, forKey: .identifiers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + quantity = try container.decode(Int.self, forKey: .quantity) + do { - identifiers = try container.decode([[String: Any]].self, forKey: .identifiers) + set = try container.decode(InventorySet.self, forKey: .set) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + storeCode = try container.decode(String.self, forKey: .storeCode) + do { - priceTransfer = try container.decode(Double.self, forKey: .priceTransfer) + itemLength = try container.decode(Double.self, forKey: .itemLength) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - currency = try container.decode(String.self, forKey: .currency) - - sellerIdentifier = try container.decode(String.self, forKey: .sellerIdentifier) - - priceEffective = try container.decode(Double.self, forKey: .priceEffective) - do { - itemDimensionsUnitOfMeasure = try container.decode(String.self, forKey: .itemDimensionsUnitOfMeasure) + itemWidth = try container.decode(Double.self, forKey: .itemWidth) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -235,41 +235,41 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(itemLength, forKey: .itemLength) + try? container.encodeIfPresent(isSet, forKey: .isSet) + + try? container.encodeIfPresent(currency, forKey: .currency) try? container.encode(size, forKey: .size) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encode(itemWeightUnitOfMeasure, forKey: .itemWeightUnitOfMeasure) - try? container.encodeIfPresent(expirationDate, forKey: .expirationDate) + try? container.encodeIfPresent(sellerIdentifier, forKey: .sellerIdentifier) try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(isSet, forKey: .isSet) - - try? container.encode(itemHeight, forKey: .itemHeight) + try? container.encode(priceTransfer, forKey: .priceTransfer) - try? container.encode(itemWidth, forKey: .itemWidth) + try? container.encodeIfPresent(expirationDate, forKey: .expirationDate) - try? container.encode(itemWeight, forKey: .itemWeight) + try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) - try? container.encode(itemWeightUnitOfMeasure, forKey: .itemWeightUnitOfMeasure) + try? container.encode(itemHeight, forKey: .itemHeight) - try? container.encodeIfPresent(storeCode, forKey: .storeCode) + try? container.encode(itemDimensionsUnitOfMeasure, forKey: .itemDimensionsUnitOfMeasure) - try? container.encodeIfPresent(set, forKey: .set) + try? container.encode(itemWeight, forKey: .itemWeight) try? container.encode(identifiers, forKey: .identifiers) - try? container.encode(priceTransfer, forKey: .priceTransfer) + try? container.encodeIfPresent(quantity, forKey: .quantity) - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(set, forKey: .set) - try? container.encodeIfPresent(sellerIdentifier, forKey: .sellerIdentifier) + try? container.encodeIfPresent(storeCode, forKey: .storeCode) - try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + try? container.encode(itemLength, forKey: .itemLength) - try? container.encode(itemDimensionsUnitOfMeasure, forKey: .itemDimensionsUnitOfMeasure) + try? container.encode(itemWidth, forKey: .itemWidth) } } } diff --git a/Sources/code/platform/models/SizeGuideResponsePlatformModelClass.swift b/Sources/code/platform/models/SizeGuideResponsePlatformModelClass.swift index e213f1f246..03d4151bd7 100644 --- a/Sources/code/platform/models/SizeGuideResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/SizeGuideResponsePlatformModelClass.swift @@ -8,93 +8,93 @@ public extension PlatformClient { */ class SizeGuideResponse: Codable { - public var companyId: Int? + public var tag: String? - public var guide: [String: Any]? + public var id: String? public var createdBy: [String: Any]? - public var modifiedOn: String? - - public var title: String? + public var name: String? - public var createdOn: String? + public var active: Bool? - public var tag: String? + public var title: String? - public var id: String? + public var brandId: Int? public var modifiedBy: [String: Any]? - public var active: Bool? + public var companyId: Int? public var subtitle: String? - public var brandId: Int? + public var modifiedOn: String? - public var name: String? + public var guide: [String: Any]? + + public var createdOn: String? public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + case tag - case guide + case id case createdBy = "created_by" - case modifiedOn = "modified_on" - - case title + case name - case createdOn = "created_on" + case active - case tag + case title - case id + case brandId = "brand_id" case modifiedBy = "modified_by" - case active + case companyId = "company_id" case subtitle - case brandId = "brand_id" + case modifiedOn = "modified_on" - case name + case guide + + case createdOn = "created_on" } public init(active: Bool? = nil, brandId: Int? = nil, companyId: Int? = nil, createdBy: [String: Any]? = nil, createdOn: String? = nil, guide: [String: Any]? = nil, id: String? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String? = nil, subtitle: String? = nil, tag: String? = nil, title: String? = nil) { - self.companyId = companyId + self.tag = tag - self.guide = guide + self.id = id self.createdBy = createdBy - self.modifiedOn = modifiedOn - - self.title = title + self.name = name - self.createdOn = createdOn + self.active = active - self.tag = tag + self.title = title - self.id = id + self.brandId = brandId self.modifiedBy = modifiedBy - self.active = active + self.companyId = companyId self.subtitle = subtitle - self.brandId = brandId + self.modifiedOn = modifiedOn - self.name = name + self.guide = guide + + self.createdOn = createdOn } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - companyId = try container.decode(Int.self, forKey: .companyId) + tag = try container.decode(String.self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,7 +102,7 @@ public extension PlatformClient { } catch {} do { - guide = try container.decode([String: Any].self, forKey: .guide) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -118,7 +118,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } catch {} do { - title = try container.decode(String.self, forKey: .title) + active = try container.decode(Bool.self, forKey: .active) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,7 +142,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode(String.self, forKey: .tag) + brandId = try container.decode(Int.self, forKey: .brandId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,7 +166,7 @@ public extension PlatformClient { } catch {} do { - active = try container.decode(Bool.self, forKey: .active) + subtitle = try container.decode(String.self, forKey: .subtitle) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - subtitle = try container.decode(String.self, forKey: .subtitle) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +182,7 @@ public extension PlatformClient { } catch {} do { - brandId = try container.decode(Int.self, forKey: .brandId) + guide = try container.decode([String: Any].self, forKey: .guide) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -201,31 +201,31 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(tag, forKey: .tag) - try? container.encodeIfPresent(guide, forKey: .guide) + try? container.encodeIfPresent(id, forKey: .id) try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - - try? container.encodeIfPresent(title, forKey: .title) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(active, forKey: .active) - try? container.encodeIfPresent(tag, forKey: .tag) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(brandId, forKey: .brandId) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(active, forKey: .active) + try? container.encodeIfPresent(companyId, forKey: .companyId) try? container.encodeIfPresent(subtitle, forKey: .subtitle) - try? container.encodeIfPresent(brandId, forKey: .brandId) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(guide, forKey: .guide) + + try? container.encodeIfPresent(createdOn, forKey: .createdOn) } } } diff --git a/Sources/code/platform/models/SizePlatformModelClass.swift b/Sources/code/platform/models/SizePlatformModelClass.swift index 7022b1a3c0..1523300179 100644 --- a/Sources/code/platform/models/SizePlatformModelClass.swift +++ b/Sources/code/platform/models/SizePlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class Size: Codable { - public var display: String? + public var quantity: Int? public var value: String? - public var isAvailable: Bool? + public var display: String? - public var quantity: Int? + public var isAvailable: Bool? public enum CodingKeys: String, CodingKey { - case display + case quantity case value - case isAvailable = "is_available" + case display - case quantity + case isAvailable = "is_available" } public init(display: String? = nil, isAvailable: Bool? = nil, quantity: Int? = nil, value: String? = nil) { - self.display = display + self.quantity = quantity self.value = value - self.isAvailable = isAvailable + self.display = display - self.quantity = quantity + self.isAvailable = isAvailable } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - display = try container.decode(String.self, forKey: .display) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - isAvailable = try container.decode(Bool.self, forKey: .isAvailable) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + isAvailable = try container.decode(Bool.self, forKey: .isAvailable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(display, forKey: .display) + try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) + try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) } } } diff --git a/Sources/code/platform/models/StoreAssignResponsePlatformModelClass.swift b/Sources/code/platform/models/StoreAssignResponsePlatformModelClass.swift index 3b6b74e213..c75c526eed 100644 --- a/Sources/code/platform/models/StoreAssignResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/StoreAssignResponsePlatformModelClass.swift @@ -8,127 +8,129 @@ public extension PlatformClient { */ class StoreAssignResponse: Codable { - public var itemId: Int + public var sCity: String? - public var companyId: Int? + public var status: Bool - public var groupId: String? + public var size: String - public var sCity: String? + public var id: String? - public var size: String + public var priceMarked: Int? + + public var meta: [String: Any]? public var storeId: Int? - public var quantity: Int + public var groupId: String? - public var index: Int? + public var strategyWiseListing: [[String: Any]]? public var priceEffective: Int? - public var meta: [String: Any]? + public var companyId: Int? - public var uid: String? + public var storePincode: Int? - public var id: String? + public var quantity: Int - public var strategyWiseListing: [[String: Any]]? + public var uid: String? - public var storePincode: Int? + public var itemId: Int public var articleAssignment: ArticleAssignment1 - public var status: Bool - - public var priceMarked: Int? + public var index: Int? public enum CodingKeys: String, CodingKey { - case itemId = "item_id" + case sCity = "s_city" - case companyId = "company_id" + case status - case groupId = "group_id" + case size - case sCity = "s_city" + case id = "_id" - case size + case priceMarked = "price_marked" + + case meta case storeId = "store_id" - case quantity + case groupId = "group_id" - case index + case strategyWiseListing = "strategy_wise_listing" case priceEffective = "price_effective" - case meta + case companyId = "company_id" - case uid + case storePincode = "store_pincode" - case id = "_id" + case quantity - case strategyWiseListing = "strategy_wise_listing" + case uid - case storePincode = "store_pincode" + case itemId = "item_id" case articleAssignment = "article_assignment" - case status - - case priceMarked = "price_marked" + case index } public init(articleAssignment: ArticleAssignment1, companyId: Int? = nil, groupId: String? = nil, index: Int? = nil, itemId: Int, meta: [String: Any]? = nil, priceEffective: Int? = nil, priceMarked: Int? = nil, quantity: Int, size: String, status: Bool, storeId: Int? = nil, storePincode: Int? = nil, strategyWiseListing: [[String: Any]]? = nil, sCity: String? = nil, uid: String? = nil, id: String? = nil) { - self.itemId = itemId + self.sCity = sCity - self.companyId = companyId + self.status = status - self.groupId = groupId + self.size = size - self.sCity = sCity + self.id = id - self.size = size + self.priceMarked = priceMarked + + self.meta = meta self.storeId = storeId - self.quantity = quantity + self.groupId = groupId - self.index = index + self.strategyWiseListing = strategyWiseListing self.priceEffective = priceEffective - self.meta = meta + self.companyId = companyId - self.uid = uid + self.storePincode = storePincode - self.id = id + self.quantity = quantity - self.strategyWiseListing = strategyWiseListing + self.uid = uid - self.storePincode = storePincode + self.itemId = itemId self.articleAssignment = articleAssignment - self.status = status - - self.priceMarked = priceMarked + self.index = index } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - itemId = try container.decode(Int.self, forKey: .itemId) - do { - companyId = try container.decode(Int.self, forKey: .companyId) + sCity = try container.decode(String.self, forKey: .sCity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + status = try container.decode(Bool.self, forKey: .status) + + size = try container.decode(String.self, forKey: .size) + do { - groupId = try container.decode(String.self, forKey: .groupId) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -136,27 +138,23 @@ public extension PlatformClient { } catch {} do { - sCity = try container.decode(String.self, forKey: .sCity) + priceMarked = try container.decode(Int.self, forKey: .priceMarked) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - size = try container.decode(String.self, forKey: .size) - do { - storeId = try container.decode(Int.self, forKey: .storeId) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - quantity = try container.decode(Int.self, forKey: .quantity) - do { - index = try container.decode(Int.self, forKey: .index) + storeId = try container.decode(Int.self, forKey: .storeId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -164,7 +162,7 @@ public extension PlatformClient { } catch {} do { - priceEffective = try container.decode(Int.self, forKey: .priceEffective) + groupId = try container.decode(String.self, forKey: .groupId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -172,7 +170,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + strategyWiseListing = try container.decode([[String: Any]].self, forKey: .strategyWiseListing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -180,7 +178,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(String.self, forKey: .uid) + priceEffective = try container.decode(Int.self, forKey: .priceEffective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -188,7 +186,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -196,27 +194,29 @@ public extension PlatformClient { } catch {} do { - strategyWiseListing = try container.decode([[String: Any]].self, forKey: .strategyWiseListing) + storePincode = try container.decode(Int.self, forKey: .storePincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + quantity = try container.decode(Int.self, forKey: .quantity) + do { - storePincode = try container.decode(Int.self, forKey: .storePincode) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - articleAssignment = try container.decode(ArticleAssignment1.self, forKey: .articleAssignment) + itemId = try container.decode(Int.self, forKey: .itemId) - status = try container.decode(Bool.self, forKey: .status) + articleAssignment = try container.decode(ArticleAssignment1.self, forKey: .articleAssignment) do { - priceMarked = try container.decode(Int.self, forKey: .priceMarked) + index = try container.decode(Int.self, forKey: .index) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -227,39 +227,39 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(itemId, forKey: .itemId) + try? container.encodeIfPresent(sCity, forKey: .sCity) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(groupId, forKey: .groupId) + try? container.encodeIfPresent(size, forKey: .size) - try? container.encodeIfPresent(sCity, forKey: .sCity) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(size, forKey: .size) + try? container.encodeIfPresent(priceMarked, forKey: .priceMarked) + + try? container.encodeIfPresent(meta, forKey: .meta) try? container.encodeIfPresent(storeId, forKey: .storeId) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(groupId, forKey: .groupId) - try? container.encodeIfPresent(index, forKey: .index) + try? container.encodeIfPresent(strategyWiseListing, forKey: .strategyWiseListing) try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(storePincode, forKey: .storePincode) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(quantity, forKey: .quantity) - try? container.encodeIfPresent(strategyWiseListing, forKey: .strategyWiseListing) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(storePincode, forKey: .storePincode) + try? container.encodeIfPresent(itemId, forKey: .itemId) try? container.encodeIfPresent(articleAssignment, forKey: .articleAssignment) - try? container.encodeIfPresent(status, forKey: .status) - - try? container.encodeIfPresent(priceMarked, forKey: .priceMarked) + try? container.encodeIfPresent(index, forKey: .index) } } } diff --git a/Sources/code/platform/models/StoreDetailPlatformModelClass.swift b/Sources/code/platform/models/StoreDetailPlatformModelClass.swift index 4ebbe6625b..13e82118b7 100644 --- a/Sources/code/platform/models/StoreDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/StoreDetailPlatformModelClass.swift @@ -8,81 +8,81 @@ public extension PlatformClient { */ class StoreDetail: Codable { - public var companyId: Int? + public var timing: [String: Any]? + + public var name: String? public var additionalContacts: [[String: Any]]? + public var companyId: Int? + + public var storeType: String? + public var modifiedOn: String? public var displayName: String? - public var createdOn: String? + public var uid: Int? - public var timing: [String: Any]? + public var documents: [[String: Any]]? - public var uid: Int? + public var createdOn: String? public var storeCode: String? - public var storeType: String? + public enum CodingKeys: String, CodingKey { + case timing - public var documents: [[String: Any]]? + case name - public var name: String? + case additionalContacts = "additional_contacts" - public enum CodingKeys: String, CodingKey { case companyId = "company_id" - case additionalContacts = "additional_contacts" + case storeType = "store_type" case modifiedOn = "modified_on" case displayName = "display_name" - case createdOn = "created_on" + case uid - case timing + case documents - case uid + case createdOn = "created_on" case storeCode = "store_code" + } - case storeType = "store_type" + public init(additionalContacts: [[String: Any]]? = nil, companyId: Int? = nil, createdOn: String? = nil, displayName: String? = nil, documents: [[String: Any]]? = nil, modifiedOn: String? = nil, name: String? = nil, storeCode: String? = nil, storeType: String? = nil, timing: [String: Any]? = nil, uid: Int? = nil) { + self.timing = timing - case documents + self.name = name - case name - } + self.additionalContacts = additionalContacts - public init(additionalContacts: [[String: Any]]? = nil, companyId: Int? = nil, createdOn: String? = nil, displayName: String? = nil, documents: [[String: Any]]? = nil, modifiedOn: String? = nil, name: String? = nil, storeCode: String? = nil, storeType: String? = nil, timing: [String: Any]? = nil, uid: Int? = nil) { self.companyId = companyId - self.additionalContacts = additionalContacts + self.storeType = storeType self.modifiedOn = modifiedOn self.displayName = displayName - self.createdOn = createdOn - - self.timing = timing - self.uid = uid - self.storeCode = storeCode - - self.storeType = storeType - self.documents = documents - self.name = name + self.createdOn = createdOn + + self.storeCode = storeCode } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - companyId = try container.decode(Int.self, forKey: .companyId) + timing = try container.decode([String: Any].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - additionalContacts = try container.decode([[String: Any]].self, forKey: .additionalContacts) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + additionalContacts = try container.decode([[String: Any]].self, forKey: .additionalContacts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -106,7 +106,7 @@ public extension PlatformClient { } catch {} do { - displayName = try container.decode(String.self, forKey: .displayName) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +114,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + storeType = try container.decode(String.self, forKey: .storeType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient { } catch {} do { - timing = try container.decode([String: Any].self, forKey: .timing) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + displayName = try container.decode(String.self, forKey: .displayName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - storeCode = try container.decode(String.self, forKey: .storeCode) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient { } catch {} do { - storeType = try container.decode(String.self, forKey: .storeType) + documents = try container.decode([[String: Any]].self, forKey: .documents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ public extension PlatformClient { } catch {} do { - documents = try container.decode([[String: Any]].self, forKey: .documents) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + storeCode = try container.decode(String.self, forKey: .storeCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -173,27 +173,27 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(timing, forKey: .timing) + + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(additionalContacts, forKey: .additionalContacts) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(storeType, forKey: .storeType) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(timing, forKey: .timing) + try? container.encodeIfPresent(displayName, forKey: .displayName) try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(storeCode, forKey: .storeCode) - - try? container.encodeIfPresent(storeType, forKey: .storeType) - try? container.encodeIfPresent(documents, forKey: .documents) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) + + try? container.encodeIfPresent(storeCode, forKey: .storeCode) } } } diff --git a/Sources/code/platform/models/SubscriptionPaymentMethodResponsePlatformModelClass.swift b/Sources/code/platform/models/SubscriptionPaymentMethodResponsePlatformModelClass.swift index 68aadb9525..20d65bd3a2 100644 --- a/Sources/code/platform/models/SubscriptionPaymentMethodResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/SubscriptionPaymentMethodResponsePlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class SubscriptionPaymentMethodResponse: Codable { - public var success: Bool - public var data: [[String: Any]] - public enum CodingKeys: String, CodingKey { - case success + public var success: Bool + public enum CodingKeys: String, CodingKey { case data + + case success } public init(data: [[String: Any]], success: Bool) { - self.success = success - self.data = data + + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - success = try container.decode(Bool.self, forKey: .success) - data = try container.decode([[String: Any]].self, forKey: .data) + + success = try container.decode(Bool.self, forKey: .success) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(data, forKey: .data) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/platform/models/TeaserTagPlatformModelClass.swift b/Sources/code/platform/models/TeaserTagPlatformModelClass.swift index 8fee09ab64..38b2337824 100644 --- a/Sources/code/platform/models/TeaserTagPlatformModelClass.swift +++ b/Sources/code/platform/models/TeaserTagPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class TeaserTag: Codable { - public var url: String? - public var tag: String? - public enum CodingKeys: String, CodingKey { - case url + public var url: String? + public enum CodingKeys: String, CodingKey { case tag + + case url } public init(tag: String? = nil, url: String? = nil) { - self.url = url - self.tag = tag + + self.url = url } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - url = try container.decode(String.self, forKey: .url) + tag = try container.decode(String.self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode(String.self, forKey: .tag) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(url, forKey: .url) - try? container.encode(tag, forKey: .tag) + + try? container.encode(url, forKey: .url) } } } diff --git a/Sources/code/platform/models/TemplateDetailsPlatformModelClass.swift b/Sources/code/platform/models/TemplateDetailsPlatformModelClass.swift index db7eb5aa07..861c645ff5 100644 --- a/Sources/code/platform/models/TemplateDetailsPlatformModelClass.swift +++ b/Sources/code/platform/models/TemplateDetailsPlatformModelClass.swift @@ -8,93 +8,95 @@ public extension PlatformClient { */ class TemplateDetails: Codable { - public var categories: [String]? + public var isExpirable: Bool public var tag: String? - public var isArchived: Bool? - - public var id: String? - - public var departments: [String]? + public var description: String? public var slug: String - public var isPhysical: Bool - - public var isActive: Bool? - - public var description: String? + public var id: String? - public var isExpirable: Bool + public var categories: [String]? public var name: String? public var attributes: [String]? - public var logo: String? + public var isPhysical: Bool - public enum CodingKeys: String, CodingKey { - case categories + public var isArchived: Bool? - case tag + public var isActive: Bool? - case isArchived = "is_archived" + public var logo: String? - case id + public var departments: [String]? - case departments + public enum CodingKeys: String, CodingKey { + case isExpirable = "is_expirable" - case slug + case tag - case isPhysical = "is_physical" + case description - case isActive = "is_active" + case slug - case description + case id - case isExpirable = "is_expirable" + case categories case name case attributes + case isPhysical = "is_physical" + + case isArchived = "is_archived" + + case isActive = "is_active" + case logo + + case departments } public init(attributes: [String]? = nil, categories: [String]? = nil, departments: [String]? = nil, description: String? = nil, id: String? = nil, isActive: Bool? = nil, isArchived: Bool? = nil, isExpirable: Bool, isPhysical: Bool, logo: String? = nil, name: String? = nil, slug: String, tag: String? = nil) { - self.categories = categories + self.isExpirable = isExpirable self.tag = tag - self.isArchived = isArchived - - self.id = id - - self.departments = departments + self.description = description self.slug = slug - self.isPhysical = isPhysical - - self.isActive = isActive - - self.description = description + self.id = id - self.isExpirable = isExpirable + self.categories = categories self.name = name self.attributes = attributes + self.isPhysical = isPhysical + + self.isArchived = isArchived + + self.isActive = isActive + self.logo = logo + + self.departments = departments } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + isExpirable = try container.decode(Bool.self, forKey: .isExpirable) + do { - categories = try container.decode([String].self, forKey: .categories) + tag = try container.decode(String.self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,15 +104,17 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode(String.self, forKey: .tag) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + slug = try container.decode(String.self, forKey: .slug) + do { - isArchived = try container.decode(Bool.self, forKey: .isArchived) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -118,7 +122,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + categories = try container.decode([String].self, forKey: .categories) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,37 +130,33 @@ public extension PlatformClient { } catch {} do { - departments = try container.decode([String].self, forKey: .departments) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - slug = try container.decode(String.self, forKey: .slug) - - isPhysical = try container.decode(Bool.self, forKey: .isPhysical) - do { - isActive = try container.decode(Bool.self, forKey: .isActive) + attributes = try container.decode([String].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + isPhysical = try container.decode(Bool.self, forKey: .isPhysical) + do { - description = try container.decode(String.self, forKey: .description) + isArchived = try container.decode(Bool.self, forKey: .isArchived) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - isExpirable = try container.decode(Bool.self, forKey: .isExpirable) - do { - name = try container.decode(String.self, forKey: .name) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -164,7 +164,7 @@ public extension PlatformClient { } catch {} do { - attributes = try container.decode([String].self, forKey: .attributes) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -172,7 +172,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(String.self, forKey: .logo) + departments = try container.decode([String].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -183,31 +183,31 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(categories, forKey: .categories) + try? container.encodeIfPresent(isExpirable, forKey: .isExpirable) try? container.encodeIfPresent(tag, forKey: .tag) - try? container.encodeIfPresent(isArchived, forKey: .isArchived) - - try? container.encodeIfPresent(id, forKey: .id) - - try? container.encode(departments, forKey: .departments) + try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(isPhysical, forKey: .isPhysical) - - try? container.encodeIfPresent(isActive, forKey: .isActive) - - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(isExpirable, forKey: .isExpirable) + try? container.encode(categories, forKey: .categories) try? container.encodeIfPresent(name, forKey: .name) try? container.encode(attributes, forKey: .attributes) + try? container.encodeIfPresent(isPhysical, forKey: .isPhysical) + + try? container.encodeIfPresent(isArchived, forKey: .isArchived) + + try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encode(departments, forKey: .departments) } } } diff --git a/Sources/code/platform/models/TemplatesValidationResponsePlatformModelClass.swift b/Sources/code/platform/models/TemplatesValidationResponsePlatformModelClass.swift index ae7b3d07ca..169c35c2f4 100644 --- a/Sources/code/platform/models/TemplatesValidationResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/TemplatesValidationResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class TemplatesValidationResponse: Codable { - public var data: TemplateValidationData? - public var templateDetails: TemplateDetails? - public enum CodingKeys: String, CodingKey { - case data + public var data: TemplateValidationData? + public enum CodingKeys: String, CodingKey { case templateDetails = "template_details" + + case data } public init(data: TemplateValidationData? = nil, templateDetails: TemplateDetails? = nil) { - self.data = data - self.templateDetails = templateDetails + + self.data = data } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - data = try container.decode(TemplateValidationData.self, forKey: .data) + templateDetails = try container.decode(TemplateDetails.self, forKey: .templateDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - templateDetails = try container.decode(TemplateDetails.self, forKey: .templateDetails) + data = try container.decode(TemplateValidationData.self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(data, forKey: .data) - try? container.encodeIfPresent(templateDetails, forKey: .templateDetails) + + try? container.encodeIfPresent(data, forKey: .data) } } } diff --git a/Sources/code/platform/models/ThirdLevelChildPlatformModelClass.swift b/Sources/code/platform/models/ThirdLevelChildPlatformModelClass.swift index 8d658fb316..382101c451 100644 --- a/Sources/code/platform/models/ThirdLevelChildPlatformModelClass.swift +++ b/Sources/code/platform/models/ThirdLevelChildPlatformModelClass.swift @@ -8,48 +8,48 @@ public extension PlatformClient { */ class ThirdLevelChild: Codable { - public var customJson: [String: Any]? + public var action: Action? public var slug: String? - public var uid: Int? + public var name: String? public var banners: ImageUrls? - public var name: String? + public var uid: Int? - public var action: Action? + public var customJson: [String: Any]? public var childs: [[String: Any]]? public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + case action case slug - case uid + case name case banners - case name + case uid - case action + case customJson = "_custom_json" case childs } public init(action: Action? = nil, banners: ImageUrls? = nil, childs: [[String: Any]]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { - self.customJson = customJson + self.action = action self.slug = slug - self.uid = uid + self.name = name self.banners = banners - self.name = name + self.uid = uid - self.action = action + self.customJson = customJson self.childs = childs } @@ -58,7 +58,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +74,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} do { - action = try container.decode(Action.self, forKey: .action) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -117,17 +117,17 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(action, forKey: .action) try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encodeIfPresent(childs, forKey: .childs) } diff --git a/Sources/code/platform/models/TraderPlatformModelClass.swift b/Sources/code/platform/models/TraderPlatformModelClass.swift index af73aa5581..636b095a9d 100644 --- a/Sources/code/platform/models/TraderPlatformModelClass.swift +++ b/Sources/code/platform/models/TraderPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class Trader: Codable { public var name: String? - public var type: String? - public var address: [String]? + public var type: String? + public enum CodingKeys: String, CodingKey { case name - case type - case address + + case type } public init(address: [String]? = nil, name: String? = nil, type: String? = nil) { self.name = name - self.type = type - self.address = address + + self.type = type } required public init(from decoder: Decoder) throws { @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + address = try container.decode([String].self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - address = try container.decode([String].self, forKey: .address) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,9 +63,9 @@ public extension PlatformClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(address, forKey: .address) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/UpdateCollectionPlatformModelClass.swift b/Sources/code/platform/models/UpdateCollectionPlatformModelClass.swift index 98297f4dd5..3bcc771484 100644 --- a/Sources/code/platform/models/UpdateCollectionPlatformModelClass.swift +++ b/Sources/code/platform/models/UpdateCollectionPlatformModelClass.swift @@ -8,141 +8,141 @@ public extension PlatformClient { */ class UpdateCollection: Codable { - public var customJson: [String: Any]? + public var slug: String? - public var visibleFacetsKeys: [String]? + public var meta: [String: Any]? - public var published: Bool? + public var schedule: Schedule? - public var meta: [String: Any]? + public var visibleFacetsKeys: [String]? - public var banners: CollectionBanner? + public var localeLanguage: [String: Any]? - public var query: [String: Any]? + public var logo: CollectionImage? - public var modifiedBy: UserInfo? + public var badge: CollectionBadge? - public var sortOn: String? + public var seo: SeoDetail? - public var localeLanguage: [String: Any]? + public var name: String? - public var description: String? + public var banners: CollectionBanner? - public var isVisible: Bool? + public var isActive: Bool? public var allowSort: Bool? - public var slug: String? + public var customJson: [String: Any]? - public var allowFacets: Bool? + public var description: String? - public var schedule: Schedule? + public var query: [String: Any]? - public var name: String? + public var tags: [String]? - public var logo: CollectionImage? + public var allowFacets: Bool? - public var tags: [String]? + public var modifiedBy: UserInfo? - public var seo: SeoDetail? + public var published: Bool? - public var isActive: Bool? + public var sortOn: String? - public var badge: CollectionBadge? + public var isVisible: Bool? public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + case slug - case visibleFacetsKeys = "visible_facets_keys" + case meta - case published + case schedule = "_schedule" - case meta + case visibleFacetsKeys = "visible_facets_keys" - case banners + case localeLanguage = "_locale_language" - case query + case logo - case modifiedBy = "modified_by" + case badge - case sortOn = "sort_on" + case seo - case localeLanguage = "_locale_language" + case name - case description + case banners - case isVisible = "is_visible" + case isActive = "is_active" case allowSort = "allow_sort" - case slug + case customJson = "_custom_json" - case allowFacets = "allow_facets" + case description - case schedule = "_schedule" + case query - case name + case tags - case logo + case allowFacets = "allow_facets" - case tags + case modifiedBy = "modified_by" - case seo + case published - case isActive = "is_active" + case sortOn = "sort_on" - case badge + case isVisible = "is_visible" } public init(allowFacets: Bool? = nil, allowSort: Bool? = nil, badge: CollectionBadge? = nil, banners: CollectionBanner? = nil, description: String? = nil, isActive: Bool? = nil, isVisible: Bool? = nil, logo: CollectionImage? = nil, meta: [String: Any]? = nil, modifiedBy: UserInfo? = nil, name: String? = nil, published: Bool? = nil, query: [String: Any]? = nil, seo: SeoDetail? = nil, slug: String? = nil, sortOn: String? = nil, tags: [String]? = nil, visibleFacetsKeys: [String]? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil, schedule: Schedule? = nil) { - self.customJson = customJson + self.slug = slug - self.visibleFacetsKeys = visibleFacetsKeys + self.meta = meta - self.published = published + self.schedule = schedule - self.meta = meta + self.visibleFacetsKeys = visibleFacetsKeys - self.banners = banners + self.localeLanguage = localeLanguage - self.query = query + self.logo = logo - self.modifiedBy = modifiedBy + self.badge = badge - self.sortOn = sortOn + self.seo = seo - self.localeLanguage = localeLanguage + self.name = name - self.description = description + self.banners = banners - self.isVisible = isVisible + self.isActive = isActive self.allowSort = allowSort - self.slug = slug + self.customJson = customJson - self.allowFacets = allowFacets + self.description = description - self.schedule = schedule + self.query = query - self.name = name + self.tags = tags - self.logo = logo + self.allowFacets = allowFacets - self.tags = tags + self.modifiedBy = modifiedBy - self.seo = seo + self.published = published - self.isActive = isActive + self.sortOn = sortOn - self.badge = badge + self.isVisible = isVisible } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - published = try container.decode(Bool.self, forKey: .published) + schedule = try container.decode(Schedule.self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,7 +166,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - banners = try container.decode(CollectionBanner.self, forKey: .banners) + localeLanguage = try container.decode([String: Any].self, forKey: .localeLanguage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +182,7 @@ public extension PlatformClient { } catch {} do { - query = try container.decode([String: Any].self, forKey: .query) + logo = try container.decode(CollectionImage.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserInfo.self, forKey: .modifiedBy) + badge = try container.decode(CollectionBadge.self, forKey: .badge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +198,7 @@ public extension PlatformClient { } catch {} do { - sortOn = try container.decode(String.self, forKey: .sortOn) + seo = try container.decode(SeoDetail.self, forKey: .seo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +206,7 @@ public extension PlatformClient { } catch {} do { - localeLanguage = try container.decode([String: Any].self, forKey: .localeLanguage) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +214,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + banners = try container.decode(CollectionBanner.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -222,7 +222,7 @@ public extension PlatformClient { } catch {} do { - isVisible = try container.decode(Bool.self, forKey: .isVisible) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -238,7 +238,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -246,7 +246,7 @@ public extension PlatformClient { } catch {} do { - allowFacets = try container.decode(Bool.self, forKey: .allowFacets) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -254,7 +254,7 @@ public extension PlatformClient { } catch {} do { - schedule = try container.decode(Schedule.self, forKey: .schedule) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -262,7 +262,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + tags = try container.decode([String].self, forKey: .tags) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -270,7 +270,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(CollectionImage.self, forKey: .logo) + allowFacets = try container.decode(Bool.self, forKey: .allowFacets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -278,7 +278,7 @@ public extension PlatformClient { } catch {} do { - tags = try container.decode([String].self, forKey: .tags) + modifiedBy = try container.decode(UserInfo.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -286,7 +286,7 @@ public extension PlatformClient { } catch {} do { - seo = try container.decode(SeoDetail.self, forKey: .seo) + published = try container.decode(Bool.self, forKey: .published) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -294,7 +294,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + sortOn = try container.decode(String.self, forKey: .sortOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -302,7 +302,7 @@ public extension PlatformClient { } catch {} do { - badge = try container.decode(CollectionBadge.self, forKey: .badge) + isVisible = try container.decode(Bool.self, forKey: .isVisible) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -313,47 +313,47 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(published, forKey: .published) + try? container.encodeIfPresent(schedule, forKey: .schedule) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) - try? container.encodeIfPresent(query, forKey: .query) + try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encode(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(badge, forKey: .badge) - try? container.encodeIfPresent(sortOn, forKey: .sortOn) + try? container.encodeIfPresent(seo, forKey: .seo) - try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(isVisible, forKey: .isVisible) + try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(allowSort, forKey: .allowSort) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(schedule, forKey: .schedule) + try? container.encodeIfPresent(query, forKey: .query) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(tags, forKey: .tags) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) - try? container.encodeIfPresent(tags, forKey: .tags) + try? container.encode(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(seo, forKey: .seo) + try? container.encodeIfPresent(published, forKey: .published) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(sortOn, forKey: .sortOn) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(isVisible, forKey: .isVisible) } } } diff --git a/Sources/code/platform/models/UpdateCompanyPlatformModelClass.swift b/Sources/code/platform/models/UpdateCompanyPlatformModelClass.swift index f8f83ce9d6..2d0a733c3c 100644 --- a/Sources/code/platform/models/UpdateCompanyPlatformModelClass.swift +++ b/Sources/code/platform/models/UpdateCompanyPlatformModelClass.swift @@ -8,93 +8,93 @@ public extension PlatformClient { */ class UpdateCompany: Codable { - public var contactDetails: ContactDetails? + public var businessDetails: BusinessDetails? - public var customJson: [String: Any]? + public var warnings: [String: Any]? - public var name: String? + public var businessInfo: String? - public var notificationEmails: [String]? + public var customJson: [String: Any]? - public var documents: [Document]? + public var addresses: [CreateUpdateAddressSerializer]? - public var warnings: [String: Any]? + public var documents: [Document]? public var rejectReason: String? - public var businessType: String? + public var franchiseEnabled: Bool? - public var businessDetails: BusinessDetails? + public var name: String? - public var franchiseEnabled: Bool? + public var contactDetails: ContactDetails? - public var businessInfo: String? + public var notificationEmails: [String]? public var companyType: String? - public var addresses: [CreateUpdateAddressSerializer]? + public var businessType: String? public enum CodingKeys: String, CodingKey { - case contactDetails = "contact_details" + case businessDetails = "business_details" - case customJson = "_custom_json" + case warnings - case name + case businessInfo = "business_info" - case notificationEmails = "notification_emails" + case customJson = "_custom_json" - case documents + case addresses - case warnings + case documents case rejectReason = "reject_reason" - case businessType = "business_type" + case franchiseEnabled = "franchise_enabled" - case businessDetails = "business_details" + case name - case franchiseEnabled = "franchise_enabled" + case contactDetails = "contact_details" - case businessInfo = "business_info" + case notificationEmails = "notification_emails" case companyType = "company_type" - case addresses + case businessType = "business_type" } public init(addresses: [CreateUpdateAddressSerializer]? = nil, businessDetails: BusinessDetails? = nil, businessInfo: String? = nil, businessType: String? = nil, companyType: String? = nil, contactDetails: ContactDetails? = nil, documents: [Document]? = nil, franchiseEnabled: Bool? = nil, name: String? = nil, notificationEmails: [String]? = nil, rejectReason: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { - self.contactDetails = contactDetails + self.businessDetails = businessDetails - self.customJson = customJson + self.warnings = warnings - self.name = name + self.businessInfo = businessInfo - self.notificationEmails = notificationEmails + self.customJson = customJson - self.documents = documents + self.addresses = addresses - self.warnings = warnings + self.documents = documents self.rejectReason = rejectReason - self.businessType = businessType + self.franchiseEnabled = franchiseEnabled - self.businessDetails = businessDetails + self.name = name - self.franchiseEnabled = franchiseEnabled + self.contactDetails = contactDetails - self.businessInfo = businessInfo + self.notificationEmails = notificationEmails self.companyType = companyType - self.addresses = addresses + self.businessType = businessType } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - contactDetails = try container.decode(ContactDetails.self, forKey: .contactDetails) + businessDetails = try container.decode(BusinessDetails.self, forKey: .businessDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,7 +102,7 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + warnings = try container.decode([String: Any].self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +110,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + businessInfo = try container.decode(String.self, forKey: .businessInfo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -118,7 +118,7 @@ public extension PlatformClient { } catch {} do { - notificationEmails = try container.decode([String].self, forKey: .notificationEmails) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } catch {} do { - documents = try container.decode([Document].self, forKey: .documents) + addresses = try container.decode([CreateUpdateAddressSerializer].self, forKey: .addresses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - warnings = try container.decode([String: Any].self, forKey: .warnings) + documents = try container.decode([Document].self, forKey: .documents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - businessType = try container.decode(String.self, forKey: .businessType) + franchiseEnabled = try container.decode(Bool.self, forKey: .franchiseEnabled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - businessDetails = try container.decode(BusinessDetails.self, forKey: .businessDetails) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,7 +166,7 @@ public extension PlatformClient { } catch {} do { - franchiseEnabled = try container.decode(Bool.self, forKey: .franchiseEnabled) + contactDetails = try container.decode(ContactDetails.self, forKey: .contactDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - businessInfo = try container.decode(String.self, forKey: .businessInfo) + notificationEmails = try container.decode([String].self, forKey: .notificationEmails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - addresses = try container.decode([CreateUpdateAddressSerializer].self, forKey: .addresses) + businessType = try container.decode(String.self, forKey: .businessType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -201,31 +201,31 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(contactDetails, forKey: .contactDetails) + try? container.encodeIfPresent(businessDetails, forKey: .businessDetails) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(warnings, forKey: .warnings) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(businessInfo, forKey: .businessInfo) - try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(documents, forKey: .documents) + try? container.encodeIfPresent(addresses, forKey: .addresses) - try? container.encodeIfPresent(warnings, forKey: .warnings) + try? container.encodeIfPresent(documents, forKey: .documents) try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) - try? container.encodeIfPresent(businessType, forKey: .businessType) + try? container.encodeIfPresent(franchiseEnabled, forKey: .franchiseEnabled) - try? container.encodeIfPresent(businessDetails, forKey: .businessDetails) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(franchiseEnabled, forKey: .franchiseEnabled) + try? container.encodeIfPresent(contactDetails, forKey: .contactDetails) - try? container.encodeIfPresent(businessInfo, forKey: .businessInfo) + try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) try? container.encodeIfPresent(companyType, forKey: .companyType) - try? container.encodeIfPresent(addresses, forKey: .addresses) + try? container.encodeIfPresent(businessType, forKey: .businessType) } } } diff --git a/Sources/code/platform/models/UpdatePayoutRequestPlatformModelClass.swift b/Sources/code/platform/models/UpdatePayoutRequestPlatformModelClass.swift index 4922c7ffdc..a74ff6ee76 100644 --- a/Sources/code/platform/models/UpdatePayoutRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/UpdatePayoutRequestPlatformModelClass.swift @@ -8,46 +8,46 @@ public extension PlatformClient { */ class UpdatePayoutRequest: Codable { - public var isDefault: Bool - public var uniqueExternalId: String public var isActive: Bool - public enum CodingKeys: String, CodingKey { - case isDefault = "is_default" + public var isDefault: Bool + public enum CodingKeys: String, CodingKey { case uniqueExternalId = "unique_external_id" case isActive = "is_active" + + case isDefault = "is_default" } public init(isActive: Bool, isDefault: Bool, uniqueExternalId: String) { - self.isDefault = isDefault - self.uniqueExternalId = uniqueExternalId self.isActive = isActive + + self.isDefault = isDefault } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - isDefault = try container.decode(Bool.self, forKey: .isDefault) - uniqueExternalId = try container.decode(String.self, forKey: .uniqueExternalId) isActive = try container.decode(Bool.self, forKey: .isActive) + + isDefault = try container.decode(Bool.self, forKey: .isDefault) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(isDefault, forKey: .isDefault) - try? container.encodeIfPresent(uniqueExternalId, forKey: .uniqueExternalId) try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(isDefault, forKey: .isDefault) } } } diff --git a/Sources/code/platform/models/UpdatePayoutResponsePlatformModelClass.swift b/Sources/code/platform/models/UpdatePayoutResponsePlatformModelClass.swift index 2a580a0435..aac83ecd72 100644 --- a/Sources/code/platform/models/UpdatePayoutResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/UpdatePayoutResponsePlatformModelClass.swift @@ -8,46 +8,46 @@ public extension PlatformClient { */ class UpdatePayoutResponse: Codable { - public var isDefault: Bool - public var success: Bool public var isActive: Bool - public enum CodingKeys: String, CodingKey { - case isDefault = "is_default" + public var isDefault: Bool + public enum CodingKeys: String, CodingKey { case success case isActive = "is_active" + + case isDefault = "is_default" } public init(isActive: Bool, isDefault: Bool, success: Bool) { - self.isDefault = isDefault - self.success = success self.isActive = isActive + + self.isDefault = isDefault } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - isDefault = try container.decode(Bool.self, forKey: .isDefault) - success = try container.decode(Bool.self, forKey: .success) isActive = try container.decode(Bool.self, forKey: .isActive) + + isDefault = try container.decode(Bool.self, forKey: .isDefault) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(isDefault, forKey: .isDefault) - try? container.encodeIfPresent(success, forKey: .success) try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(isDefault, forKey: .isDefault) } } } diff --git a/Sources/code/platform/models/UserCommonPlatformModelClass.swift b/Sources/code/platform/models/UserCommonPlatformModelClass.swift index 4b5e7f12d2..af8aaa8073 100644 --- a/Sources/code/platform/models/UserCommonPlatformModelClass.swift +++ b/Sources/code/platform/models/UserCommonPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class UserCommon: Codable { - public var username: String? - public var companyId: Int? public var userId: String? - public enum CodingKeys: String, CodingKey { - case username + public var username: String? + public enum CodingKeys: String, CodingKey { case companyId = "company_id" case userId = "user_id" + + case username } public init(companyId: Int? = nil, username: String? = nil, userId: String? = nil) { - self.username = username - self.companyId = companyId self.userId = userId + + self.username = username } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - username = try container.decode(String.self, forKey: .username) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - companyId = try container.decode(Int.self, forKey: .companyId) + userId = try container.decode(String.self, forKey: .userId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - userId = try container.decode(String.self, forKey: .userId) + username = try container.decode(String.self, forKey: .username) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(username, forKey: .username) - try? container.encodeIfPresent(companyId, forKey: .companyId) try? container.encodeIfPresent(userId, forKey: .userId) + + try? container.encodeIfPresent(username, forKey: .username) } } } diff --git a/Sources/code/platform/models/UserDetailPlatformModelClass.swift b/Sources/code/platform/models/UserDetailPlatformModelClass.swift index 866801b175..ad79869485 100644 --- a/Sources/code/platform/models/UserDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/UserDetailPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class UserDetail: Codable { - public var username: String? - public var fullName: String? public var userId: String? - public enum CodingKeys: String, CodingKey { - case username + public var username: String? + public enum CodingKeys: String, CodingKey { case fullName = "full_name" case userId = "user_id" + + case username } public init(fullName: String? = nil, username: String? = nil, userId: String? = nil) { - self.username = username - self.fullName = fullName self.userId = userId + + self.username = username } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - username = try container.decode(String.self, forKey: .username) + fullName = try container.decode(String.self, forKey: .fullName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - fullName = try container.decode(String.self, forKey: .fullName) + userId = try container.decode(String.self, forKey: .userId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - userId = try container.decode(String.self, forKey: .userId) + username = try container.decode(String.self, forKey: .username) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(username, forKey: .username) - try? container.encodeIfPresent(fullName, forKey: .fullName) try? container.encodeIfPresent(userId, forKey: .userId) + + try? container.encodeIfPresent(username, forKey: .username) } } } diff --git a/Sources/code/platform/models/UserSerializer1PlatformModelClass.swift b/Sources/code/platform/models/UserSerializer1PlatformModelClass.swift index d320506842..ae0b83774c 100644 --- a/Sources/code/platform/models/UserSerializer1PlatformModelClass.swift +++ b/Sources/code/platform/models/UserSerializer1PlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class UserSerializer1: Codable { - public var username: String? - public var contact: String? public var userId: String? - public enum CodingKeys: String, CodingKey { - case username + public var username: String? + public enum CodingKeys: String, CodingKey { case contact case userId = "user_id" + + case username } public init(contact: String? = nil, username: String? = nil, userId: String? = nil) { - self.username = username - self.contact = contact self.userId = userId + + self.username = username } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - username = try container.decode(String.self, forKey: .username) + contact = try container.decode(String.self, forKey: .contact) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - contact = try container.decode(String.self, forKey: .contact) + userId = try container.decode(String.self, forKey: .userId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - userId = try container.decode(String.self, forKey: .userId) + username = try container.decode(String.self, forKey: .username) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(username, forKey: .username) - try? container.encodeIfPresent(contact, forKey: .contact) try? container.encodeIfPresent(userId, forKey: .userId) + + try? container.encodeIfPresent(username, forKey: .username) } } } diff --git a/Sources/code/platform/models/UserSerializer2PlatformModelClass.swift b/Sources/code/platform/models/UserSerializer2PlatformModelClass.swift index eea7ffd453..931fbe1af9 100644 --- a/Sources/code/platform/models/UserSerializer2PlatformModelClass.swift +++ b/Sources/code/platform/models/UserSerializer2PlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class UserSerializer2: Codable { - public var username: String? - public var contact: String? public var userId: String? - public enum CodingKeys: String, CodingKey { - case username + public var username: String? + public enum CodingKeys: String, CodingKey { case contact case userId = "user_id" + + case username } public init(contact: String? = nil, username: String? = nil, userId: String? = nil) { - self.username = username - self.contact = contact self.userId = userId + + self.username = username } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - username = try container.decode(String.self, forKey: .username) + contact = try container.decode(String.self, forKey: .contact) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - contact = try container.decode(String.self, forKey: .contact) + userId = try container.decode(String.self, forKey: .userId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - userId = try container.decode(String.self, forKey: .userId) + username = try container.decode(String.self, forKey: .username) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(username, forKey: .username) - try? container.encodeIfPresent(contact, forKey: .contact) try? container.encodeIfPresent(userId, forKey: .userId) + + try? container.encodeIfPresent(username, forKey: .username) } } } diff --git a/Sources/code/platform/models/UserSerializerPlatformModelClass.swift b/Sources/code/platform/models/UserSerializerPlatformModelClass.swift index 49cb005cf8..4e67608bb1 100644 --- a/Sources/code/platform/models/UserSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/UserSerializerPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class UserSerializer: Codable { - public var username: String? - public var contact: String? public var userId: String? - public enum CodingKeys: String, CodingKey { - case username + public var username: String? + public enum CodingKeys: String, CodingKey { case contact case userId = "user_id" + + case username } public init(contact: String? = nil, username: String? = nil, userId: String? = nil) { - self.username = username - self.contact = contact self.userId = userId + + self.username = username } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - username = try container.decode(String.self, forKey: .username) + contact = try container.decode(String.self, forKey: .contact) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - contact = try container.decode(String.self, forKey: .contact) + userId = try container.decode(String.self, forKey: .userId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - userId = try container.decode(String.self, forKey: .userId) + username = try container.decode(String.self, forKey: .username) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(username, forKey: .username) - try? container.encodeIfPresent(contact, forKey: .contact) try? container.encodeIfPresent(userId, forKey: .userId) + + try? container.encodeIfPresent(username, forKey: .username) } } } diff --git a/Sources/code/platform/models/ValidateSizeGuidePlatformModelClass.swift b/Sources/code/platform/models/ValidateSizeGuidePlatformModelClass.swift index 872d5cf814..aae704bc4f 100644 --- a/Sources/code/platform/models/ValidateSizeGuidePlatformModelClass.swift +++ b/Sources/code/platform/models/ValidateSizeGuidePlatformModelClass.swift @@ -8,105 +8,105 @@ public extension PlatformClient { */ class ValidateSizeGuide: Codable { - public var companyId: Int? - - public var guide: Guide? - - public var title: String - - public var createdBy: [String: Any]? - - public var modifiedOn: String? - public var tag: String? - public var createdOn: String? + public var description: String? public var id: String? - public var modifiedBy: [String: Any]? + public var name: String + + public var createdBy: [String: Any]? public var active: Bool? - public var subtitle: String? + public var title: String - public var description: String? + public var image: String? public var brandId: Int? - public var image: String? - - public var name: String + public var companyId: Int? - public enum CodingKeys: String, CodingKey { - case companyId = "company_id" + public var modifiedBy: [String: Any]? - case guide + public var modifiedOn: String? - case title + public var guide: Guide? - case createdBy = "created_by" + public var subtitle: String? - case modifiedOn = "modified_on" + public var createdOn: String? + public enum CodingKeys: String, CodingKey { case tag - case createdOn = "created_on" + case description case id - case modifiedBy = "modified_by" + case name + + case createdBy = "created_by" case active - case subtitle + case title - case description + case image case brandId = "brand_id" - case image - - case name - } + case companyId = "company_id" - public init(active: Bool? = nil, brandId: Int? = nil, companyId: Int? = nil, createdBy: [String: Any]? = nil, createdOn: String? = nil, description: String? = nil, guide: Guide? = nil, id: String? = nil, image: String? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String, subtitle: String? = nil, tag: String? = nil, title: String) { - self.companyId = companyId + case modifiedBy = "modified_by" - self.guide = guide + case modifiedOn = "modified_on" - self.title = title + case guide - self.createdBy = createdBy + case subtitle - self.modifiedOn = modifiedOn + case createdOn = "created_on" + } + public init(active: Bool? = nil, brandId: Int? = nil, companyId: Int? = nil, createdBy: [String: Any]? = nil, createdOn: String? = nil, description: String? = nil, guide: Guide? = nil, id: String? = nil, image: String? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String, subtitle: String? = nil, tag: String? = nil, title: String) { self.tag = tag - self.createdOn = createdOn + self.description = description self.id = id - self.modifiedBy = modifiedBy + self.name = name + + self.createdBy = createdBy self.active = active - self.subtitle = subtitle + self.title = title - self.description = description + self.image = image self.brandId = brandId - self.image = image + self.companyId = companyId - self.name = name + self.modifiedBy = modifiedBy + + self.modifiedOn = modifiedOn + + self.guide = guide + + self.subtitle = subtitle + + self.createdOn = createdOn } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - companyId = try container.decode(Int.self, forKey: .companyId) + tag = try container.decode(String.self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,25 +114,25 @@ public extension PlatformClient { } catch {} do { - guide = try container.decode(Guide.self, forKey: .guide) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - title = try container.decode(String.self, forKey: .title) - do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -140,15 +140,17 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode(String.self, forKey: .tag) + active = try container.decode(Bool.self, forKey: .active) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + title = try container.decode(String.self, forKey: .title) + do { - createdOn = try container.decode(String.self, forKey: .createdOn) + image = try container.decode(String.self, forKey: .image) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -156,7 +158,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + brandId = try container.decode(Int.self, forKey: .brandId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -164,7 +166,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -172,7 +174,7 @@ public extension PlatformClient { } catch {} do { - active = try container.decode(Bool.self, forKey: .active) + modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -180,7 +182,7 @@ public extension PlatformClient { } catch {} do { - subtitle = try container.decode(String.self, forKey: .subtitle) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -188,7 +190,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + guide = try container.decode(Guide.self, forKey: .guide) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -196,7 +198,7 @@ public extension PlatformClient { } catch {} do { - brandId = try container.decode(Int.self, forKey: .brandId) + subtitle = try container.decode(String.self, forKey: .subtitle) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -204,48 +206,46 @@ public extension PlatformClient { } catch {} do { - image = try container.decode(String.self, forKey: .image) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - name = try container.decode(String.self, forKey: .name) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(tag, forKey: .tag) - try? container.encodeIfPresent(guide, forKey: .guide) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(title, forKey: .title) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(tag, forKey: .tag) + try? container.encodeIfPresent(active, forKey: .active) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(image, forKey: .image) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(brandId, forKey: .brandId) - try? container.encodeIfPresent(active, forKey: .active) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(subtitle, forKey: .subtitle) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(brandId, forKey: .brandId) + try? container.encodeIfPresent(guide, forKey: .guide) - try? container.encodeIfPresent(image, forKey: .image) + try? container.encodeIfPresent(subtitle, forKey: .subtitle) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) } } } diff --git a/Sources/code/platform/models/VerifiedByPlatformModelClass.swift b/Sources/code/platform/models/VerifiedByPlatformModelClass.swift index fbebde7a9e..f3a36cde3e 100644 --- a/Sources/code/platform/models/VerifiedByPlatformModelClass.swift +++ b/Sources/code/platform/models/VerifiedByPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class VerifiedBy: Codable { - public var username: String? - public var userId: String? - public enum CodingKeys: String, CodingKey { - case username + public var username: String? + public enum CodingKeys: String, CodingKey { case userId = "user_id" + + case username } public init(username: String? = nil, userId: String? = nil) { - self.username = username - self.userId = userId + + self.username = username } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - username = try container.decode(String.self, forKey: .username) + userId = try container.decode(String.self, forKey: .userId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - userId = try container.decode(String.self, forKey: .userId) + username = try container.decode(String.self, forKey: .username) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(username, forKey: .username) - try? container.encodeIfPresent(userId, forKey: .userId) + + try? container.encodeIfPresent(username, forKey: .username) } } } diff --git a/Sources/code/public/PublicAPIClient.swift b/Sources/code/public/PublicAPIClient.swift index 53813dbfd5..e3366042df 100644 --- a/Sources/code/public/PublicAPIClient.swift +++ b/Sources/code/public/PublicAPIClient.swift @@ -10,7 +10,7 @@ class PublicAPIClient { onResponse: @escaping OnResponse) { var headers = [ - (key: "x-fp-sdk-version", value: "0.1.17") + (key: "x-fp-sdk-version", value: "0.1.18") ] headers.append(contentsOf: extraHeaders) headers.append(contentsOf: config.extraHeaders) diff --git a/documentation/application/CATALOG.md b/documentation/application/CATALOG.md index 4cbb545baa..6280428b21 100644 --- a/documentation/application/CATALOG.md +++ b/documentation/application/CATALOG.md @@ -7908,8 +7908,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | query | [String: Any]? | yes | | | type | String? | yes | | + | query | [String: Any]? | yes | | | params | [String: Any]? | yes | | --- @@ -7941,26 +7941,25 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [Price](#Price) + #### [ProductDetailAttribute](#ProductDetailAttribute) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | max | Double? | yes | | - | min | Double? | yes | | - | currencySymbol | String? | yes | | - | currencyCode | String? | yes | | + | type | String? | yes | | + | value | String? | yes | | + | key | String? | yes | | --- - #### [ProductListingPrice](#ProductListingPrice) + #### [ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | effective | [Price](#Price)? | yes | | - | marked | [Price](#Price)? | yes | | + | details | [[ProductDetailAttribute](#ProductDetailAttribute)]? | yes | | + | title | String? | yes | | --- @@ -7983,8 +7982,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | type | String? | yes | | - | url | String? | yes | | | meta | [Meta](#Meta)? | yes | | + | url | String? | yes | | --- @@ -7995,35 +7994,36 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | logo | [Media](#Media)? | yes | | + | action | [ProductListingAction](#ProductListingAction)? | yes | | | name | String? | yes | | | uid | Int? | yes | | - | action | [ProductListingAction](#ProductListingAction)? | yes | | - | logo | [Media](#Media)? | yes | | --- - #### [ProductDetailAttribute](#ProductDetailAttribute) + #### [Price](#Price) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | value | String? | yes | | - | type | String? | yes | | - | key | String? | yes | | + | currencySymbol | String? | yes | | + | min | Double? | yes | | + | max | Double? | yes | | + | currencyCode | String? | yes | | --- - #### [ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute) + #### [ProductListingPrice](#ProductListingPrice) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | details | [[ProductDetailAttribute](#ProductDetailAttribute)]? | yes | | - | title | String? | yes | | + | marked | [Price](#Price)? | yes | | + | effective | [Price](#Price)? | yes | | --- @@ -8034,34 +8034,34 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | ratingCount | Int? | yes | | + | type | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | - | hasVariant | Bool? | yes | | - | description | String? | yes | | - | customMeta | [[MetaFields](#MetaFields)]? | yes | | - | similars | [String]? | yes | | - | slug | String | no | | - | price | [ProductListingPrice](#ProductListingPrice)? | yes | | - | itemType | String? | yes | | - | categories | [[ProductBrand](#ProductBrand)]? | yes | | - | highlights | [String]? | yes | | - | productOnlineDate | String? | yes | | - | tryouts | [String]? | yes | | - | medias | [[Media](#Media)]? | yes | | - | rating | Double? | yes | | - | discount | String? | yes | | | name | String? | yes | | - | teaserTag | String? | yes | | - | uid | Int? | yes | | + | color | String? | yes | | | imageNature | String? | yes | | - | brand | [ProductBrand](#ProductBrand)? | yes | | - | shortDescription | String? | yes | | - | type | String? | yes | | + | rating | Double? | yes | | + | ratingCount | Int? | yes | | + | discount | String? | yes | | + | customMeta | [[MetaFields](#MetaFields)]? | yes | | | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | + | hasVariant | Bool? | yes | | + | highlights | [String]? | yes | | | customJson | [String: Any]? | yes | | - | color | String? | yes | | - | attributes | [String: Any]? | yes | | + | categories | [[ProductBrand](#ProductBrand)]? | yes | | + | shortDescription | String? | yes | | + | price | [ProductListingPrice](#ProductListingPrice)? | yes | | + | similars | [String]? | yes | | | itemCode | String? | yes | | + | teaserTag | String? | yes | | + | medias | [[Media](#Media)]? | yes | | + | brand | [ProductBrand](#ProductBrand)? | yes | | + | productOnlineDate | String? | yes | | + | attributes | [String: Any]? | yes | | + | tryouts | [String]? | yes | | + | itemType | String? | yes | | + | slug | String | no | | + | description | String? | yes | | + | uid | Int? | yes | | --- @@ -8079,86 +8079,86 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [ProductSize](#ProductSize) + #### [ProductSizeStores](#ProductSizeStores) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | quantity | Int? | yes | | - | value | String? | yes | | - | display | String? | yes | | - | isAvailable | Bool? | yes | | + | count | Int? | yes | | --- - #### [ColumnHeader](#ColumnHeader) + #### [ProductSize](#ProductSize) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | isAvailable | Bool? | yes | | + | quantity | Int? | yes | | | value | String? | yes | | - | convertable | Bool? | yes | | + | display | String? | yes | | --- - #### [ColumnHeaders](#ColumnHeaders) + #### [SizeChartValues](#SizeChartValues) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | col3 | [ColumnHeader](#ColumnHeader)? | yes | | - | col6 | [ColumnHeader](#ColumnHeader)? | yes | | - | col1 | [ColumnHeader](#ColumnHeader)? | yes | | - | col2 | [ColumnHeader](#ColumnHeader)? | yes | | - | col5 | [ColumnHeader](#ColumnHeader)? | yes | | - | col4 | [ColumnHeader](#ColumnHeader)? | yes | | + | col4 | String? | yes | | + | col5 | String? | yes | | + | col6 | String? | yes | | + | col2 | String? | yes | | + | col1 | String? | yes | | + | col3 | String? | yes | | --- - #### [SizeChartValues](#SizeChartValues) + #### [ColumnHeader](#ColumnHeader) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | col3 | String? | yes | | - | col6 | String? | yes | | - | col1 | String? | yes | | - | col2 | String? | yes | | - | col5 | String? | yes | | - | col4 | String? | yes | | + | value | String? | yes | | + | convertable | Bool? | yes | | --- - #### [SizeChart](#SizeChart) + #### [ColumnHeaders](#ColumnHeaders) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | headers | [ColumnHeaders](#ColumnHeaders)? | yes | | - | description | String? | yes | | - | image | String? | yes | | - | sizes | [[SizeChartValues](#SizeChartValues)]? | yes | | - | unit | String? | yes | | - | sizeTip | String? | yes | | - | title | String? | yes | | + | col4 | [ColumnHeader](#ColumnHeader)? | yes | | + | col5 | [ColumnHeader](#ColumnHeader)? | yes | | + | col6 | [ColumnHeader](#ColumnHeader)? | yes | | + | col2 | [ColumnHeader](#ColumnHeader)? | yes | | + | col1 | [ColumnHeader](#ColumnHeader)? | yes | | + | col3 | [ColumnHeader](#ColumnHeader)? | yes | | --- - #### [ProductSizeStores](#ProductSizeStores) + #### [SizeChart](#SizeChart) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | count | Int? | yes | | + | unit | String? | yes | | + | image | String? | yes | | + | title | String? | yes | | + | sizes | [[SizeChartValues](#SizeChartValues)]? | yes | | + | description | String? | yes | | + | headers | [ColumnHeaders](#ColumnHeaders)? | yes | | + | sizeTip | String? | yes | | --- @@ -8169,12 +8169,12 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | discount | String? | yes | | | sellable | Bool? | yes | | - | sizes | [[ProductSize](#ProductSize)]? | yes | | + | stores | [ProductSizeStores](#ProductSizeStores)? | yes | | | price | [ProductListingPrice](#ProductListingPrice)? | yes | | + | sizes | [[ProductSize](#ProductSize)]? | yes | | | sizeChart | [SizeChart](#SizeChart)? | yes | | - | stores | [ProductSizeStores](#ProductSizeStores)? | yes | | + | discount | String? | yes | | --- @@ -8186,9 +8186,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | logo | String? | yes | | + | description | String? | yes | | | display | String? | yes | | | key | String? | yes | | - | description | String? | yes | | --- @@ -8211,8 +8211,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | attributesMetadata | [[AttributeMetadata](#AttributeMetadata)]? | yes | | | items | [[ProductDetail](#ProductDetail)]? | yes | | + | attributesMetadata | [[AttributeMetadata](#AttributeMetadata)]? | yes | | --- @@ -8223,10 +8223,10 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | attributesMetadata | [[AttributeMetadata](#AttributeMetadata)]? | yes | | | items | [[ProductDetail](#ProductDetail)]? | yes | | - | subtitle | String? | yes | | + | attributesMetadata | [[AttributeMetadata](#AttributeMetadata)]? | yes | | | title | String? | yes | | + | subtitle | String? | yes | | --- @@ -8249,8 +8249,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | items | [[ProductDetail](#ProductDetail)]? | yes | | - | subtitle | String? | yes | | | title | String? | yes | | + | subtitle | String? | yes | | --- @@ -8272,15 +8272,15 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | value | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | - | slug | String? | yes | | - | name | String? | yes | | | medias | [[Media](#Media)]? | yes | | + | colorName | String? | yes | | + | value | String? | yes | | + | name | String? | yes | | | isAvailable | Bool? | yes | | + | slug | String? | yes | | | color | String? | yes | | | uid | Int? | yes | | - | colorName | String? | yes | | --- @@ -8291,10 +8291,10 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | header | String? | yes | | - | displayType | String? | yes | | - | items | [[ProductVariantItemResponse](#ProductVariantItemResponse)]? | yes | | | key | String? | yes | | + | items | [[ProductVariantItemResponse](#ProductVariantItemResponse)]? | yes | | + | displayType | String? | yes | | + | header | String? | yes | | --- @@ -8312,13 +8312,11 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [StoreDetail](#StoreDetail) + #### [CompanyDetail](#CompanyDetail) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | name | String? | yes | | - | city | String? | yes | | - | code | String? | yes | | | id | Int? | yes | | --- @@ -8330,34 +8328,36 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | effective | Double? | yes | | - | marked | Double? | yes | | | currency | String? | yes | | + | marked | Double? | yes | | + | effective | Double? | yes | | --- - #### [Seller](#Seller) + #### [StoreDetail](#StoreDetail) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | city | String? | yes | | + | code | String? | yes | | | name | String? | yes | | - | count | Int? | yes | | - | uid | Int? | yes | | + | id | Int? | yes | | --- - #### [CompanyDetail](#CompanyDetail) + #### [Seller](#Seller) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | name | String? | yes | | - | id | Int? | yes | | + | uid | Int? | yes | | + | count | Int? | yes | | --- @@ -8368,15 +8368,15 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | itemId | Int? | yes | | | quantity | Int? | yes | | + | company | [CompanyDetail](#CompanyDetail)? | yes | | | identifier | [String: Any]? | yes | | | size | String? | yes | | - | store | [StoreDetail](#StoreDetail)? | yes | | | price | [ProductStockPrice](#ProductStockPrice)? | yes | | + | itemId | Int? | yes | | + | store | [StoreDetail](#StoreDetail)? | yes | | | seller | [Seller](#Seller)? | yes | | | uid | String? | yes | | - | company | [CompanyDetail](#CompanyDetail)? | yes | | --- @@ -8399,12 +8399,12 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | type | String | no | | - | hasNext | Bool? | yes | | - | size | Int? | yes | | - | hasPrevious | Bool? | yes | | | current | Int? | yes | | - | nextId | String? | yes | | + | size | Int? | yes | | + | hasNext | Bool? | yes | | | itemTotal | Int? | yes | | + | nextId | String? | yes | | + | hasPrevious | Bool? | yes | | --- @@ -8423,28 +8423,15 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [ProductSortOn](#ProductSortOn) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | value | String? | yes | | - | isSelected | Bool? | yes | | - ---- - - - - #### [ProductVariantListingResponse](#ProductVariantListingResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | items | [[ProductVariantItemResponse](#ProductVariantItemResponse)]? | yes | | | total | Int? | yes | | - | header | String? | yes | | - | displayType | String? | yes | | | key | String? | yes | | - | items | [[ProductVariantItemResponse](#ProductVariantItemResponse)]? | yes | | + | displayType | String? | yes | | + | header | String? | yes | | --- @@ -8455,36 +8442,36 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | ratingCount | Int? | yes | | + | type | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | - | hasVariant | Bool? | yes | | - | description | String? | yes | | + | name | String? | yes | | + | color | String? | yes | | + | imageNature | String? | yes | | + | rating | Double? | yes | | + | ratingCount | Int? | yes | | + | discount | String? | yes | | | customMeta | [[MetaFields](#MetaFields)]? | yes | | - | similars | [String]? | yes | | - | slug | String | no | | - | price | [ProductListingPrice](#ProductListingPrice)? | yes | | - | itemType | String? | yes | | - | categories | [[ProductBrand](#ProductBrand)]? | yes | | + | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | + | hasVariant | Bool? | yes | | | highlights | [String]? | yes | | + | sellable | Bool? | yes | | + | customJson | [String: Any]? | yes | | + | categories | [[ProductBrand](#ProductBrand)]? | yes | | + | shortDescription | String? | yes | | + | price | [ProductListingPrice](#ProductListingPrice)? | yes | | + | similars | [String]? | yes | | + | itemCode | String? | yes | | + | teaserTag | String? | yes | | | variants | [[ProductVariantListingResponse](#ProductVariantListingResponse)]? | yes | | + | medias | [[Media](#Media)]? | yes | | + | brand | [ProductBrand](#ProductBrand)? | yes | | | productOnlineDate | String? | yes | | + | attributes | [String: Any]? | yes | | | tryouts | [String]? | yes | | - | medias | [[Media](#Media)]? | yes | | - | rating | Double? | yes | | - | discount | String? | yes | | - | name | String? | yes | | - | teaserTag | String? | yes | | + | itemType | String? | yes | | + | slug | String | no | | + | description | String? | yes | | | uid | Int? | yes | | - | imageNature | String? | yes | | - | brand | [ProductBrand](#ProductBrand)? | yes | | - | shortDescription | String? | yes | | - | type | String? | yes | | - | sellable | Bool? | yes | | - | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | - | customJson | [String: Any]? | yes | | - | color | String? | yes | | - | attributes | [String: Any]? | yes | | - | itemCode | String? | yes | | --- @@ -8495,18 +8482,18 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | isSelected | Bool | no | | + | max | Int? | yes | | + | queryFormat | String? | yes | | + | count | Int? | yes | | + | currencyCode | String? | yes | | + | selectedMax | Int? | yes | | | value | String? | yes | | + | selectedMin | Int? | yes | | + | displayFormat | String? | yes | | + | currencySymbol | String? | yes | | | min | Int? | yes | | | display | String | no | | - | selectedMax | Int? | yes | | - | currencyCode | String? | yes | | - | currencySymbol | String? | yes | | - | queryFormat | String? | yes | | - | displayFormat | String? | yes | | - | selectedMin | Int? | yes | | - | max | Int? | yes | | - | count | Int? | yes | | - | isSelected | Bool | no | | --- @@ -8517,10 +8504,10 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String | no | | | kind | String? | yes | | - | display | String | no | | | logo | String? | yes | | + | display | String | no | | + | name | String | no | | --- @@ -8539,14 +8526,27 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or + #### [ProductSortOn](#ProductSortOn) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | isSelected | Bool? | yes | | + | value | String? | yes | | + | name | String? | yes | | + +--- + + + + #### [ProductListingResponse](#ProductListingResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | | items | [[ProductListingDetail](#ProductListingDetail)]? | yes | | - | page | [Page](#Page) | no | | | filters | [[ProductFilters](#ProductFilters)]? | yes | | + | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | + | page | [Page](#Page) | no | | --- @@ -8569,14 +8569,14 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | discount | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | - | slug | String? | yes | | - | name | String? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | - | uid | Int? | yes | | - | logo | [Media](#Media)? | yes | | + | name | String? | yes | | | departments | [String]? | yes | | + | logo | [Media](#Media)? | yes | | + | slug | String? | yes | | + | uid | Int? | yes | | + | discount | String? | yes | | --- @@ -8599,20 +8599,25 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | | uid | Int? | yes | | | logo | [Media](#Media)? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | name | String? | yes | | --- - #### [DepartmentIdentifier](#DepartmentIdentifier) + #### [ThirdLevelChild](#ThirdLevelChild) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | childs | [[String: Any]]? | yes | | + | action | [ProductListingAction](#ProductListingAction)? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | customJson | [String: Any]? | yes | | + | name | String? | yes | | | slug | String? | yes | | | uid | Int? | yes | | @@ -8621,79 +8626,74 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [ThirdLevelChild](#ThirdLevelChild) + #### [SecondLevelChild](#SecondLevelChild) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | childs | [[ThirdLevelChild](#ThirdLevelChild)]? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | - | slug | String? | yes | | - | name | String? | yes | | - | customJson | [String: Any]? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | + | customJson | [String: Any]? | yes | | + | name | String? | yes | | + | slug | String? | yes | | | uid | Int? | yes | | - | childs | [[String: Any]]? | yes | | --- - #### [SecondLevelChild](#SecondLevelChild) + #### [Child](#Child) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | childs | [[SecondLevelChild](#SecondLevelChild)]? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | - | slug | String? | yes | | - | name | String? | yes | | - | customJson | [String: Any]? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | + | customJson | [String: Any]? | yes | | + | name | String? | yes | | + | slug | String? | yes | | | uid | Int? | yes | | - | childs | [[ThirdLevelChild](#ThirdLevelChild)]? | yes | | --- - #### [Child](#Child) + #### [CategoryItems](#CategoryItems) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | childs | [[Child](#Child)]? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | - | slug | String? | yes | | - | name | String? | yes | | - | customJson | [String: Any]? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | + | name | String? | yes | | + | slug | String? | yes | | | uid | Int? | yes | | - | childs | [[SecondLevelChild](#SecondLevelChild)]? | yes | | --- - #### [CategoryItems](#CategoryItems) + #### [DepartmentCategoryTree](#DepartmentCategoryTree) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | action | [ProductListingAction](#ProductListingAction)? | yes | | - | slug | String? | yes | | - | name | String? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | - | uid | Int? | yes | | - | childs | [[Child](#Child)]? | yes | | + | items | [[CategoryItems](#CategoryItems)]? | yes | | + | department | String? | yes | | --- - #### [DepartmentCategoryTree](#DepartmentCategoryTree) + #### [DepartmentIdentifier](#DepartmentIdentifier) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[CategoryItems](#CategoryItems)]? | yes | | - | department | String? | yes | | + | slug | String? | yes | | + | uid | Int? | yes | | --- @@ -8704,8 +8704,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | departments | [[DepartmentIdentifier](#DepartmentIdentifier)]? | yes | | | data | [[DepartmentCategoryTree](#DepartmentCategoryTree)]? | yes | | + | departments | [[DepartmentIdentifier](#DepartmentIdentifier)]? | yes | | --- @@ -8716,10 +8716,10 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | | uid | Int? | yes | | | logo | [Media](#Media)? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | name | String? | yes | | --- @@ -8730,9 +8730,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | message | String? | yes | | | items | [[ProductListingDetail](#ProductListingDetail)]? | yes | | | page | [Page](#Page) | no | | + | message | String? | yes | | --- @@ -8743,11 +8743,11 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | priorityOrder | Int? | yes | | - | slug | String? | yes | | | name | String? | yes | | - | uid | Int? | yes | | | logo | [Media](#Media)? | yes | | + | slug | String? | yes | | + | priorityOrder | Int? | yes | | + | uid | Int? | yes | | --- @@ -8770,9 +8770,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | type | String? | yes | | - | display | String? | yes | | - | action | [ProductListingAction](#ProductListingAction)? | yes | | | logo | [Media](#Media)? | yes | | + | action | [ProductListingAction](#ProductListingAction)? | yes | | + | display | String? | yes | | --- @@ -8794,51 +8794,51 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | cron | [String: Any]? | yes | | + | schedule | [String: Any]? | yes | | + | type | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | - | description | String? | yes | | - | slug | String? | yes | | - | allowSort | Bool? | yes | | - | logo | [Media](#Media)? | yes | | - | isActive | Bool? | yes | | - | visibleFacetsKeys | [String]? | yes | | - | meta | [String: Any]? | yes | | + | tag | [String]? | yes | | | name | String? | yes | | - | uid | String? | yes | | - | appId | String? | yes | | + | allowSort | Bool? | yes | | | allowFacets | Bool? | yes | | - | query | [String: Any]? | yes | | - | schedule | [String: Any]? | yes | | - | tag | [String]? | yes | | - | type | String? | yes | | + | meta | [String: Any]? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | + | visibleFacetsKeys | [String]? | yes | | | badge | [String: Any]? | yes | | + | logo | [Media](#Media)? | yes | | + | query | [String: Any]? | yes | | + | appId | String? | yes | | + | isActive | Bool? | yes | | + | slug | String? | yes | | + | cron | [String: Any]? | yes | | + | description | String? | yes | | + | uid | String? | yes | | --- - #### [CollectionListingFilterType](#CollectionListingFilterType) + #### [CollectionListingFilterTag](#CollectionListingFilterTag) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | display | String? | yes | | | isSelected | Bool? | yes | | + | display | String? | yes | | + | name | String? | yes | | --- - #### [CollectionListingFilterTag](#CollectionListingFilterTag) + #### [CollectionListingFilterType](#CollectionListingFilterType) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | display | String? | yes | | | isSelected | Bool? | yes | | + | display | String? | yes | | + | name | String? | yes | | --- @@ -8849,8 +8849,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | type | [[CollectionListingFilterType](#CollectionListingFilterType)]? | yes | | | tags | [[CollectionListingFilterTag](#CollectionListingFilterTag)]? | yes | | + | type | [[CollectionListingFilterType](#CollectionListingFilterType)]? | yes | | --- @@ -8862,8 +8862,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | items | [[GetCollectionDetailNest](#GetCollectionDetailNest)]? | yes | | - | page | [Page](#Page) | no | | | filters | [CollectionListingFilter](#CollectionListingFilter)? | yes | | + | page | [Page](#Page) | no | | --- @@ -8874,22 +8874,22 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | tag | [String]? | yes | | + | schedule | [String: Any]? | yes | | | type | String? | yes | | - | cron | [String: Any]? | yes | | + | appId | String? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | | isActive | Bool? | yes | | - | description | String? | yes | | - | slug | String? | yes | | - | badge | [String: Any]? | yes | | | name | String? | yes | | + | tag | [String]? | yes | | | visibleFacetsKeys | [String]? | yes | | - | allowSort | Bool? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | + | badge | [String: Any]? | yes | | | logo | [Media](#Media)? | yes | | | query | [String: Any]? | yes | | - | appId | String? | yes | | + | slug | String? | yes | | + | allowSort | Bool? | yes | | + | cron | [String: Any]? | yes | | | allowFacets | Bool? | yes | | - | schedule | [String: Any]? | yes | | + | description | String? | yes | | | meta | [String: Any]? | yes | | --- @@ -8936,9 +8936,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | products | [Int]? | yes | | - | brands | [Int]? | yes | | | collections | [Int]? | yes | | + | brands | [Int]? | yes | | + | products | [Int]? | yes | | --- @@ -8960,8 +8960,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | coordinates | [Double]? | yes | | | type | String? | yes | | + | coordinates | [Double]? | yes | | --- @@ -8972,16 +8972,16 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | pincode | Int? | yes | | - | address | String? | yes | | - | country | String? | yes | | | state | String? | yes | | + | city | String? | yes | | + | storeEmail | String? | yes | | | name | String? | yes | | - | latLong | [LatLong](#LatLong)? | yes | | + | address | String? | yes | | | storeCode | String? | yes | | + | country | String? | yes | | + | pincode | Int? | yes | | + | latLong | [LatLong](#LatLong)? | yes | | | uid | Int? | yes | | - | city | String? | yes | | - | storeEmail | String? | yes | | --- @@ -9000,19 +9000,14 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [StoreAddressSerializer](#StoreAddressSerializer) + #### [CompanyStore](#CompanyStore) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | address2 | String? | yes | | - | pincode | Int? | yes | | - | country | String? | yes | | - | landmark | String? | yes | | - | address1 | String? | yes | | - | state | String? | yes | | - | latitude | Double? | yes | | - | city | String? | yes | | - | longitude | Double? | yes | | + | companyType | String? | yes | | + | name | String? | yes | | + | uid | Int? | yes | | + | businessType | String? | yes | | --- @@ -9031,26 +9026,33 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [StoreManagerSerializer](#StoreManagerSerializer) + #### [StoreAddressSerializer](#StoreAddressSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | email | String? | yes | | - | mobileNo | [SellerPhoneNumber](#SellerPhoneNumber)? | yes | | + | state | String? | yes | | + | city | String? | yes | | + | pincode | Int? | yes | | + | country | String? | yes | | + | landmark | String? | yes | | + | address1 | String? | yes | | + | latitude | Double? | yes | | + | address2 | String? | yes | | + | longitude | Double? | yes | | --- - #### [CompanyStore](#CompanyStore) + #### [StoreDepartments](#StoreDepartments) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | name | String? | yes | | - | companyType | String? | yes | | - | businessType | String? | yes | | + | logo | String? | yes | | + | slug | String? | yes | | + | priorityOrder | Int? | yes | | | uid | Int? | yes | | --- @@ -9058,15 +9060,13 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [StoreDepartments](#StoreDepartments) + #### [StoreManagerSerializer](#StoreManagerSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | priorityOrder | Int? | yes | | - | slug | String? | yes | | + | mobileNo | [SellerPhoneNumber](#SellerPhoneNumber)? | yes | | | name | String? | yes | | - | uid | Int? | yes | | - | logo | String? | yes | | + | email | String? | yes | | --- @@ -9077,13 +9077,13 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | address | [StoreAddressSerializer](#StoreAddressSerializer)? | yes | | - | manager | [StoreManagerSerializer](#StoreManagerSerializer)? | yes | | - | name | String? | yes | | | company | [CompanyStore](#CompanyStore)? | yes | | - | uid | Int? | yes | | | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | + | name | String? | yes | | + | address | [StoreAddressSerializer](#StoreAddressSerializer)? | yes | | | departments | [[StoreDepartments](#StoreDepartments)]? | yes | | + | manager | [StoreManagerSerializer](#StoreManagerSerializer)? | yes | | + | uid | Int? | yes | | --- @@ -9095,8 +9095,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | items | [[AppStore](#AppStore)]? | yes | | - | page | [Page](#Page)? | yes | | | filters | [[StoreDepartments](#StoreDepartments)]? | yes | | + | page | [Page](#Page)? | yes | | --- @@ -9107,8 +9107,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | hour | Int? | yes | | | minute | Int? | yes | | + | hour | Int? | yes | | --- @@ -9120,8 +9120,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | opening | [Time](#Time)? | yes | | - | weekday | String? | yes | | | open | Bool? | yes | | + | weekday | String? | yes | | | closing | [Time](#Time)? | yes | | --- @@ -9133,74 +9133,74 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | address | [StoreAddressSerializer](#StoreAddressSerializer)? | yes | | - | manager | [StoreManagerSerializer](#StoreManagerSerializer)? | yes | | - | name | String? | yes | | - | customJson | [String: Any]? | yes | | - | timing | [[StoreTiming](#StoreTiming)]? | yes | | | company | [CompanyStore](#CompanyStore)? | yes | | - | uid | Int? | yes | | | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | + | customJson | [String: Any]? | yes | | + | name | String? | yes | | + | address | [StoreAddressSerializer](#StoreAddressSerializer)? | yes | | | departments | [[StoreDepartments](#StoreDepartments)]? | yes | | + | manager | [StoreManagerSerializer](#StoreManagerSerializer)? | yes | | + | uid | Int? | yes | | + | timing | [[StoreTiming](#StoreTiming)]? | yes | | --- - #### [ProductDetails](#ProductDetails) + #### [Price1](#Price1) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | ratingCount | Int? | yes | | - | description | String? | yes | | - | hasVariant | Bool? | yes | | - | slug | String? | yes | | - | countryOfOrigin | String? | yes | | - | templateTag | String? | yes | | - | outOfStock | Bool? | yes | | - | media | [[String: Any]]? | yes | | - | rating | Double? | yes | | - | isSet | Bool? | yes | | - | name | String? | yes | | - | imageNature | String? | yes | | - | brandUid | Int? | yes | | - | shortDescription | String? | yes | | - | identifier | [String: Any]? | yes | | - | groupedAttributes | [String: Any]? | yes | | - | hsnCode | Int? | yes | | - | attributes | [String: Any]? | yes | | - | itemCode | String? | yes | | - | images | [[String: Any]]? | yes | | + | maxEffective | Double? | yes | | + | minEffective | Double? | yes | | + | minMarked | Double? | yes | | + | maxMarked | Double? | yes | | + | currency | String? | yes | | --- - #### [Price1](#Price1) + #### [Size](#Size) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | minMarked | Double? | yes | | - | maxMarked | Double? | yes | | - | minEffective | Double? | yes | | - | currency | String? | yes | | - | maxEffective | Double? | yes | | + | isAvailable | Bool? | yes | | + | quantity | Int? | yes | | + | value | String? | yes | | + | display | String? | yes | | --- - #### [Size](#Size) + #### [ProductDetails](#ProductDetails) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | quantity | Int? | yes | | - | value | String? | yes | | - | display | String? | yes | | - | isAvailable | Bool? | yes | | + | name | String? | yes | | + | media | [[String: Any]]? | yes | | + | rating | Double? | yes | | + | imageNature | String? | yes | | + | templateTag | String? | yes | | + | ratingCount | Int? | yes | | + | brandUid | Int? | yes | | + | groupedAttributes | [String: Any]? | yes | | + | countryOfOrigin | String? | yes | | + | hasVariant | Bool? | yes | | + | outOfStock | Bool? | yes | | + | images | [[String: Any]]? | yes | | + | shortDescription | String? | yes | | + | isSet | Bool? | yes | | + | itemCode | String? | yes | | + | identifier | [String: Any]? | yes | | + | hsnCode | Int? | yes | | + | attributes | [String: Any]? | yes | | + | slug | String? | yes | | + | description | String? | yes | | --- @@ -9211,15 +9211,15 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | minQuantity | Int? | yes | | | allowRemove | Bool? | yes | | | productUid | Int? | yes | | + | price | [Price1](#Price1)? | yes | | + | sizes | [[Size](#Size)]? | yes | | + | productDetails | [ProductDetails](#ProductDetails)? | yes | | | autoSelect | Bool? | yes | | | autoAddToCart | Bool? | yes | | - | minQuantity | Int? | yes | | - | productDetails | [ProductDetails](#ProductDetails)? | yes | | - | price | [Price1](#Price1)? | yes | | | maxQuantity | Int? | yes | | - | sizes | [[Size](#Size)]? | yes | | --- @@ -9230,15 +9230,15 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | choice | String? | yes | | + | products | [[Products](#Products)]? | yes | | | pageVisibility | [String]? | yes | | - | slug | String? | yes | | | name | String? | yes | | - | products | [[Products](#Products)]? | yes | | | sameStoreAssignment | Bool? | yes | | - | companyId | Int? | yes | | | logo | String? | yes | | + | choice | String? | yes | | + | slug | String? | yes | | | active | Bool? | yes | | + | companyId | Int? | yes | | | meta | [String: Any]? | yes | | --- @@ -9262,82 +9262,82 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | distance | Int? | yes | | - | pincode | Int? | yes | | | quantity | Int? | yes | | | tat | Int? | yes | | + | pincode | Int? | yes | | --- - #### [ProductSetDistributionSizeV2](#ProductSetDistributionSizeV2) + #### [ProductStockPriceV2](#ProductStockPriceV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | pieces | Int? | yes | | - | size | String? | yes | | + | currency | String? | yes | | + | marked | Double? | yes | | + | effective | Double? | yes | | --- - #### [ProductSetDistributionV2](#ProductSetDistributionV2) + #### [ProductSetDistributionSizeV2](#ProductSetDistributionSizeV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sizes | [[ProductSetDistributionSizeV2](#ProductSetDistributionSizeV2)]? | yes | | + | pieces | Int? | yes | | + | size | String? | yes | | --- - #### [ProductSetV2](#ProductSetV2) + #### [ProductSetDistributionV2](#ProductSetDistributionV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | quantity | Int? | yes | | - | sizeDistribution | [ProductSetDistributionV2](#ProductSetDistributionV2)? | yes | | + | sizes | [[ProductSetDistributionSizeV2](#ProductSetDistributionSizeV2)]? | yes | | --- - #### [ArticleAssignmentV2](#ArticleAssignmentV2) + #### [ProductSetV2](#ProductSetV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | level | String? | yes | | - | strategy | String? | yes | | + | sizeDistribution | [ProductSetDistributionV2](#ProductSetDistributionV2)? | yes | | + | quantity | Int? | yes | | --- - #### [ProductStockPriceV2](#ProductStockPriceV2) + #### [DetailsSchemaV2](#DetailsSchemaV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | effective | Double? | yes | | - | marked | Double? | yes | | - | currency | String? | yes | | + | type | String? | yes | | + | value | String? | yes | | + | key | String? | yes | | --- - #### [DetailsSchemaV2](#DetailsSchemaV2) + #### [MarketPlaceSttributesSchemaV2](#MarketPlaceSttributesSchemaV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | value | String? | yes | | - | type | String? | yes | | - | key | String? | yes | | + | details | [[DetailsSchemaV2](#DetailsSchemaV2)]? | yes | | + | title | String? | yes | | --- @@ -9356,51 +9356,51 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [SellerV2](#SellerV2) + #### [StoreV2](#StoreV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | name | String? | yes | | - | count | Int? | yes | | | uid | Int? | yes | | + | count | Int? | yes | | --- - #### [StoreV2](#StoreV2) + #### [ReturnConfigSchemaV2](#ReturnConfigSchemaV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | count | Int? | yes | | - | uid | Int? | yes | | + | time | Int? | yes | | + | unit | String? | yes | | + | returnable | Bool? | yes | | --- - #### [ReturnConfigSchemaV2](#ReturnConfigSchemaV2) + #### [SellerV2](#SellerV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | returnable | Bool? | yes | | - | time | Int? | yes | | - | unit | String? | yes | | + | name | String? | yes | | + | uid | Int? | yes | | + | count | Int? | yes | | --- - #### [MarketPlaceSttributesSchemaV2](#MarketPlaceSttributesSchemaV2) + #### [ArticleAssignmentV2](#ArticleAssignmentV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | details | [[DetailsSchemaV2](#DetailsSchemaV2)]? | yes | | - | title | String? | yes | | + | level | String? | yes | | + | strategy | String? | yes | | --- @@ -9411,24 +9411,24 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | pincode | Int? | yes | | - | discount | String? | yes | | - | quantity | Int? | yes | | | strategyWiseListing | [[StrategyWiseListingSchemaV2](#StrategyWiseListingSchemaV2)]? | yes | | + | quantity | Int? | yes | | + | pricePerPiece | [ProductStockPriceV2](#ProductStockPriceV2)? | yes | | + | discount | String? | yes | | | set | [ProductSetV2](#ProductSetV2)? | yes | | - | specialBadge | String? | yes | | - | articleAssignment | [ArticleAssignmentV2](#ArticleAssignmentV2)? | yes | | + | marketplaceAttributes | [[MarketPlaceSttributesSchemaV2](#MarketPlaceSttributesSchemaV2)]? | yes | | + | articleId | String? | yes | | | price | [ProductStockPriceV2](#ProductStockPriceV2)? | yes | | - | longLat | [Double]? | yes | | | itemType | String? | yes | | + | longLat | [Double]? | yes | | | groupedAttributes | [[SellerGroupAttributes](#SellerGroupAttributes)]? | yes | | - | seller | [SellerV2](#SellerV2)? | yes | | | store | [StoreV2](#StoreV2)? | yes | | + | pincode | Int? | yes | | | returnConfig | [ReturnConfigSchemaV2](#ReturnConfigSchemaV2)? | yes | | - | articleId | String? | yes | | + | seller | [SellerV2](#SellerV2)? | yes | | + | articleAssignment | [ArticleAssignmentV2](#ArticleAssignmentV2)? | yes | | | sellerCount | Int? | yes | | - | marketplaceAttributes | [[MarketPlaceSttributesSchemaV2](#MarketPlaceSttributesSchemaV2)]? | yes | | - | pricePerPiece | [ProductStockPriceV2](#ProductStockPriceV2)? | yes | | + | specialBadge | String? | yes | | --- @@ -9439,9 +9439,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | value | String? | yes | | | isSelected | Bool? | yes | | + | value | String? | yes | | + | name | String? | yes | | --- @@ -9452,8 +9452,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sortOn | [[ProductSizeSellerFilterSchemaV2](#ProductSizeSellerFilterSchemaV2)]? | yes | | | items | [[ProductSizePriceResponseV2](#ProductSizePriceResponseV2)]? | yes | | + | sortOn | [[ProductSizeSellerFilterSchemaV2](#ProductSizeSellerFilterSchemaV2)]? | yes | | | page | [Page](#Page) | no | | --- diff --git a/documentation/application/PAYMENT.md b/documentation/application/PAYMENT.md index b0d6a8997c..11e3205709 100644 --- a/documentation/application/PAYMENT.md +++ b/documentation/application/PAYMENT.md @@ -2092,16 +2092,16 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | api | String? | yes | Payment gateway api endpoint | + | secret | String | no | Masked payment gateway api secret | + | key | String | no | Payment gateway api key | | configType | String | no | Fynd or self payment gateway | - | verifyApi | String? | yes | Payment gateway verify payment api endpoint | + | merchantId | String? | yes | Unique merchant id | | pin | String? | yes | Masked pin | - | key | String | no | Payment gateway api key | | merchantKey | String? | yes | Unique merchant key | - | merchantId | String? | yes | Unique merchant id | - | api | String? | yes | Payment gateway api endpoint | | sdk | Bool? | yes | SDK | - | secret | String | no | Masked payment gateway api secret | | userId | String? | yes | Registered User id | + | verifyApi | String? | yes | Payment gateway verify payment api endpoint | --- @@ -2112,16 +2112,16 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | env | String | no | Environment i.e Live or Test | - | mswipe | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | | ccavenue | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | - | juspay | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | - | payumoney | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | + | mswipe | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | + | simpl | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | | rupifi | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | - | success | Bool | no | | + | payumoney | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | + | env | String | no | Environment i.e Live or Test | | razorpay | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | | stripe | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | - | simpl | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | + | success | Bool | no | | + | juspay | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | --- @@ -2156,10 +2156,10 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | refresh | Bool? | yes | Refresh cache flag. | | cardId | String | no | Card token of payment gateway. | - | nickname | String? | yes | | | nameOnCard | String? | yes | | - | refresh | Bool? | yes | Refresh cache flag. | + | nickname | String? | yes | | --- @@ -2183,9 +2183,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | api | String? | yes | Payment gateway CARD api endpoint | | aggregator | String | no | Payment gateway name. | | customerId | String? | yes | Payment gateway customer id. | + | api | String? | yes | Payment gateway CARD api endpoint | --- @@ -2196,8 +2196,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool | no | Response is successful or not. | | cards | [CardPaymentGateway](#CardPaymentGateway) | no | Card's payment gateway with customer id. | + | success | Bool | no | Response is successful or not. | | message | String | no | Human readable message. | --- @@ -2209,22 +2209,22 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aggregatorName | String | no | aggregator_name | - | cardIsin | String? | yes | card_isin | - | expYear | Int? | yes | exp_year | - | cardBrandImage | String? | yes | card_brand_image | | cardBrand | String? | yes | card_brand | - | cardIssuer | String? | yes | card_issuer | - | cardReference | String? | yes | card_reference | - | cardType | String? | yes | card_type | - | nickname | String? | yes | nickname | + | cardId | String? | yes | card_id | | cardName | String? | yes | card_name | + | aggregatorName | String | no | aggregator_name | | expired | Bool? | yes | expired | + | cardReference | String? | yes | card_reference | + | cardNumber | String? | yes | card_number | | expMonth | Int? | yes | exp_month | - | cardFingerprint | String? | yes | card_fingerprint | - | cardId | String? | yes | card_id | + | nickname | String? | yes | nickname | + | expYear | Int? | yes | exp_year | + | cardIsin | String? | yes | card_isin | + | cardType | String? | yes | card_type | + | cardIssuer | String? | yes | card_issuer | + | cardBrandImage | String? | yes | card_brand_image | | cardToken | String? | yes | card_token | - | cardNumber | String? | yes | card_number | + | cardFingerprint | String? | yes | card_fingerprint | --- @@ -2271,11 +2271,11 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | aggregator | String | no | Payment gateway name in camel case i.e Simpl, Rupifi | + | merchantParams | [String: Any] | no | Extra meta fields. | | transactionAmountInPaise | Int | no | Payable amount in paise | | payload | String | no | Hashed payload string. | - | aggregator | String | no | Payment gateway name in camel case i.e Simpl, Rupifi | | phoneNumber | String | no | User mobile number without country code. | - | merchantParams | [String: Any] | no | Extra meta fields. | --- @@ -2299,11 +2299,11 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aggregator | String | no | Payment gateway name i.e Simpl, Mswipe | - | verified | Bool? | yes | Already Verified flag from payment gateway i.e Mswipe | - | transactionToken | String? | yes | Transaction token of payment gateway. | | amount | Int | no | Chargable amount of order. | | orderId | String | no | Unique order id. | + | transactionToken | String? | yes | Transaction token of payment gateway. | + | aggregator | String | no | Payment gateway name i.e Simpl, Mswipe | + | verified | Bool? | yes | Already Verified flag from payment gateway i.e Mswipe | --- @@ -2314,12 +2314,12 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aggregator | String | no | Payment gateway name i.e Simpl, Mswipe | - | success | Bool | no | Response is successful or not. | - | status | String | no | Status of charged payment. | | cartId | String? | yes | Cart id of customer | | deliveryAddressId | String? | yes | Delivery adddress id of customer | + | status | String | no | Status of charged payment. | | orderId | String | no | Unique order id. | + | aggregator | String | no | Payment gateway name i.e Simpl, Mswipe | + | success | Bool | no | Response is successful or not. | | message | String | no | Human readable message. | --- @@ -2331,18 +2331,18 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | currency | String | no | Currency code. | - | contact | String | no | Customer valid mobile number | - | aggregator | String | no | Payment gateway name | + | razorpayPaymentId | String? | yes | Payment gateway payment id | + | method | String | no | Payment method | | vpa | String? | yes | Customer vpa address | - | customerId | String | no | Payment gateway customer id. | - | merchantOrderId | String | no | Unique fynd order id | - | email | String | no | Customer valid email | | amount | Int | no | Payable amount. | | timeout | Int? | yes | Payment polling timeout if not recieved response | | orderId | String | no | Payment gateway order id | - | method | String | no | Payment method | - | razorpayPaymentId | String? | yes | Payment gateway payment id | + | customerId | String | no | Payment gateway customer id. | + | aggregator | String | no | Payment gateway name | + | currency | String | no | Currency code. | + | contact | String | no | Customer valid mobile number | + | email | String | no | Customer valid email | + | merchantOrderId | String | no | Unique fynd order id | --- @@ -2353,22 +2353,22 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aggregatorOrderId | String? | yes | Payment order id | - | bqrImage | String? | yes | Bharath qr image url. | - | currency | String? | yes | Currency code. | - | virtualId | String? | yes | Payment virtual address. | - | aggregator | String | no | Payment gateway name | - | vpa | String? | yes | Customer vpa address | - | customerId | String? | yes | Payment gateway customer id. | | upiPollUrl | String? | yes | UPI poll url. | - | merchantOrderId | String | no | order id | - | success | Bool | no | Response is successful or not. | + | razorpayPaymentId | String? | yes | Payment id. | + | virtualId | String? | yes | Payment virtual address. | | status | String? | yes | Status of payment. | + | aggregatorOrderId | String? | yes | Payment order id | + | merchantOrderId | String | no | order id | + | method | String | no | Payment method | | amount | Int? | yes | Payable amount. | + | vpa | String? | yes | Customer vpa address | + | customerId | String? | yes | Payment gateway customer id. | | timeout | Int? | yes | timeout. | - | method | String | no | Payment method | + | aggregator | String | no | Payment gateway name | + | bqrImage | String? | yes | Bharath qr image url. | + | currency | String? | yes | Currency code. | | pollingUrl | String | no | Polling url. | - | razorpayPaymentId | String? | yes | Payment id. | + | success | Bool | no | Response is successful or not. | --- @@ -2379,17 +2379,17 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | currency | String | no | Currency code. | - | contact | String | no | Customer valid mobile number | - | aggregator | String | no | Payment gateway name | - | vpa | String | no | Customer vpa address | - | customerId | String | no | Payment gateway customer id. | - | merchantOrderId | String | no | Unique fynd order id | | status | String | no | Status of payment. | - | email | String | no | Customer valid email | + | method | String | no | Payment method | + | vpa | String | no | Customer vpa address | | amount | Int | no | Payable amount. | | orderId | String | no | Payment gateway order id | - | method | String | no | Payment method | + | customerId | String | no | Payment gateway customer id. | + | aggregator | String | no | Payment gateway name | + | currency | String | no | Currency code. | + | contact | String | no | Customer valid mobile number | + | email | String | no | Customer valid email | + | merchantOrderId | String | no | Unique fynd order id | --- @@ -2400,47 +2400,47 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | retry | Bool | no | Response is successful or not. | | aggregatorName | String | no | Payment gateway name | | status | String | no | Payment status | - | retry | Bool | no | Response is successful or not. | --- - #### [PaymentModeLogo](#PaymentModeLogo) + #### [IntentAppErrorList](#IntentAppErrorList) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | small | String | no | smalll | - | large | String | no | large | + | code | String? | yes | code | + | packageName | String? | yes | package_name | --- - #### [IntentApp](#IntentApp) + #### [PaymentModeLogo](#PaymentModeLogo) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | packageName | String? | yes | package_name | - | displayName | String? | yes | display_name | - | code | String? | yes | code | - | logos | [PaymentModeLogo](#PaymentModeLogo)? | yes | logos | + | small | String | no | smalll | + | large | String | no | large | --- - #### [IntentAppErrorList](#IntentAppErrorList) + #### [IntentApp](#IntentApp) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | packageName | String? | yes | package_name | | code | String? | yes | code | + | displayName | String? | yes | display_name | + | logos | [PaymentModeLogo](#PaymentModeLogo)? | yes | logos | + | packageName | String? | yes | package_name | --- @@ -2451,35 +2451,35 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | cardBrandImage | String? | yes | card_brand_image | - | intentApp | [[IntentApp](#IntentApp)]? | yes | intent_app | - | cardFingerprint | String? | yes | card_fingerprint | - | cardBrand | String? | yes | card_brand | - | merchantCode | String? | yes | merchant code | + | intentAppErrorDictList | [[IntentAppErrorList](#IntentAppErrorList)]? | yes | intent_app_error_dict_list | | aggregatorName | String | no | aggregator_name | + | retryCount | Int? | yes | retry_count | + | cardReference | String? | yes | card_reference | + | nickname | String? | yes | nickname | + | cardType | String? | yes | card_type | + | merchantCode | String? | yes | merchant code | + | cardNumber | String? | yes | card_number | + | expMonth | Int? | yes | exp_month | + | timeout | Int? | yes | timeout | | cardIssuer | String? | yes | card_issuer | - | intentAppErrorDictList | [[IntentAppErrorList](#IntentAppErrorList)]? | yes | intent_app_error_dict_list | - | intentAppErrorList | [String]? | yes | intent_app_error_list | | displayName | String? | yes | display name | - | cardIsin | String? | yes | card_isin | | code | String? | yes | code | - | cardNumber | String? | yes | card_number | - | fyndVpa | String? | yes | fynd_vpa | - | displayPriority | Int? | yes | Dispaly Priority | - | cardType | String? | yes | card_type | - | expired | Bool? | yes | expired | - | cardName | String? | yes | card_name | - | timeout | Int? | yes | timeout | - | name | String? | yes | name | - | retryCount | Int? | yes | retry_count | - | cardToken | String? | yes | card_token | + | cardBrandImage | String? | yes | card_brand_image | | logoUrl | [PaymentModeLogo](#PaymentModeLogo)? | yes | Logo | + | cardBrand | String? | yes | card_brand | + | name | String? | yes | name | + | intentAppErrorList | [String]? | yes | intent_app_error_list | + | cardIsin | String? | yes | card_isin | | intentFlow | Bool? | yes | intent_flow | - | expYear | Int? | yes | exp_year | - | cardReference | String? | yes | card_reference | - | nickname | String? | yes | nickname | - | expMonth | Int? | yes | exp_month | | cardId | String? | yes | card_id | + | cardToken | String? | yes | card_token | + | cardFingerprint | String? | yes | card_fingerprint | + | intentApp | [[IntentApp](#IntentApp)]? | yes | intent_app | + | expired | Bool? | yes | expired | + | expYear | Int? | yes | exp_year | + | fyndVpa | String? | yes | fynd_vpa | + | cardName | String? | yes | card_name | + | displayPriority | Int? | yes | Dispaly Priority | --- @@ -2491,12 +2491,12 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | aggregatorName | String? | yes | Dispaly Priority | - | addCardEnabled | Bool? | yes | Annonymous card flag | - | displayPriority | Int | no | Dispaly Priority | | list | [[PaymentModeList](#PaymentModeList)]? | yes | Payment mode | | name | String | no | Payment mode name | - | displayName | String | no | Payment mode display name | | anonymousEnable | Bool? | yes | Annonymous card flag | + | addCardEnabled | Bool? | yes | Annonymous card flag | + | displayName | String | no | Payment mode display name | + | displayPriority | Int | no | Dispaly Priority | --- @@ -2507,10 +2507,10 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [String: Any]? | yes | Data | - | paymentFlowData | String? | yes | payment_flow_data | | paymentFlow | String? | yes | payment_flow | | apiLink | String? | yes | api_link | + | data | [String: Any]? | yes | Data | + | paymentFlowData | String? | yes | payment_flow_data | --- @@ -2521,17 +2521,17 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | mswipe | [AggregatorRoute](#AggregatorRoute)? | yes | mswipe | - | ccavenue | [AggregatorRoute](#AggregatorRoute)? | yes | Ccavenue | - | juspay | [AggregatorRoute](#AggregatorRoute)? | yes | Juspay | - | payubiz | [AggregatorRoute](#AggregatorRoute)? | yes | Payubiz | | upiRazorpay | [AggregatorRoute](#AggregatorRoute)? | yes | UPI_Razorpay | - | fynd | [AggregatorRoute](#AggregatorRoute)? | yes | Fynd | + | ccavenue | [AggregatorRoute](#AggregatorRoute)? | yes | Ccavenue | | bqrRazorpay | [AggregatorRoute](#AggregatorRoute)? | yes | BQR_Razorpay | + | mswipe | [AggregatorRoute](#AggregatorRoute)? | yes | mswipe | + | simpl | [AggregatorRoute](#AggregatorRoute)? | yes | simpl | | rupifi | [AggregatorRoute](#AggregatorRoute)? | yes | Rupifi | + | payubiz | [AggregatorRoute](#AggregatorRoute)? | yes | Payubiz | | razorpay | [AggregatorRoute](#AggregatorRoute)? | yes | Razorpay | + | fynd | [AggregatorRoute](#AggregatorRoute)? | yes | Fynd | | stripe | [AggregatorRoute](#AggregatorRoute)? | yes | Stripe | - | simpl | [AggregatorRoute](#AggregatorRoute)? | yes | simpl | + | juspay | [AggregatorRoute](#AggregatorRoute)? | yes | Juspay | --- @@ -2554,8 +2554,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool | no | Response is successful or not | | paymentOptions | [PaymentOptionAndFlow](#PaymentOptionAndFlow) | no | payment_options | + | success | Bool | no | Response is successful or not | --- @@ -2566,8 +2566,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | status | String? | yes | Rupifi KYC status | | kycUrl | String? | yes | Rupifi KYC banner url. | + | status | String? | yes | Rupifi KYC status | --- @@ -2591,10 +2591,10 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | id | Int | no | | - | logoSmall | String | no | Beneficiary small Logo | - | logoLarge | String | no | Beneficiary large Logo | | name | String | no | Beneficiary Name | + | logoSmall | String | no | Beneficiary small Logo | | displayName | String? | yes | Beneficiary Display Name | + | logoLarge | String | no | Beneficiary large Logo | --- @@ -2605,8 +2605,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | displayName | String | no | Beneficiary Mode Name | | items | [[TransferItemsDetails](#TransferItemsDetails)]? | yes | Beneficiary Mode Items | + | displayName | String | no | Beneficiary Mode Name | --- @@ -2628,8 +2628,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | transferMode | String | no | Transfer Mode of the Beneficiary to be added | | enable | Bool | no | True for enabling the Transfer Mode | + | transferMode | String | no | Transfer Mode of the Beneficiary to be added | --- @@ -2651,25 +2651,25 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | id | Int | no | | + | branchName | Bool? | yes | Branch Name Of Account | + | delightsUserName | String? | yes | User Id Who filled the Beneficiary | + | mobile | Bool? | yes | MObile no of User | + | transferMode | String | no | Transfer Mode Of Account | | bankName | String | no | Bank Name Of Account | - | isActive | Bool | no | Boolean Flag whether Beneficiary set or not | - | email | String | no | EMail of User | - | subtitle | String | no | SHort Title Of Account | | accountNo | String | no | Account Number | - | comment | Bool? | yes | Remarks | + | createdOn | String | no | Creation Date of Beneficiary | + | title | String | no | Title Of Account | | beneficiaryId | String | no | Benenficiary Id | | displayName | String | no | Display Name Of Account | - | delightsUserName | String? | yes | User Id Who filled the Beneficiary | - | transferMode | String | no | Transfer Mode Of Account | - | ifscCode | String | no | Ifsc Code Of Account | - | accountHolder | String | no | Account Holder Name | | modifiedOn | String | no | MOdification Date of Beneficiary | - | title | String | no | Title Of Account | - | branchName | Bool? | yes | Branch Name Of Account | - | createdOn | String | no | Creation Date of Beneficiary | - | mobile | Bool? | yes | MObile no of User | + | subtitle | String | no | SHort Title Of Account | + | isActive | Bool | no | Boolean Flag whether Beneficiary set or not | + | id | Int | no | | + | comment | Bool? | yes | Remarks | + | accountHolder | String | no | Account Holder Name | | address | String | no | Address of User | + | ifscCode | String | no | Ifsc Code Of Account | + | email | String | no | EMail of User | --- @@ -2680,8 +2680,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | showBeneficiaryDetails | Bool? | yes | Show beneficiary details or not. | | beneficiaries | [[OrderBeneficiaryDetails](#OrderBeneficiaryDetails)]? | yes | All Beneficiaries Of An Order | + | showBeneficiaryDetails | Bool? | yes | Show beneficiary details or not. | --- @@ -2692,9 +2692,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool | no | Response is successful or not | | code | String | no | Bad Request Data | | description | String | no | Not Found | + | success | Bool | no | Response is successful or not | --- @@ -2705,9 +2705,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool? | yes | Response is successful or not | - | bankName | String | no | Bank Name Of Account | | branchName | String | no | Branch Name Of Account | + | bankName | String | no | Bank Name Of Account | + | success | Bool? | yes | Response is successful or not | --- @@ -2718,9 +2718,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool | no | Response is successful or not | | code | String | no | Error descrption code. | | description | String | no | Error human understandable description. | + | success | Bool | no | Response is successful or not | --- @@ -2731,9 +2731,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | hashKey | String | no | Hash key of the beneficiary Id | | otp | String | no | Otp sent to the given Mobile No | | requestId | String | no | Request Id sent in | - | hashKey | String | no | Hash key of the beneficiary Id | --- @@ -2756,9 +2756,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | String | no | Response is successful or not | - | description | String | no | Wrong OTP Code | | isVerifiedFlag | Bool | no | Vefified flag. | + | description | String | no | Wrong OTP Code | + | success | String | no | Response is successful or not | --- @@ -2769,17 +2769,17 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | ifscCode | String | no | Ifsc Code of the Account | - | bankName | String | no | Bank Name of the Account | - | wallet | String? | yes | | + | branchName | String | no | Branch Name of the Account | | mobile | String | no | Moblie Number of the User | | vpa | String? | yes | | | accountHolder | String | no | Name of the Account Holder | + | bankName | String | no | Bank Name of the Account | + | comment | String? | yes | Remarks added by The user | | address | String? | yes | Address of the User | - | email | String | no | Email of the Account Holder | | accountNo | String | no | Account NUmber of the Account Holder | - | comment | String? | yes | Remarks added by The user | - | branchName | String | no | Branch Name of the Account | + | ifscCode | String | no | Ifsc Code of the Account | + | email | String | no | Email of the Account Holder | + | wallet | String? | yes | | --- @@ -2790,13 +2790,13 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | shipmentId | String | no | Shipment Id of the respective Merchant Order Id | - | requestId | String? | yes | | - | delights | Bool | no | True if beneficiary to be added by delights or False if by User | | otp | String? | yes | | - | details | [BeneficiaryModeDetails](#BeneficiaryModeDetails) | no | Beneficiary bank details | - | orderId | String | no | Merchant Order Id | | transferMode | String | no | Transfer Mode of the Beneficiary to be added | + | requestId | String? | yes | | + | orderId | String | no | Merchant Order Id | + | details | [BeneficiaryModeDetails](#BeneficiaryModeDetails) | no | Beneficiary bank details | + | shipmentId | String | no | Shipment Id of the respective Merchant Order Id | + | delights | Bool | no | True if beneficiary to be added by delights or False if by User | --- @@ -2807,9 +2807,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | isVerifiedFlag | Bool? | yes | | | data | [String: Any]? | yes | Refund account data. | | success | Bool | no | Success or failure flag. | - | isVerifiedFlag | Bool? | yes | | | message | String | no | Response message | --- @@ -2821,11 +2821,11 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | ifscCode | String | no | | - | bankName | String | no | | + | branchName | String | no | | | accountHolder | String | no | | + | bankName | String | no | | | accountNo | String | no | | - | branchName | String | no | | + | ifscCode | String | no | | --- @@ -2848,8 +2848,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | mobile | String | no | Wallet Moblie Number of the User | | countryCode | String | no | Country Code of the Mobile Number | + | mobile | String | no | Wallet Moblie Number of the User | --- @@ -2860,9 +2860,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | requestId | String | no | request id | - | success | Bool? | yes | Response is successful or not | | isVerifiedFlag | String | no | Boolean Flag whether OTP Validation is already done or not | + | success | Bool? | yes | Response is successful or not | + | requestId | String | no | request id | --- @@ -2885,8 +2885,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool? | yes | Response is successful or not | | isBeneficiarySet | Bool | no | Boolean Flag whether Beneficiary set or not | + | success | Bool? | yes | Response is successful or not | --- diff --git a/documentation/platform/CATALOG.md b/documentation/platform/CATALOG.md index ff153973d2..e5406eecda 100644 --- a/documentation/platform/CATALOG.md +++ b/documentation/platform/CATALOG.md @@ -7,13 +7,13 @@ ## Catalog Methods Catalog API's allows you to access list of products, prices, seller details, similar features, variants and many more useful features. * [getSearchKeywords](#getsearchkeywords) -* [deleteSearchKeywords](#deletesearchkeywords) * [updateSearchKeywords](#updatesearchkeywords) +* [deleteSearchKeywords](#deletesearchkeywords) * [getAllSearchKeyword](#getallsearchkeyword) * [createCustomKeyword](#createcustomkeyword) * [getAutocompleteKeywordDetail](#getautocompletekeyworddetail) -* [deleteAutocompleteKeyword](#deleteautocompletekeyword) * [updateAutocompleteKeyword](#updateautocompletekeyword) +* [deleteAutocompleteKeyword](#deleteautocompletekeyword) * [getAutocompleteConfig](#getautocompleteconfig) * [createCustomAutocompleteRule](#createcustomautocompleterule) * [getProductBundle](#getproductbundle) @@ -34,8 +34,8 @@ Catalog API's allows you to access list of products, prices, seller details, sim * [getAllCollections](#getallcollections) * [createCollection](#createcollection) * [getCollectionDetail](#getcollectiondetail) -* [deleteCollection](#deletecollection) * [updateCollection](#updatecollection) +* [deleteCollection](#deletecollection) * [getCollectionItems](#getcollectionitems) * [addCollectionItems](#addcollectionitems) * [getCatalogInsights](#getcataloginsights) @@ -65,14 +65,14 @@ Catalog API's allows you to access list of products, prices, seller details, sim * [getProducts](#getproducts) * [createProduct](#createproduct) * [getProduct](#getproduct) -* [deleteProduct](#deleteproduct) * [editProduct](#editproduct) +* [deleteProduct](#deleteproduct) * [getProductValidation](#getproductvalidation) * [getProductSize](#getproductsize) * [getProductBulkUploadHistory](#getproductbulkuploadhistory) * [createBulkProductUploadJob](#createbulkproductuploadjob) -* [deleteProductBulkJob](#deleteproductbulkjob) * [createProductsInBulk](#createproductsinbulk) +* [deleteProductBulkJob](#deleteproductbulkjob) * [getProductTags](#getproducttags) * [getProductAssetsInBulk](#getproductassetsinbulk) * [createProductAssetsInBulk](#createproductassetsinbulk) @@ -84,8 +84,8 @@ Catalog API's allows you to access list of products, prices, seller details, sim * [deleteInventory](#deleteinventory) * [getInventoryBulkUploadHistory](#getinventorybulkuploadhistory) * [createBulkInventoryJob](#createbulkinventoryjob) -* [deleteBulkInventoryJob](#deletebulkinventoryjob) * [createBulkInventory](#createbulkinventory) +* [deleteBulkInventoryJob](#deletebulkinventoryjob) * [getInventoryExport](#getinventoryexport) * [createInventoryExportJob](#createinventoryexportjob) * [exportInventoryConfig](#exportinventoryconfig) @@ -179,14 +179,14 @@ The Collection object. See example below or refer `GetSearchWordsDetailResponseS --- -#### deleteSearchKeywords -Delete a Search Keywords +#### updateSearchKeywords +Update Search Keyword ```swift -client.application("").catalog.deleteSearchKeywords(id: id) { (response, error) in +client.application("").catalog.updateSearchKeywords(id: id, body: body) { (response, error) in // Use response } ``` @@ -198,19 +198,19 @@ client.application("").catalog.deleteSearchKeywords(id: id) { (r | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | | id | String | yes | A `id` is a unique identifier for a particular detail. Pass the `id` of the keywords which you want to delete. | +| body | CreateSearchKeyword | yes | Request body | - -Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully +Update Search Keyword by its id. On successful request, returns the updated collection *Returned Response:* -[DeleteResponse](#DeleteResponse) +[GetSearchWordsData](#GetSearchWordsData) -Status object. Tells whether the operation was successful. See example below or refer `DeleteResponse` +The Collection object. See example below or refer `GetSearchWordsDataSchema` for details. @@ -219,9 +219,7 @@ Status object. Tells whether the operation was successful. See example below or   Example: ```json -{ - "message": "Words Deleted" -} + ``` @@ -236,14 +234,14 @@ Status object. Tells whether the operation was successful. See example below or --- -#### updateSearchKeywords -Update Search Keyword +#### deleteSearchKeywords +Delete a Search Keywords ```swift -client.application("").catalog.updateSearchKeywords(id: id, body: body) { (response, error) in +client.application("").catalog.deleteSearchKeywords(id: id) { (response, error) in // Use response } ``` @@ -255,19 +253,19 @@ client.application("").catalog.updateSearchKeywords(id: id, body | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | | id | String | yes | A `id` is a unique identifier for a particular detail. Pass the `id` of the keywords which you want to delete. | -| body | CreateSearchKeyword | yes | Request body | -Update Search Keyword by its id. On successful request, returns the updated collection + +Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully *Returned Response:* -[GetSearchWordsData](#GetSearchWordsData) +[DeleteResponse](#DeleteResponse) -The Collection object. See example below or refer `GetSearchWordsDataSchema` for details. +Status object. Tells whether the operation was successful. See example below or refer `DeleteResponse` @@ -276,7 +274,9 @@ The Collection object. See example below or refer `GetSearchWordsDataSchema` for   Example: ```json - +{ + "message": "Words Deleted" +} ``` @@ -521,14 +521,14 @@ The mapping object. See example below or refer `GetAutocompleteWordsResponseSche --- -#### deleteAutocompleteKeyword -Delete a Autocomplete Keywords +#### updateAutocompleteKeyword +Create & Update Autocomplete Keyword ```swift -client.application("").catalog.deleteAutocompleteKeyword(id: id) { (response, error) in +client.application("").catalog.updateAutocompleteKeyword(id: id, body: body) { (response, error) in // Use response } ``` @@ -540,19 +540,19 @@ client.application("").catalog.deleteAutocompleteKeyword(id: id) | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | | id | String | yes | A `id` is a unique identifier for a particular detail. Pass the `id` of the keywords which you want to delete. | +| body | CreateAutocompleteKeyword | yes | Request body | - -Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully +Update a mapping by it's id. On successful request, returns the updated Keyword mapping *Returned Response:* -[DeleteResponse](#DeleteResponse) +[GetAutocompleteWordsResponse](#GetAutocompleteWordsResponse) -Status object. Tells whether the operation was successful. See example below or refer `DeleteResponse` +The Mapping object. See example below or refer `GetAutocompleteWordsResponseSchema` for details. @@ -561,9 +561,7 @@ Status object. Tells whether the operation was successful. See example below or   Example: ```json -{ - "message": "Words Deleted" -} + ``` @@ -578,14 +576,14 @@ Status object. Tells whether the operation was successful. See example below or --- -#### updateAutocompleteKeyword -Create & Update Autocomplete Keyword +#### deleteAutocompleteKeyword +Delete a Autocomplete Keywords ```swift -client.application("").catalog.updateAutocompleteKeyword(id: id, body: body) { (response, error) in +client.application("").catalog.deleteAutocompleteKeyword(id: id) { (response, error) in // Use response } ``` @@ -597,19 +595,19 @@ client.application("").catalog.updateAutocompleteKeyword(id: id, | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | | id | String | yes | A `id` is a unique identifier for a particular detail. Pass the `id` of the keywords which you want to delete. | -| body | CreateAutocompleteKeyword | yes | Request body | -Update a mapping by it's id. On successful request, returns the updated Keyword mapping + +Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully *Returned Response:* -[GetAutocompleteWordsResponse](#GetAutocompleteWordsResponse) +[DeleteResponse](#DeleteResponse) -The Mapping object. See example below or refer `GetAutocompleteWordsResponseSchema` for details. +Status object. Tells whether the operation was successful. See example below or refer `DeleteResponse` @@ -618,7 +616,9 @@ The Mapping object. See example below or refer `GetAutocompleteWordsResponseSche   Example: ```json - +{ + "message": "Words Deleted" +} ``` @@ -3150,63 +3150,6 @@ The Collection object. See example below or refer `CollectionDetailResponse` for ---- - - -#### deleteCollection -Delete a Collection - - - - -```swift -client.application("").catalog.deleteCollection(id: id) { (response, error) in - // Use response -} -``` - - - - - -| Argument | Type | Required | Description | -| -------- | ---- | -------- | ----------- | -| id | String | yes | A `id` is a unique identifier of a collection. | - - - -Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully - -*Returned Response:* - - - - -[DeleteResponse](#DeleteResponse) - -Status object. Tells whether the operation was successful. See example below or refer `DeleteResponse` - - - - -
-  Example: - -```json -{ - "message": "Collection Deleted" -} -``` -
- - - - - - - - - --- @@ -3322,6 +3265,63 @@ The Collection object. See example below or refer `UpdateCollectionSchema` for d +--- + + +#### deleteCollection +Delete a Collection + + + + +```swift +client.application("").catalog.deleteCollection(id: id) { (response, error) in + // Use response +} +``` + + + + + +| Argument | Type | Required | Description | +| -------- | ---- | -------- | ----------- | +| id | String | yes | A `id` is a unique identifier of a collection. | + + + +Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully + +*Returned Response:* + + + + +[DeleteResponse](#DeleteResponse) + +Status object. Tells whether the operation was successful. See example below or refer `DeleteResponse` + + + + +
+  Example: + +```json +{ + "message": "Collection Deleted" +} +``` +
+ + + + + + + + + --- @@ -8339,14 +8339,14 @@ Product object. See example below or refer `product.utils.format_product_respons --- -#### deleteProduct -Delete a product. +#### editProduct +Edit a product. ```swift -client.catalog.deleteProduct(itemId: itemId) { (response, error) in +client.catalog.editProduct(itemId: itemId, body: body) { (response, error) in // Use response } ``` @@ -8358,10 +8358,10 @@ client.catalog.deleteProduct(itemId: itemId) { (response, error) in | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | | itemId | Int | yes | Id of the product to be updated. | +| body | ProductCreateUpdate | yes | Request body | - -This API allows to delete product. +This API allows to edit product. *Returned Response:* @@ -8396,14 +8396,14 @@ Returns a success response --- -#### editProduct -Edit a product. +#### deleteProduct +Delete a product. ```swift -client.catalog.editProduct(itemId: itemId, body: body) { (response, error) in +client.catalog.deleteProduct(itemId: itemId) { (response, error) in // Use response } ``` @@ -8415,10 +8415,10 @@ client.catalog.editProduct(itemId: itemId, body: body) { (response, error) in | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | | itemId | Int | yes | Id of the product to be updated. | -| body | ProductCreateUpdate | yes | Request body | -This API allows to edit product. + +This API allows to delete product. *Returned Response:* @@ -8823,14 +8823,14 @@ Returns a success response --- -#### deleteProductBulkJob -Delete Bulk product job. +#### createProductsInBulk +Create products in bulk associated with given batch Id. ```swift -client.catalog.deleteProductBulkJob(batchId: batchId) { (response, error) in +client.catalog.createProductsInBulk(batchId: batchId, body: body) { (response, error) in // Use response } ``` @@ -8841,11 +8841,11 @@ client.catalog.deleteProductBulkJob(batchId: batchId) { (response, error) in | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | -| batchId | Int | yes | Batch Id of the bulk product job to be deleted. | - +| batchId | String | yes | Batch Id in which assets to be uploaded. | +| body | BulkProductRequest | yes | Request body | -This API allows to delete bulk product job associated with company. +This API helps to create products in bulk push to kafka for approval/creation. *Returned Response:* @@ -8880,14 +8880,14 @@ Returns a success response --- -#### createProductsInBulk -Create products in bulk associated with given batch Id. +#### deleteProductBulkJob +Delete Bulk product job. ```swift -client.catalog.createProductsInBulk(batchId: batchId, body: body) { (response, error) in +client.catalog.deleteProductBulkJob(batchId: batchId) { (response, error) in // Use response } ``` @@ -8898,11 +8898,11 @@ client.catalog.createProductsInBulk(batchId: batchId, body: body) { (response, e | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | -| batchId | String | yes | Batch Id in which assets to be uploaded. | -| body | BulkProductRequest | yes | Request body | +| batchId | Int | yes | Batch Id of the bulk product job to be deleted. | -This API helps to create products in bulk push to kafka for approval/creation. + +This API allows to delete bulk product job associated with company. *Returned Response:* @@ -10763,14 +10763,14 @@ Returns a success response --- -#### deleteBulkInventoryJob -Delete Bulk Inventory job. +#### createBulkInventory +Create products in bulk associated with given batch Id. ```swift -client.catalog.deleteBulkInventoryJob(batchId: batchId) { (response, error) in +client.catalog.createBulkInventory(batchId: batchId, body: body) { (response, error) in // Use response } ``` @@ -10781,11 +10781,11 @@ client.catalog.deleteBulkInventoryJob(batchId: batchId) { (response, error) in | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | -| batchId | String | yes | Batch Id of the bulk delete job. | - +| batchId | String | yes | Batch Id of the bulk create job. | +| body | InventoryBulkRequest | yes | Request body | -This API allows to delete bulk Inventory job associated with company. +This API helps to create products in bulk push to kafka for approval/creation. *Returned Response:* @@ -10820,14 +10820,14 @@ Returns a success response --- -#### createBulkInventory -Create products in bulk associated with given batch Id. +#### deleteBulkInventoryJob +Delete Bulk Inventory job. ```swift -client.catalog.createBulkInventory(batchId: batchId, body: body) { (response, error) in +client.catalog.deleteBulkInventoryJob(batchId: batchId) { (response, error) in // Use response } ``` @@ -10838,11 +10838,11 @@ client.catalog.createBulkInventory(batchId: batchId, body: body) { (response, er | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | -| batchId | String | yes | Batch Id of the bulk create job. | -| body | InventoryBulkRequest | yes | Request body | +| batchId | String | yes | Batch Id of the bulk delete job. | -This API helps to create products in bulk push to kafka for approval/creation. + +This API allows to delete bulk Inventory job associated with company. *Returned Response:* @@ -13067,13 +13067,13 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | itemTotal | Int? | yes | | + | size | Int? | yes | | | current | Int? | yes | | | hasPrevious | Bool? | yes | | + | nextId | String? | yes | | | hasNext | Bool? | yes | | - | size | Int? | yes | | | type | String | no | | - | itemTotal | Int? | yes | | - | nextId | String? | yes | | --- @@ -13084,11 +13084,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | - | appId | String? | yes | | | words | [String]? | yes | | | result | [String: Any]? | yes | | | uid | String? | yes | | + | appId | String? | yes | | + | customJson | [String: Any]? | yes | | --- @@ -13111,48 +13111,48 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | code | String? | yes | | - | message | String? | yes | | - | status | Int? | yes | | | meta | [String: Any]? | yes | | + | status | Int? | yes | | + | message | String? | yes | | + | code | String? | yes | | --- - #### [DeleteResponse](#DeleteResponse) + #### [SearchKeywordResult](#SearchKeywordResult) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | message | String? | yes | | + | query | [String: Any] | no | | + | sortOn | String | no | | --- - #### [SearchKeywordResult](#SearchKeywordResult) + #### [CreateSearchKeyword](#CreateSearchKeyword) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | query | [String: Any] | no | | - | sortOn | String | no | | + | words | [String]? | yes | | + | result | [SearchKeywordResult](#SearchKeywordResult) | no | | + | isActive | Bool? | yes | | + | appId | String? | yes | | + | customJson | [String: Any]? | yes | | --- - #### [CreateSearchKeyword](#CreateSearchKeyword) + #### [DeleteResponse](#DeleteResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | - | appId | String? | yes | | - | words | [String]? | yes | | - | result | [SearchKeywordResult](#SearchKeywordResult) | no | | - | isActive | Bool? | yes | | + | message | String? | yes | | --- @@ -13175,11 +13175,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | - | appId | String? | yes | | | words | [String]? | yes | | | results | [[String: Any]]? | yes | | | uid | String? | yes | | + | appId | String? | yes | | + | customJson | [String: Any]? | yes | | --- @@ -13204,8 +13204,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | ---------- | ---- | -------- | ----------- | | query | [String: Any]? | yes | | | params | [String: Any]? | yes | | - | type | String? | yes | | | url | String? | yes | | + | type | String? | yes | | --- @@ -13228,8 +13228,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | type | String? | yes | | | url | String? | yes | | + | type | String? | yes | | --- @@ -13240,10 +13240,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | display | String? | yes | | - | customJson | [String: Any]? | yes | | | action | [AutocompleteAction](#AutocompleteAction)? | yes | | + | display | String? | yes | | | logo | [Media](#Media)? | yes | | + | customJson | [String: Any]? | yes | | --- @@ -13254,11 +13254,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | - | appId | String? | yes | | | words | [String]? | yes | | | results | [[AutocompleteResult](#AutocompleteResult)]? | yes | | | isActive | Bool? | yes | | + | appId | String? | yes | | + | customJson | [String: Any]? | yes | | --- @@ -13269,9 +13269,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | results | [[String: Any]]? | yes | | - | customJson | [String: Any]? | yes | | | appId | String? | yes | | + | customJson | [String: Any]? | yes | | + | results | [[String: Any]]? | yes | | | words | [String]? | yes | | --- @@ -13284,11 +13284,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | maxQuantity | Int | no | | - | allowRemove | Bool? | yes | | - | autoSelect | Bool? | yes | | | minQuantity | Int | no | | - | productUid | Int | no | | | autoAddToCart | Bool? | yes | | + | productUid | Int | no | | + | allowRemove | Bool? | yes | | + | autoSelect | Bool? | yes | | --- @@ -13299,20 +13299,20 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | - | sameStoreAssignment | Bool? | yes | | - | modifiedOn | String? | yes | | - | pageVisibility | [String]? | yes | | - | createdBy | [String: Any]? | yes | | - | createdOn | String? | yes | | - | id | String? | yes | | - | modifiedBy | [String: Any]? | yes | | + | choice | String | no | | | slug | String | no | | | meta | [String: Any]? | yes | | - | choice | String | no | | - | isActive | Bool | no | | | products | [[ProductBundleItem](#ProductBundleItem)] | no | | + | id | String? | yes | | | name | String | no | | + | createdBy | [String: Any]? | yes | | + | sameStoreAssignment | Bool? | yes | | + | pageVisibility | [String]? | yes | | + | modifiedBy | [String: Any]? | yes | | + | companyId | Int? | yes | | + | modifiedOn | String? | yes | | + | isActive | Bool | no | | + | createdOn | String? | yes | | | logo | String? | yes | | --- @@ -13336,18 +13336,18 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sameStoreAssignment | Bool? | yes | | - | modifiedOn | String? | yes | | - | pageVisibility | [String]? | yes | | - | createdBy | [String: Any]? | yes | | - | createdOn | String? | yes | | - | modifiedBy | [String: Any]? | yes | | + | choice | String | no | | | slug | String | no | | | meta | [String: Any]? | yes | | - | choice | String | no | | - | isActive | Bool | no | | | products | [[ProductBundleItem](#ProductBundleItem)] | no | | | name | String | no | | + | createdBy | [String: Any]? | yes | | + | sameStoreAssignment | Bool? | yes | | + | pageVisibility | [String]? | yes | | + | modifiedBy | [String: Any]? | yes | | + | modifiedOn | String? | yes | | + | isActive | Bool | no | | + | createdOn | String? | yes | | | logo | String? | yes | | --- @@ -13359,47 +13359,47 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | maxMarked | Double? | yes | | - | minEffective | Double? | yes | | - | maxEffective | Double? | yes | | | currency | String? | yes | | + | maxEffective | Double? | yes | | | minMarked | Double? | yes | | + | maxMarked | Double? | yes | | + | minEffective | Double? | yes | | --- - #### [Size](#Size) + #### [LimitedProductData](#LimitedProductData) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | display | String? | yes | | - | value | String? | yes | | - | isAvailable | Bool? | yes | | + | slug | String? | yes | | + | attributes | [String: Any]? | yes | | + | price | [String: Any]? | yes | | + | name | String? | yes | | + | sizes | [String]? | yes | | + | countryOfOrigin | String? | yes | | + | itemCode | String? | yes | | | quantity | Int? | yes | | + | uid | Int? | yes | | + | images | [String]? | yes | | + | shortDescription | String? | yes | | + | identifier | [String: Any]? | yes | | --- - #### [LimitedProductData](#LimitedProductData) + #### [Size](#Size) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | shortDescription | String? | yes | | - | itemCode | String? | yes | | | quantity | Int? | yes | | - | identifier | [String: Any]? | yes | | - | price | [String: Any]? | yes | | - | slug | String? | yes | | - | uid | Int? | yes | | - | countryOfOrigin | String? | yes | | - | sizes | [String]? | yes | | - | name | String? | yes | | - | attributes | [String: Any]? | yes | | - | images | [String]? | yes | | + | value | String? | yes | | + | display | String? | yes | | + | isAvailable | Bool? | yes | | --- @@ -13411,14 +13411,14 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | maxQuantity | Int? | yes | | - | allowRemove | Bool? | yes | | - | autoSelect | Bool? | yes | | | minQuantity | Int? | yes | | + | autoAddToCart | Bool? | yes | | | price | [Price](#Price)? | yes | | + | productDetails | [LimitedProductData](#LimitedProductData)? | yes | | | productUid | Int? | yes | | - | autoAddToCart | Bool? | yes | | + | allowRemove | Bool? | yes | | + | autoSelect | Bool? | yes | | | sizes | [[Size](#Size)]? | yes | | - | productDetails | [LimitedProductData](#LimitedProductData)? | yes | | --- @@ -13429,15 +13429,15 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | - | pageVisibility | [String]? | yes | | - | sameStoreAssignment | Bool? | yes | | - | slug | String? | yes | | - | meta | [String: Any]? | yes | | | choice | String? | yes | | - | isActive | Bool? | yes | | + | slug | String? | yes | | | products | [[GetProducts](#GetProducts)]? | yes | | + | meta | [String: Any]? | yes | | | name | String? | yes | | + | pageVisibility | [String]? | yes | | + | sameStoreAssignment | Bool? | yes | | + | companyId | Int? | yes | | + | isActive | Bool? | yes | | | logo | String? | yes | | --- @@ -13449,16 +13449,16 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sameStoreAssignment | Bool? | yes | | - | modifiedOn | String? | yes | | - | pageVisibility | [String]? | yes | | - | modifiedBy | [String: Any]? | yes | | + | choice | String | no | | | slug | String | no | | | meta | [String: Any]? | yes | | - | choice | String | no | | - | isActive | Bool | no | | | products | [[ProductBundleItem](#ProductBundleItem)] | no | | | name | String | no | | + | sameStoreAssignment | Bool? | yes | | + | pageVisibility | [String]? | yes | | + | modifiedBy | [String: Any]? | yes | | + | modifiedOn | String? | yes | | + | isActive | Bool | no | | | logo | String? | yes | | --- @@ -13482,9 +13482,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | headers | [String: Any]? | yes | | | values | [[String: Any]]? | yes | | | unit | String? | yes | | + | headers | [String: Any]? | yes | | --- @@ -13506,21 +13506,21 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | - | guide | [Guide](#Guide)? | yes | | - | title | String | no | | - | createdBy | [String: Any]? | yes | | - | modifiedOn | String? | yes | | | tag | String? | yes | | - | createdOn | String? | yes | | + | description | String? | yes | | | id | String? | yes | | - | modifiedBy | [String: Any]? | yes | | + | name | String | no | | + | createdBy | [String: Any]? | yes | | | active | Bool? | yes | | - | subtitle | String? | yes | | - | description | String? | yes | | - | brandId | Int? | yes | | + | title | String | no | | | image | String? | yes | | - | name | String | no | | + | brandId | Int? | yes | | + | companyId | Int? | yes | | + | modifiedBy | [String: Any]? | yes | | + | modifiedOn | String? | yes | | + | guide | [Guide](#Guide)? | yes | | + | subtitle | String? | yes | | + | createdOn | String? | yes | | --- @@ -13542,19 +13542,19 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | - | guide | [String: Any]? | yes | | - | createdBy | [String: Any]? | yes | | - | modifiedOn | String? | yes | | - | title | String? | yes | | - | createdOn | String? | yes | | | tag | String? | yes | | | id | String? | yes | | - | modifiedBy | [String: Any]? | yes | | + | createdBy | [String: Any]? | yes | | + | name | String? | yes | | | active | Bool? | yes | | - | subtitle | String? | yes | | + | title | String? | yes | | | brandId | Int? | yes | | - | name | String? | yes | | + | modifiedBy | [String: Any]? | yes | | + | companyId | Int? | yes | | + | subtitle | String? | yes | | + | modifiedOn | String? | yes | | + | guide | [String: Any]? | yes | | + | createdOn | String? | yes | | --- @@ -13590,8 +13590,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | ---------- | ---- | -------- | ----------- | | display | String? | yes | | | filterTypes | [String]? | yes | | - | units | [[String: Any]]? | yes | | | key | String? | yes | | + | units | [[String: Any]]? | yes | | --- @@ -13648,10 +13648,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | compare | [String: Any]? | yes | | - | variant | [String: Any]? | yes | | | detail | [String: Any]? | yes | | | similar | [String: Any]? | yes | | + | variant | [String: Any]? | yes | | + | compare | [String: Any]? | yes | | --- @@ -13674,9 +13674,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | display | String? | yes | | | end | Double? | yes | | | start | Double? | yes | | + | display | String? | yes | | --- @@ -13687,10 +13687,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sort | String? | yes | | - | value | String? | yes | | | condition | String? | yes | | + | sort | String? | yes | | | bucketPoints | [[ConfigurationBucketPoints](#ConfigurationBucketPoints)]? | yes | | + | value | String? | yes | | | map | [String: Any]? | yes | | --- @@ -13702,13 +13702,13 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | priority | Int | no | | - | valueConfig | [ConfigurationListingFilterValue](#ConfigurationListingFilterValue)? | yes | | - | type | String | no | | - | isActive | Bool | no | | | key | String | no | | | name | String? | yes | | + | valueConfig | [ConfigurationListingFilterValue](#ConfigurationListingFilterValue)? | yes | | + | isActive | Bool | no | | + | priority | Int | no | | | logo | String? | yes | | + | type | String | no | | --- @@ -13719,8 +13719,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | attributeConfig | [[ConfigurationListingFilterConfig](#ConfigurationListingFilterConfig)]? | yes | | | allowSingle | Bool | no | | + | attributeConfig | [[ConfigurationListingFilterConfig](#ConfigurationListingFilterConfig)]? | yes | | --- @@ -13731,10 +13731,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | priority | Int | no | | - | isActive | Bool | no | | | key | String | no | | | name | String? | yes | | + | isActive | Bool | no | | + | priority | Int | no | | | logo | String? | yes | | --- @@ -13746,8 +13746,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | config | [[ConfigurationListingSortConfig](#ConfigurationListingSortConfig)]? | yes | | | defaultKey | String | no | | + | config | [[ConfigurationListingSortConfig](#ConfigurationListingSortConfig)]? | yes | | --- @@ -13770,24 +13770,24 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | min | Int | no | | | max | Int | no | | + | min | Int | no | | --- - #### [ConfigurationProductVariantConfig](#ConfigurationProductVariantConfig) + #### [ConfigurationProductConfig](#ConfigurationProductConfig) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | priority | Int | no | | - | size | [ProductSize](#ProductSize) | no | | - | isActive | Bool | no | | | key | String | no | | - | name | String | no | | - | displayType | String | no | | + | size | [ProductSize](#ProductSize)? | yes | | + | title | String? | yes | | + | isActive | Bool | no | | + | subtitle | String? | yes | | + | priority | Int | no | | | logo | String? | yes | | --- @@ -13795,27 +13795,27 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [ConfigurationProductVariant](#ConfigurationProductVariant) + #### [ConfigurationProductSimilar](#ConfigurationProductSimilar) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | config | [[ConfigurationProductVariantConfig](#ConfigurationProductVariantConfig)]? | yes | | + | config | [[ConfigurationProductConfig](#ConfigurationProductConfig)]? | yes | | --- - #### [ConfigurationProductConfig](#ConfigurationProductConfig) + #### [ConfigurationProductVariantConfig](#ConfigurationProductVariantConfig) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | title | String? | yes | | - | priority | Int | no | | - | size | [ProductSize](#ProductSize)? | yes | | - | isActive | Bool | no | | + | displayType | String | no | | | key | String | no | | - | subtitle | String? | yes | | + | size | [ProductSize](#ProductSize) | no | | + | name | String | no | | + | isActive | Bool | no | | + | priority | Int | no | | | logo | String? | yes | | --- @@ -13823,11 +13823,11 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [ConfigurationProductSimilar](#ConfigurationProductSimilar) + #### [ConfigurationProductVariant](#ConfigurationProductVariant) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | config | [[ConfigurationProductConfig](#ConfigurationProductConfig)]? | yes | | + | config | [[ConfigurationProductVariantConfig](#ConfigurationProductVariantConfig)]? | yes | | --- @@ -13838,8 +13838,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | variant | [ConfigurationProductVariant](#ConfigurationProductVariant) | no | | | similar | [ConfigurationProductSimilar](#ConfigurationProductSimilar) | no | | + | variant | [ConfigurationProductVariant](#ConfigurationProductVariant) | no | | --- @@ -13850,12 +13850,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | listing | [ConfigurationListing](#ConfigurationListing)? | yes | | - | appId | String | no | | | id | String? | yes | | - | configId | String? | yes | | | configType | String | no | | + | listing | [ConfigurationListing](#ConfigurationListing)? | yes | | | product | [ConfigurationProduct](#ConfigurationProduct)? | yes | | + | appId | String | no | | + | configId | String? | yes | | --- @@ -13878,11 +13878,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | configType | String | no | | | listing | [ConfigurationListing](#ConfigurationListing)? | yes | | + | product | [ConfigurationProduct](#ConfigurationProduct)? | yes | | | appId | String | no | | | configId | String? | yes | | - | configType | String | no | | - | product | [ConfigurationProduct](#ConfigurationProduct)? | yes | | --- @@ -13905,12 +13905,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | listing | [GetCatalogConfigurationDetailsSchemaListing](#GetCatalogConfigurationDetailsSchemaListing)? | yes | | - | appId | String | no | | | id | String? | yes | | - | configId | String? | yes | | | configType | String | no | | + | listing | [GetCatalogConfigurationDetailsSchemaListing](#GetCatalogConfigurationDetailsSchemaListing)? | yes | | | product | [GetCatalogConfigurationDetailsProduct](#GetCatalogConfigurationDetailsProduct)? | yes | | + | appId | String | no | | + | configId | String? | yes | | --- @@ -13929,22 +13929,35 @@ Company profile object. See example below or refer `LocationListSerializer` for + #### [ProductSortOn](#ProductSortOn) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | value | String? | yes | | + | name | String? | yes | | + | isSelected | Bool? | yes | | + +--- + + + + #### [ProductFiltersValue](#ProductFiltersValue) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | display | String | no | | + | displayFormat | String? | yes | | | count | Int? | yes | | - | currencySymbol | String? | yes | | + | selectedMax | Int? | yes | | | min | Int? | yes | | + | isSelected | Bool | no | | + | currencyCode | String? | yes | | + | currencySymbol | String? | yes | | | queryFormat | String? | yes | | + | display | String | no | | + | value | String | no | | | max | Int? | yes | | - | selectedMax | Int? | yes | | - | displayFormat | String? | yes | | | selectedMin | Int? | yes | | - | value | String | no | | - | isSelected | Bool | no | | - | currencyCode | String? | yes | | --- @@ -13955,9 +13968,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | display | String | no | | | kind | String? | yes | | | name | String | no | | + | display | String | no | | | logo | String? | yes | | --- @@ -13977,63 +13990,25 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [ProductSortOn](#ProductSortOn) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | value | String? | yes | | - | name | String? | yes | | - | isSelected | Bool? | yes | | - ---- - - - - #### [GetCollectionQueryOptionResponse](#GetCollectionQueryOptionResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | filters | [[ProductFilters](#ProductFilters)]? | yes | | | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | + | filters | [[ProductFilters](#ProductFilters)]? | yes | | --- - #### [CollectionListingFilterTag](#CollectionListingFilterTag) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | display | String? | yes | | - | name | String? | yes | | - | isSelected | Bool? | yes | | - ---- - - - - - #### [CollectionListingFilterType](#CollectionListingFilterType) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | display | String? | yes | | - | name | String? | yes | | - | isSelected | Bool? | yes | | - ---- - - - - - #### [CollectionListingFilter](#CollectionListingFilter) + #### [Media1](#Media1) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | tags | [[CollectionListingFilterTag](#CollectionListingFilterTag)]? | yes | | - | type | [[CollectionListingFilterType](#CollectionListingFilterType)]? | yes | | + | meta | [String: Any]? | yes | | + | url | String | no | | + | type | String? | yes | | --- @@ -14044,8 +14019,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aspectRatio | String? | yes | | | url | String? | yes | | + | aspectRatio | String? | yes | | --- @@ -14088,93 +14063,80 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [Media1](#Media1) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | type | String? | yes | | - | meta | [String: Any]? | yes | | - | url | String | no | | - ---- - - - - #### [GetCollectionDetailNest](#GetCollectionDetailNest) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | visibleFacetsKeys | [String]? | yes | | - | cron | [String: Any]? | yes | | + | slug | String? | yes | | + | tag | [String]? | yes | | | meta | [String: Any]? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | - | query | [String: Any]? | yes | | - | type | String? | yes | | + | schedule | [String: Any]? | yes | | + | visibleFacetsKeys | [String]? | yes | | | uid | String? | yes | | - | description | String? | yes | | - | allowSort | Bool? | yes | | | appId | String? | yes | | - | slug | String? | yes | | - | allowFacets | Bool? | yes | | - | schedule | [String: Any]? | yes | | - | name | String? | yes | | - | action | [Action](#Action)? | yes | | | logo | [Media1](#Media1)? | yes | | - | tag | [String]? | yes | | - | isActive | Bool? | yes | | + | type | String? | yes | | | badge | [String: Any]? | yes | | + | name | String? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | isActive | Bool? | yes | | + | allowSort | Bool? | yes | | + | action | [Action](#Action)? | yes | | + | description | String? | yes | | + | query | [String: Any]? | yes | | + | cron | [String: Any]? | yes | | + | allowFacets | Bool? | yes | | --- - #### [GetCollectionListingResponse](#GetCollectionListingResponse) + #### [CollectionListingFilterTag](#CollectionListingFilterTag) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | filters | [CollectionListingFilter](#CollectionListingFilter)? | yes | | - | page | [Page](#Page)? | yes | | - | items | [[GetCollectionDetailNest](#GetCollectionDetailNest)]? | yes | | + | display | String? | yes | | + | name | String? | yes | | + | isSelected | Bool? | yes | | --- - #### [CollectionImage](#CollectionImage) + #### [CollectionListingFilterType](#CollectionListingFilterType) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aspectRatio | String | no | | - | url | String | no | | + | display | String? | yes | | + | name | String? | yes | | + | isSelected | Bool? | yes | | --- - #### [CollectionBanner](#CollectionBanner) + #### [CollectionListingFilter](#CollectionListingFilter) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | portrait | [CollectionImage](#CollectionImage) | no | | - | landscape | [CollectionImage](#CollectionImage) | no | | + | tags | [[CollectionListingFilterTag](#CollectionListingFilterTag)]? | yes | | + | type | [[CollectionListingFilterType](#CollectionListingFilterType)]? | yes | | --- - #### [UserInfo](#UserInfo) + #### [GetCollectionListingResponse](#GetCollectionListingResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | uid | String? | yes | | - | email | String? | yes | | - | userId | String? | yes | | - | username | String? | yes | | + | page | [Page](#Page)? | yes | | + | items | [[GetCollectionDetailNest](#GetCollectionDetailNest)]? | yes | | + | filters | [CollectionListingFilter](#CollectionListingFilter)? | yes | | --- @@ -14195,12 +14157,12 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [SeoDetail](#SeoDetail) + #### [CollectionImage](#CollectionImage) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | title | String? | yes | | - | description | String? | yes | | + | url | String | no | | + | aspectRatio | String | no | | --- @@ -14219,133 +14181,157 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [CreateCollection](#CreateCollection) + #### [SeoDetail](#SeoDetail) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | - | visibleFacetsKeys | [String]? | yes | | - | published | Bool? | yes | | - | meta | [String: Any]? | yes | | - | banners | [CollectionBanner](#CollectionBanner) | no | | - | query | [String: Any]? | yes | | - | createdBy | [UserInfo](#UserInfo)? | yes | | - | modifiedBy | [UserInfo](#UserInfo)? | yes | | - | type | String | no | | - | sortOn | String? | yes | | + | title | String? | yes | | | description | String? | yes | | - | localeLanguage | [String: Any]? | yes | | - | isVisible | Bool? | yes | | - | allowSort | Bool? | yes | | - | appId | String | no | | - | slug | String | no | | - | allowFacets | Bool? | yes | | - | schedule | [Schedule](#Schedule)? | yes | | - | name | String | no | | - | logo | [CollectionImage](#CollectionImage) | no | | - | tags | [String]? | yes | | - | seo | [SeoDetail](#SeoDetail)? | yes | | - | isActive | Bool? | yes | | - | badge | [CollectionBadge](#CollectionBadge)? | yes | | --- - #### [CollectionCreateResponse](#CollectionCreateResponse) + #### [CollectionBanner](#CollectionBanner) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | allowSort | Bool? | yes | | - | appId | String? | yes | | - | tag | [String]? | yes | | - | visibleFacetsKeys | [String]? | yes | | - | slug | String? | yes | | - | cron | [String: Any]? | yes | | - | type | String? | yes | | - | meta | [String: Any]? | yes | | - | allowFacets | Bool? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | - | isActive | Bool? | yes | | - | schedule | [String: Any]? | yes | | - | description | String? | yes | | - | badge | [String: Any]? | yes | | - | query | [String: Any]? | yes | | - | name | String? | yes | | - | logo | [BannerImage](#BannerImage)? | yes | | + | portrait | [CollectionImage](#CollectionImage) | no | | + | landscape | [CollectionImage](#CollectionImage) | no | | --- - #### [CollectionDetailResponse](#CollectionDetailResponse) + #### [UserInfo](#UserInfo) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | allowSort | Bool? | yes | | - | appId | String? | yes | | - | tag | [String]? | yes | | - | visibleFacetsKeys | [String]? | yes | | - | slug | String? | yes | | - | cron | [String: Any]? | yes | | - | type | String? | yes | | + | uid | String? | yes | | + | email | String? | yes | | + | userId | String? | yes | | + | username | String? | yes | | + +--- + + + + + #### [CreateCollection](#CreateCollection) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | slug | String | no | | | meta | [String: Any]? | yes | | - | allowFacets | Bool? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | + | schedule | [Schedule](#Schedule)? | yes | | + | visibleFacetsKeys | [String]? | yes | | + | appId | String | no | | + | localeLanguage | [String: Any]? | yes | | + | logo | [CollectionImage](#CollectionImage) | no | | + | type | String | no | | + | badge | [CollectionBadge](#CollectionBadge)? | yes | | + | seo | [SeoDetail](#SeoDetail)? | yes | | + | name | String | no | | + | banners | [CollectionBanner](#CollectionBanner) | no | | | isActive | Bool? | yes | | - | schedule | [String: Any]? | yes | | + | allowSort | Bool? | yes | | + | customJson | [String: Any]? | yes | | + | description | String? | yes | | + | query | [String: Any]? | yes | | + | createdBy | [UserInfo](#UserInfo)? | yes | | + | tags | [String]? | yes | | + | allowFacets | Bool? | yes | | + | modifiedBy | [UserInfo](#UserInfo)? | yes | | + | published | Bool? | yes | | + | sortOn | String? | yes | | + | isVisible | Bool? | yes | | + +--- + + + + + #### [CollectionCreateResponse](#CollectionCreateResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | tag | [String]? | yes | | | description | String? | yes | | | badge | [String: Any]? | yes | | + | slug | String? | yes | | + | meta | [String: Any]? | yes | | | query | [String: Any]? | yes | | + | allowSort | Bool? | yes | | | name | String? | yes | | - | logo | [Media1](#Media1)? | yes | | + | cron | [String: Any]? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | schedule | [String: Any]? | yes | | + | allowFacets | Bool? | yes | | + | visibleFacetsKeys | [String]? | yes | | + | isActive | Bool? | yes | | + | appId | String? | yes | | + | logo | [BannerImage](#BannerImage)? | yes | | + | type | String? | yes | | --- - #### [UpdateCollection](#UpdateCollection) + #### [CollectionDetailResponse](#CollectionDetailResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | - | visibleFacetsKeys | [String]? | yes | | - | published | Bool? | yes | | + | tag | [String]? | yes | | + | description | String? | yes | | + | badge | [String: Any]? | yes | | + | slug | String? | yes | | | meta | [String: Any]? | yes | | - | banners | [CollectionBanner](#CollectionBanner)? | yes | | | query | [String: Any]? | yes | | - | modifiedBy | [UserInfo](#UserInfo)? | yes | | - | sortOn | String? | yes | | - | localeLanguage | [String: Any]? | yes | | - | description | String? | yes | | - | isVisible | Bool? | yes | | | allowSort | Bool? | yes | | - | slug | String? | yes | | - | allowFacets | Bool? | yes | | - | schedule | [Schedule](#Schedule)? | yes | | | name | String? | yes | | - | logo | [CollectionImage](#CollectionImage)? | yes | | - | tags | [String]? | yes | | - | seo | [SeoDetail](#SeoDetail)? | yes | | + | cron | [String: Any]? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | schedule | [String: Any]? | yes | | + | allowFacets | Bool? | yes | | + | visibleFacetsKeys | [String]? | yes | | | isActive | Bool? | yes | | - | badge | [CollectionBadge](#CollectionBadge)? | yes | | + | appId | String? | yes | | + | logo | [Media1](#Media1)? | yes | | + | type | String? | yes | | --- - #### [ProductBrand](#ProductBrand) + #### [UpdateCollection](#UpdateCollection) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | uid | Int? | yes | | + | slug | String? | yes | | + | meta | [String: Any]? | yes | | + | schedule | [Schedule](#Schedule)? | yes | | + | visibleFacetsKeys | [String]? | yes | | + | localeLanguage | [String: Any]? | yes | | + | logo | [CollectionImage](#CollectionImage)? | yes | | + | badge | [CollectionBadge](#CollectionBadge)? | yes | | + | seo | [SeoDetail](#SeoDetail)? | yes | | | name | String? | yes | | - | action | [Action](#Action)? | yes | | - | logo | [Media1](#Media1)? | yes | | + | banners | [CollectionBanner](#CollectionBanner)? | yes | | + | isActive | Bool? | yes | | + | allowSort | Bool? | yes | | + | customJson | [String: Any]? | yes | | + | description | String? | yes | | + | query | [String: Any]? | yes | | + | tags | [String]? | yes | | + | allowFacets | Bool? | yes | | + | modifiedBy | [UserInfo](#UserInfo)? | yes | | + | published | Bool? | yes | | + | sortOn | String? | yes | | + | isVisible | Bool? | yes | | --- @@ -14356,10 +14342,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | min | Double? | yes | | + | currencyCode | String? | yes | | | max | Double? | yes | | + | min | Double? | yes | | | currencySymbol | String? | yes | | - | currencyCode | String? | yes | | --- @@ -14395,8 +14381,22 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | details | [[ProductDetailAttribute](#ProductDetailAttribute)]? | yes | | | title | String? | yes | | + | details | [[ProductDetailAttribute](#ProductDetailAttribute)]? | yes | | + +--- + + + + + #### [ProductBrand](#ProductBrand) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | uid | Int? | yes | | + | name | String? | yes | | + | logo | [Media1](#Media1)? | yes | | + | action | [Action](#Action)? | yes | | --- @@ -14407,32 +14407,32 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | color | String? | yes | | - | itemCode | String? | yes | | - | ratingCount | Int? | yes | | - | brand | [ProductBrand](#ProductBrand)? | yes | | | itemType | String? | yes | | - | sellable | Bool? | yes | | + | slug | String | no | | + | price | [ProductListingPrice](#ProductListingPrice)? | yes | | + | teaserTag | [String: Any]? | yes | | + | productOnlineDate | String? | yes | | + | hasVariant | Bool? | yes | | | rating | Double? | yes | | + | sellable | Bool? | yes | | | attributes | [String: Any]? | yes | | - | similars | [String]? | yes | | | promoMeta | [String: Any]? | yes | | + | uid | Int? | yes | | + | color | String? | yes | | + | tryouts | [String]? | yes | | + | type | String? | yes | | + | name | String? | yes | | + | itemCode | String? | yes | | + | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | | shortDescription | String? | yes | | | discount | String? | yes | | - | highlights | [String]? | yes | | - | type | String? | yes | | - | uid | Int? | yes | | + | ratingCount | Int? | yes | | | description | String? | yes | | + | highlights | [String]? | yes | | + | brand | [ProductBrand](#ProductBrand)? | yes | | | medias | [[Media1](#Media1)]? | yes | | - | productOnlineDate | String? | yes | | - | tryouts | [String]? | yes | | - | price | [ProductListingPrice](#ProductListingPrice)? | yes | | - | slug | String | no | | + | similars | [String]? | yes | | | imageNature | String? | yes | | - | teaserTag | [String: Any]? | yes | | - | name | String? | yes | | - | hasVariant | Bool? | yes | | - | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | --- @@ -14443,10 +14443,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | filters | [[ProductFilters](#ProductFilters)]? | yes | | | page | [Page](#Page)? | yes | | - | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | | items | [[ProductListingDetail](#ProductListingDetail)]? | yes | | + | filters | [[ProductFilters](#ProductFilters)]? | yes | | + | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | --- @@ -14457,8 +14457,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | pageSize | Int | no | | | pageNo | Int | no | | + | pageSize | Int | no | | --- @@ -14476,29 +14476,29 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [CatalogInsightItem](#CatalogInsightItem) + #### [CatalogInsightBrand](#CatalogInsightBrand) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | count | Int? | yes | | - | sellableCount | Int? | yes | | - | outOfStockCount | Int? | yes | | + | articleFreshness | Int? | yes | | + | totalSizes | Int? | yes | | + | name | String? | yes | | + | availableArticles | Int? | yes | | + | availableSizes | Int? | yes | | + | totalArticles | Int? | yes | | --- - #### [CatalogInsightBrand](#CatalogInsightBrand) + #### [CatalogInsightItem](#CatalogInsightItem) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | totalArticles | Int? | yes | | - | articleFreshness | Int? | yes | | - | availableArticles | Int? | yes | | - | totalSizes | Int? | yes | | - | availableSizes | Int? | yes | | - | name | String? | yes | | + | outOfStockCount | Int? | yes | | + | sellableCount | Int? | yes | | + | count | Int? | yes | | --- @@ -14509,8 +14509,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | item | [CatalogInsightItem](#CatalogInsightItem)? | yes | | | brandDistribution | [CatalogInsightBrand](#CatalogInsightBrand)? | yes | | + | item | [CatalogInsightItem](#CatalogInsightItem)? | yes | | --- @@ -14533,8 +14533,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [CrossSellingData](#CrossSellingData)? | yes | | | brandDistribution | [CatalogInsightBrand](#CatalogInsightBrand)? | yes | | + | data | [CrossSellingData](#CrossSellingData)? | yes | | --- @@ -14546,8 +14546,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | brandIds | [Int]? | yes | | - | enabled | Bool? | yes | | | optLevel | String | no | | + | enabled | Bool? | yes | | | storeIds | [Int]? | yes | | --- @@ -14559,16 +14559,16 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int | no | | - | createdBy | [String: Any]? | yes | | - | modifiedOn | Int | no | | - | storeIds | [Int] | no | | - | createdOn | Int | no | | - | modifiedBy | [String: Any]? | yes | | - | platform | String | no | | | optLevel | String | no | | | enabled | Bool | no | | + | createdBy | [String: Any]? | yes | | + | platform | String | no | | + | modifiedBy | [String: Any]? | yes | | + | companyId | Int | no | | + | modifiedOn | Int | no | | | brandIds | [Int] | no | | + | createdOn | Int | no | | + | storeIds | [Int] | no | | --- @@ -14591,10 +14591,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | companyType | String? | yes | | | uid | Int? | yes | | - | businessType | String? | yes | | | name | String? | yes | | - | companyType | String? | yes | | + | businessType | String? | yes | | --- @@ -14605,10 +14605,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | + | totalArticle | Int? | yes | | | brandId | Int? | yes | | + | companyId | Int? | yes | | | brandName | String? | yes | | - | totalArticle | Int? | yes | | --- @@ -14631,9 +14631,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brand | Int? | yes | | | store | Int? | yes | | | company | String? | yes | | + | brand | Int? | yes | | --- @@ -14644,17 +14644,17 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | + | timing | [String: Any]? | yes | | + | name | String? | yes | | | additionalContacts | [[String: Any]]? | yes | | + | companyId | Int? | yes | | + | storeType | String? | yes | | | modifiedOn | String? | yes | | | displayName | String? | yes | | - | createdOn | String? | yes | | - | timing | [String: Any]? | yes | | | uid | Int? | yes | | - | storeCode | String? | yes | | - | storeType | String? | yes | | | documents | [[String: Any]]? | yes | | - | name | String? | yes | | + | createdOn | String? | yes | | + | storeCode | String? | yes | | --- @@ -14673,28 +14673,23 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [AttributeSchemaRange](#AttributeSchemaRange) + #### [AttributeMasterMandatoryDetails](#AttributeMasterMandatoryDetails) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | min | Int? | yes | | - | max | Int? | yes | | + | l3Keys | [String]? | yes | | --- - #### [AttributeMaster](#AttributeMaster) + #### [AttributeMasterMeta](#AttributeMasterMeta) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | multi | Bool? | yes | | - | range | [AttributeSchemaRange](#AttributeSchemaRange)? | yes | | - | mandatory | Bool? | yes | | - | type | String | no | | - | format | String? | yes | | - | allowedValues | [String]? | yes | | + | enriched | Bool? | yes | | + | mandatoryDetails | [AttributeMasterMandatoryDetails](#AttributeMasterMandatoryDetails) | no | | --- @@ -14705,43 +14700,48 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | dependsOn | [String]? | yes | | - | priority | Int? | yes | | | indexing | Bool | no | | + | priority | Int? | yes | | + | dependsOn | [String]? | yes | | --- - #### [AttributeMasterMandatoryDetails](#AttributeMasterMandatoryDetails) + #### [AttributeMasterDetails](#AttributeMasterDetails) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | l3Keys | [String]? | yes | | + | displayType | String | no | | --- - #### [AttributeMasterMeta](#AttributeMasterMeta) + #### [AttributeSchemaRange](#AttributeSchemaRange) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | mandatoryDetails | [AttributeMasterMandatoryDetails](#AttributeMasterMandatoryDetails) | no | | - | enriched | Bool? | yes | | + | max | Int? | yes | | + | min | Int? | yes | | --- - #### [AttributeMasterDetails](#AttributeMasterDetails) + #### [AttributeMaster](#AttributeMaster) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | displayType | String | no | | + | format | String? | yes | | + | multi | Bool? | yes | | + | allowedValues | [String]? | yes | | + | mandatory | Bool? | yes | | + | range | [AttributeSchemaRange](#AttributeSchemaRange)? | yes | | + | type | String | no | | --- @@ -14752,18 +14752,18 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | schema | [AttributeMaster](#AttributeMaster)? | yes | | - | isNested | Bool? | yes | | - | id | String? | yes | | - | filters | [AttributeMasterFilter](#AttributeMasterFilter)? | yes | | | departments | [String]? | yes | | + | description | String? | yes | | | slug | String? | yes | | | meta | [AttributeMasterMeta](#AttributeMasterMeta)? | yes | | + | id | String? | yes | | + | name | String? | yes | | | enabledForEndConsumer | Bool? | yes | | + | filters | [AttributeMasterFilter](#AttributeMasterFilter)? | yes | | | details | [AttributeMasterDetails](#AttributeMasterDetails)? | yes | | - | description | String? | yes | | - | name | String? | yes | | + | isNested | Bool? | yes | | | logo | String? | yes | | + | schema | [AttributeMaster](#AttributeMaster)? | yes | | --- @@ -14786,11 +14786,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | status | Int? | yes | | | code | String? | yes | | - | errors | [String: Any]? | yes | | - | message | String? | yes | | | meta | [String: Any]? | yes | | - | status | Int? | yes | | + | message | String? | yes | | + | errors | [String: Any]? | yes | | --- @@ -14801,9 +14801,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | username | String? | yes | | | contact | String? | yes | | | userId | String? | yes | | + | username | String? | yes | | --- @@ -14814,21 +14814,21 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | createdBy | [UserSerializer](#UserSerializer)? | yes | | - | modifiedOn | String? | yes | | - | search | String? | yes | | - | createdOn | String? | yes | | - | priorityOrder | Int? | yes | | - | modifiedBy | [UserSerializer](#UserSerializer)? | yes | | - | slug | String? | yes | | - | uid | Int? | yes | | - | synonyms | [String]? | yes | | - | isActive | Bool? | yes | | - | pageSize | Int? | yes | | | pageNo | Int? | yes | | | itemType | String? | yes | | + | slug | String? | yes | | | name | String? | yes | | + | search | String? | yes | | + | createdBy | [UserSerializer](#UserSerializer)? | yes | | + | synonyms | [String]? | yes | | + | modifiedBy | [UserSerializer](#UserSerializer)? | yes | | + | priorityOrder | Int? | yes | | + | modifiedOn | String? | yes | | + | isActive | Bool? | yes | | + | uid | Int? | yes | | + | createdOn | String? | yes | | | logo | String? | yes | | + | pageSize | Int? | yes | | --- @@ -14851,11 +14851,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | status | Int? | yes | | | code | String? | yes | | - | errors | [String: Any]? | yes | | - | message | String? | yes | | | meta | [String: Any]? | yes | | - | status | Int? | yes | | + | message | String? | yes | | + | errors | [String: Any]? | yes | | --- @@ -14866,22 +14866,22 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | createdBy | [String: Any]? | yes | | - | modifiedOn | String? | yes | | - | categories | [String]? | yes | | + | isExpirable | Bool | no | | | tag | String? | yes | | - | isArchived | Bool? | yes | | - | createdOn | String? | yes | | - | modifiedBy | [String: Any]? | yes | | - | departments | [String]? | yes | | - | slug | String | no | | - | isPhysical | Bool | no | | - | isActive | Bool? | yes | | | description | String? | yes | | - | isExpirable | Bool | no | | + | slug | String | no | | + | categories | [String]? | yes | | | name | String? | yes | | | attributes | [String]? | yes | | + | isPhysical | Bool | no | | + | createdBy | [String: Any]? | yes | | + | modifiedBy | [String: Any]? | yes | | + | modifiedOn | String? | yes | | + | isArchived | Bool? | yes | | + | isActive | Bool? | yes | | + | createdOn | String? | yes | | | logo | String? | yes | | + | departments | [String]? | yes | | --- @@ -14900,40 +14900,63 @@ Company profile object. See example below or refer `LocationListSerializer` for + #### [TemplateDetails](#TemplateDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | isExpirable | Bool | no | | + | tag | String? | yes | | + | description | String? | yes | | + | slug | String | no | | + | id | String? | yes | | + | categories | [String]? | yes | | + | name | String? | yes | | + | attributes | [String]? | yes | | + | isPhysical | Bool | no | | + | isArchived | Bool? | yes | | + | isActive | Bool? | yes | | + | logo | String? | yes | | + | departments | [String]? | yes | | + +--- + + + + #### [Properties](#Properties) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | hsnCode | [String: Any]? | yes | | - | itemCode | [String: Any]? | yes | | - | trader | [String: Any]? | yes | | - | countryOfOrigin | [String: Any]? | yes | | - | sizes | [String: Any]? | yes | | - | productGroupTag | [String: Any]? | yes | | + | currency | [String: Any]? | yes | | + | customOrder | [String: Any]? | yes | | | itemType | [String: Any]? | yes | | - | variants | [String: Any]? | yes | | - | traderType | [String: Any]? | yes | | - | shortDescription | [String: Any]? | yes | | - | isDependent | [String: Any]? | yes | | - | sizeGuide | [String: Any]? | yes | | - | highlights | [String: Any]? | yes | | - | returnConfig | [String: Any]? | yes | | - | description | [String: Any]? | yes | | | slug | [String: Any]? | yes | | - | customOrder | [String: Any]? | yes | | - | noOfBoxes | [String: Any]? | yes | | | teaserTag | [String: Any]? | yes | | - | name | [String: Any]? | yes | | - | media | [String: Any]? | yes | | - | tags | [String: Any]? | yes | | + | returnConfig | [String: Any]? | yes | | + | sizes | [String: Any]? | yes | | + | isDependent | [String: Any]? | yes | | + | productGroupTag | [String: Any]? | yes | | + | noOfBoxes | [String: Any]? | yes | | | command | [String: Any]? | yes | | + | productPublish | [String: Any]? | yes | | | moq | [String: Any]? | yes | | + | name | [String: Any]? | yes | | | multiSize | [String: Any]? | yes | | - | currency | [String: Any]? | yes | | - | productPublish | [String: Any]? | yes | | - | categorySlug | [String: Any]? | yes | | - | isActive | [String: Any]? | yes | | + | itemCode | [String: Any]? | yes | | | brandUid | [String: Any]? | yes | | + | isActive | [String: Any]? | yes | | + | countryOfOrigin | [String: Any]? | yes | | + | shortDescription | [String: Any]? | yes | | + | media | [String: Any]? | yes | | + | description | [String: Any]? | yes | | + | highlights | [String: Any]? | yes | | + | tags | [String: Any]? | yes | | + | categorySlug | [String: Any]? | yes | | + | traderType | [String: Any]? | yes | | + | sizeGuide | [String: Any]? | yes | | + | hsnCode | [String: Any]? | yes | | + | variants | [String: Any]? | yes | | + | trader | [String: Any]? | yes | | --- @@ -14944,12 +14967,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | title | String? | yes | | - | properties | [Properties](#Properties)? | yes | | | definitions | [String: Any]? | yes | | - | type | String? | yes | | | required | [String]? | yes | | + | properties | [Properties](#Properties)? | yes | | | description | String? | yes | | + | title | String? | yes | | + | type | String? | yes | | --- @@ -14968,35 +14991,12 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [TemplateDetails](#TemplateDetails) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | categories | [String]? | yes | | - | tag | String? | yes | | - | isArchived | Bool? | yes | | - | id | String? | yes | | - | departments | [String]? | yes | | - | slug | String | no | | - | isPhysical | Bool | no | | - | isActive | Bool? | yes | | - | description | String? | yes | | - | isExpirable | Bool | no | | - | name | String? | yes | | - | attributes | [String]? | yes | | - | logo | String? | yes | | - ---- - - - - #### [TemplatesValidationResponse](#TemplatesValidationResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [TemplateValidationData](#TemplateValidationData)? | yes | | | templateDetails | [TemplateDetails](#TemplateDetails)? | yes | | + | data | [TemplateValidationData](#TemplateValidationData)? | yes | | --- @@ -15007,8 +15007,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | message | String? | yes | | | data | [String: Any]? | yes | | + | message | String? | yes | | --- @@ -15019,8 +15019,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | hsnCode | [String]? | yes | | | countryOfOrigin | [String]? | yes | | + | hsnCode | [String]? | yes | | --- @@ -15031,33 +15031,33 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | message | String? | yes | | | data | [HSNData](#HSNData)? | yes | | + | message | String? | yes | | --- - #### [VerifiedBy](#VerifiedBy) + #### [ProductDownloadItemsData](#ProductDownloadItemsData) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | username | String? | yes | | - | userId | String? | yes | | + | brand | [String]? | yes | | + | templates | [String]? | yes | | + | type | String? | yes | | --- - #### [ProductDownloadItemsData](#ProductDownloadItemsData) + #### [VerifiedBy](#VerifiedBy) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brand | [String]? | yes | | - | type | String? | yes | | - | templates | [String]? | yes | | + | userId | String? | yes | | + | username | String? | yes | | --- @@ -15068,16 +15068,16 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | createdBy | [VerifiedBy](#VerifiedBy)? | yes | | + | status | String? | yes | | + | data | [ProductDownloadItemsData](#ProductDownloadItemsData)? | yes | | | url | String? | yes | | - | id | String? | yes | | | templateTags | [String: Any]? | yes | | - | data | [ProductDownloadItemsData](#ProductDownloadItemsData)? | yes | | - | triggerOn | String? | yes | | - | taskId | String? | yes | | | sellerId | Double? | yes | | + | id | String? | yes | | + | createdBy | [VerifiedBy](#VerifiedBy)? | yes | | + | triggerOn | String? | yes | | | completedOn | String? | yes | | - | status | String? | yes | | + | taskId | String? | yes | | --- @@ -15113,46 +15113,46 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | portrait | String | no | | - | landscape | String | no | | | logo | String | no | | + | landscape | String | no | | --- - #### [Hierarchy](#Hierarchy) + #### [CategoryMappingValues](#CategoryMappingValues) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | department | Int | no | | - | l2 | Int | no | | - | l1 | Int | no | | + | name | String | no | | + | catalogId | Int? | yes | | --- - #### [CategoryMappingValues](#CategoryMappingValues) + #### [CategoryMapping](#CategoryMapping) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String | no | | - | catalogId | Int? | yes | | + | ajio | [CategoryMappingValues](#CategoryMappingValues)? | yes | | + | facebook | [CategoryMappingValues](#CategoryMappingValues)? | yes | | + | google | [CategoryMappingValues](#CategoryMappingValues)? | yes | | --- - #### [CategoryMapping](#CategoryMapping) + #### [Hierarchy](#Hierarchy) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | google | [CategoryMappingValues](#CategoryMappingValues)? | yes | | - | ajio | [CategoryMappingValues](#CategoryMappingValues)? | yes | | - | facebook | [CategoryMappingValues](#CategoryMappingValues)? | yes | | + | l2 | Int | no | | + | department | Int | no | | + | l1 | Int | no | | --- @@ -15164,22 +15164,22 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | media | [Media2](#Media2)? | yes | | - | tryouts | [String]? | yes | | - | priority | Int? | yes | | - | createdBy | [String: Any]? | yes | | - | modifiedOn | String? | yes | | - | createdOn | String? | yes | | - | modifiedBy | [String: Any]? | yes | | | departments | [Int] | no | | + | id | String? | yes | | | slug | String? | yes | | - | uid | Int? | yes | | - | hierarchy | [[Hierarchy](#Hierarchy)]? | yes | | + | name | String | no | | + | priority | Int? | yes | | + | createdBy | [String: Any]? | yes | | | marketplaces | [CategoryMapping](#CategoryMapping)? | yes | | | synonyms | [String]? | yes | | + | modifiedBy | [String: Any]? | yes | | + | modifiedOn | String? | yes | | | isActive | Bool | no | | - | id | String? | yes | | + | uid | Int? | yes | | + | createdOn | String? | yes | | | level | Int | no | | - | name | String | no | | + | tryouts | [String]? | yes | | + | hierarchy | [[Hierarchy](#Hierarchy)]? | yes | | --- @@ -15203,16 +15203,16 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | media | [Media2](#Media2)? | yes | | - | tryouts | [String]? | yes | | - | priority | Int? | yes | | | departments | [Int] | no | | | slug | String? | yes | | - | hierarchy | [[Hierarchy](#Hierarchy)]? | yes | | + | name | String | no | | | marketplaces | [CategoryMapping](#CategoryMapping)? | yes | | | synonyms | [String]? | yes | | | isActive | Bool | no | | | level | Int | no | | - | name | String | no | | + | priority | Int? | yes | | + | tryouts | [String]? | yes | | + | hierarchy | [[Hierarchy](#Hierarchy)]? | yes | | --- @@ -15246,61 +15246,61 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | message | String? | yes | | | success | Bool? | yes | | + | message | String? | yes | | --- - #### [Logo](#Logo) + #### [Image](#Image) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aspectRatio | String? | yes | | - | secureUrl | String? | yes | | - | aspectRatioF | Int? | yes | | | url | String? | yes | | + | aspectRatioF | Double? | yes | | + | secureUrl | String? | yes | | + | aspectRatio | String? | yes | | --- - #### [Brand](#Brand) + #### [ProductPublished](#ProductPublished) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | uid | Int? | yes | | - | name | String? | yes | | - | logo | [Logo](#Logo)? | yes | | + | isSet | Bool? | yes | | + | productOnlineDate | Int? | yes | | --- - #### [Image](#Image) + #### [Logo](#Logo) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aspectRatio | String? | yes | | - | secureUrl | String? | yes | | - | aspectRatioF | Double? | yes | | | url | String? | yes | | + | aspectRatioF | Int? | yes | | + | secureUrl | String? | yes | | + | aspectRatio | String? | yes | | --- - #### [ProductPublished](#ProductPublished) + #### [Brand](#Brand) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | productOnlineDate | Int? | yes | | - | isSet | Bool? | yes | | + | uid | Int? | yes | | + | name | String? | yes | | + | logo | [Logo](#Logo)? | yes | | --- @@ -15311,43 +15311,43 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | color | String? | yes | | - | hsnCode | String? | yes | | - | customJson | [String: Any]? | yes | | + | currency | String? | yes | | + | customOrder | [String: Any]? | yes | | + | itemType | String? | yes | | + | slug | String? | yes | | + | id | String? | yes | | | primaryColor | String? | yes | | - | itemCode | String? | yes | | - | countryOfOrigin | String? | yes | | + | categoryUid | Int? | yes | | | sizes | [[String: Any]]? | yes | | - | brand | [Brand](#Brand)? | yes | | - | itemType | String? | yes | | - | variants | [String: Any]? | yes | | - | shortDescription | String? | yes | | + | images | [[Image](#Image)]? | yes | | | isDependent | Bool? | yes | | - | allSizes | [[String: Any]]? | yes | | - | sizeGuide | String? | yes | | - | templateTag | String? | yes | | - | highlights | [String]? | yes | | - | id | String? | yes | | - | uid | Int? | yes | | - | description | String? | yes | | | departments | [Int]? | yes | | - | slug | String? | yes | | - | imageNature | String? | yes | | - | customOrder | [String: Any]? | yes | | - | name | String? | yes | | - | images | [[Image](#Image)]? | yes | | - | media | [[Media1](#Media1)]? | yes | | - | moq | [String: Any]? | yes | | - | categoryUid | Int? | yes | | - | l3Mapping | [String]? | yes | | - | currency | String? | yes | | | isSet | Bool? | yes | | | productPublish | [ProductPublished](#ProductPublished)? | yes | | + | l3Mapping | [String]? | yes | | + | uid | Int? | yes | | + | color | String? | yes | | + | moq | [String: Any]? | yes | | + | name | String? | yes | | | isPhysical | Bool? | yes | | | multiSize | Bool? | yes | | - | categorySlug | String? | yes | | - | isActive | Bool? | yes | | + | itemCode | String? | yes | | | brandUid | Int? | yes | | + | isActive | Bool? | yes | | + | countryOfOrigin | String? | yes | | + | shortDescription | String? | yes | | + | customJson | [String: Any]? | yes | | + | media | [[Media1](#Media1)]? | yes | | + | description | String? | yes | | + | highlights | [String]? | yes | | + | categorySlug | String? | yes | | + | sizeGuide | String? | yes | | + | brand | [Brand](#Brand)? | yes | | + | templateTag | String? | yes | | + | variants | [String: Any]? | yes | | + | hsnCode | String? | yes | | + | allSizes | [[String: Any]]? | yes | | + | imageNature | String? | yes | | --- @@ -15366,51 +15366,50 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [Trader](#Trader) + #### [CustomOrder](#CustomOrder) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | type | String? | yes | | - | address | [String]? | yes | | + | isCustomOrder | Bool? | yes | | + | manufacturingTimeUnit | String? | yes | | + | manufacturingTime | Int? | yes | | --- - #### [ReturnConfig](#ReturnConfig) + #### [TeaserTag](#TeaserTag) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | time | Int | no | | - | returnable | Bool | no | | - | unit | String | no | | + | tag | String? | yes | | + | url | String? | yes | | --- - #### [CustomOrder](#CustomOrder) + #### [ReturnConfig](#ReturnConfig) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | manufacturingTimeUnit | String? | yes | | - | manufacturingTime | Int? | yes | | - | isCustomOrder | Bool? | yes | | + | time | Int | no | | + | returnable | Bool | no | | + | unit | String | no | | --- - #### [TeaserTag](#TeaserTag) + #### [ProductPublish](#ProductPublish) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | url | String? | yes | | - | tag | String? | yes | | + | isSet | Bool? | yes | | + | productOnlineDate | String? | yes | | --- @@ -15421,21 +15420,22 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | maximum | Int? | yes | | - | minimum | Int? | yes | | | isSet | Bool? | yes | | + | minimum | Int? | yes | | + | maximum | Int? | yes | | --- - #### [ProductPublish](#ProductPublish) + #### [Trader](#Trader) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | productOnlineDate | String? | yes | | - | isSet | Bool? | yes | | + | name | String? | yes | | + | address | [String]? | yes | | + | type | String? | yes | | --- @@ -15446,44 +15446,44 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | hsnCode | String | no | | - | changeRequestId | String? | yes | | - | customJson | [String: Any]? | yes | | - | itemCode | String | no | | - | trader | [[Trader](#Trader)] | no | | - | countryOfOrigin | String | no | | - | productGroupTag | [String]? | yes | | + | currency | String | no | | + | customOrder | [CustomOrder](#CustomOrder)? | yes | | | itemType | String | no | | - | variants | [String: Any]? | yes | | - | companyId | Int | no | | - | shortDescription | String? | yes | | - | isDependent | Bool? | yes | | - | sizeGuide | String? | yes | | - | templateTag | String | no | | - | highlights | [String]? | yes | | + | slug | String | no | | + | requester | String? | yes | | + | changeRequestId | String? | yes | | + | teaserTag | [TeaserTag](#TeaserTag)? | yes | | | returnConfig | [ReturnConfig](#ReturnConfig) | no | | - | bulkJobId | String? | yes | | - | uid | Int? | yes | | - | description | String? | yes | | + | isDependent | Bool? | yes | | + | productGroupTag | [String]? | yes | | | departments | [Int] | no | | - | slug | String | no | | + | isSet | Bool? | yes | | | noOfBoxes | Int? | yes | | - | customOrder | [CustomOrder](#CustomOrder)? | yes | | - | teaserTag | [TeaserTag](#TeaserTag)? | yes | | + | bulkJobId | String? | yes | | + | productPublish | [ProductPublish](#ProductPublish)? | yes | | + | uid | Int? | yes | | + | moq | [OrderQuantity](#OrderQuantity)? | yes | | | name | String | no | | + | multiSize | Bool? | yes | | + | itemCode | String | no | | + | brandUid | Int | no | | + | isActive | Bool? | yes | | + | countryOfOrigin | String | no | | + | shortDescription | String? | yes | | + | customJson | [String: Any]? | yes | | + | media | [[Media1](#Media1)]? | yes | | | action | String? | yes | | + | description | String? | yes | | + | highlights | [String]? | yes | | + | categorySlug | String | no | | | isImageLessProduct | Bool? | yes | | - | media | [[Media1](#Media1)]? | yes | | | tags | [String]? | yes | | - | requester | String? | yes | | - | moq | [OrderQuantity](#OrderQuantity)? | yes | | - | multiSize | Bool? | yes | | - | isSet | Bool? | yes | | - | currency | String | no | | - | productPublish | [ProductPublish](#ProductPublish)? | yes | | - | categorySlug | String | no | | - | isActive | Bool? | yes | | - | brandUid | Int | no | | + | sizeGuide | String? | yes | | + | companyId | Int | no | | + | templateTag | String | no | | + | variants | [String: Any]? | yes | | + | hsnCode | String | no | | + | trader | [[Trader](#Trader)] | no | | --- @@ -15505,9 +15505,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | username | String? | yes | | | fullName | String? | yes | | | userId | String? | yes | | + | username | String? | yes | | --- @@ -15518,22 +15518,22 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | + | cancelled | Int? | yes | | + | failedRecords | [String]? | yes | | + | failed | Int? | yes | | | createdBy | [UserDetail](#UserDetail)? | yes | | - | modifiedOn | String? | yes | | | total | Int? | yes | | - | templateTag | String? | yes | | - | createdOn | String? | yes | | - | filePath | String? | yes | | | succeed | Int? | yes | | - | cancelled | Int? | yes | | + | cancelledRecords | [String]? | yes | | + | filePath | String? | yes | | | modifiedBy | [UserDetail](#UserDetail)? | yes | | + | companyId | Int? | yes | | | template | [ProductTemplate](#ProductTemplate)? | yes | | - | failedRecords | [String]? | yes | | - | failed | Int? | yes | | - | stage | String? | yes | | + | modifiedOn | String? | yes | | + | templateTag | String? | yes | | | isActive | Bool? | yes | | - | cancelledRecords | [String]? | yes | | + | createdOn | String? | yes | | + | stage | String? | yes | | --- @@ -15570,23 +15570,23 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int | no | | + | cancelled | Int? | yes | | + | failedRecords | [[String: Any]]? | yes | | + | trackingUrl | String? | yes | | | createdBy | [UserInfo1](#UserInfo1)? | yes | | - | modifiedOn | String? | yes | | | total | Int | no | | - | filePath | String? | yes | | - | createdOn | String | no | | + | failed | Int? | yes | | + | customTemplateTag | String? | yes | | | succeed | Int? | yes | | - | cancelled | Int? | yes | | - | templateTag | String? | yes | | + | cancelledRecords | [[String: Any]]? | yes | | + | filePath | String? | yes | | | modifiedBy | [UserInfo1](#UserInfo1)? | yes | | - | trackingUrl | String? | yes | | - | failedRecords | [[String: Any]]? | yes | | - | failed | Int? | yes | | + | companyId | Int | no | | + | modifiedOn | String? | yes | | + | templateTag | String? | yes | | | isActive | Bool? | yes | | + | createdOn | String | no | | | stage | String? | yes | | - | customTemplateTag | String? | yes | | - | cancelledRecords | [[String: Any]]? | yes | | --- @@ -15598,11 +15598,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | createdBy | [UserInfo1](#UserInfo1)? | yes | | - | modifiedOn | String? | yes | | - | createdOn | String | no | | | modifiedBy | [UserInfo1](#UserInfo1)? | yes | | - | isActive | Bool? | yes | | + | modifiedOn | String? | yes | | | batchId | String | no | | + | isActive | Bool? | yes | | + | createdOn | String | no | | --- @@ -15613,8 +15613,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int | no | | | data | [[String: Any]] | no | | + | companyId | Int | no | | | batchId | String | no | | | templateTag | String | no | | @@ -15649,9 +15649,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | username | String? | yes | | | companyId | Int? | yes | | | userId | String? | yes | | + | username | String? | yes | | --- @@ -15662,23 +15662,23 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | - | createdBy | [UserCommon](#UserCommon)? | yes | | - | modifiedOn | String? | yes | | - | filePath | String? | yes | | - | total | Int? | yes | | - | createdOn | String? | yes | | - | succeed | Int? | yes | | | cancelled | Int? | yes | | - | id | String? | yes | | - | modifiedBy | [UserCommon](#UserCommon)? | yes | | - | trackingUrl | String? | yes | | | failedRecords | [String]? | yes | | + | trackingUrl | String? | yes | | + | id | String? | yes | | + | createdBy | [UserCommon](#UserCommon)? | yes | | | failed | Int? | yes | | - | stage | String? | yes | | - | isActive | Bool? | yes | | + | total | Int? | yes | | + | succeed | Int? | yes | | + | filePath | String? | yes | | | cancelledRecords | [String]? | yes | | + | modifiedBy | [UserCommon](#UserCommon)? | yes | | | retry | Int? | yes | | + | companyId | Int? | yes | | + | modifiedOn | String? | yes | | + | isActive | Bool? | yes | | + | createdOn | String? | yes | | + | stage | String? | yes | | --- @@ -15701,9 +15701,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | | user | [String: Any] | no | | | url | String | no | | + | companyId | Int? | yes | | --- @@ -15727,8 +15727,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool? | yes | | | data | [ProductSizeDeleteDataResponse](#ProductSizeDeleteDataResponse)? | yes | | + | success | Bool? | yes | | --- @@ -15739,19 +15739,19 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | itemId | Int? | yes | | + | currency | String? | yes | | | inventoryUpdatedOn | String? | yes | | - | quantity | Int? | yes | | + | sellableQuantity | Int? | yes | | + | store | [String: Any]? | yes | | | size | String? | yes | | | price | Int? | yes | | - | currency | String? | yes | | - | uid | String? | yes | | - | sellableQuantity | Int? | yes | | - | identifiers | [String: Any]? | yes | | | priceTransfer | Int? | yes | | - | sellerIdentifier | Int? | yes | | + | identifiers | [String: Any]? | yes | | | priceEffective | Int? | yes | | - | store | [String: Any]? | yes | | + | quantity | Int? | yes | | + | uid | String? | yes | | + | itemId | Int? | yes | | + | sellerIdentifier | Int? | yes | | --- @@ -15770,13 +15770,13 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [ItemQuery](#ItemQuery) + #### [GTIN](#GTIN) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | uid | Int? | yes | | - | brandUid | Int? | yes | | - | itemCode | String? | yes | | + | gtinType | String | no | | + | primary | Bool? | yes | | + | gtinValue | String | no | | --- @@ -15818,40 +15818,40 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [GTIN](#GTIN) + #### [InvSize](#InvSize) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | primary | Bool? | yes | | - | gtinValue | String | no | | - | gtinType | String | no | | + | isSet | Bool? | yes | | + | currency | String | no | | + | size | String | no | | + | itemWeightUnitOfMeasure | String? | yes | | + | price | Double | no | | + | priceTransfer | Double? | yes | | + | expirationDate | String? | yes | | + | priceEffective | Double | no | | + | itemHeight | Double? | yes | | + | itemDimensionsUnitOfMeasure | String? | yes | | + | itemWeight | Double? | yes | | + | identifiers | [[GTIN](#GTIN)] | no | | + | quantity | Int | no | | + | set | [InventorySet](#InventorySet)? | yes | | + | storeCode | String | no | | + | itemLength | Double? | yes | | + | itemWidth | Double? | yes | | --- - #### [InvSize](#InvSize) + #### [ItemQuery](#ItemQuery) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | itemLength | Double? | yes | | - | size | String | no | | - | quantity | Int | no | | - | expirationDate | String? | yes | | - | price | Double | no | | - | isSet | Bool? | yes | | - | itemHeight | Double? | yes | | - | itemWidth | Double? | yes | | - | itemWeight | Double? | yes | | - | itemWeightUnitOfMeasure | String? | yes | | - | storeCode | String | no | | - | set | [InventorySet](#InventorySet)? | yes | | - | identifiers | [[GTIN](#GTIN)] | no | | - | priceTransfer | Double? | yes | | - | currency | String | no | | - | priceEffective | Double | no | | - | itemDimensionsUnitOfMeasure | String? | yes | | + | itemCode | String? | yes | | + | uid | Int? | yes | | + | brandUid | Int? | yes | | --- @@ -15863,8 +15863,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | companyId | Int | no | | - | item | [ItemQuery](#ItemQuery) | no | | | sizes | [[InvSize](#InvSize)] | no | | + | item | [ItemQuery](#ItemQuery) | no | | --- @@ -15875,21 +15875,21 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | - | createdBy | [String: Any]? | yes | | - | modifiedOn | String? | yes | | - | filePath | String? | yes | | - | total | Int? | yes | | - | createdOn | String? | yes | | | cancelled | Int? | yes | | + | failedRecords | [String]? | yes | | | id | String? | yes | | + | createdBy | [String: Any]? | yes | | + | failed | Int? | yes | | + | total | Int? | yes | | | succeed | Int? | yes | | + | cancelledRecords | [String]? | yes | | + | filePath | String? | yes | | | modifiedBy | [String: Any]? | yes | | - | failedRecords | [String]? | yes | | - | failed | Int? | yes | | + | companyId | Int? | yes | | + | modifiedOn | String? | yes | | | isActive | Bool? | yes | | + | createdOn | String? | yes | | | stage | String? | yes | | - | cancelledRecords | [String]? | yes | | --- @@ -15912,24 +15912,24 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | itemLength | Double? | yes | | - | size | String? | yes | | - | quantity | Int | no | | - | expirationDate | String? | yes | | - | price | Double | no | | | isSet | Bool? | yes | | - | itemHeight | Double? | yes | | - | itemWidth | Double? | yes | | - | itemWeight | Double? | yes | | - | itemWeightUnitOfMeasure | String? | yes | | - | storeCode | String | no | | - | set | [InventorySet](#InventorySet)? | yes | | - | identifiers | [[String: Any]]? | yes | | - | priceTransfer | Double? | yes | | | currency | String | no | | + | size | String? | yes | | + | itemWeightUnitOfMeasure | String? | yes | | | sellerIdentifier | String | no | | + | price | Double | no | | + | priceTransfer | Double? | yes | | + | expirationDate | String? | yes | | | priceEffective | Double | no | | + | itemHeight | Double? | yes | | | itemDimensionsUnitOfMeasure | String? | yes | | + | itemWeight | Double? | yes | | + | identifiers | [[String: Any]]? | yes | | + | quantity | Int | no | | + | set | [InventorySet](#InventorySet)? | yes | | + | storeCode | String | no | | + | itemLength | Double? | yes | | + | itemWidth | Double? | yes | | --- @@ -15940,10 +15940,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int | no | | | user | [String: Any]? | yes | | - | batchId | String | no | | + | companyId | Int | no | | | sizes | [[Size1](#Size1)] | no | | + | batchId | String | no | | --- @@ -15954,13 +15954,13 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | requestParams | [String: Any]? | yes | | + | status | String? | yes | | | url | String? | yes | | - | triggerOn | String? | yes | | - | taskId | String | no | | | sellerId | Int | no | | + | triggerOn | String? | yes | | | completedOn | String? | yes | | - | status | String? | yes | | + | requestParams | [String: Any]? | yes | | + | taskId | String | no | | --- @@ -15971,8 +15971,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brand | [Int]? | yes | | | store | [Int]? | yes | | + | brand | [Int]? | yes | | | type | String? | yes | | --- @@ -15984,11 +15984,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | requestParams | [String: Any]? | yes | | + | status | String? | yes | | + | sellerId | Int | no | | | triggerOn | String? | yes | | + | requestParams | [String: Any]? | yes | | | taskId | String | no | | - | sellerId | Int | no | | - | status | String? | yes | | --- @@ -15999,8 +15999,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | display | String? | yes | | | value | String? | yes | | + | display | String? | yes | | --- @@ -16023,11 +16023,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | itemTotal | Int? | yes | | + | size | Int? | yes | | | current | String? | yes | | | hasPrevious | Bool? | yes | | | hasNext | Bool? | yes | | - | size | Int? | yes | | - | itemTotal | Int? | yes | | --- @@ -16038,17 +16038,17 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | - | hsnCode | String? | yes | | - | modifiedOn | String? | yes | | - | taxOnMrp | Bool? | yes | | | threshold1 | Double? | yes | | - | id | String? | yes | | - | tax2 | Double? | yes | | - | threshold2 | Double? | yes | | | tax1 | Double? | yes | | | taxOnEsp | Bool? | yes | | | hs2Code | String? | yes | | + | taxOnMrp | Bool? | yes | | + | id | String? | yes | | + | threshold2 | Double? | yes | | + | companyId | Int? | yes | | + | modifiedOn | String? | yes | | + | hsnCode | String? | yes | | + | tax2 | Double? | yes | | --- @@ -16071,16 +16071,16 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int | no | | - | hsnCode | String | no | | - | taxOnMrp | Bool | no | | | threshold1 | Double | no | | - | tax2 | Double? | yes | | - | threshold2 | Double? | yes | | - | uid | Int? | yes | | | tax1 | Double | no | | | taxOnEsp | Bool? | yes | | | hs2Code | String | no | | + | taxOnMrp | Bool | no | | + | threshold2 | Double? | yes | | + | companyId | Int | no | | + | hsnCode | String | no | | + | tax2 | Double? | yes | | + | uid | Int? | yes | | --- @@ -16125,13 +16125,13 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | discount | String? | yes | | - | departments | [String]? | yes | | + | action | [Action](#Action)? | yes | | | slug | String? | yes | | - | uid | Int? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | | name | String? | yes | | - | action | [Action](#Action)? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | uid | Int? | yes | | | logo | [Media](#Media)? | yes | | + | departments | [String]? | yes | | --- @@ -16154,10 +16154,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | priorityOrder | Int? | yes | | | slug | String? | yes | | - | uid | Int? | yes | | | name | String? | yes | | + | priorityOrder | Int? | yes | | + | uid | Int? | yes | | | logo | [Media](#Media)? | yes | | --- @@ -16180,12 +16180,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | + | action | [Action](#Action)? | yes | | | slug | String? | yes | | - | uid | Int? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | | name | String? | yes | | - | action | [Action](#Action)? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | uid | Int? | yes | | + | customJson | [String: Any]? | yes | | | childs | [[String: Any]]? | yes | | --- @@ -16197,12 +16197,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | + | action | [Action](#Action)? | yes | | | slug | String? | yes | | - | uid | Int? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | | name | String? | yes | | - | action | [Action](#Action)? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | uid | Int? | yes | | + | customJson | [String: Any]? | yes | | | childs | [[ThirdLevelChild](#ThirdLevelChild)]? | yes | | --- @@ -16214,12 +16214,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | + | action | [Action](#Action)? | yes | | | slug | String? | yes | | - | uid | Int? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | | name | String? | yes | | - | action | [Action](#Action)? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | uid | Int? | yes | | + | customJson | [String: Any]? | yes | | | childs | [[SecondLevelChild](#SecondLevelChild)]? | yes | | --- @@ -16231,11 +16231,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | action | [Action](#Action)? | yes | | | slug | String? | yes | | - | uid | Int? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | | name | String? | yes | | - | action | [Action](#Action)? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | uid | Int? | yes | | | childs | [[Child](#Child)]? | yes | | --- @@ -16247,8 +16247,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | department | String? | yes | | | items | [[CategoryItems](#CategoryItems)]? | yes | | + | department | String? | yes | | --- @@ -16283,10 +16283,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | filters | [[ProductFilters](#ProductFilters)]? | yes | | | page | [Page](#Page) | no | | - | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | | items | [[ProductListingDetail](#ProductListingDetail)]? | yes | | + | filters | [[ProductFilters](#ProductFilters)]? | yes | | + | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | --- @@ -16297,54 +16297,54 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | color | String? | yes | | - | itemCode | String? | yes | | - | ratingCount | Int? | yes | | - | brand | [ProductBrand](#ProductBrand)? | yes | | | itemType | String? | yes | | + | slug | String | no | | + | teaserTag | [String: Any]? | yes | | + | productOnlineDate | String? | yes | | + | hasVariant | Bool? | yes | | | rating | Double? | yes | | | attributes | [String: Any]? | yes | | - | similars | [String]? | yes | | | promoMeta | [String: Any]? | yes | | - | shortDescription | String? | yes | | - | highlights | [String]? | yes | | - | type | String? | yes | | | uid | Int? | yes | | - | description | String? | yes | | - | medias | [[Media1](#Media1)]? | yes | | - | productOnlineDate | String? | yes | | + | color | String? | yes | | | tryouts | [String]? | yes | | - | slug | String | no | | - | imageNature | String? | yes | | - | teaserTag | [String: Any]? | yes | | + | type | String? | yes | | | name | String? | yes | | - | hasVariant | Bool? | yes | | + | itemCode | String? | yes | | | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | + | shortDescription | String? | yes | | + | ratingCount | Int? | yes | | + | description | String? | yes | | + | highlights | [String]? | yes | | + | brand | [ProductBrand](#ProductBrand)? | yes | | + | medias | [[Media1](#Media1)]? | yes | | + | similars | [String]? | yes | | + | imageNature | String? | yes | | --- - #### [ArticleAssignment](#ArticleAssignment) + #### [ArticleQuery](#ArticleQuery) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | level | String? | yes | | - | strategy | String? | yes | | + | ignoredStores | [Int]? | yes | | + | itemId | Int | no | | + | size | String | no | | --- - #### [ArticleQuery](#ArticleQuery) + #### [ArticleAssignment](#ArticleAssignment) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | itemId | Int | no | | - | ignoredStores | [Int]? | yes | | - | size | String | no | | + | level | String? | yes | | + | strategy | String? | yes | | --- @@ -16355,11 +16355,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | meta | [String: Any]? | yes | | + | query | [ArticleQuery](#ArticleQuery)? | yes | | | groupId | String? | yes | | | quantity | Int? | yes | | - | meta | [String: Any]? | yes | | | articleAssignment | [ArticleAssignment](#ArticleAssignment)? | yes | | - | query | [ArticleQuery](#ArticleQuery)? | yes | | --- @@ -16370,13 +16370,13 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyId | Int? | yes | | - | appId | String | no | | - | storeIds | [Int]? | yes | | | channelType | String? | yes | | - | pincode | String | no | | | channelIdentifier | String? | yes | | | articles | [[AssignStoreArticle](#AssignStoreArticle)] | no | | + | pincode | String | no | | + | companyId | Int? | yes | | + | appId | String | no | | + | storeIds | [Int]? | yes | | --- @@ -16399,118 +16399,99 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | itemId | Int | no | | - | companyId | Int? | yes | | - | groupId | String? | yes | | | sCity | String? | yes | | + | status | Bool | no | | | size | String | no | | - | storeId | Int? | yes | | - | quantity | Int | no | | - | index | Int? | yes | | - | priceEffective | Int? | yes | | - | meta | [String: Any]? | yes | | - | uid | String? | yes | | | id | String? | yes | | + | priceMarked | Int? | yes | | + | meta | [String: Any]? | yes | | + | storeId | Int? | yes | | + | groupId | String? | yes | | | strategyWiseListing | [[String: Any]]? | yes | | + | priceEffective | Int? | yes | | + | companyId | Int? | yes | | | storePincode | Int? | yes | | + | quantity | Int | no | | + | uid | String? | yes | | + | itemId | Int | no | | | articleAssignment | [ArticleAssignment1](#ArticleAssignment1) | no | | - | status | Bool | no | | - | priceMarked | Int? | yes | | + | index | Int? | yes | | --- - #### [UserSerializer1](#UserSerializer1) + #### [SellerPhoneNumber](#SellerPhoneNumber) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | username | String? | yes | | - | contact | String? | yes | | - | userId | String? | yes | | + | number | String | no | | + | countryCode | Int | no | | --- - #### [GetAddressSerializer](#GetAddressSerializer) + #### [LocationManagerSerializer](#LocationManagerSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | country | String? | yes | | - | address2 | String? | yes | | - | addressType | String? | yes | | - | longitude | Double? | yes | | - | pincode | Int? | yes | | - | countryCode | String? | yes | | - | state | String? | yes | | - | landmark | String? | yes | | - | latitude | Double? | yes | | - | address1 | String? | yes | | - | city | String? | yes | | + | name | String? | yes | | + | mobileNo | [SellerPhoneNumber](#SellerPhoneNumber) | no | | + | email | String? | yes | | --- - #### [GetCompanySerializer](#GetCompanySerializer) + #### [UserSerializer1](#UserSerializer1) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | businessType | String? | yes | | - | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | - | modifiedOn | String? | yes | | - | createdOn | String? | yes | | - | verifiedOn | String? | yes | | - | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | - | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | - | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | - | uid | Int? | yes | | - | stage | String? | yes | | - | companyType | String? | yes | | - | name | String? | yes | | - | rejectReason | String? | yes | | + | contact | String? | yes | | + | userId | String? | yes | | + | username | String? | yes | | --- - #### [UserSerializer2](#UserSerializer2) + #### [LocationTimingSerializer](#LocationTimingSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | username | String? | yes | | - | contact | String? | yes | | - | userId | String? | yes | | + | minute | Int? | yes | | + | hour | Int? | yes | | --- - #### [SellerPhoneNumber](#SellerPhoneNumber) + #### [LocationDayWiseSerializer](#LocationDayWiseSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | countryCode | Int | no | | - | number | String | no | | + | closing | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | + | open | Bool | no | | + | opening | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | + | weekday | String | no | | --- - #### [LocationManagerSerializer](#LocationManagerSerializer) + #### [ProductReturnConfigSerializer](#ProductReturnConfigSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | mobileNo | [SellerPhoneNumber](#SellerPhoneNumber) | no | | - | name | String? | yes | | - | email | String? | yes | | + | storeUid | Int? | yes | | + | onSameStore | Bool? | yes | | --- @@ -16521,86 +16502,105 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | order | String? | yes | | | inventory | String? | yes | | + | order | String? | yes | | --- - #### [LocationTimingSerializer](#LocationTimingSerializer) + #### [InvoiceCredSerializer](#InvoiceCredSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | hour | Int? | yes | | - | minute | Int? | yes | | + | password | String? | yes | | + | enabled | Bool? | yes | | + | username | String? | yes | | --- - #### [LocationDayWiseSerializer](#LocationDayWiseSerializer) + #### [InvoiceDetailsSerializer](#InvoiceDetailsSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | weekday | String | no | | - | closing | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | - | opening | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | - | open | Bool | no | | + | eWaybill | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | + | eInvoice | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | --- - #### [Document](#Document) + #### [GetAddressSerializer](#GetAddressSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | url | String? | yes | | - | type | String | no | | - | value | String | no | | - | verified | Bool? | yes | | - | legalName | String? | yes | | + | landmark | String? | yes | | + | address1 | String? | yes | | + | addressType | String? | yes | | + | address2 | String? | yes | | + | countryCode | String? | yes | | + | state | String? | yes | | + | pincode | Int? | yes | | + | city | String? | yes | | + | latitude | Double? | yes | | + | country | String? | yes | | + | longitude | Double? | yes | | --- - #### [ProductReturnConfigSerializer](#ProductReturnConfigSerializer) + #### [UserSerializer2](#UserSerializer2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | onSameStore | Bool? | yes | | - | storeUid | Int? | yes | | + | contact | String? | yes | | + | userId | String? | yes | | + | username | String? | yes | | --- - #### [InvoiceCredSerializer](#InvoiceCredSerializer) + #### [GetCompanySerializer](#GetCompanySerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | username | String? | yes | | - | enabled | Bool? | yes | | - | password | String? | yes | | + | companyType | String? | yes | | + | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | + | createdBy | [UserSerializer2](#UserSerializer2)? | yes | | + | verifiedBy | [UserSerializer2](#UserSerializer2)? | yes | | + | name | String? | yes | | + | businessType | String? | yes | | + | verifiedOn | String? | yes | | + | modifiedBy | [UserSerializer2](#UserSerializer2)? | yes | | + | rejectReason | String? | yes | | + | modifiedOn | String? | yes | | + | uid | Int? | yes | | + | createdOn | String? | yes | | + | stage | String? | yes | | --- - #### [InvoiceDetailsSerializer](#InvoiceDetailsSerializer) + #### [Document](#Document) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | eWaybill | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | - | eInvoice | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | + | url | String? | yes | | + | value | String | no | | + | verified | Bool? | yes | | + | legalName | String? | yes | | + | type | String | no | | --- @@ -16611,31 +16611,31 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | code | String | no | | - | customJson | [String: Any]? | yes | | - | createdOn | String? | yes | | - | company | [GetCompanySerializer](#GetCompanySerializer)? | yes | | - | verifiedBy | [UserSerializer2](#UserSerializer2)? | yes | | - | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | - | integrationType | [LocationIntegrationType](#LocationIntegrationType)? | yes | | - | createdBy | [UserSerializer2](#UserSerializer2)? | yes | | + | verifiedOn | String? | yes | | | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | - | timing | [[LocationDayWiseSerializer](#LocationDayWiseSerializer)]? | yes | | - | modifiedBy | [UserSerializer2](#UserSerializer2)? | yes | | - | uid | Int? | yes | | - | documents | [[Document](#Document)]? | yes | | - | productReturnConfig | [ProductReturnConfigSerializer](#ProductReturnConfigSerializer)? | yes | | - | address | [GetAddressSerializer](#GetAddressSerializer) | no | | + | notificationEmails | [String]? | yes | | + | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | + | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | | phoneNumber | String | no | | | displayName | String | no | | - | verifiedOn | String? | yes | | - | storeType | String? | yes | | - | gstCredentials | [InvoiceDetailsSerializer](#InvoiceDetailsSerializer)? | yes | | + | uid | Int? | yes | | + | timing | [[LocationDayWiseSerializer](#LocationDayWiseSerializer)]? | yes | | | name | String | no | | - | modifiedOn | String? | yes | | - | notificationEmails | [String]? | yes | | + | productReturnConfig | [ProductReturnConfigSerializer](#ProductReturnConfigSerializer)? | yes | | + | integrationType | [LocationIntegrationType](#LocationIntegrationType)? | yes | | | warnings | [String: Any]? | yes | | + | gstCredentials | [InvoiceDetailsSerializer](#InvoiceDetailsSerializer)? | yes | | + | modifiedOn | String? | yes | | + | createdOn | String? | yes | | + | customJson | [String: Any]? | yes | | | stage | String? | yes | | + | code | String | no | | + | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | + | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | storeType | String? | yes | | + | company | [GetCompanySerializer](#GetCompanySerializer)? | yes | | + | documents | [[Document](#Document)]? | yes | | + | address | [GetAddressSerializer](#GetAddressSerializer) | no | | --- diff --git a/documentation/platform/COMPANYPROFILE.md b/documentation/platform/COMPANYPROFILE.md index baae996256..cbf07da8ad 100644 --- a/documentation/platform/COMPANYPROFILE.md +++ b/documentation/platform/COMPANYPROFILE.md @@ -9,15 +9,15 @@ Company Profile API's allows you to access list of products, prices, seller deta * [updateCompany](#updatecompany) * [cbsOnboardGet](#cbsonboardget) * [getCompanyMetrics](#getcompanymetrics) -* [editBrand](#editbrand) * [getBrand](#getbrand) +* [editBrand](#editbrand) * [createBrand](#createbrand) * [getBrands](#getbrands) * [createCompanyBrandMapping](#createcompanybrandmapping) * [getLocations](#getlocations) * [createLocation](#createlocation) -* [updateLocation](#updatelocation) * [getLocationDetail](#getlocationdetail) +* [updateLocation](#updatelocation) * [createLocationBulk](#createlocationbulk) @@ -266,14 +266,14 @@ Metrics response object. See example below or refer `MetricsSerializer` for deta --- -#### editBrand -Edit a brand. +#### getBrand +Get a single brand. ```swift -client.companyprofile.editBrand(brandId: brandId, body: body) { (response, error) in +client.companyprofile.getBrand(brandId: brandId) { (response, error) in // Use response } ``` @@ -285,19 +285,19 @@ client.companyprofile.editBrand(brandId: brandId, body: body) { (response, error | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | | brandId | String | yes | Id of the brand to be viewed. | -| body | CreateUpdateBrandRequestSerializer | yes | Request body | -This API allows to edit meta of a brand. + +This API helps to get data associated to a particular brand. *Returned Response:* -[SuccessResponse](#SuccessResponse) +[GetBrandResponseSerializer](#GetBrandResponseSerializer) -Returns a success response +Brand object. See example below or refer `GetBrandResponseSerializer` for details @@ -307,8 +307,33 @@ Returns a success response ```json { + "stage": "verified", + "_custom_json": {}, "uid": 1, - "success": true + "logo": "http://cdn4.gofynd.com/media/logo/brand/original/4597_40d1ce44d61940d4829a3c54951bd9ee.jpg", + "warnings": {}, + "_locale_language": {}, + "name": "edited brand", + "slug_key": "brand-2", + "banner": { + "portrait": "http://cdn4.gofynd.com/media/banner_portrait/brand/original/7021_16fc50205c40477daf419b64ec64c64c.jpg", + "landscape": "http://cdn4.gofynd.com/media/banner/brand/original/7020_f9e91f7d501c4f2985c09bd196ed304d.jpg" + }, + "created_by": { + "username": "silverbolt", + "user_id": "0" + }, + "modified_by": { + "username": "917827311650_22960", + "user_id": "123" + }, + "verified_by": { + "username": "917827311650_22960", + "user_id": "123" + }, + "synonyms": [ + "xyz" + ] } ``` @@ -324,14 +349,14 @@ Returns a success response --- -#### getBrand -Get a single brand. +#### editBrand +Edit a brand. ```swift -client.companyprofile.getBrand(brandId: brandId) { (response, error) in +client.companyprofile.editBrand(brandId: brandId, body: body) { (response, error) in // Use response } ``` @@ -343,19 +368,19 @@ client.companyprofile.getBrand(brandId: brandId) { (response, error) in | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | | brandId | String | yes | Id of the brand to be viewed. | +| body | CreateUpdateBrandRequestSerializer | yes | Request body | - -This API helps to get data associated to a particular brand. +This API allows to edit meta of a brand. *Returned Response:* -[GetBrandResponseSerializer](#GetBrandResponseSerializer) +[SuccessResponse](#SuccessResponse) -Brand object. See example below or refer `GetBrandResponseSerializer` for details +Returns a success response @@ -365,33 +390,8 @@ Brand object. See example below or refer `GetBrandResponseSerializer` for detail ```json { - "stage": "verified", - "_custom_json": {}, "uid": 1, - "logo": "http://cdn4.gofynd.com/media/logo/brand/original/4597_40d1ce44d61940d4829a3c54951bd9ee.jpg", - "warnings": {}, - "_locale_language": {}, - "name": "edited brand", - "slug_key": "brand-2", - "banner": { - "portrait": "http://cdn4.gofynd.com/media/banner_portrait/brand/original/7021_16fc50205c40477daf419b64ec64c64c.jpg", - "landscape": "http://cdn4.gofynd.com/media/banner/brand/original/7020_f9e91f7d501c4f2985c09bd196ed304d.jpg" - }, - "created_by": { - "username": "silverbolt", - "user_id": "0" - }, - "modified_by": { - "username": "917827311650_22960", - "user_id": "123" - }, - "verified_by": { - "username": "917827311650_22960", - "user_id": "123" - }, - "synonyms": [ - "xyz" - ] + "success": true } ``` @@ -960,64 +960,6 @@ Returns a success response ---- - - -#### updateLocation -Edit a location asscoiated to a company. - - - - -```swift -client.companyprofile.updateLocation(locationId: locationId, body: body) { (response, error) in - // Use response -} -``` - - - - - -| Argument | Type | Required | Description | -| -------- | ---- | -------- | ----------- | -| locationId | String | yes | Id of the location which you want to edit. | -| body | LocationSerializer | yes | Request body | - - -This API allows to edit a location associated to a company. - -*Returned Response:* - - - - -[SuccessResponse](#SuccessResponse) - -Returns a success response - - - - -
-  Example: - -```json -{ - "uid": 1, - "success": true -} -``` -
- - - - - - - - - --- @@ -1258,6 +1200,64 @@ Brand object. See example below or refer `GetLocationSerializer` for details +--- + + +#### updateLocation +Edit a location asscoiated to a company. + + + + +```swift +client.companyprofile.updateLocation(locationId: locationId, body: body) { (response, error) in + // Use response +} +``` + + + + + +| Argument | Type | Required | Description | +| -------- | ---- | -------- | ----------- | +| locationId | String | yes | Id of the location which you want to edit. | +| body | LocationSerializer | yes | Request body | + + +This API allows to edit a location associated to a company. + +*Returned Response:* + + + + +[SuccessResponse](#SuccessResponse) + +Returns a success response + + + + +
+  Example: + +```json +{ + "uid": 1, + "success": true +} +``` +
+ + + + + + + + + --- @@ -1323,82 +1323,82 @@ Returns a success response - #### [SellerPhoneNumber](#SellerPhoneNumber) + #### [Website](#Website) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | countryCode | Int | no | | - | number | String | no | | + | url | String? | yes | | --- - #### [ContactDetails](#ContactDetails) + #### [BusinessDetails](#BusinessDetails) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | emails | [String]? | yes | | - | phone | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | + | website | [Website](#Website)? | yes | | --- - #### [Document](#Document) + #### [CreateUpdateAddressSerializer](#CreateUpdateAddressSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | legalName | String? | yes | | - | verified | Bool? | yes | | - | type | String | no | | - | url | String? | yes | | - | value | String | no | | + | pincode | Int | no | | + | country | String | no | | + | address1 | String | no | | + | landmark | String? | yes | | + | city | String | no | | + | state | String | no | | + | countryCode | String? | yes | | + | latitude | Double | no | | + | addressType | String | no | | + | longitude | Double | no | | + | address2 | String? | yes | | --- - #### [Website](#Website) + #### [Document](#Document) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | verified | Bool? | yes | | + | type | String | no | | | url | String? | yes | | + | legalName | String? | yes | | + | value | String | no | | --- - #### [BusinessDetails](#BusinessDetails) + #### [SellerPhoneNumber](#SellerPhoneNumber) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | website | [Website](#Website)? | yes | | + | countryCode | Int | no | | + | number | String | no | | --- - #### [CreateUpdateAddressSerializer](#CreateUpdateAddressSerializer) + #### [ContactDetails](#ContactDetails) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | country | String | no | | - | address1 | String | no | | - | landmark | String? | yes | | - | city | String | no | | - | pincode | Int | no | | - | state | String | no | | - | addressType | String | no | | - | address2 | String? | yes | | - | countryCode | String? | yes | | - | longitude | Double | no | | - | latitude | Double | no | | + | emails | [String]? | yes | | + | phone | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | --- @@ -1409,19 +1409,19 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | contactDetails | [ContactDetails](#ContactDetails)? | yes | | + | businessDetails | [BusinessDetails](#BusinessDetails)? | yes | | + | warnings | [String: Any]? | yes | | + | businessInfo | String? | yes | | | customJson | [String: Any]? | yes | | - | name | String? | yes | | - | notificationEmails | [String]? | yes | | + | addresses | [[CreateUpdateAddressSerializer](#CreateUpdateAddressSerializer)]? | yes | | | documents | [[Document](#Document)]? | yes | | - | warnings | [String: Any]? | yes | | | rejectReason | String? | yes | | - | businessType | String? | yes | | - | businessDetails | [BusinessDetails](#BusinessDetails)? | yes | | | franchiseEnabled | Bool? | yes | | - | businessInfo | String? | yes | | + | name | String? | yes | | + | contactDetails | [ContactDetails](#ContactDetails)? | yes | | + | notificationEmails | [String]? | yes | | | companyType | String? | yes | | - | addresses | [[CreateUpdateAddressSerializer](#CreateUpdateAddressSerializer)]? | yes | | + | businessType | String? | yes | | --- @@ -1432,8 +1432,8 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool? | yes | | | uid | Int? | yes | | + | success | Bool? | yes | | --- @@ -1444,10 +1444,10 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | status | Int? | yes | | + | message | String? | yes | | | code | String? | yes | | | meta | [String: Any]? | yes | | - | message | String? | yes | | + | status | Int? | yes | | --- @@ -1458,9 +1458,9 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | username | String? | yes | | - | contact | String? | yes | | | userId | String? | yes | | + | contact | String? | yes | | + | username | String? | yes | | --- @@ -1483,17 +1483,17 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | pincode | Int? | yes | | | country | String? | yes | | | address1 | String? | yes | | | landmark | String? | yes | | | city | String? | yes | | - | pincode | Int? | yes | | - | addressType | String? | yes | | | state | String? | yes | | - | address2 | String? | yes | | | countryCode | String? | yes | | - | longitude | Double? | yes | | | latitude | Double? | yes | | + | addressType | String? | yes | | + | longitude | Double? | yes | | + | address2 | String? | yes | | --- @@ -1504,27 +1504,27 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | verifiedOn | String? | yes | | - | verifiedBy | [UserSerializer](#UserSerializer)? | yes | | - | businessInfo | String? | yes | | - | businessCountryInfo | [BusinessCountryInfo](#BusinessCountryInfo)? | yes | | - | name | String? | yes | | - | createdOn | String? | yes | | - | createdBy | [UserSerializer](#UserSerializer)? | yes | | + | stage | String? | yes | | | documents | [[Document](#Document)]? | yes | | - | mode | String? | yes | | | modifiedOn | String? | yes | | - | stage | String? | yes | | + | verifiedBy | [UserSerializer](#UserSerializer)? | yes | | + | companyType | String | no | | + | businessType | String | no | | | uid | Int | no | | - | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | - | businessDetails | [BusinessDetails](#BusinessDetails)? | yes | | + | businessInfo | String? | yes | | | franchiseEnabled | Bool? | yes | | | contactDetails | [ContactDetails](#ContactDetails)? | yes | | + | modifiedBy | [UserSerializer](#UserSerializer)? | yes | | + | name | String? | yes | | + | mode | String? | yes | | | notificationEmails | [String]? | yes | | + | createdOn | String? | yes | | + | businessDetails | [BusinessDetails](#BusinessDetails)? | yes | | + | createdBy | [UserSerializer](#UserSerializer)? | yes | | + | businessCountryInfo | [BusinessCountryInfo](#BusinessCountryInfo)? | yes | | | warnings | [String: Any]? | yes | | - | modifiedBy | [UserSerializer](#UserSerializer)? | yes | | - | businessType | String | no | | - | companyType | String | no | | + | verifiedOn | String? | yes | | + | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | --- @@ -1535,8 +1535,8 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | verified | Int? | yes | | | pending | Int? | yes | | + | verified | Int? | yes | | --- @@ -1548,12 +1548,12 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | storeDocuments | [DocumentsObj](#DocumentsObj)? | yes | | + | stage | String? | yes | | | store | [DocumentsObj](#DocumentsObj)? | yes | | | brand | [DocumentsObj](#DocumentsObj)? | yes | | | companyDocuments | [DocumentsObj](#DocumentsObj)? | yes | | - | stage | String? | yes | | - | product | [DocumentsObj](#DocumentsObj)? | yes | | | uid | Int? | yes | | + | product | [DocumentsObj](#DocumentsObj)? | yes | | --- @@ -1572,62 +1572,79 @@ Returns a success response - #### [CreateUpdateBrandRequestSerializer](#CreateUpdateBrandRequestSerializer) + #### [UserSerializer1](#UserSerializer1) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | localeLanguage | [String: Any]? | yes | | - | description | String? | yes | | - | customJson | [String: Any]? | yes | | - | name | String | no | | - | banner | [BrandBannerSerializer](#BrandBannerSerializer)? | yes | | - | brandTier | String? | yes | | - | companyId | Int? | yes | | - | logo | String | no | | - | uid | Int? | yes | | - | synonyms | [String]? | yes | | + | userId | String? | yes | | + | contact | String? | yes | | + | username | String? | yes | | --- - #### [UserSerializer1](#UserSerializer1) + #### [GetBrandResponseSerializer](#GetBrandResponseSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | username | String? | yes | | - | contact | String? | yes | | - | userId | String? | yes | | + | banner | [BrandBannerSerializer](#BrandBannerSerializer)? | yes | | + | stage | String? | yes | | + | rejectReason | String? | yes | | + | modifiedOn | String? | yes | | + | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | uid | Int? | yes | | + | description | String? | yes | | + | synonyms | [String]? | yes | | + | localeLanguage | [String: Any]? | yes | | + | logo | String? | yes | | + | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | customJson | [String: Any]? | yes | | + | name | String | no | | + | mode | String? | yes | | + | createdOn | String? | yes | | + | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | + | warnings | [String: Any]? | yes | | + | verifiedOn | String? | yes | | + | slugKey | String? | yes | | --- - #### [GetBrandResponseSerializer](#GetBrandResponseSerializer) + #### [CreateUpdateBrandRequestSerializer](#CreateUpdateBrandRequestSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | verifiedOn | String? | yes | | - | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | - | slugKey | String? | yes | | + | banner | [BrandBannerSerializer](#BrandBannerSerializer)? | yes | | + | customJson | [String: Any]? | yes | | + | description | String? | yes | | + | brandTier | String? | yes | | | synonyms | [String]? | yes | | | name | String | no | | - | createdOn | String? | yes | | - | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | - | banner | [BrandBannerSerializer](#BrandBannerSerializer)? | yes | | - | mode | String? | yes | | - | modifiedOn | String? | yes | | - | stage | String? | yes | | - | uid | Int? | yes | | + | companyId | Int? | yes | | | localeLanguage | [String: Any]? | yes | | - | description | String? | yes | | - | customJson | [String: Any]? | yes | | - | rejectReason | String? | yes | | - | warnings | [String: Any]? | yes | | - | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | - | logo | String? | yes | | + | logo | String | no | | + | uid | Int? | yes | | + +--- + + + + + #### [Page](#Page) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | hasPrevious | Bool? | yes | | + | current | Int? | yes | | + | type | String | no | | + | itemTotal | Int? | yes | | + | hasNext | Bool? | yes | | + | nextId | String? | yes | | + | size | Int? | yes | | --- @@ -1638,19 +1655,19 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | createdBy | [UserSerializer](#UserSerializer)? | yes | | | stage | String? | yes | | | verifiedOn | String? | yes | | - | name | String? | yes | | - | createdOn | String? | yes | | - | verifiedBy | [UserSerializer](#UserSerializer)? | yes | | - | createdBy | [UserSerializer](#UserSerializer)? | yes | | - | modifiedBy | [UserSerializer](#UserSerializer)? | yes | | - | businessType | String? | yes | | + | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | | rejectReason | String? | yes | | + | name | String? | yes | | | modifiedOn | String? | yes | | + | verifiedBy | [UserSerializer](#UserSerializer)? | yes | | | companyType | String? | yes | | + | businessType | String? | yes | | | uid | Int? | yes | | - | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | + | modifiedBy | [UserSerializer](#UserSerializer)? | yes | | + | createdOn | String? | yes | | --- @@ -1661,35 +1678,18 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | verifiedOn | String? | yes | | - | createdOn | String? | yes | | - | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | - | brand | [GetBrandResponseSerializer](#GetBrandResponseSerializer)? | yes | | + | stage | String? | yes | | | warnings | [String: Any]? | yes | | - | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | verifiedOn | String? | yes | | | rejectReason | String? | yes | | | company | [GetCompanySerializer](#GetCompanySerializer)? | yes | | | modifiedOn | String? | yes | | - | stage | String? | yes | | + | brand | [GetBrandResponseSerializer](#GetBrandResponseSerializer)? | yes | | + | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | | uid | Int? | yes | | - ---- - - - - - #### [Page](#Page) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | current | Int? | yes | | - | hasPrevious | Bool? | yes | | - | hasNext | Bool? | yes | | - | itemTotal | Int? | yes | | - | size | Int? | yes | | - | type | String | no | | - | nextId | String? | yes | | + | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | createdOn | String? | yes | | --- @@ -1700,8 +1700,8 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[CompanyBrandSerializer](#CompanyBrandSerializer)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[CompanyBrandSerializer](#CompanyBrandSerializer)]? | yes | | --- @@ -1713,96 +1713,96 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | brands | [Int] | no | | - | company | Int | no | | | uid | Int? | yes | | + | company | Int | no | | --- - #### [InvoiceCredSerializer](#InvoiceCredSerializer) + #### [LocationTimingSerializer](#LocationTimingSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | username | String? | yes | | - | password | String? | yes | | - | enabled | Bool? | yes | | + | minute | Int? | yes | | + | hour | Int? | yes | | --- - #### [InvoiceDetailsSerializer](#InvoiceDetailsSerializer) + #### [LocationDayWiseSerializer](#LocationDayWiseSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | eWaybill | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | - | eInvoice | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | + | opening | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | + | weekday | String | no | | + | open | Bool | no | | + | closing | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | --- - #### [LocationManagerSerializer](#LocationManagerSerializer) + #### [InvoiceCredSerializer](#InvoiceCredSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | mobileNo | [SellerPhoneNumber](#SellerPhoneNumber) | no | | - | email | String? | yes | | + | enabled | Bool? | yes | | + | password | String? | yes | | + | username | String? | yes | | --- - #### [LocationTimingSerializer](#LocationTimingSerializer) + #### [InvoiceDetailsSerializer](#InvoiceDetailsSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | minute | Int? | yes | | - | hour | Int? | yes | | + | eInvoice | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | + | eWaybill | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | --- - #### [LocationDayWiseSerializer](#LocationDayWiseSerializer) + #### [ProductReturnConfigSerializer](#ProductReturnConfigSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | opening | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | - | weekday | String | no | | - | open | Bool | no | | - | closing | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | + | storeUid | Int? | yes | | + | onSameStore | Bool? | yes | | --- - #### [LocationIntegrationType](#LocationIntegrationType) + #### [LocationManagerSerializer](#LocationManagerSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | inventory | String? | yes | | - | order | String? | yes | | + | email | String? | yes | | + | name | String? | yes | | + | mobileNo | [SellerPhoneNumber](#SellerPhoneNumber) | no | | --- - #### [ProductReturnConfigSerializer](#ProductReturnConfigSerializer) + #### [LocationIntegrationType](#LocationIntegrationType) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | storeUid | Int? | yes | | - | onSameStore | Bool? | yes | | + | inventory | String? | yes | | + | order | String? | yes | | --- @@ -1813,31 +1813,31 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | stage | String? | yes | | + | documents | [[Document](#Document)]? | yes | | | code | String | no | | - | verifiedOn | String? | yes | | + | timing | [[LocationDayWiseSerializer](#LocationDayWiseSerializer)]? | yes | | + | modifiedOn | String? | yes | | | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | - | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | + | uid | Int? | yes | | + | phoneNumber | String | no | | | gstCredentials | [InvoiceDetailsSerializer](#InvoiceDetailsSerializer)? | yes | | - | storeType | String? | yes | | - | displayName | String | no | | + | productReturnConfig | [ProductReturnConfigSerializer](#ProductReturnConfigSerializer)? | yes | | + | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | customJson | [String: Any]? | yes | | | name | String | no | | + | notificationEmails | [String]? | yes | | + | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | | createdOn | String? | yes | | | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | - | documents | [[Document](#Document)]? | yes | | - | modifiedOn | String? | yes | | - | stage | String? | yes | | - | uid | Int? | yes | | - | customJson | [String: Any]? | yes | | - | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | - | company | [GetCompanySerializer](#GetCompanySerializer)? | yes | | - | timing | [[LocationDayWiseSerializer](#LocationDayWiseSerializer)]? | yes | | | address | [GetAddressSerializer](#GetAddressSerializer) | no | | - | phoneNumber | String | no | | - | notificationEmails | [String]? | yes | | | warnings | [String: Any]? | yes | | - | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | verifiedOn | String? | yes | | + | displayName | String | no | | + | company | [GetCompanySerializer](#GetCompanySerializer)? | yes | | + | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | | integrationType | [LocationIntegrationType](#LocationIntegrationType)? | yes | | - | productReturnConfig | [ProductReturnConfigSerializer](#ProductReturnConfigSerializer)? | yes | | + | storeType | String? | yes | | --- @@ -1848,8 +1848,8 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[GetLocationSerializer](#GetLocationSerializer)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[GetLocationSerializer](#GetLocationSerializer)]? | yes | | --- @@ -1860,17 +1860,17 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | pincode | Int? | yes | | | country | String? | yes | | | address1 | String? | yes | | | landmark | String? | yes | | | city | String? | yes | | - | pincode | Int? | yes | | - | addressType | String? | yes | | | state | String? | yes | | - | address2 | String? | yes | | | countryCode | String? | yes | | - | longitude | Double? | yes | | | latitude | Double? | yes | | + | addressType | String? | yes | | + | longitude | Double? | yes | | + | address2 | String? | yes | | --- @@ -1881,23 +1881,23 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | warnings | [String: Any]? | yes | | + | address | [GetAddressSerializer1](#GetAddressSerializer1) | no | | + | stage | String? | yes | | + | customJson | [String: Any]? | yes | | + | gstCredentials | [InvoiceDetailsSerializer](#InvoiceDetailsSerializer)? | yes | | + | documents | [[Document](#Document)]? | yes | | | code | String | no | | - | storeType | String? | yes | | | displayName | String | no | | - | customJson | [String: Any]? | yes | | + | timing | [[LocationDayWiseSerializer](#LocationDayWiseSerializer)]? | yes | | | name | String | no | | - | notificationEmails | [String]? | yes | | - | documents | [[Document](#Document)]? | yes | | - | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | - | warnings | [String: Any]? | yes | | - | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | | company | Int | no | | - | gstCredentials | [InvoiceDetailsSerializer](#InvoiceDetailsSerializer)? | yes | | | productReturnConfig | [ProductReturnConfigSerializer](#ProductReturnConfigSerializer)? | yes | | - | stage | String? | yes | | - | timing | [[LocationDayWiseSerializer](#LocationDayWiseSerializer)]? | yes | | + | notificationEmails | [String]? | yes | | + | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | + | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | + | storeType | String? | yes | | | uid | Int? | yes | | - | address | [GetAddressSerializer1](#GetAddressSerializer1) | no | | --- diff --git a/documentation/platform/PAYMENT.md b/documentation/platform/PAYMENT.md index 795fba4f8a..963de63858 100644 --- a/documentation/platform/PAYMENT.md +++ b/documentation/platform/PAYMENT.md @@ -2618,11 +2618,11 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | success | Bool | no | Response is successful or not | | displayFields | [String] | no | List of all included options with their Details. | + | created | Bool | no | Response is created or not | | aggregators | [[String: Any]]? | yes | List of all speceific Payment options with their Details. | | appId | String | no | Application Id to which Payment config Mapped | - | created | Bool | no | Response is created or not | - | success | Bool | no | Response is successful or not | | excludedFields | [String] | no | List of all excluded options with their Details. | --- @@ -2635,8 +2635,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | description | String | no | Error human understandable description. | - | code | String | no | Error descrption code. | | success | Bool | no | Response is successful or not | + | code | String | no | Error descrption code. | --- @@ -2647,11 +2647,11 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | key | String | no | Api key of the payment aggregator | | merchantSalt | String | no | Merchant key of the payment aggregator | + | isActive | Bool? | yes | Enable/ Disable Flag | | secret | String | no | Secret Key of the payment aggregator | + | key | String | no | Api key of the payment aggregator | | configType | String | no | Config Type of the aggregator | - | isActive | Bool? | yes | Enable/ Disable Flag | --- @@ -2711,33 +2711,33 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | large | String | no | large | | small | String | no | smalll | + | large | String | no | large | --- - #### [IntentApp](#IntentApp) + #### [IntentAppErrorList](#IntentAppErrorList) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | logos | [PaymentModeLogo](#PaymentModeLogo)? | yes | logos | | packageName | String? | yes | package_name | | code | String? | yes | code | - | displayName | String? | yes | display_name | --- - #### [IntentAppErrorList](#IntentAppErrorList) + #### [IntentApp](#IntentApp) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | logos | [PaymentModeLogo](#PaymentModeLogo)? | yes | logos | | packageName | String? | yes | package_name | + | displayName | String? | yes | display_name | | code | String? | yes | code | --- @@ -2749,35 +2749,35 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | name | - | expYear | Int? | yes | exp_year | - | intentApp | [[IntentApp](#IntentApp)]? | yes | intent_app | - | intentAppErrorDictList | [[IntentAppErrorList](#IntentAppErrorList)]? | yes | intent_app_error_dict_list | | merchantCode | String? | yes | merchant code | - | cardIsin | String? | yes | card_isin | - | intentAppErrorList | [String]? | yes | intent_app_error_list | - | aggregatorName | String | no | aggregator_name | - | displayName | String? | yes | display name | - | cardToken | String? | yes | card_token | | cardIssuer | String? | yes | card_issuer | - | cardBrand | String? | yes | card_brand | - | retryCount | Int? | yes | retry_count | - | cardId | String? | yes | card_id | + | cardNumber | String? | yes | card_number | + | cardBrandImage | String? | yes | card_brand_image | + | cardIsin | String? | yes | card_isin | | logoUrl | [PaymentModeLogo](#PaymentModeLogo)? | yes | Logo | + | intentAppErrorList | [String]? | yes | intent_app_error_list | + | expYear | Int? | yes | exp_year | | fyndVpa | String? | yes | fynd_vpa | - | cardReference | String? | yes | card_reference | - | expMonth | Int? | yes | exp_month | | cardFingerprint | String? | yes | card_fingerprint | - | timeout | Int? | yes | timeout | - | cardType | String? | yes | card_type | - | nickname | String? | yes | nickname | | expired | Bool? | yes | expired | - | intentFlow | Bool? | yes | intent_flow | - | cardBrandImage | String? | yes | card_brand_image | + | cardId | String? | yes | card_id | + | expMonth | Int? | yes | exp_month | + | displayName | String? | yes | display name | + | intentAppErrorDictList | [[IntentAppErrorList](#IntentAppErrorList)]? | yes | intent_app_error_dict_list | + | cardBrand | String? | yes | card_brand | | displayPriority | Int? | yes | Dispaly Priority | - | code | String? | yes | code | - | cardNumber | String? | yes | card_number | + | intentFlow | Bool? | yes | intent_flow | + | nickname | String? | yes | nickname | | cardName | String? | yes | card_name | + | aggregatorName | String | no | aggregator_name | + | timeout | Int? | yes | timeout | + | cardReference | String? | yes | card_reference | + | name | String? | yes | name | + | code | String? | yes | code | + | retryCount | Int? | yes | retry_count | + | intentApp | [[IntentApp](#IntentApp)]? | yes | intent_app | + | cardType | String? | yes | card_type | + | cardToken | String? | yes | card_token | --- @@ -2788,12 +2788,12 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String | no | Payment mode name | + | aggregatorName | String? | yes | Dispaly Priority | + | anonymousEnable | Bool? | yes | Annonymous card flag | | addCardEnabled | Bool? | yes | Annonymous card flag | + | name | String | no | Payment mode name | | displayPriority | Int | no | Dispaly Priority | - | anonymousEnable | Bool? | yes | Annonymous card flag | | list | [[PaymentModeList](#PaymentModeList)]? | yes | Payment mode | - | aggregatorName | String? | yes | Dispaly Priority | | displayName | String | no | Payment mode display name | --- @@ -2816,8 +2816,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool | no | Response is successful or not | | paymentOptions | [PaymentOptions](#PaymentOptions) | no | Payment options | + | success | Bool | no | Response is successful or not | --- @@ -2828,13 +2828,13 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | payoutsAggregators | [[String: Any]] | no | payout aggregator object | | uniqueTransferNo | [String: Any] | no | display priority of the payment mode | + | transferType | String | no | transafer type | | moreAttributes | [String: Any] | no | bank details object | + | isActive | Bool | no | Enable/DIsable Flag Payout | | customers | [String: Any] | no | customers details object | - | transferType | String | no | transafer type | | isDefault | Bool | no | default or not | - | isActive | Bool | no | Enable/DIsable Flag Payout | - | payoutsAggregators | [[String: Any]] | no | payout aggregator object | --- @@ -2845,16 +2845,16 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | country | String? | yes | | + | pincode | Int? | yes | | + | city | String? | yes | | | state | String? | yes | | - | accountNo | String? | yes | | | branchName | String? | yes | | | accountHolder | String? | yes | | - | city | String? | yes | | - | ifscCode | String | no | | - | pincode | Int? | yes | | - | accountType | String | no | | | bankName | String? | yes | | + | accountType | String | no | | + | accountNo | String? | yes | | + | ifscCode | String | no | | + | country | String? | yes | | --- @@ -2865,12 +2865,12 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | uniqueExternalId | String | no | Unique Id of Payout | - | aggregator | String | no | Aggregator Name | | transferType | String | no | transafer type | + | users | [String: Any] | no | payout users object | | isActive | Bool | no | Enable/Disable Flag Payout | | bankDetails | [PayoutBankDetails](#PayoutBankDetails) | no | payout bank details object | - | users | [String: Any] | no | payout users object | + | uniqueExternalId | String | no | Unique Id of Payout | + | aggregator | String | no | Aggregator Name | --- @@ -2882,15 +2882,15 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | uniqueTransferNo | String | no | unique transfer no | - | aggregator | String | no | Aggregator Name | - | created | Bool | no | created flag | | success | Bool | no | Response is successful or not | - | paymentStatus | String | no | status of payment | | transferType | String | no | transfer type | - | isActive | Bool | no | Enable/DIsable Flag Payout | - | bankDetails | [String: Any] | no | payout bank_details object | | payouts | [String: Any] | no | payout object | + | created | Bool | no | created flag | | users | [String: Any] | no | users details object | + | isActive | Bool | no | Enable/DIsable Flag Payout | + | bankDetails | [String: Any] | no | payout bank_details object | + | aggregator | String | no | Aggregator Name | + | paymentStatus | String | no | status of payment | --- @@ -2901,9 +2901,9 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | isDefault | Bool | no | Enable/Disable Default Payout | | success | Bool | no | Response is successful or not | | isActive | Bool | no | Enable/DIsable Flag Payout | + | isDefault | Bool | no | Enable/Disable Default Payout | --- @@ -2914,9 +2914,9 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | isDefault | Bool | no | Enable/Disable Default Payout | | uniqueExternalId | String | no | Unique Id of Payout | | isActive | Bool | no | Enable/Disable Flag Payout | + | isDefault | Bool | no | Enable/Disable Default Payout | --- @@ -2938,8 +2938,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool | no | Response is successful or not | | data | [[String: Any]] | no | Subscription Payment Method Object | + | success | Bool | no | Response is successful or not | --- @@ -2985,8 +2985,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool | no | Response is successful or not | | data | [String: Any] | no | Subscription Payment Method Object | + | success | Bool | no | Response is successful or not | --- @@ -2997,17 +2997,17 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | accountNo | String | no | Account NUmber of the Account Holder | - | branchName | String | no | Branch Name of the Account | | comment | String? | yes | Remarks added by The user | - | address | String? | yes | Address of the User | | vpa | String? | yes | | + | branchName | String | no | Branch Name of the Account | + | address | String? | yes | Address of the User | | accountHolder | String | no | Name of the Account Holder | + | bankName | String | no | Bank Name of the Account | | email | String | no | Email of the Account Holder | - | ifscCode | String | no | Ifsc Code of the Account | | mobile | String | no | Moblie Number of the User | | wallet | String? | yes | | - | bankName | String | no | Bank Name of the Account | + | accountNo | String | no | Account NUmber of the Account Holder | + | ifscCode | String | no | Ifsc Code of the Account | --- @@ -3018,12 +3018,12 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | shipmentId | String | no | Shipment Id of the respective Merchant Order Id | + | requestId | String? | yes | | | delights | Bool | no | True if beneficiary to be added by delights or False if by User | - | otp | String? | yes | | | transferMode | String | no | Transfer Mode of the Beneficiary to be added | + | otp | String? | yes | | + | shipmentId | String | no | Shipment Id of the respective Merchant Order Id | | details | [BeneficiaryModeDetails](#BeneficiaryModeDetails) | no | Beneficiary bank details | - | requestId | String? | yes | | | orderId | String | no | Merchant Order Id | --- @@ -3035,10 +3035,10 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | data | [String: Any]? | yes | Refund account data. | | isVerifiedFlag | Bool? | yes | | | success | Bool | no | Success or failure flag. | | message | String | no | Response message | - | data | [String: Any]? | yes | Refund account data. | --- @@ -3050,8 +3050,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | description | String | no | Not Found | - | code | String | no | Bad Request Data | | success | Bool | no | Response is successful or not | + | code | String | no | Bad Request Data | --- @@ -3062,9 +3062,9 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | bankName | String | no | Bank Name Of Account | - | success | Bool? | yes | Response is successful or not | | branchName | String | no | Branch Name Of Account | + | success | Bool? | yes | Response is successful or not | + | bankName | String | no | Bank Name Of Account | --- @@ -3075,25 +3075,25 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | isActive | Bool | no | Boolean Flag whether Beneficiary set or not | | title | String | no | Title Of Account | - | accountNo | String | no | Account Number | - | accountHolder | String | no | Account Holder Name | - | delightsUserName | String? | yes | User Id Who filled the Beneficiary | - | displayName | String | no | Display Name Of Account | + | ifscCode | String | no | Ifsc Code Of Account | | createdOn | String | no | Creation Date of Beneficiary | + | mobile | Bool? | yes | MObile no of User | + | displayName | String | no | Display Name Of Account | + | comment | Bool? | yes | Remarks | | branchName | Bool? | yes | Branch Name Of Account | | transferMode | String | no | Transfer Mode Of Account | - | ifscCode | String | no | Ifsc Code Of Account | - | mobile | Bool? | yes | MObile no of User | - | id | Int | no | | + | delightsUserName | String? | yes | User Id Who filled the Beneficiary | | beneficiaryId | String | no | Benenficiary Id | - | bankName | String | no | Bank Name Of Account | - | address | String | no | Address of User | | subtitle | String | no | SHort Title Of Account | - | isActive | Bool | no | Boolean Flag whether Beneficiary set or not | | modifiedOn | String | no | MOdification Date of Beneficiary | + | address | String | no | Address of User | + | accountHolder | String | no | Account Holder Name | + | bankName | String | no | Bank Name Of Account | | email | String | no | EMail of User | - | comment | Bool? | yes | Remarks | + | accountNo | String | no | Account Number | + | id | Int | no | | --- @@ -3104,8 +3104,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | beneficiaries | [[OrderBeneficiaryDetails](#OrderBeneficiaryDetails)]? | yes | All Beneficiaries Of An Order | | showBeneficiaryDetails | Bool? | yes | Show beneficiary details or not. | + | beneficiaries | [[OrderBeneficiaryDetails](#OrderBeneficiaryDetails)]? | yes | All Beneficiaries Of An Order | --- @@ -3116,10 +3116,10 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | paymentId | String? | yes | | - | extraMeta | [String: Any]? | yes | | | paymentGateway | String? | yes | | + | paymentId | String? | yes | | | currentStatus | String? | yes | | + | extraMeta | [String: Any]? | yes | | | orderId | String? | yes | | --- @@ -3131,10 +3131,10 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | Payment mode name | - | amount | Double | no | Payment amount | | meta | [MultiTenderPaymentMeta](#MultiTenderPaymentMeta)? | yes | | + | name | String? | yes | Payment mode name | | mode | String | no | | + | amount | Double | no | Payment amount | --- @@ -3157,9 +3157,9 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | orderId | String | no | Unique order id | | success | Bool | no | Payment confirmation updated or not. | | message | String | no | Message | - | orderId | String | no | Unique order id | ---