From 04f9a2be441926ebb3baaf77e4aa0b4579c6dd36 Mon Sep 17 00:00:00 2001 From: Jigar Dafda Date: Thu, 26 May 2022 13:31:04 +0000 Subject: [PATCH] [Auto Generated] 0.1.19 --- .../application/ApplicationPageType.swift | 2 +- ...dPaymentGatewayResponseAppModelClass.swift | 20 +- ...neficiaryDetailsRequestAppModelClass.swift | 78 +- ...aOtpVerificationRequestAppModelClass.swift | 20 +- ...OtpVerificationResponseAppModelClass.swift | 20 +- .../AggregatorConfigDetailAppModelClass.swift | 90 +- .../models/AggregatorRouteAppModelClass.swift | 38 +- ...orsConfigDetailResponseAppModelClass.swift | 86 +- .../models/AppStoreAppModelClass.swift | 52 +- ...ApplicationStoreListingAppModelClass.swift | 20 +- .../ArticleAssignmentV2AppModelClass.swift | 20 +- .../AttachCardRequestAppModelClass.swift | 22 +- .../AttachCardsResponseAppModelClass.swift | 20 +- .../models/AttributeDetailAppModelClass.swift | 38 +- .../AttributeMetadataAppModelClass.swift | 20 +- .../AutocompleteItemAppModelClass.swift | 38 +- .../BankDetailsForOTPAppModelClass.swift | 30 +- .../BeneficiaryModeDetailsAppModelClass.swift | 80 +- .../BrandDetailResponseAppModelClass.swift | 22 +- .../models/BrandItemAppModelClass.swift | 70 +- .../BrandListingResponseAppModelClass.swift | 20 +- .../models/CardAppModelClass.swift | 158 +- .../CardPaymentGatewayAppModelClass.swift | 20 +- .../models/CategoryItemsAppModelClass.swift | 30 +- .../CategoryMetaResponseAppModelClass.swift | 22 +- .../ChargeCustomerRequestAppModelClass.swift | 40 +- .../ChargeCustomerResponseAppModelClass.swift | 64 +- .../models/ChildAppModelClass.swift | 32 +- ...ollectionDetailResponseAppModelClass.swift | 152 +- ...CollectionListingFilterAppModelClass.swift | 20 +- ...lectionListingFilterTagAppModelClass.swift | 20 +- ...ectionListingFilterTypeAppModelClass.swift | 20 +- .../models/ColumnHeadersAppModelClass.swift | 52 +- .../models/CompanyDetailAppModelClass.swift | 20 +- .../models/CompanyStoreAppModelClass.swift | 22 +- .../CompleteResponseAppModelClass.swift | 16 +- .../DeleteCardsResponseAppModelClass.swift | 20 +- .../models/DepartmentAppModelClass.swift | 40 +- .../models/DetailsSchemaV2AppModelClass.swift | 22 +- ...ErrorCodeAndDescriptionAppModelClass.swift | 20 +- .../ErrorCodeDescriptionAppModelClass.swift | 20 +- .../models/FollowIdsDataAppModelClass.swift | 20 +- .../FollowPostResponseAppModelClass.swift | 20 +- ...GetCollectionDetailNestAppModelClass.swift | 170 +- ...llectionListingResponseAppModelClass.swift | 24 +- ...etFollowListingResponseAppModelClass.swift | 20 +- .../GetGroupedProductsAppModelClass.swift | 80 +- .../HomeListingResponseAppModelClass.swift | 20 +- .../IfscCodeResponseAppModelClass.swift | 24 +- .../models/ImageUrlsAppModelClass.swift | 20 +- .../models/IntentAppAppModelClass.swift | 24 +- .../ListCardsResponseAppModelClass.swift | 20 +- ...PlaceSttributesSchemaV2AppModelClass.swift | 20 +- .../models/MediaAppModelClass.swift | 22 +- .../models/MetaFieldsAppModelClass.swift | 20 +- .../NotFoundResourceErrorAppModelClass.swift | 20 +- ...OrderBeneficiaryDetailsAppModelClass.swift | 168 +- .../models/PaymentFlowAppModelClass.swift | 90 +- ...ntInitializationRequestAppModelClass.swift | 104 +- ...tInitializationResponseAppModelClass.swift | 164 +- .../models/PaymentModeListAppModelClass.swift | 294 ++- .../PaymentOptionAndFlowAppModelClass.swift | 20 +- ...mentStatusUpdateRequestAppModelClass.swift | 90 +- ...entStatusUpdateResponseAppModelClass.swift | 20 +- .../models/Price1AppModelClass.swift | 26 +- .../models/PriceAppModelClass.swift | 20 +- .../models/ProductBrandAppModelClass.swift | 32 +- .../ProductCompareResponseAppModelClass.swift | 24 +- .../models/ProductDetailAppModelClass.swift | 252 +- .../ProductDetailAttributeAppModelClass.swift | 22 +- ...tDetailGroupedAttributeAppModelClass.swift | 20 +- .../models/ProductDetailsAppModelClass.swift | 176 +- .../ProductFiltersKeyAppModelClass.swift | 40 +- .../ProductFiltersValueAppModelClass.swift | 118 +- .../ProductListingActionAppModelClass.swift | 20 +- ...roductListingActionPageAppModelClass.swift | 22 +- .../ProductListingDetailAppModelClass.swift | 272 +- .../ProductListingResponseAppModelClass.swift | 34 +- .../models/ProductSetV2AppModelClass.swift | 20 +- .../ProductSimilarItemAppModelClass.swift | 22 +- .../models/ProductSizeAppModelClass.swift | 20 +- ...ductSizePriceResponseV2AppModelClass.swift | 168 +- ...ctSizeSellersResponseV2AppModelClass.swift | 24 +- .../models/ProductSizesAppModelClass.swift | 26 +- .../models/ProductSortOnAppModelClass.swift | 20 +- .../ProductStockPollingAppModelClass.swift | 20 +- .../ProductStockPriceAppModelClass.swift | 22 +- .../ProductStockPriceV2AppModelClass.swift | 22 +- .../ProductStockStatusItemAppModelClass.swift | 88 +- ...ductVariantItemResponseAppModelClass.swift | 72 +- ...tVariantListingResponseAppModelClass.swift | 50 +- .../ProductVariantResponseAppModelClass.swift | 20 +- .../models/ProductsAppModelClass.swift | 78 +- ...ductsComparisonResponseAppModelClass.swift | 20 +- .../RefundAccountResponseAppModelClass.swift | 40 +- .../ReturnConfigSchemaV2AppModelClass.swift | 22 +- .../models/RootPaymentModeAppModelClass.swift | 54 +- .../RupifiBannerDataAppModelClass.swift | 20 +- .../SecondLevelChildAppModelClass.swift | 32 +- .../SellerGroupAttributesAppModelClass.swift | 20 +- ...faultBeneficiaryRequestAppModelClass.swift | 20 +- .../models/SizeAppModelClass.swift | 40 +- .../models/SizeChartAppModelClass.swift | 60 +- .../models/SizeChartValuesAppModelClass.swift | 52 +- .../StoreAddressSerializerAppModelClass.swift | 82 +- .../models/StoreAppModelClass.swift | 92 +- .../StoreDepartmentsAppModelClass.swift | 40 +- .../models/StoreDetailAppModelClass.swift | 20 +- .../models/StoreDetailsAppModelClass.swift | 70 +- .../StoreListingResponseAppModelClass.swift | 20 +- .../StoreManagerSerializerAppModelClass.swift | 20 +- .../models/StoreTimingAppModelClass.swift | 24 +- ...tegyWiseListingSchemaV2AppModelClass.swift | 38 +- .../models/ThirdLevelChildAppModelClass.swift | 32 +- .../models/TimeAppModelClass.swift | 20 +- .../TransferItemsDetailsAppModelClass.swift | 44 +- .../TransferModeDetailsAppModelClass.swift | 20 +- ...ValidateCustomerRequestAppModelClass.swift | 30 +- ...alidateCustomerResponseAppModelClass.swift | 20 +- .../WalletOtpResponseAppModelClass.swift | 24 +- .../models/WrongOtpErrorAppModelClass.swift | 20 +- Sources/code/platform/PlatformClient.swift | 96 +- Sources/code/platform/PlatformPageType.swift | 2 +- .../client/CatalogPlatformClient.swift | 196 +- .../client/CompanyProfilePlatformClient.swift | 94 +- ...iaryDetailsRequestPlatformModelClass.swift | 72 +- ...talogConfigurationPlatformModelClass.swift | 56 +- .../AppConfigurationPlatformModelClass.swift | 44 +- ...uctListingResponsePlatformModelClass.swift | 26 +- .../ArticleQueryPlatformModelClass.swift | 24 +- ...AssignStoreArticlePlatformModelClass.swift | 30 +- .../AssignStorePlatformModelClass.swift | 60 +- ...ributeMasterFilterPlatformModelClass.swift | 20 +- .../AttributeMasterPlatformModelClass.swift | 40 +- ...AutocompleteActionPlatformModelClass.swift | 20 +- ...completePageActionPlatformModelClass.swift | 24 +- ...AutocompleteResultPlatformModelClass.swift | 20 +- .../BannerImagePlatformModelClass.swift | 20 +- ...ficiaryModeDetailsPlatformModelClass.swift | 78 +- .../models/BrandItemPlatformModelClass.swift | 52 +- ...andListingResponsePlatformModelClass.swift | 20 +- .../models/BrandPlatformModelClass.swift | 20 +- .../BulkAssetResponsePlatformModelClass.swift | 20 +- ...kInventoryGetItemsPlatformModelClass.swift | 128 +- .../BulkInventoryGetPlatformModelClass.swift | 20 +- .../models/BulkJobPlatformModelClass.swift | 158 +- .../BulkResponsePlatformModelClass.swift | 52 +- ...atalogInsightBrandPlatformModelClass.swift | 26 +- .../CategoryItemsPlatformModelClass.swift | 32 +- .../CategoryMappingPlatformModelClass.swift | 20 +- ...egoryMappingValuesPlatformModelClass.swift | 20 +- .../models/CategoryPlatformModelClass.swift | 160 +- ...ategoryRequestBodyPlatformModelClass.swift | 104 +- .../CategoryResponsePlatformModelClass.swift | 20 +- .../models/ChildPlatformModelClass.swift | 40 +- ...tionCreateResponsePlatformModelClass.swift | 136 +- ...tionDetailResponsePlatformModelClass.swift | 136 +- .../CollectionImagePlatformModelClass.swift | 20 +- ...onListingFilterTagPlatformModelClass.swift | 20 +- ...nListingFilterTypePlatformModelClass.swift | 20 +- ...CompanyBrandDetailPlatformModelClass.swift | 32 +- ...randListSerializerPlatformModelClass.swift | 20 +- ...tRequestSerializerPlatformModelClass.swift | 20 +- ...anyBrandSerializerPlatformModelClass.swift | 102 +- .../CompanyOptInPlatformModelClass.swift | 78 +- .../CompleteResponsePlatformModelClass.swift | 16 +- ...rationBucketPointsPlatformModelClass.swift | 20 +- ...istingFilterConfigPlatformModelClass.swift | 58 +- ...ListingFilterValuePlatformModelClass.swift | 20 +- ...nfigurationListingPlatformModelClass.swift | 20 +- ...nListingSortConfigPlatformModelClass.swift | 40 +- ...urationListingSortPlatformModelClass.swift | 20 +- ...ationProductConfigPlatformModelClass.swift | 66 +- ...oductVariantConfigPlatformModelClass.swift | 64 +- ...utocompleteKeywordPlatformModelClass.swift | 40 +- .../CreateCollectionPlatformModelClass.swift | 206 +- ...reateSearchKeywordPlatformModelClass.swift | 42 +- ...eAddressSerializerPlatformModelClass.swift | 108 +- ...dRequestSerializerPlatformModelClass.swift | 82 +- .../CrossSellingDataPlatformModelClass.swift | 20 +- ...ossSellingResponsePlatformModelClass.swift | 20 +- .../CustomOrderPlatformModelClass.swift | 22 +- ...tmentErrorResponsePlatformModelClass.swift | 34 +- ...partmentIdentifierPlatformModelClass.swift | 20 +- .../models/DepartmentPlatformModelClass.swift | 20 +- ...epartmentsResponsePlatformModelClass.swift | 20 +- .../models/DocumentPlatformModelClass.swift | 24 +- ...ntityConfigurationPlatformModelClass.swift | 56 +- ...CodeAndDescriptionPlatformModelClass.swift | 20 +- ...rorCodeDescriptionPlatformModelClass.swift | 20 +- .../ErrorResponsePlatformModelClass.swift | 20 +- .../models/GTINPlatformModelClass.swift | 20 +- .../GenderDetailPlatformModelClass.swift | 104 +- ...AddressSerializer1PlatformModelClass.swift | 100 +- ...tAddressSerializerPlatformModelClass.swift | 94 +- ...ocompleteWordsDataPlatformModelClass.swift | 42 +- ...pleteWordsResponsePlatformModelClass.swift | 20 +- ...ResponseSerializerPlatformModelClass.swift | 174 +- ...tionDetailsProductPlatformModelClass.swift | 40 +- ...tailsSchemaListingPlatformModelClass.swift | 20 +- ...llectionDetailNestPlatformModelClass.swift | 150 +- ...ctionItemsResponsePlatformModelClass.swift | 20 +- ...ionListingResponsePlatformModelClass.swift | 22 +- ...ueryOptionResponsePlatformModelClass.swift | 20 +- ...SerializerResponsePlatformModelClass.swift | 206 +- ...tCompanySerializerPlatformModelClass.swift | 110 +- .../GetDepartmentPlatformModelClass.swift | 122 +- ...LocationSerializerPlatformModelClass.swift | 246 +- .../GetOptInPlatformPlatformModelClass.swift | 20 +- ...ndleCreateResponsePlatformModelClass.swift | 110 +- ...dleListingResponsePlatformModelClass.swift | 20 +- ...ductBundleResponsePlatformModelClass.swift | 82 +- .../GetProductsPlatformModelClass.swift | 70 +- ...GetSearchWordsDataPlatformModelClass.swift | 42 +- ...ordsDetailResponsePlatformModelClass.swift | 20 +- ...earchWordsResponsePlatformModelClass.swift | 20 +- .../GlobalValidationPlatformModelClass.swift | 42 +- .../models/HSNDataPlatformModelClass.swift | 20 +- .../models/HierarchyPlatformModelClass.swift | 20 +- ...desListingResponsePlatformModelClass.swift | 20 +- .../HsnCodesObjectPlatformModelClass.swift | 92 +- .../models/HsnUpsertPlatformModelClass.swift | 80 +- .../IfscCodeResponsePlatformModelClass.swift | 20 +- .../models/ImagePlatformModelClass.swift | 30 +- .../models/IntentAppPlatformModelClass.swift | 30 +- .../models/InvSizePlatformModelClass.swift | 166 +- .../InventoryConfigPlatformModelClass.swift | 20 +- ...InventoryExportJobPlatformModelClass.swift | 54 +- ...ntoryExportRequestPlatformModelClass.swift | 22 +- ...toryExportResponsePlatformModelClass.swift | 20 +- ...yResponsePaginatedPlatformModelClass.swift | 20 +- .../InventoryResponsePlatformModelClass.swift | 120 +- .../InventorySetPlatformModelClass.swift | 20 +- ...eDetailsSerializerPlatformModelClass.swift | 20 +- .../models/ItemQueryPlatformModelClass.swift | 20 +- .../models/ItemsPlatformModelClass.swift | 142 +- ...LimitedProductDataPlatformModelClass.swift | 70 +- .../ListSizeGuidePlatformModelClass.swift | 20 +- ...nDayWiseSerializerPlatformModelClass.swift | 24 +- ...tionListSerializerPlatformModelClass.swift | 20 +- ...nManagerSerializerPlatformModelClass.swift | 20 +- ...LocationSerializerPlatformModelClass.swift | 162 +- .../models/LogoPlatformModelClass.swift | 30 +- .../models/Media1PlatformModelClass.swift | 20 +- .../models/Media2PlatformModelClass.swift | 20 +- ...FilterMetaResponsePlatformModelClass.swift | 24 +- ...ataListingResponsePlatformModelClass.swift | 20 +- .../models/MetaFieldsPlatformModelClass.swift | 20 +- .../models/MetaPlatformModelClass.swift | 20 +- .../MetricsSerializerPlatformModelClass.swift | 62 +- ...iTenderPaymentMetaPlatformModelClass.swift | 20 +- ...enderPaymentMethodPlatformModelClass.swift | 24 +- ...FoundResourceErrorPlatformModelClass.swift | 20 +- .../OptInPostRequestPlatformModelClass.swift | 20 +- ...nyBrandDetailsViewPlatformModelClass.swift | 20 +- ...OptinCompanyDetailPlatformModelClass.swift | 20 +- ...ptinCompanyMetricsPlatformModelClass.swift | 22 +- .../OptinStoreDetailsPlatformModelClass.swift | 20 +- ...BeneficiaryDetailsPlatformModelClass.swift | 192 +- .../OrderQuantityPlatformModelClass.swift | 20 +- .../PTErrorResponsePlatformModelClass.swift | 34 +- .../PageResponsePlatformModelClass.swift | 30 +- ...ymentGatewayConfigPlatformModelClass.swift | 30 +- ...tewayConfigRequestPlatformModelClass.swift | 24 +- ...ewayConfigResponsePlatformModelClass.swift | 50 +- .../PaymentModeListPlatformModelClass.swift | 296 ++- .../PaymentModeLogoPlatformModelClass.swift | 20 +- ...entOptionsResponsePlatformModelClass.swift | 20 +- .../PayoutBankDetailsPlatformModelClass.swift | 80 +- .../PayoutRequestPlatformModelClass.swift | 50 +- .../PayoutResponsePlatformModelClass.swift | 90 +- .../PayoutsResponsePlatformModelClass.swift | 50 +- .../models/Price1PlatformModelClass.swift | 22 +- .../models/PricePlatformModelClass.swift | 42 +- ...CategoriesResponsePlatformModelClass.swift | 20 +- .../ProductBrandPlatformModelClass.swift | 22 +- .../ProductBulkAssetsPlatformModelClass.swift | 24 +- ...uctBulkRequestListPlatformModelClass.swift | 20 +- ...ProductBulkRequestPlatformModelClass.swift | 140 +- .../ProductBundleItemPlatformModelClass.swift | 58 +- ...oductBundleRequestPlatformModelClass.swift | 88 +- ...undleUpdateRequestPlatformModelClass.swift | 82 +- ...igurationDownloadsPlatformModelClass.swift | 20 +- ...roductCreateUpdatePlatformModelClass.swift | 382 +-- ...uctDetailAttributePlatformModelClass.swift | 20 +- .../ProductDetailPlatformModelClass.swift | 208 +- ...tDownloadItemsDataPlatformModelClass.swift | 22 +- ...ductDownloadsItemsPlatformModelClass.swift | 80 +- ...tDownloadsResponsePlatformModelClass.swift | 20 +- .../ProductFiltersKeyPlatformModelClass.swift | 32 +- .../ProductFiltersPlatformModelClass.swift | 20 +- ...roductFiltersValuePlatformModelClass.swift | 116 +- ...oductListingDetailPlatformModelClass.swift | 252 +- ...roductListingPricePlatformModelClass.swift | 20 +- ...uctListingResponsePlatformModelClass.swift | 20 +- .../models/ProductPlatformModelClass.swift | 356 +-- .../ProductPublishPlatformModelClass.swift | 20 +- .../ProductPublishedPlatformModelClass.swift | 20 +- ...rnConfigSerializerPlatformModelClass.swift | 20 +- ...SizeDeleteResponsePlatformModelClass.swift | 20 +- .../ProductSortOnPlatformModelClass.swift | 20 +- .../ProductTemplatePlatformModelClass.swift | 124 +- .../models/PropertiesPlatformModelClass.swift | 292 +-- ...undAccountResponsePlatformModelClass.swift | 32 +- .../RootPaymentModePlatformModelClass.swift | 52 +- ...etupIntentResponsePlatformModelClass.swift | 20 +- .../models/SchedulePlatformModelClass.swift | 24 +- .../SecondLevelChildPlatformModelClass.swift | 40 +- .../SellerPhoneNumberPlatformModelClass.swift | 20 +- .../models/SeoDetailPlatformModelClass.swift | 20 +- .../models/Size1PlatformModelClass.swift | 190 +- .../SizeGuideResponsePlatformModelClass.swift | 110 +- ...toreAssignResponsePlatformModelClass.swift | 162 +- .../StoreDetailPlatformModelClass.swift | 74 +- ...tionConfigResponsePlatformModelClass.swift | 20 +- ...mentMethodResponsePlatformModelClass.swift | 20 +- .../models/TeaserTagPlatformModelClass.swift | 20 +- .../TemplateDetailsPlatformModelClass.swift | 96 +- .../TemplatesResponsePlatformModelClass.swift | 20 +- .../ThirdLevelChildPlatformModelClass.swift | 40 +- .../models/TraderPlatformModelClass.swift | 22 +- .../UpdateCollectionPlatformModelClass.swift | 174 +- .../UpdateCompanyPlatformModelClass.swift | 116 +- ...pdatePayoutRequestPlatformModelClass.swift | 20 +- ...datePayoutResponsePlatformModelClass.swift | 20 +- .../models/UserCommonPlatformModelClass.swift | 20 +- .../models/UserDetailPlatformModelClass.swift | 20 +- .../models/UserInfo1PlatformModelClass.swift | 40 +- .../models/UserInfoPlatformModelClass.swift | 40 +- .../UserSerializer1PlatformModelClass.swift | 22 +- .../UserSerializer2PlatformModelClass.swift | 22 +- .../UserSerializerPlatformModelClass.swift | 22 +- .../ValidateSizeGuidePlatformModelClass.swift | 128 +- documentation/application/CATALOG.md | 690 ++--- documentation/application/CONTENT.md | 2 +- documentation/application/FILESTORAGE.md | 3 +- documentation/application/PAYMENT.md | 329 +-- documentation/platform/CATALOG.md | 2304 ++++++++--------- documentation/platform/COMPANYPROFILE.md | 830 +++--- documentation/platform/CONTENT.md | 2 +- documentation/platform/FILESTORAGE.md | 3 +- documentation/platform/PAYMENT.md | 181 +- 342 files changed, 11245 insertions(+), 11215 deletions(-) diff --git a/Sources/code/application/ApplicationPageType.swift b/Sources/code/application/ApplicationPageType.swift index 5393114bec..f5f3042437 100644 --- a/Sources/code/application/ApplicationPageType.swift +++ b/Sources/code/application/ApplicationPageType.swift @@ -115,7 +115,7 @@ public extension ApplicationClient { case .contactUs: return "/contact-us/" case .external: - return "/external/:url" + return "/external/" case .faq: return "/faq/:category" case .freshchat: diff --git a/Sources/code/application/models/ActiveCardPaymentGatewayResponseAppModelClass.swift b/Sources/code/application/models/ActiveCardPaymentGatewayResponseAppModelClass.swift index 170a716911..e278061f69 100644 --- a/Sources/code/application/models/ActiveCardPaymentGatewayResponseAppModelClass.swift +++ b/Sources/code/application/models/ActiveCardPaymentGatewayResponseAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class ActiveCardPaymentGatewayResponse: Codable { public var cards: CardPaymentGateway - public var success: Bool - public var message: String + public var success: Bool + public enum CodingKeys: String, CodingKey { case cards - case success - case message + + case success } public init(cards: CardPaymentGateway, message: String, success: Bool) { self.cards = cards - self.success = success - self.message = message + + self.success = success } required public init(from decoder: Decoder) throws { @@ -34,9 +34,9 @@ public extension ApplicationClient { cards = try container.decode(CardPaymentGateway.self, forKey: .cards) - success = try container.decode(Bool.self, forKey: .success) - message = try container.decode(String.self, forKey: .message) + + success = try container.decode(Bool.self, forKey: .success) } public func encode(to encoder: Encoder) throws { @@ -44,9 +44,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(cards, forKey: .cards) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(message, forKey: .message) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/AddBeneficiaryDetailsRequestAppModelClass.swift b/Sources/code/application/models/AddBeneficiaryDetailsRequestAppModelClass.swift index 3cf78ad3b3..500bd33cae 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 transferMode: String + public var otp: String? + + public var shipmentId: String + + public var requestId: String? public var orderId: String - public var details: BeneficiaryModeDetails + public var transferMode: String - public var shipmentId: String + public var details: BeneficiaryModeDetails public var delights: Bool - public var requestId: String? + public enum CodingKeys: String, CodingKey { + case otp - public var otp: String? + case shipmentId = "shipment_id" - public enum CodingKeys: String, CodingKey { - case transferMode = "transfer_mode" + case requestId = "request_id" case orderId = "order_id" - case details + case transferMode = "transfer_mode" - case shipmentId = "shipment_id" + case details case delights - - case requestId = "request_id" - - case otp } public init(delights: Bool, details: BeneficiaryModeDetails, orderId: String, otp: String? = nil, requestId: String? = nil, shipmentId: String, transferMode: String) { - self.transferMode = transferMode + self.otp = otp - self.orderId = orderId + self.shipmentId = shipmentId - self.details = details + self.requestId = requestId - self.shipmentId = shipmentId + self.orderId = orderId - self.delights = delights + self.transferMode = transferMode - self.requestId = requestId + self.details = details - self.otp = otp + self.delights = delights } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - transferMode = try container.decode(String.self, forKey: .transferMode) - - orderId = try container.decode(String.self, forKey: .orderId) - - details = try container.decode(BeneficiaryModeDetails.self, forKey: .details) - - shipmentId = try container.decode(String.self, forKey: .shipmentId) - - delights = try container.decode(Bool.self, forKey: .delights) - 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) + 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) + + transferMode = try container.decode(String.self, forKey: .transferMode) + + details = try container.decode(BeneficiaryModeDetails.self, forKey: .details) + + 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(transferMode, forKey: .transferMode) + try? container.encodeIfPresent(otp, forKey: .otp) - try? container.encodeIfPresent(orderId, forKey: .orderId) + try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) - try? container.encodeIfPresent(details, forKey: .details) + try? container.encodeIfPresent(requestId, forKey: .requestId) - try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) + try? container.encodeIfPresent(orderId, forKey: .orderId) - try? container.encodeIfPresent(delights, forKey: .delights) + try? container.encodeIfPresent(transferMode, forKey: .transferMode) - try? container.encodeIfPresent(requestId, forKey: .requestId) + try? container.encodeIfPresent(details, forKey: .details) - try? container.encodeIfPresent(otp, forKey: .otp) + try? container.encodeIfPresent(delights, forKey: .delights) } } } diff --git a/Sources/code/application/models/AddBeneficiaryViaOtpVerificationRequestAppModelClass.swift b/Sources/code/application/models/AddBeneficiaryViaOtpVerificationRequestAppModelClass.swift index 7d28ad09c8..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 requestId: String + public var hashKey: String public var otp: String - public var hashKey: String + public var requestId: String public enum CodingKeys: String, CodingKey { - case requestId = "request_id" + case hashKey = "hash_key" case otp - case hashKey = "hash_key" + case requestId = "request_id" } public init(hashKey: String, otp: String, requestId: String) { - self.requestId = requestId + self.hashKey = hashKey self.otp = otp - self.hashKey = hashKey + 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) + hashKey = try container.decode(String.self, forKey: .hashKey) otp = try container.decode(String.self, forKey: .otp) - hashKey = try container.decode(String.self, forKey: .hashKey) + 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(hashKey, forKey: .hashKey) try? container.encodeIfPresent(otp, forKey: .otp) - try? container.encodeIfPresent(hashKey, forKey: .hashKey) + try? container.encodeIfPresent(requestId, forKey: .requestId) } } } diff --git a/Sources/code/application/models/AddBeneficiaryViaOtpVerificationResponseAppModelClass.swift b/Sources/code/application/models/AddBeneficiaryViaOtpVerificationResponseAppModelClass.swift index 30347eb071..77bd807727 100644 --- a/Sources/code/application/models/AddBeneficiaryViaOtpVerificationResponseAppModelClass.swift +++ b/Sources/code/application/models/AddBeneficiaryViaOtpVerificationResponseAppModelClass.swift @@ -7,25 +7,27 @@ public extension ApplicationClient { Used By: Payment */ class AddBeneficiaryViaOtpVerificationResponse: Codable { - public var success: Bool? - public var message: String - public enum CodingKeys: String, CodingKey { - case success + public var success: Bool? + public enum CodingKeys: String, CodingKey { case message + + case success } public init(message: String, success: Bool? = nil) { - self.success = success - self.message = message + + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + message = try container.decode(String.self, forKey: .message) + 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 {} - - 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(message, forKey: .message) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/AggregatorConfigDetailAppModelClass.swift b/Sources/code/application/models/AggregatorConfigDetailAppModelClass.swift index 4afd48c68c..2cf3a1816e 100644 --- a/Sources/code/application/models/AggregatorConfigDetailAppModelClass.swift +++ b/Sources/code/application/models/AggregatorConfigDetailAppModelClass.swift @@ -7,75 +7,77 @@ public extension ApplicationClient { Used By: Payment */ class AggregatorConfigDetail: Codable { - public var merchantKey: String? - - public var userId: String? + public var configType: String public var pin: String? - public var configType: String - public var sdk: Bool? - public var verifyApi: String? - public var merchantId: String? + public var merchantKey: String? + public var api: String? - public var key: String + public var verifyApi: String? public var secret: String - public enum CodingKeys: String, CodingKey { - case merchantKey = "merchant_key" - - case userId = "user_id" + public var key: String - case pin + public var userId: String? + public enum CodingKeys: String, CodingKey { case configType = "config_type" - case sdk + case pin - case verifyApi = "verify_api" + case sdk case merchantId = "merchant_id" + case merchantKey = "merchant_key" + case api - case key + case verifyApi = "verify_api" case secret + + case key + + case userId = "user_id" } 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.merchantKey = merchantKey - - self.userId = userId + self.configType = configType self.pin = pin - self.configType = configType - self.sdk = sdk - self.verifyApi = verifyApi - self.merchantId = merchantId + self.merchantKey = merchantKey + self.api = api - self.key = key + self.verifyApi = verifyApi self.secret = secret + + self.key = key + + self.userId = userId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + configType = try container.decode(String.self, forKey: .configType) + 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) @@ -83,7 +85,7 @@ public extension ApplicationClient { } catch {} do { - userId = try container.decode(String.self, forKey: .userId) + sdk = try container.decode(Bool.self, forKey: .sdk) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,17 +93,15 @@ public extension ApplicationClient { } catch {} 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 {} - configType = try container.decode(String.self, forKey: .configType) - do { - sdk = try container.decode(Bool.self, forKey: .sdk) + merchantKey = try container.decode(String.self, forKey: .merchantKey) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -109,7 +109,7 @@ public extension ApplicationClient { } catch {} 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) @@ -117,48 +117,48 @@ public extension ApplicationClient { } catch {} do { - merchantId = try container.decode(String.self, forKey: .merchantId) + verifyApi = try container.decode(String.self, forKey: .verifyApi) } 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) + do { - api = try container.decode(String.self, forKey: .api) + 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 {} - - key = try container.decode(String.self, forKey: .key) - - secret = try container.decode(String.self, forKey: .secret) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(merchantKey, forKey: .merchantKey) - - try? container.encode(userId, forKey: .userId) + try? container.encodeIfPresent(configType, forKey: .configType) try? container.encode(pin, forKey: .pin) - try? container.encodeIfPresent(configType, forKey: .configType) - try? container.encode(sdk, forKey: .sdk) - try? container.encode(verifyApi, forKey: .verifyApi) - try? container.encode(merchantId, forKey: .merchantId) + try? container.encode(merchantKey, forKey: .merchantKey) + try? container.encode(api, forKey: .api) - try? container.encodeIfPresent(key, forKey: .key) + try? container.encode(verifyApi, forKey: .verifyApi) try? container.encodeIfPresent(secret, forKey: .secret) + + try? container.encodeIfPresent(key, forKey: .key) + + try? container.encode(userId, forKey: .userId) } } } diff --git a/Sources/code/application/models/AggregatorRouteAppModelClass.swift b/Sources/code/application/models/AggregatorRouteAppModelClass.swift index 8c5932d2e8..3e8a55a24b 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 apiLink: String? + + public var data: [String: Any]? + public var paymentFlowData: String? public var paymentFlow: String? - public var data: [String: Any]? + public enum CodingKeys: String, CodingKey { + case apiLink = "api_link" - public var apiLink: String? + case data - public enum CodingKeys: String, CodingKey { case paymentFlowData = "payment_flow_data" case paymentFlow = "payment_flow" - - case data - - case apiLink = "api_link" } public init(apiLink: String? = nil, data: [String: Any]? = nil, paymentFlow: String? = nil, paymentFlowData: String? = nil) { - self.paymentFlowData = paymentFlowData - - self.paymentFlow = paymentFlow + self.apiLink = apiLink self.data = data - self.apiLink = apiLink + self.paymentFlowData = paymentFlowData + + self.paymentFlow = paymentFlow } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -47,7 +47,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) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - data = try container.decode([String: Any].self, forKey: .data) + paymentFlowData = try container.decode(String.self, forKey: .paymentFlowData) } 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) + paymentFlow = try container.decode(String.self, forKey: .paymentFlow) } 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(paymentFlowData, forKey: .paymentFlowData) - - try? container.encode(paymentFlow, forKey: .paymentFlow) + try? container.encode(apiLink, forKey: .apiLink) try? container.encode(data, forKey: .data) - try? container.encode(apiLink, forKey: .apiLink) + try? container.encode(paymentFlowData, forKey: .paymentFlowData) + + try? container.encode(paymentFlow, forKey: .paymentFlow) } } } diff --git a/Sources/code/application/models/AggregatorsConfigDetailResponseAppModelClass.swift b/Sources/code/application/models/AggregatorsConfigDetailResponseAppModelClass.swift index 239ba8a13e..1fa1abe909 100644 --- a/Sources/code/application/models/AggregatorsConfigDetailResponseAppModelClass.swift +++ b/Sources/code/application/models/AggregatorsConfigDetailResponseAppModelClass.swift @@ -7,75 +7,75 @@ public extension ApplicationClient { Used By: Payment */ class AggregatorsConfigDetailResponse: Codable { - public var payumoney: AggregatorConfigDetail? - public var razorpay: AggregatorConfigDetail? - public var rupifi: AggregatorConfigDetail? + public var ccavenue: AggregatorConfigDetail? - public var env: String + public var simpl: AggregatorConfigDetail? - public var stripe: AggregatorConfigDetail? + public var payumoney: AggregatorConfigDetail? - public var ccavenue: AggregatorConfigDetail? + public var rupifi: AggregatorConfigDetail? public var mswipe: AggregatorConfigDetail? - public var simpl: AggregatorConfigDetail? + public var env: String + + public var success: Bool public var juspay: AggregatorConfigDetail? - public var success: Bool + public var stripe: AggregatorConfigDetail? public enum CodingKeys: String, CodingKey { - case payumoney - case razorpay - case rupifi + case ccavenue - case env + case simpl - case stripe + case payumoney - case ccavenue + case rupifi case mswipe - case simpl + case env + + case success case juspay - case success + case stripe } 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.payumoney = payumoney - self.razorpay = razorpay - self.rupifi = rupifi + self.ccavenue = ccavenue - self.env = env + self.simpl = simpl - self.stripe = stripe + self.payumoney = payumoney - self.ccavenue = ccavenue + self.rupifi = rupifi self.mswipe = mswipe - self.simpl = simpl + self.env = env + + self.success = success self.juspay = juspay - self.success = success + self.stripe = stripe } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - payumoney = try container.decode(AggregatorConfigDetail.self, forKey: .payumoney) + razorpay = try container.decode(AggregatorConfigDetail.self, forKey: .razorpay) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -83,7 +83,7 @@ public extension ApplicationClient { } catch {} do { - razorpay = try container.decode(AggregatorConfigDetail.self, forKey: .razorpay) + ccavenue = try container.decode(AggregatorConfigDetail.self, forKey: .ccavenue) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,17 +91,15 @@ public extension ApplicationClient { } catch {} do { - rupifi = try container.decode(AggregatorConfigDetail.self, forKey: .rupifi) + simpl = try container.decode(AggregatorConfigDetail.self, forKey: .simpl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - env = try container.decode(String.self, forKey: .env) - do { - stripe = try container.decode(AggregatorConfigDetail.self, forKey: .stripe) + payumoney = try container.decode(AggregatorConfigDetail.self, forKey: .payumoney) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -109,7 +107,7 @@ public extension ApplicationClient { } catch {} do { - ccavenue = try container.decode(AggregatorConfigDetail.self, forKey: .ccavenue) + rupifi = try container.decode(AggregatorConfigDetail.self, forKey: .rupifi) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -124,8 +122,12 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} + env = try container.decode(String.self, forKey: .env) + + 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) @@ -133,38 +135,36 @@ public extension ApplicationClient { } catch {} do { - juspay = try container.decode(AggregatorConfigDetail.self, forKey: .juspay) + stripe = try container.decode(AggregatorConfigDetail.self, forKey: .stripe) } 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) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(payumoney, forKey: .payumoney) - try? container.encodeIfPresent(razorpay, forKey: .razorpay) - try? container.encodeIfPresent(rupifi, forKey: .rupifi) + try? container.encodeIfPresent(ccavenue, forKey: .ccavenue) - try? container.encodeIfPresent(env, forKey: .env) + try? container.encodeIfPresent(simpl, forKey: .simpl) - try? container.encodeIfPresent(stripe, forKey: .stripe) + try? container.encodeIfPresent(payumoney, forKey: .payumoney) - try? container.encodeIfPresent(ccavenue, forKey: .ccavenue) + try? container.encodeIfPresent(rupifi, forKey: .rupifi) try? container.encodeIfPresent(mswipe, forKey: .mswipe) - try? container.encodeIfPresent(simpl, forKey: .simpl) + try? container.encodeIfPresent(env, forKey: .env) + + try? container.encodeIfPresent(success, forKey: .success) try? container.encodeIfPresent(juspay, forKey: .juspay) - try? container.encodeIfPresent(success, forKey: .success) + try? container.encodeIfPresent(stripe, forKey: .stripe) } } } diff --git a/Sources/code/application/models/AppStoreAppModelClass.swift b/Sources/code/application/models/AppStoreAppModelClass.swift index 116e0d0892..4e7f310411 100644 --- a/Sources/code/application/models/AppStoreAppModelClass.swift +++ b/Sources/code/application/models/AppStoreAppModelClass.swift @@ -7,48 +7,48 @@ public extension ApplicationClient { Used By: Catalog */ class AppStore: Codable { + public var address: StoreAddressSerializer? + public var contactNumbers: [SellerPhoneNumber]? - public var manager: StoreManagerSerializer? + public var company: CompanyStore? - public var departments: [StoreDepartments]? + public var manager: StoreManagerSerializer? public var name: String? - public var company: CompanyStore? - - public var address: StoreAddressSerializer? + public var departments: [StoreDepartments]? public var uid: Int? public enum CodingKeys: String, CodingKey { + case address + case contactNumbers = "contact_numbers" - case manager + case company - case departments + case manager case name - case company - - case address + 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.contactNumbers = contactNumbers - self.manager = manager + self.company = company - self.departments = departments + self.manager = manager self.name = name - self.company = company - - self.address = address + self.departments = departments self.uid = uid } @@ -57,7 +57,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) + address = try container.decode(StoreAddressSerializer.self, forKey: .address) } 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) @@ -73,7 +73,7 @@ public extension ApplicationClient { } catch {} do { - departments = try container.decode([StoreDepartments].self, forKey: .departments) + company = try container.decode(CompanyStore.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -81,7 +81,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + manager = try container.decode(StoreManagerSerializer.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,7 +89,7 @@ public extension ApplicationClient { } catch {} do { - company = try container.decode(CompanyStore.self, forKey: .company) + 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 { - address = try container.decode(StoreAddressSerializer.self, forKey: .address) + departments = try container.decode([StoreDepartments].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,17 +116,17 @@ 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(contactNumbers, forKey: .contactNumbers) - try? container.encodeIfPresent(manager, forKey: .manager) + try? container.encodeIfPresent(company, forKey: .company) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(manager, forKey: .manager) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(company, forKey: .company) - - try? container.encodeIfPresent(address, forKey: .address) + 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 92f10bd4c0..f2e4a10b73 100644 --- a/Sources/code/application/models/ApplicationStoreListingAppModelClass.swift +++ b/Sources/code/application/models/ApplicationStoreListingAppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class ApplicationStoreListing: Codable { - public var page: Page? + public var items: [AppStore]? public var filters: [StoreDepartments]? - public var items: [AppStore]? + public var page: Page? public enum CodingKeys: String, CodingKey { - case page + case items case filters - case items + case page } public init(filters: [StoreDepartments]? = nil, items: [AppStore]? = nil, page: Page? = nil) { - self.page = page + self.items = items self.filters = filters - self.items = items + self.page = page } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - page = try container.decode(Page.self, forKey: .page) + items = try container.decode([AppStore].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - items = try container.decode([AppStore].self, forKey: .items) + page = try container.decode(Page.self, forKey: .page) } 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(page, forKey: .page) + try? container.encodeIfPresent(items, forKey: .items) try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(items, forKey: .items) + try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/application/models/ArticleAssignmentV2AppModelClass.swift b/Sources/code/application/models/ArticleAssignmentV2AppModelClass.swift index 636215aa33..95bdaf3b5d 100644 --- a/Sources/code/application/models/ArticleAssignmentV2AppModelClass.swift +++ b/Sources/code/application/models/ArticleAssignmentV2AppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class ArticleAssignmentV2: Codable { - public var strategy: String? - public var level: String? - public enum CodingKeys: String, CodingKey { - case strategy + public var strategy: String? + public enum CodingKeys: String, CodingKey { case level + + case strategy } public init(level: String? = nil, strategy: String? = nil) { - self.strategy = strategy - self.level = level + + self.strategy = strategy } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - strategy = try container.decode(String.self, forKey: .strategy) + level = try container.decode(String.self, forKey: .level) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - level = try container.decode(String.self, forKey: .level) + strategy = try container.decode(String.self, forKey: .strategy) } 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(strategy, forKey: .strategy) - try? container.encodeIfPresent(level, forKey: .level) + + try? container.encodeIfPresent(strategy, forKey: .strategy) } } } diff --git a/Sources/code/application/models/AttachCardRequestAppModelClass.swift b/Sources/code/application/models/AttachCardRequestAppModelClass.swift index bdd73501a5..577424862f 100644 --- a/Sources/code/application/models/AttachCardRequestAppModelClass.swift +++ b/Sources/code/application/models/AttachCardRequestAppModelClass.swift @@ -9,30 +9,30 @@ public extension ApplicationClient { class AttachCardRequest: Codable { public var cardId: String + public var nickname: String? + public var refresh: Bool? public var nameOnCard: String? - public var nickname: String? - public enum CodingKeys: String, CodingKey { case cardId = "card_id" + case nickname + case refresh case nameOnCard = "name_on_card" - - case nickname } public init(cardId: String, nameOnCard: String? = nil, nickname: String? = nil, refresh: Bool? = nil) { self.cardId = cardId + self.nickname = nickname + self.refresh = refresh self.nameOnCard = nameOnCard - - self.nickname = nickname } required public init(from decoder: Decoder) throws { @@ -41,7 +41,7 @@ public extension ApplicationClient { cardId = try container.decode(String.self, forKey: .cardId) 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) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - nameOnCard = try container.decode(String.self, forKey: .nameOnCard) + refresh = try container.decode(Bool.self, forKey: .refresh) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -57,7 +57,7 @@ public extension ApplicationClient { } catch {} do { - nickname = try container.decode(String.self, forKey: .nickname) + nameOnCard = try container.decode(String.self, forKey: .nameOnCard) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,11 +70,11 @@ public extension ApplicationClient { try? container.encode(cardId, forKey: .cardId) + try? container.encodeIfPresent(nickname, forKey: .nickname) + try? container.encode(refresh, forKey: .refresh) try? container.encodeIfPresent(nameOnCard, forKey: .nameOnCard) - - try? container.encodeIfPresent(nickname, forKey: .nickname) } } } diff --git a/Sources/code/application/models/AttachCardsResponseAppModelClass.swift b/Sources/code/application/models/AttachCardsResponseAppModelClass.swift index a0756f76ba..8a68a7700b 100644 --- a/Sources/code/application/models/AttachCardsResponseAppModelClass.swift +++ b/Sources/code/application/models/AttachCardsResponseAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class AttachCardsResponse: Codable { public var data: [String: Any] - public var success: Bool - public var message: String? + public var success: Bool + public enum CodingKeys: String, CodingKey { case data - case success - case message + + case success } public init(data: [String: Any], message: String? = nil, success: Bool) { self.data = data - self.success = success - self.message = message + + self.success = success } required public init(from decoder: Decoder) throws { @@ -34,8 +34,6 @@ public extension ApplicationClient { data = try container.decode([String: Any].self, forKey: .data) - success = try container.decode(Bool.self, forKey: .success) - do { message = try container.decode(String.self, forKey: .message) @@ -43,6 +41,8 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + success = try container.decode(Bool.self, forKey: .success) } public func encode(to encoder: Encoder) throws { @@ -50,9 +50,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(data, forKey: .data) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(message, forKey: .message) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/AttributeDetailAppModelClass.swift b/Sources/code/application/models/AttributeDetailAppModelClass.swift index 783a2fa1d4..bf9094c74e 100644 --- a/Sources/code/application/models/AttributeDetailAppModelClass.swift +++ b/Sources/code/application/models/AttributeDetailAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class AttributeDetail: Codable { - public var key: String? - - public var display: String? - public var logo: String? public var description: String? - public enum CodingKeys: String, CodingKey { - case key + public var display: String? - case display + public var key: String? + public enum CodingKeys: String, CodingKey { case logo case description - } - public init(description: String? = nil, display: String? = nil, key: String? = nil, logo: String? = nil) { - self.key = key + case display - self.display = display + case key + } + 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 } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - key = try container.decode(String.self, forKey: .key) + logo = try container.decode(String.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 { - 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 { - logo = try container.decode(String.self, forKey: .logo) + 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) @@ -74,13 +74,13 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(key, forKey: .key) - - try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(description, forKey: .description) + + try? container.encodeIfPresent(display, forKey: .display) + + try? container.encodeIfPresent(key, forKey: .key) } } } diff --git a/Sources/code/application/models/AttributeMetadataAppModelClass.swift b/Sources/code/application/models/AttributeMetadataAppModelClass.swift index 40dc41384d..af3f52f07a 100644 --- a/Sources/code/application/models/AttributeMetadataAppModelClass.swift +++ b/Sources/code/application/models/AttributeMetadataAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class AttributeMetadata: Codable { - public var title: String? - public var details: [AttributeDetail]? - public enum CodingKeys: String, CodingKey { - case title + public var title: String? + public enum CodingKeys: String, CodingKey { case details + + case title } public init(details: [AttributeDetail]? = nil, title: String? = nil) { - self.title = title - self.details = details + + self.title = title } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - title = try container.decode(String.self, forKey: .title) + details = try container.decode([AttributeDetail].self, forKey: .details) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - details = try container.decode([AttributeDetail].self, forKey: .details) + title = try container.decode(String.self, forKey: .title) } 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(title, forKey: .title) - try? container.encodeIfPresent(details, forKey: .details) + + try? container.encodeIfPresent(title, forKey: .title) } } } diff --git a/Sources/code/application/models/AutocompleteItemAppModelClass.swift b/Sources/code/application/models/AutocompleteItemAppModelClass.swift index 7c23b5beca..5721a2b4cf 100644 --- a/Sources/code/application/models/AutocompleteItemAppModelClass.swift +++ b/Sources/code/application/models/AutocompleteItemAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class AutocompleteItem: Codable { - public var type: String? - - public var display: String? - public var logo: Media? public var action: ProductListingAction? - public enum CodingKeys: String, CodingKey { - case type + public var display: String? - case display + public var type: String? + public enum CodingKeys: String, CodingKey { case logo case action - } - public init(action: ProductListingAction? = nil, display: String? = nil, logo: Media? = nil, type: String? = nil) { - self.type = type + case display - self.display = display + case type + } + public init(action: ProductListingAction? = nil, display: String? = nil, logo: Media? = nil, type: String? = nil) { self.logo = logo self.action = action + + self.display = display + + 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) + 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 { - display = try container.decode(String.self, forKey: .display) + 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 { - 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) @@ -63,7 +63,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) @@ -74,13 +74,13 @@ 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(display, forKey: .display) - try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(action, forKey: .action) + + try? container.encodeIfPresent(display, forKey: .display) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/application/models/BankDetailsForOTPAppModelClass.swift b/Sources/code/application/models/BankDetailsForOTPAppModelClass.swift index 52ddb88a18..0711728bf1 100644 --- a/Sources/code/application/models/BankDetailsForOTPAppModelClass.swift +++ b/Sources/code/application/models/BankDetailsForOTPAppModelClass.swift @@ -9,36 +9,36 @@ public extension ApplicationClient { class BankDetailsForOTP: Codable { public var accountNo: String - public var branchName: String - public var ifscCode: String - public var bankName: String + public var branchName: String public var accountHolder: String + public var bankName: String + public enum CodingKeys: String, CodingKey { case accountNo = "account_no" - case branchName = "branch_name" - case ifscCode = "ifsc_code" - case bankName = "bank_name" + case branchName = "branch_name" case accountHolder = "account_holder" + + case bankName = "bank_name" } public init(accountHolder: String, accountNo: String, bankName: String, branchName: String, ifscCode: String) { self.accountNo = accountNo - self.branchName = branchName - self.ifscCode = ifscCode - self.bankName = bankName + self.branchName = branchName self.accountHolder = accountHolder + + self.bankName = bankName } required public init(from decoder: Decoder) throws { @@ -46,13 +46,13 @@ public extension ApplicationClient { accountNo = try container.decode(String.self, forKey: .accountNo) - branchName = try container.decode(String.self, forKey: .branchName) - 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) } public func encode(to encoder: Encoder) throws { @@ -60,13 +60,13 @@ public extension ApplicationClient { try? container.encodeIfPresent(accountNo, forKey: .accountNo) - try? container.encodeIfPresent(branchName, forKey: .branchName) - 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) } } } diff --git a/Sources/code/application/models/BeneficiaryModeDetailsAppModelClass.swift b/Sources/code/application/models/BeneficiaryModeDetailsAppModelClass.swift index 2513076708..72a836b2ff 100644 --- a/Sources/code/application/models/BeneficiaryModeDetailsAppModelClass.swift +++ b/Sources/code/application/models/BeneficiaryModeDetailsAppModelClass.swift @@ -11,46 +11,46 @@ public extension ApplicationClient { public var mobile: String - public var branchName: String + public var comment: String? - public var bankName: String + public var vpa: String? public var wallet: String? public var ifscCode: String - public var address: String? + public var branchName: String - public var vpa: String? + public var accountHolder: String - public var email: String + public var address: String? - public var comment: String? + public var bankName: String - public var accountHolder: String + public var email: String public enum CodingKeys: String, CodingKey { case accountNo = "account_no" case mobile - case branchName = "branch_name" + case comment - case bankName = "bank_name" + case vpa case wallet case ifscCode = "ifsc_code" - case address + case branchName = "branch_name" - case vpa + case accountHolder = "account_holder" - case email + case address - case comment + case bankName = "bank_name" - case accountHolder = "account_holder" + case email } 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) { @@ -58,23 +58,23 @@ public extension ApplicationClient { self.mobile = mobile - self.branchName = branchName + self.comment = comment - self.bankName = bankName + self.vpa = vpa self.wallet = wallet self.ifscCode = ifscCode - self.address = address + self.branchName = branchName - self.vpa = vpa + self.accountHolder = accountHolder - self.email = email + self.address = address - self.comment = comment + self.bankName = bankName - self.accountHolder = accountHolder + self.email = email } required public init(from decoder: Decoder) throws { @@ -84,22 +84,16 @@ public extension ApplicationClient { mobile = try container.decode(String.self, forKey: .mobile) - branchName = try container.decode(String.self, forKey: .branchName) - - bankName = try container.decode(String.self, forKey: .bankName) - do { - wallet = try container.decode(String.self, forKey: .wallet) + 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 {} - ifscCode = try container.decode(String.self, forKey: .ifscCode) - 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) @@ -107,24 +101,30 @@ public extension ApplicationClient { } catch {} do { - vpa = try container.decode(String.self, forKey: .vpa) + 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 {} - email = try container.decode(String.self, forKey: .email) + ifscCode = try container.decode(String.self, forKey: .ifscCode) + + branchName = try container.decode(String.self, forKey: .branchName) + + accountHolder = try container.decode(String.self, forKey: .accountHolder) do { - comment = try container.decode(String.self, forKey: .comment) + address = try container.decode(String.self, forKey: .address) } 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) + bankName = try container.decode(String.self, forKey: .bankName) + + email = try container.decode(String.self, forKey: .email) } public func encode(to encoder: Encoder) throws { @@ -134,23 +134,23 @@ public extension ApplicationClient { try? container.encodeIfPresent(mobile, forKey: .mobile) - try? container.encodeIfPresent(branchName, forKey: .branchName) + try? container.encodeIfPresent(comment, forKey: .comment) - try? container.encodeIfPresent(bankName, forKey: .bankName) + try? container.encode(vpa, forKey: .vpa) try? container.encode(wallet, forKey: .wallet) try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(branchName, forKey: .branchName) - try? container.encode(vpa, forKey: .vpa) + try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) - try? container.encodeIfPresent(email, forKey: .email) + try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(comment, forKey: .comment) + try? container.encodeIfPresent(bankName, forKey: .bankName) - try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) + try? container.encodeIfPresent(email, forKey: .email) } } } diff --git a/Sources/code/application/models/BrandDetailResponseAppModelClass.swift b/Sources/code/application/models/BrandDetailResponseAppModelClass.swift index b427dbf80e..ef31907774 100644 --- a/Sources/code/application/models/BrandDetailResponseAppModelClass.swift +++ b/Sources/code/application/models/BrandDetailResponseAppModelClass.swift @@ -7,31 +7,31 @@ public extension ApplicationClient { Used By: Catalog */ class BrandDetailResponse: Codable { + public var logo: Media? + public var banners: ImageUrls? public var name: String? - public var logo: Media? - public var uid: Int? public enum CodingKeys: String, CodingKey { + case logo + case banners case name - case logo - case uid } public init(banners: ImageUrls? = nil, logo: Media? = nil, name: String? = nil, uid: Int? = nil) { + self.logo = logo + self.banners = banners self.name = name - self.logo = logo - self.uid = uid } @@ -39,7 +39,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -47,7 +47,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) @@ -55,7 +55,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,12 +74,12 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(banners, forKey: .banners) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(uid, forKey: .uid) } } diff --git a/Sources/code/application/models/BrandItemAppModelClass.swift b/Sources/code/application/models/BrandItemAppModelClass.swift index 653e90e499..ecf0a27959 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 slug: String? - - public var discount: String? - - public var departments: [String]? - public var name: String? public var action: ProductListingAction? - public var logo: Media? + public var slug: String? - public var uid: Int? + public var discount: String? public var banners: ImageUrls? - public enum CodingKeys: String, CodingKey { - case slug + public var logo: Media? - case discount + public var departments: [String]? - case departments + public var uid: Int? + public enum CodingKeys: String, CodingKey { case name case action - case logo + case slug - case uid + case discount case banners - } - 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.slug = slug + case logo - self.discount = discount + case departments - self.departments = departments + case uid + } + 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.name = name self.action = action - self.logo = logo + self.slug = slug - self.uid = uid + self.discount = discount self.banners = banners + + self.logo = logo + + self.departments = departments + + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -71,7 +71,7 @@ public extension ApplicationClient { } catch {} 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) @@ -79,7 +79,7 @@ public extension ApplicationClient { } catch {} do { - departments = try container.decode([String].self, forKey: .departments) + slug = try container.decode(String.self, forKey: .slug) } 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) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -95,7 +95,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) @@ -111,7 +111,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + departments = try container.decode([String].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -119,7 +119,7 @@ public extension ApplicationClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + uid = try container.decode(Int.self, forKey: .uid) } 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(slug, forKey: .slug) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(discount, forKey: .discount) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(discount, forKey: .discount) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(banners, forKey: .banners) try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(departments, forKey: .departments) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/BrandListingResponseAppModelClass.swift b/Sources/code/application/models/BrandListingResponseAppModelClass.swift index 5b790c20ba..185b3c1f25 100644 --- a/Sources/code/application/models/BrandListingResponseAppModelClass.swift +++ b/Sources/code/application/models/BrandListingResponseAppModelClass.swift @@ -7,27 +7,25 @@ public extension ApplicationClient { Used By: Catalog */ class BrandListingResponse: Codable { - public var page: Page - public var items: [BrandItem]? - public enum CodingKeys: String, CodingKey { - case page + public var page: Page + public enum CodingKeys: String, CodingKey { case items + + case page } public init(items: [BrandItem]? = nil, page: Page) { - self.page = page - self.items = items + + self.page = page } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - page = try container.decode(Page.self, forKey: .page) - do { items = try container.decode([BrandItem].self, forKey: .items) @@ -35,14 +33,16 @@ 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 { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(page, forKey: .page) - try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/application/models/CardAppModelClass.swift b/Sources/code/application/models/CardAppModelClass.swift index 491c4696b7..d07c35d968 100644 --- a/Sources/code/application/models/CardAppModelClass.swift +++ b/Sources/code/application/models/CardAppModelClass.swift @@ -7,111 +7,117 @@ public extension ApplicationClient { Used By: Payment */ class Card: Codable { - public var cardId: String? - - public var cardBrandImage: String? + public var cardBrand: String? - public var cardFingerprint: String? + public var expMonth: Int? public var aggregatorName: String - public var cardNumber: String? + public var compliantWithTokenisationGuidelines: Bool? + + public var cardName: String? + + public var cardFingerprint: String? public var cardToken: String? - public var cardType: String? + public var cardReference: String? - public var cardIssuer: String? + public var expYear: Int? - public var cardIsin: String? + public var cardNumber: String? - public var cardReference: String? + public var cardId: String? - public var expMonth: Int? + public var cardType: String? - public var expired: Bool? + public var cardIssuer: String? - public var expYear: Int? + public var expired: Bool? - public var cardBrand: String? + public var cardBrandImage: String? public var nickname: String? - public var cardName: String? + public var cardIsin: String? public enum CodingKeys: String, CodingKey { - case cardId = "card_id" - - case cardBrandImage = "card_brand_image" + case cardBrand = "card_brand" - case cardFingerprint = "card_fingerprint" + case expMonth = "exp_month" case aggregatorName = "aggregator_name" - case cardNumber = "card_number" + case compliantWithTokenisationGuidelines = "compliant_with_tokenisation_guidelines" + + case cardName = "card_name" + + case cardFingerprint = "card_fingerprint" case cardToken = "card_token" - case cardType = "card_type" + case cardReference = "card_reference" - case cardIssuer = "card_issuer" + case expYear = "exp_year" - case cardIsin = "card_isin" + case cardNumber = "card_number" - case cardReference = "card_reference" + case cardId = "card_id" - case expMonth = "exp_month" + case cardType = "card_type" - case expired + case cardIssuer = "card_issuer" - case expYear = "exp_year" + case expired - case cardBrand = "card_brand" + case cardBrandImage = "card_brand_image" case nickname - case cardName = "card_name" + case cardIsin = "card_isin" } - 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.cardId = cardId - - self.cardBrandImage = cardBrandImage + 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, compliantWithTokenisationGuidelines: Bool? = nil, expired: Bool? = nil, expMonth: Int? = nil, expYear: Int? = nil, nickname: String? = nil) { + self.cardBrand = cardBrand - self.cardFingerprint = cardFingerprint + self.expMonth = expMonth self.aggregatorName = aggregatorName - self.cardNumber = cardNumber + self.compliantWithTokenisationGuidelines = compliantWithTokenisationGuidelines + + self.cardName = cardName + + self.cardFingerprint = cardFingerprint self.cardToken = cardToken - self.cardType = cardType + self.cardReference = cardReference - self.cardIssuer = cardIssuer + self.expYear = expYear - self.cardIsin = cardIsin + self.cardNumber = cardNumber - self.cardReference = cardReference + self.cardId = cardId - self.expMonth = expMonth + self.cardType = cardType - self.expired = expired + self.cardIssuer = cardIssuer - self.expYear = expYear + self.expired = expired - self.cardBrand = cardBrand + self.cardBrandImage = cardBrandImage self.nickname = nickname - self.cardName = cardName + self.cardIsin = cardIsin } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - cardId = try container.decode(String.self, forKey: .cardId) + cardBrand = try container.decode(String.self, forKey: .cardBrand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -119,25 +125,33 @@ public extension ApplicationClient { } catch {} do { - cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) + expMonth = try container.decode(Int.self, forKey: .expMonth) } 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 { - cardFingerprint = try container.decode(String.self, forKey: .cardFingerprint) + compliantWithTokenisationGuidelines = try container.decode(Bool.self, forKey: .compliantWithTokenisationGuidelines) } 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 { + 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 {} 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) @@ -153,7 +167,7 @@ public extension ApplicationClient { } catch {} do { - cardType = try container.decode(String.self, forKey: .cardType) + cardReference = try container.decode(String.self, forKey: .cardReference) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -161,7 +175,7 @@ public extension ApplicationClient { } catch {} do { - cardIssuer = try container.decode(String.self, forKey: .cardIssuer) + expYear = try container.decode(Int.self, forKey: .expYear) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -169,7 +183,7 @@ public extension ApplicationClient { } catch {} do { - cardIsin = try container.decode(String.self, forKey: .cardIsin) + cardNumber = try container.decode(String.self, forKey: .cardNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -177,7 +191,7 @@ public extension ApplicationClient { } catch {} do { - cardReference = try container.decode(String.self, forKey: .cardReference) + cardId = try container.decode(String.self, forKey: .cardId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -185,7 +199,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) @@ -193,7 +207,7 @@ public extension ApplicationClient { } catch {} do { - expired = try container.decode(Bool.self, forKey: .expired) + cardIssuer = try container.decode(String.self, forKey: .cardIssuer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -201,7 +215,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) @@ -209,7 +223,7 @@ public extension ApplicationClient { } catch {} do { - cardBrand = try container.decode(String.self, forKey: .cardBrand) + cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -225,7 +239,7 @@ public extension ApplicationClient { } catch {} do { - cardName = try container.decode(String.self, forKey: .cardName) + cardIsin = try container.decode(String.self, forKey: .cardIsin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -236,37 +250,39 @@ 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(cardBrandImage, forKey: .cardBrandImage) + try? container.encode(cardBrand, forKey: .cardBrand) - try? container.encode(cardFingerprint, forKey: .cardFingerprint) + try? container.encode(expMonth, forKey: .expMonth) try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) - try? container.encode(cardNumber, forKey: .cardNumber) + try? container.encode(compliantWithTokenisationGuidelines, forKey: .compliantWithTokenisationGuidelines) + + try? container.encode(cardName, forKey: .cardName) + + try? container.encode(cardFingerprint, forKey: .cardFingerprint) try? container.encode(cardToken, forKey: .cardToken) - try? container.encode(cardType, forKey: .cardType) + try? container.encode(cardReference, forKey: .cardReference) - try? container.encode(cardIssuer, forKey: .cardIssuer) + try? container.encode(expYear, forKey: .expYear) - try? container.encode(cardIsin, forKey: .cardIsin) + try? container.encode(cardNumber, forKey: .cardNumber) - try? container.encode(cardReference, forKey: .cardReference) + try? container.encode(cardId, forKey: .cardId) - try? container.encode(expMonth, forKey: .expMonth) + try? container.encode(cardType, forKey: .cardType) - try? container.encode(expired, forKey: .expired) + try? container.encode(cardIssuer, forKey: .cardIssuer) - try? container.encode(expYear, forKey: .expYear) + try? container.encode(expired, forKey: .expired) - try? container.encode(cardBrand, forKey: .cardBrand) + try? container.encode(cardBrandImage, forKey: .cardBrandImage) try? container.encode(nickname, forKey: .nickname) - try? container.encode(cardName, forKey: .cardName) + try? container.encode(cardIsin, forKey: .cardIsin) } } } diff --git a/Sources/code/application/models/CardPaymentGatewayAppModelClass.swift b/Sources/code/application/models/CardPaymentGatewayAppModelClass.swift index 46ba0c5f84..2fc53ece32 100644 --- a/Sources/code/application/models/CardPaymentGatewayAppModelClass.swift +++ b/Sources/code/application/models/CardPaymentGatewayAppModelClass.swift @@ -7,33 +7,31 @@ public extension ApplicationClient { Used By: Payment */ class CardPaymentGateway: Codable { - public var aggregator: String - public var customerId: String? public var api: String? - public enum CodingKeys: String, CodingKey { - case aggregator + public var aggregator: String + public enum CodingKeys: String, CodingKey { case customerId = "customer_id" case api + + case aggregator } public init(aggregator: String, api: String? = nil, customerId: String? = nil) { - self.aggregator = aggregator - self.customerId = customerId self.api = api + + self.aggregator = aggregator } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - aggregator = try container.decode(String.self, forKey: .aggregator) - do { customerId = try container.decode(String.self, forKey: .customerId) @@ -49,16 +47,18 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + 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(aggregator, forKey: .aggregator) - try? container.encode(customerId, forKey: .customerId) try? container.encode(api, forKey: .api) + + try? container.encodeIfPresent(aggregator, forKey: .aggregator) } } } diff --git a/Sources/code/application/models/CategoryItemsAppModelClass.swift b/Sources/code/application/models/CategoryItemsAppModelClass.swift index 1574fed71f..121171fb60 100644 --- a/Sources/code/application/models/CategoryItemsAppModelClass.swift +++ b/Sources/code/application/models/CategoryItemsAppModelClass.swift @@ -7,7 +7,7 @@ public extension ApplicationClient { Used By: Catalog */ class CategoryItems: Codable { - public var childs: [Child]? + public var slug: String? public var name: String? @@ -15,12 +15,12 @@ public extension ApplicationClient { public var banners: ImageUrls? - public var uid: Int? + public var childs: [Child]? - public var slug: String? + public var uid: Int? public enum CodingKeys: String, CodingKey { - case childs + case slug case name @@ -28,13 +28,13 @@ public extension ApplicationClient { case banners - case uid + case childs - case slug + case uid } public init(action: ProductListingAction? = nil, banners: ImageUrls? = nil, childs: [Child]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { - self.childs = childs + self.slug = slug self.name = name @@ -42,16 +42,16 @@ public extension ApplicationClient { self.banners = banners - self.uid = uid + self.childs = childs - self.slug = slug + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - childs = try container.decode([Child].self, forKey: .childs) + slug = try container.decode(String.self, forKey: .slug) } 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) + childs = try container.decode([Child].self, forKey: .childs) } 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) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,7 +102,7 @@ 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(slug, forKey: .slug) try? container.encodeIfPresent(name, forKey: .name) @@ -110,9 +110,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(childs, forKey: .childs) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/CategoryMetaResponseAppModelClass.swift b/Sources/code/application/models/CategoryMetaResponseAppModelClass.swift index a4645fdad5..3de0e4ef8e 100644 --- a/Sources/code/application/models/CategoryMetaResponseAppModelClass.swift +++ b/Sources/code/application/models/CategoryMetaResponseAppModelClass.swift @@ -7,31 +7,31 @@ public extension ApplicationClient { Used By: Catalog */ class CategoryMetaResponse: Codable { + public var logo: Media? + public var banners: ImageUrls? public var name: String? - public var logo: Media? - public var uid: Int? public enum CodingKeys: String, CodingKey { + case logo + case banners case name - case logo - case uid } public init(banners: ImageUrls? = nil, logo: Media? = nil, name: String? = nil, uid: Int? = nil) { + self.logo = logo + self.banners = banners self.name = name - self.logo = logo - self.uid = uid } @@ -39,7 +39,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -47,7 +47,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) @@ -55,7 +55,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,12 +74,12 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(banners, forKey: .banners) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(uid, forKey: .uid) } } diff --git a/Sources/code/application/models/ChargeCustomerRequestAppModelClass.swift b/Sources/code/application/models/ChargeCustomerRequestAppModelClass.swift index 2da1b7be50..e4306e7738 100644 --- a/Sources/code/application/models/ChargeCustomerRequestAppModelClass.swift +++ b/Sources/code/application/models/ChargeCustomerRequestAppModelClass.swift @@ -7,59 +7,59 @@ public extension ApplicationClient { Used By: Payment */ class ChargeCustomerRequest: Codable { - public var aggregator: String + public var verified: Bool? public var orderId: String public var amount: Int - public var transactionToken: String? + public var aggregator: String - public var verified: Bool? + public var transactionToken: String? public enum CodingKeys: String, CodingKey { - case aggregator + case verified case orderId = "order_id" case amount - case transactionToken = "transaction_token" + case aggregator - case verified + case transactionToken = "transaction_token" } public init(aggregator: String, amount: Int, orderId: String, transactionToken: String? = nil, verified: Bool? = nil) { - self.aggregator = aggregator + self.verified = verified self.orderId = orderId self.amount = amount - self.transactionToken = transactionToken + self.aggregator = aggregator - self.verified = verified + self.transactionToken = transactionToken } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - aggregator = try container.decode(String.self, forKey: .aggregator) - - orderId = try container.decode(String.self, forKey: .orderId) - - amount = try container.decode(Int.self, forKey: .amount) - 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 {} + orderId = try container.decode(String.self, forKey: .orderId) + + amount = try container.decode(Int.self, forKey: .amount) + + aggregator = try container.decode(String.self, forKey: .aggregator) + 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) @@ -70,15 +70,15 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) + try? container.encode(verified, forKey: .verified) try? container.encodeIfPresent(orderId, forKey: .orderId) try? container.encode(amount, forKey: .amount) - try? container.encode(transactionToken, forKey: .transactionToken) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encode(verified, forKey: .verified) + try? container.encode(transactionToken, forKey: .transactionToken) } } } diff --git a/Sources/code/application/models/ChargeCustomerResponseAppModelClass.swift b/Sources/code/application/models/ChargeCustomerResponseAppModelClass.swift index 4eb6ee43fa..62b5f8e0df 100644 --- a/Sources/code/application/models/ChargeCustomerResponseAppModelClass.swift +++ b/Sources/code/application/models/ChargeCustomerResponseAppModelClass.swift @@ -7,59 +7,61 @@ public extension ApplicationClient { Used By: Payment */ class ChargeCustomerResponse: Codable { - public var aggregator: String - public var orderId: String - public var cartId: String? + public var message: String - public var deliveryAddressId: String? + public var aggregator: String - public var status: String + public var cartId: String? public var success: Bool - public var message: String + public var status: String - public enum CodingKeys: String, CodingKey { - case aggregator + public var deliveryAddressId: String? + public enum CodingKeys: String, CodingKey { case orderId = "order_id" - case cartId = "cart_id" + case message - case deliveryAddressId = "delivery_address_id" + case aggregator - case status + case cartId = "cart_id" case success - case message + case status + + case deliveryAddressId = "delivery_address_id" } public init(aggregator: String, cartId: String? = nil, deliveryAddressId: String? = nil, message: String, orderId: String, status: String, success: Bool) { - self.aggregator = aggregator - self.orderId = orderId - self.cartId = cartId + self.message = message - self.deliveryAddressId = deliveryAddressId + self.aggregator = aggregator - self.status = status + self.cartId = cartId self.success = success - self.message = message + self.status = status + + self.deliveryAddressId = deliveryAddressId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - aggregator = try container.decode(String.self, forKey: .aggregator) - orderId = try container.decode(String.self, forKey: .orderId) + message = try container.decode(String.self, forKey: .message) + + aggregator = try container.decode(String.self, forKey: .aggregator) + do { cartId = try container.decode(String.self, forKey: .cartId) @@ -68,6 +70,10 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} + success = try container.decode(Bool.self, forKey: .success) + + status = try container.decode(String.self, forKey: .status) + do { deliveryAddressId = try container.decode(String.self, forKey: .deliveryAddressId) @@ -75,30 +81,24 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - status = try container.decode(String.self, forKey: .status) - - 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.encodeIfPresent(orderId, forKey: .orderId) - try? container.encode(cartId, forKey: .cartId) + try? container.encodeIfPresent(message, forKey: .message) - try? container.encode(deliveryAddressId, forKey: .deliveryAddressId) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encode(cartId, forKey: .cartId) try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(message, forKey: .message) + try? container.encodeIfPresent(status, forKey: .status) + + try? container.encode(deliveryAddressId, forKey: .deliveryAddressId) } } } diff --git a/Sources/code/application/models/ChildAppModelClass.swift b/Sources/code/application/models/ChildAppModelClass.swift index cc1159d967..a0a79d462a 100644 --- a/Sources/code/application/models/ChildAppModelClass.swift +++ b/Sources/code/application/models/ChildAppModelClass.swift @@ -7,7 +7,7 @@ public extension ApplicationClient { Used By: Catalog */ class Child: Codable { - public var childs: [SecondLevelChild]? + public var slug: String? public var name: String? @@ -15,14 +15,14 @@ public extension ApplicationClient { public var banners: ImageUrls? + public var childs: [SecondLevelChild]? + public var customJson: [String: Any]? public var uid: Int? - public var slug: String? - public enum CodingKeys: String, CodingKey { - case childs + case slug case name @@ -30,15 +30,15 @@ public extension ApplicationClient { case banners + case childs + case customJson = "_custom_json" case uid - - case slug } 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.childs = childs + self.slug = slug self.name = name @@ -46,18 +46,18 @@ public extension ApplicationClient { self.banners = banners + self.childs = childs + self.customJson = customJson self.uid = uid - - self.slug = slug } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - childs = try container.decode([SecondLevelChild].self, forKey: .childs) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,7 +89,7 @@ public extension ApplicationClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + childs = try container.decode([SecondLevelChild].self, forKey: .childs) } 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) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,7 +116,7 @@ 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(slug, forKey: .slug) try? container.encodeIfPresent(name, forKey: .name) @@ -124,11 +124,11 @@ public extension ApplicationClient { try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(childs, forKey: .childs) + try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(slug, forKey: .slug) } } } diff --git a/Sources/code/application/models/CollectionDetailResponseAppModelClass.swift b/Sources/code/application/models/CollectionDetailResponseAppModelClass.swift index 6a5231d940..3b01ac73db 100644 --- a/Sources/code/application/models/CollectionDetailResponseAppModelClass.swift +++ b/Sources/code/application/models/CollectionDetailResponseAppModelClass.swift @@ -7,117 +7,117 @@ public extension ApplicationClient { Used By: Catalog */ class CollectionDetailResponse: Codable { - public var slug: String? + public var isActive: Bool? - public var cron: [String: Any]? + public var description: String? - public var visibleFacetsKeys: [String]? + public var type: String? - public var badge: [String: Any]? + public var query: [String: Any]? - public var type: String? + public var appId: String? public var name: String? - public var isActive: Bool? - - public var allowFacets: Bool? + public var slug: String? public var tag: [String]? public var allowSort: Bool? - public var meta: [String: Any]? + public var allowFacets: Bool? - public var schedule: [String: Any]? + public var banners: ImageUrls? - public var logo: Media? + public var visibleFacetsKeys: [String]? - public var query: [String: Any]? + public var meta: [String: Any]? - public var banners: ImageUrls? + public var badge: [String: Any]? - public var appId: String? + public var logo: Media? - public var description: String? + public var cron: [String: Any]? + + public var schedule: [String: Any]? public enum CodingKeys: String, CodingKey { - case slug + case isActive = "is_active" - case cron + case description - case visibleFacetsKeys = "visible_facets_keys" + case type - case badge + case query - case type + case appId = "app_id" case name - case isActive = "is_active" - - case allowFacets = "allow_facets" + case slug case tag case allowSort = "allow_sort" - case meta + case allowFacets = "allow_facets" - case schedule = "_schedule" + case banners - case logo + case visibleFacetsKeys = "visible_facets_keys" - case query + case meta - case banners + case badge - case appId = "app_id" + case logo - case description + case cron + + case schedule = "_schedule" } 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.slug = slug + self.isActive = isActive - self.cron = cron + self.description = description - self.visibleFacetsKeys = visibleFacetsKeys + self.type = type - self.badge = badge + self.query = query - self.type = type + self.appId = appId self.name = name - self.isActive = isActive - - self.allowFacets = allowFacets + self.slug = slug self.tag = tag self.allowSort = allowSort - self.meta = meta + self.allowFacets = allowFacets - self.schedule = schedule + self.banners = banners - self.logo = logo + self.visibleFacetsKeys = visibleFacetsKeys - self.query = query + self.meta = meta - self.banners = banners + self.badge = badge - self.appId = appId + self.logo = logo - self.description = description + self.cron = cron + + self.schedule = schedule } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - slug = try container.decode(String.self, forKey: .slug) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -125,7 +125,7 @@ public extension ApplicationClient { } catch {} do { - cron = try container.decode([String: Any].self, forKey: .cron) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -133,7 +133,7 @@ public extension ApplicationClient { } catch {} do { - visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -141,7 +141,7 @@ public extension ApplicationClient { } catch {} do { - badge = try container.decode([String: Any].self, forKey: .badge) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -149,7 +149,7 @@ public extension ApplicationClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -165,7 +165,7 @@ public extension ApplicationClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -173,7 +173,7 @@ public extension ApplicationClient { } catch {} do { - allowFacets = try container.decode(Bool.self, forKey: .allowFacets) + tag = try container.decode([String].self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -181,7 +181,7 @@ public extension ApplicationClient { } catch {} do { - tag = try container.decode([String].self, forKey: .tag) + allowSort = try container.decode(Bool.self, forKey: .allowSort) } 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) + allowFacets = try container.decode(Bool.self, forKey: .allowFacets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -197,7 +197,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) @@ -205,7 +205,7 @@ public extension ApplicationClient { } catch {} do { - schedule = try container.decode([String: Any].self, forKey: .schedule) + visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -213,7 +213,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -221,7 +221,7 @@ public extension ApplicationClient { } catch {} do { - query = try container.decode([String: Any].self, forKey: .query) + badge = try container.decode([String: Any].self, forKey: .badge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -229,7 +229,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) @@ -237,7 +237,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) @@ -245,7 +245,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + schedule = try container.decode([String: Any].self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -256,39 +256,39 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(cron, forKey: .cron) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) + try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(query, forKey: .query) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(appId, forKey: .appId) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(isActive, forKey: .isActive) - - try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) + try? container.encodeIfPresent(slug, forKey: .slug) try? container.encodeIfPresent(tag, forKey: .tag) try? container.encodeIfPresent(allowSort, forKey: .allowSort) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) - try? container.encodeIfPresent(schedule, forKey: .schedule) + try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - try? container.encodeIfPresent(query, forKey: .query) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(badge, forKey: .badge) - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(cron, forKey: .cron) + + try? container.encodeIfPresent(schedule, forKey: .schedule) } } } 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 473b2dec8d..f3d8a301ae 100644 --- a/Sources/code/application/models/CollectionListingFilterTagAppModelClass.swift +++ b/Sources/code/application/models/CollectionListingFilterTagAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class CollectionListingFilterTag: Codable { public var name: String? - public var isSelected: Bool? - public var display: String? + public var isSelected: Bool? + public enum CodingKeys: String, CodingKey { case name - case isSelected = "is_selected" - case display + + case isSelected = "is_selected" } public init(display: String? = nil, isSelected: Bool? = nil, name: String? = nil) { self.name = name - self.isSelected = isSelected - self.display = display + + self.isSelected = isSelected } required public init(from decoder: Decoder) throws { @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - isSelected = try container.decode(Bool.self, forKey: .isSelected) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - display = try container.decode(String.self, forKey: .display) + isSelected = try container.decode(Bool.self, forKey: .isSelected) } 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(isSelected, forKey: .isSelected) - try? container.encodeIfPresent(display, forKey: .display) + + try? container.encodeIfPresent(isSelected, forKey: .isSelected) } } } diff --git a/Sources/code/application/models/CollectionListingFilterTypeAppModelClass.swift b/Sources/code/application/models/CollectionListingFilterTypeAppModelClass.swift index b89148333b..a024d6681f 100644 --- a/Sources/code/application/models/CollectionListingFilterTypeAppModelClass.swift +++ b/Sources/code/application/models/CollectionListingFilterTypeAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class CollectionListingFilterType: Codable { public var name: String? - public var isSelected: Bool? - public var display: String? + public var isSelected: Bool? + public enum CodingKeys: String, CodingKey { case name - case isSelected = "is_selected" - case display + + case isSelected = "is_selected" } public init(display: String? = nil, isSelected: Bool? = nil, name: String? = nil) { self.name = name - self.isSelected = isSelected - self.display = display + + self.isSelected = isSelected } required public init(from decoder: Decoder) throws { @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - isSelected = try container.decode(Bool.self, forKey: .isSelected) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - display = try container.decode(String.self, forKey: .display) + isSelected = try container.decode(Bool.self, forKey: .isSelected) } 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(isSelected, forKey: .isSelected) - try? container.encodeIfPresent(display, forKey: .display) + + try? container.encodeIfPresent(isSelected, forKey: .isSelected) } } } diff --git a/Sources/code/application/models/ColumnHeadersAppModelClass.swift b/Sources/code/application/models/ColumnHeadersAppModelClass.swift index 26cd48f478..7b40c2fa17 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 col2: ColumnHeader? - public var col6: ColumnHeader? - public var col1: ColumnHeader? - public var col3: ColumnHeader? - public var col4: ColumnHeader? + public var col2: ColumnHeader? public var col5: ColumnHeader? - public enum CodingKeys: String, CodingKey { - case col2 = "col_2" + public var col1: ColumnHeader? - case col6 = "col_6" + public var col4: ColumnHeader? - case col1 = "col_1" + public enum CodingKeys: String, CodingKey { + case col6 = "col_6" case col3 = "col_3" - case col4 = "col_4" + case col2 = "col_2" case col5 = "col_5" + + case col1 = "col_1" + + case col4 = "col_4" } public init(col1: ColumnHeader? = nil, col2: ColumnHeader? = nil, col3: ColumnHeader? = nil, col4: ColumnHeader? = nil, col5: ColumnHeader? = nil, col6: ColumnHeader? = nil) { - self.col2 = col2 - self.col6 = col6 - self.col1 = col1 - self.col3 = col3 - self.col4 = col4 + self.col2 = col2 self.col5 = col5 + + self.col1 = col1 + + self.col4 = col4 } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - col2 = try container.decode(ColumnHeader.self, forKey: .col2) + col6 = try container.decode(ColumnHeader.self, forKey: .col6) } 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) + col3 = try container.decode(ColumnHeader.self, forKey: .col3) } 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) + col2 = try container.decode(ColumnHeader.self, forKey: .col2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,7 +75,7 @@ public extension ApplicationClient { } catch {} do { - col3 = try container.decode(ColumnHeader.self, forKey: .col3) + col5 = try container.decode(ColumnHeader.self, forKey: .col5) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -83,7 +83,7 @@ public extension ApplicationClient { } catch {} do { - col4 = try container.decode(ColumnHeader.self, forKey: .col4) + 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 { - col5 = try container.decode(ColumnHeader.self, forKey: .col5) + col4 = try container.decode(ColumnHeader.self, forKey: .col4) } 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(col2, forKey: .col2) - try? container.encodeIfPresent(col6, forKey: .col6) - try? container.encodeIfPresent(col1, forKey: .col1) - try? container.encodeIfPresent(col3, forKey: .col3) - try? container.encodeIfPresent(col4, forKey: .col4) + try? container.encodeIfPresent(col2, forKey: .col2) try? container.encodeIfPresent(col5, forKey: .col5) + + try? container.encodeIfPresent(col1, forKey: .col1) + + try? container.encodeIfPresent(col4, forKey: .col4) } } } diff --git a/Sources/code/application/models/CompanyDetailAppModelClass.swift b/Sources/code/application/models/CompanyDetailAppModelClass.swift index ffa7820da8..dc4c817002 100644 --- a/Sources/code/application/models/CompanyDetailAppModelClass.swift +++ b/Sources/code/application/models/CompanyDetailAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class CompanyDetail: Codable { - public var id: Int? - public var name: String? - public enum CodingKeys: String, CodingKey { - case id + public var id: Int? + public enum CodingKeys: String, CodingKey { case name + + case id } public init(id: Int? = nil, name: String? = nil) { - self.id = id - self.name = name + + self.id = id } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - id = try container.decode(Int.self, forKey: .id) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + id = try container.decode(Int.self, forKey: .id) } 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(id, forKey: .id) - try? container.encodeIfPresent(name, forKey: .name) + + try? container.encodeIfPresent(id, forKey: .id) } } } diff --git a/Sources/code/application/models/CompanyStoreAppModelClass.swift b/Sources/code/application/models/CompanyStoreAppModelClass.swift index 685d68b177..95ba3418b0 100644 --- a/Sources/code/application/models/CompanyStoreAppModelClass.swift +++ b/Sources/code/application/models/CompanyStoreAppModelClass.swift @@ -7,31 +7,31 @@ public extension ApplicationClient { Used By: Catalog */ class CompanyStore: Codable { - public var name: String? - public var businessType: String? public var companyType: String? + public var name: String? + public var uid: Int? public enum CodingKeys: String, CodingKey { - case name - case businessType = "business_type" case companyType = "company_type" + case name + case uid } public init(businessType: String? = nil, companyType: String? = nil, name: String? = nil, uid: Int? = nil) { - self.name = name - self.businessType = businessType self.companyType = companyType + self.name = name + self.uid = uid } @@ -39,7 +39,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - name = try container.decode(String.self, forKey: .name) + businessType = try container.decode(String.self, forKey: .businessType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} 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) @@ -55,7 +55,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) @@ -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(businessType, forKey: .businessType) try? container.encodeIfPresent(companyType, forKey: .companyType) + try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(uid, forKey: .uid) } } diff --git a/Sources/code/application/models/CompleteResponseAppModelClass.swift b/Sources/code/application/models/CompleteResponseAppModelClass.swift index b6eaa39934..5609ef7cbc 100644 --- a/Sources/code/application/models/CompleteResponseAppModelClass.swift +++ b/Sources/code/application/models/CompleteResponseAppModelClass.swift @@ -15,8 +15,6 @@ public extension ApplicationClient { public var contentType: String - public var method: String - public var namespace: String public var operation: String @@ -27,7 +25,7 @@ public extension ApplicationClient { public var cdn: CDN - public var success: String + public var success: Bool public var tags: [String]? @@ -44,8 +42,6 @@ public extension ApplicationClient { case contentType = "content_type" - case method - case namespace case operation @@ -65,7 +61,7 @@ public extension ApplicationClient { case modifiedOn = "modified_on" } - public init(cdn: CDN, contentType: String, createdOn: String, fileName: String, filePath: String, method: String, modifiedOn: String, namespace: String, operation: String, size: Int, success: String, tags: [String]? = nil, upload: Upload, id: String) { + public init(cdn: CDN, contentType: String, createdOn: String, fileName: String, filePath: String, modifiedOn: String, namespace: String, operation: String, size: Int, success: Bool, tags: [String]? = nil, upload: Upload, id: String) { self.id = id self.fileName = fileName @@ -74,8 +70,6 @@ public extension ApplicationClient { self.contentType = contentType - self.method = method - self.namespace = namespace self.operation = operation @@ -106,8 +100,6 @@ public extension ApplicationClient { contentType = try container.decode(String.self, forKey: .contentType) - method = try container.decode(String.self, forKey: .method) - namespace = try container.decode(String.self, forKey: .namespace) operation = try container.decode(String.self, forKey: .operation) @@ -118,7 +110,7 @@ public extension ApplicationClient { cdn = try container.decode(CDN.self, forKey: .cdn) - success = try container.decode(String.self, forKey: .success) + success = try container.decode(Bool.self, forKey: .success) do { tags = try container.decode([String].self, forKey: .tags) @@ -144,8 +136,6 @@ public extension ApplicationClient { try? container.encodeIfPresent(contentType, forKey: .contentType) - try? container.encodeIfPresent(method, forKey: .method) - try? container.encodeIfPresent(namespace, forKey: .namespace) try? container.encodeIfPresent(operation, forKey: .operation) diff --git a/Sources/code/application/models/DeleteCardsResponseAppModelClass.swift b/Sources/code/application/models/DeleteCardsResponseAppModelClass.swift index 93fdaeb943..a311d4bbad 100644 --- a/Sources/code/application/models/DeleteCardsResponseAppModelClass.swift +++ b/Sources/code/application/models/DeleteCardsResponseAppModelClass.swift @@ -7,27 +7,25 @@ public extension ApplicationClient { Used By: Payment */ class DeleteCardsResponse: Codable { - public var success: Bool - public var message: String? - public enum CodingKeys: String, CodingKey { - case success + public var success: Bool + public enum CodingKeys: String, CodingKey { case message + + case success } public init(message: String? = nil, success: Bool) { - self.success = success - self.message = message + + 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) - do { message = try container.decode(String.self, forKey: .message) @@ -35,14 +33,16 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + 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.encode(message, forKey: .message) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/DepartmentAppModelClass.swift b/Sources/code/application/models/DepartmentAppModelClass.swift index fc7bc8ab1d..7e6e8da699 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 name: String? + public var slug: String? - public var priorityOrder: Int? + public var name: String? public var logo: Media? - public var uid: Int? + public var priorityOrder: Int? - public var slug: String? + public var uid: Int? public enum CodingKeys: String, CodingKey { - case name + case slug - case priorityOrder = "priority_order" + case name case logo - case uid + case priorityOrder = "priority_order" - case slug + case uid } public init(logo: Media? = nil, name: String? = nil, priorityOrder: Int? = nil, slug: String? = nil, uid: Int? = nil) { - self.name = name + self.slug = slug - self.priorityOrder = priorityOrder + self.name = name self.logo = logo - self.uid = uid + self.priorityOrder = priorityOrder - self.slug = slug + 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) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -53,7 +53,7 @@ public extension ApplicationClient { } catch {} 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) @@ -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 { - slug = try container.decode(String.self, forKey: .slug) + 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(name, forKey: .name) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/DetailsSchemaV2AppModelClass.swift b/Sources/code/application/models/DetailsSchemaV2AppModelClass.swift index 40c433f57e..ad4e35df1a 100644 --- a/Sources/code/application/models/DetailsSchemaV2AppModelClass.swift +++ b/Sources/code/application/models/DetailsSchemaV2AppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class DetailsSchemaV2: Codable { + public var value: String? + public var key: String? public var type: String? - public var value: String? - public enum CodingKeys: String, CodingKey { + case value + case key case type - - case value } public init(key: String? = nil, type: String? = nil, value: String? = nil) { + self.value = value + self.key = key self.type = type - - self.value = value } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - key = try container.decode(String.self, forKey: .key) + value = try container.decode(String.self, forKey: .value) } 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) + key = try container.decode(String.self, forKey: .key) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} 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) @@ -60,11 +60,11 @@ 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(key, forKey: .key) try? container.encodeIfPresent(type, forKey: .type) - - try? container.encodeIfPresent(value, forKey: .value) } } } diff --git a/Sources/code/application/models/ErrorCodeAndDescriptionAppModelClass.swift b/Sources/code/application/models/ErrorCodeAndDescriptionAppModelClass.swift index c8f8bc9543..24ced97d24 100644 --- a/Sources/code/application/models/ErrorCodeAndDescriptionAppModelClass.swift +++ b/Sources/code/application/models/ErrorCodeAndDescriptionAppModelClass.swift @@ -7,36 +7,36 @@ public extension ApplicationClient { Used By: Payment */ class ErrorCodeAndDescription: Codable { - public var code: String - public var description: String - public enum CodingKeys: String, CodingKey { - case code + public var code: String + public enum CodingKeys: String, CodingKey { case description + + case code } public init(code: String, description: String) { - self.code = code - self.description = description + + self.code = code } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - code = try container.decode(String.self, forKey: .code) - description = try container.decode(String.self, forKey: .description) + + code = try container.decode(String.self, forKey: .code) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(code, forKey: .code) - try? container.encodeIfPresent(description, forKey: .description) + + try? container.encodeIfPresent(code, forKey: .code) } } } diff --git a/Sources/code/application/models/ErrorCodeDescriptionAppModelClass.swift b/Sources/code/application/models/ErrorCodeDescriptionAppModelClass.swift index 1c3dc69424..c724829f87 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 description: String + public var code: String public var success: Bool - public var description: String - public enum CodingKeys: String, CodingKey { + case description + case code case success - - case description } public init(code: String, description: String, success: Bool) { + self.description = description + self.code = code self.success = success - - self.description = description } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + description = try container.decode(String.self, forKey: .description) + code = try container.decode(String.self, forKey: .code) success = try container.decode(Bool.self, forKey: .success) - - description = try container.decode(String.self, forKey: .description) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(code, forKey: .code) try? container.encodeIfPresent(success, forKey: .success) - - try? container.encodeIfPresent(description, forKey: .description) } } } diff --git a/Sources/code/application/models/FollowIdsDataAppModelClass.swift b/Sources/code/application/models/FollowIdsDataAppModelClass.swift index 18daf8ff40..660a547eb9 100644 --- a/Sources/code/application/models/FollowIdsDataAppModelClass.swift +++ b/Sources/code/application/models/FollowIdsDataAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class FollowIdsData: Codable { public var collections: [Int]? - public var brands: [Int]? - public var products: [Int]? + public var brands: [Int]? + public enum CodingKeys: String, CodingKey { case collections - case brands - case products + + case brands } public init(brands: [Int]? = nil, collections: [Int]? = nil, products: [Int]? = nil) { self.collections = collections - self.brands = brands - self.products = products + + self.brands = brands } required public init(from decoder: Decoder) throws { @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - brands = try container.decode([Int].self, forKey: .brands) + products = try container.decode([Int].self, forKey: .products) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} do { - products = try container.decode([Int].self, forKey: .products) + brands = try container.decode([Int].self, forKey: .brands) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,9 +62,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(collections, forKey: .collections) - try? container.encodeIfPresent(brands, forKey: .brands) - try? container.encodeIfPresent(products, forKey: .products) + + try? container.encodeIfPresent(brands, forKey: .brands) } } } diff --git a/Sources/code/application/models/FollowPostResponseAppModelClass.swift b/Sources/code/application/models/FollowPostResponseAppModelClass.swift index 7c35cc1892..4b7f15fc51 100644 --- a/Sources/code/application/models/FollowPostResponseAppModelClass.swift +++ b/Sources/code/application/models/FollowPostResponseAppModelClass.swift @@ -7,36 +7,36 @@ public extension ApplicationClient { Used By: Catalog */ class FollowPostResponse: Codable { - public var id: String - public var message: String - public enum CodingKeys: String, CodingKey { - case id + public var id: String + public enum CodingKeys: String, CodingKey { case message + + case id } public init(id: String, message: String) { - self.id = id - self.message = message + + self.id = id } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - id = try container.decode(String.self, forKey: .id) - message = try container.decode(String.self, forKey: .message) + + id = try container.decode(String.self, forKey: .id) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(message, forKey: .message) + + try? container.encodeIfPresent(id, forKey: .id) } } } diff --git a/Sources/code/application/models/GetCollectionDetailNestAppModelClass.swift b/Sources/code/application/models/GetCollectionDetailNestAppModelClass.swift index c82867e956..d4fd5063ee 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 allowFacets: Bool? + public var schedule: [String: Any]? - public var banners: ImageUrls? + public var description: String? public var query: [String: Any]? - public var appId: String? - - public var description: String? - - public var visibleFacetsKeys: [String]? + public var action: ProductListingAction? - public var type: String? + public var allowFacets: Bool? public var logo: Media? public var isActive: Bool? + public var type: String? + public var tag: [String]? - public var slug: String? + public var visibleFacetsKeys: [String]? - public var badge: [String: Any]? + public var cron: [String: Any]? - public var name: String? + public var uid: String? - public var allowSort: Bool? + public var appId: String? - public var action: ProductListingAction? + public var name: String? - public var schedule: [String: Any]? + public var slug: String? - public var uid: String? + public var allowSort: Bool? public var meta: [String: Any]? - public enum CodingKeys: String, CodingKey { - case cron - - case allowFacets = "allow_facets" - - case banners + public var banners: ImageUrls? - case query + public var badge: [String: Any]? - case appId = "app_id" + public enum CodingKeys: String, CodingKey { + case schedule = "_schedule" case description - case visibleFacetsKeys = "visible_facets_keys" + case query - case type + case action + + case allowFacets = "allow_facets" case logo case isActive = "is_active" + case type + case tag - case slug + case visibleFacetsKeys = "visible_facets_keys" - case badge + case cron - case name + case uid - case allowSort = "allow_sort" + case appId = "app_id" - case action + case name - case schedule = "_schedule" + case slug - case uid + case allowSort = "allow_sort" case meta + + case banners + + case badge } 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.allowFacets = allowFacets + self.schedule = schedule - self.banners = banners + self.description = description self.query = query - self.appId = appId - - self.description = description - - self.visibleFacetsKeys = visibleFacetsKeys + self.action = action - self.type = type + self.allowFacets = allowFacets self.logo = logo self.isActive = isActive + self.type = type + self.tag = tag - self.slug = slug + self.visibleFacetsKeys = visibleFacetsKeys - self.badge = badge + self.cron = cron - self.name = name + self.uid = uid - self.allowSort = allowSort + self.appId = appId - self.action = action + self.name = name - self.schedule = schedule + self.slug = slug - self.uid = uid + self.allowSort = allowSort self.meta = meta + + self.banners = banners + + self.badge = badge } 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 { - 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) @@ -145,7 +145,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) @@ -153,7 +153,7 @@ public extension ApplicationClient { } catch {} do { - query = try container.decode([String: Any].self, forKey: .query) + action = try container.decode(ProductListingAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -161,7 +161,7 @@ public extension ApplicationClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + allowFacets = try container.decode(Bool.self, forKey: .allowFacets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -169,7 +169,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -177,7 +177,7 @@ public extension ApplicationClient { } catch {} do { - visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -193,7 +193,7 @@ public extension ApplicationClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + tag = try container.decode([String].self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -201,7 +201,7 @@ public extension ApplicationClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + 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 { - tag = try container.decode([String].self, forKey: .tag) + cron = try container.decode([String: Any].self, forKey: .cron) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -217,7 +217,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -225,7 +225,7 @@ public extension ApplicationClient { } catch {} do { - badge = try container.decode([String: Any].self, forKey: .badge) + 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 { - allowSort = try container.decode(Bool.self, forKey: .allowSort) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -249,7 +249,7 @@ public extension ApplicationClient { } catch {} do { - action = try container.decode(ProductListingAction.self, forKey: .action) + allowSort = try container.decode(Bool.self, forKey: .allowSort) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -257,7 +257,7 @@ public extension ApplicationClient { } catch {} do { - schedule = try container.decode([String: Any].self, forKey: .schedule) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -265,7 +265,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(String.self, forKey: .uid) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -273,7 +273,7 @@ public extension ApplicationClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + badge = try container.decode([String: Any].self, forKey: .badge) } 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(allowFacets, forKey: .allowFacets) + try? container.encodeIfPresent(schedule, forKey: .schedule) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(query, forKey: .query) - try? container.encodeIfPresent(appId, forKey: .appId) - - try? container.encodeIfPresent(description, forKey: .description) - - try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(tag, forKey: .tag) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(cron, forKey: .cron) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(allowSort, forKey: .allowSort) + try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(schedule, forKey: .schedule) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(allowSort, forKey: .allowSort) try? container.encodeIfPresent(meta, forKey: .meta) + + try? container.encodeIfPresent(banners, forKey: .banners) + + try? container.encodeIfPresent(badge, forKey: .badge) } } } diff --git a/Sources/code/application/models/GetCollectionListingResponseAppModelClass.swift b/Sources/code/application/models/GetCollectionListingResponseAppModelClass.swift index 6b0d0ab7b0..e486527e7c 100644 --- a/Sources/code/application/models/GetCollectionListingResponseAppModelClass.swift +++ b/Sources/code/application/models/GetCollectionListingResponseAppModelClass.swift @@ -7,35 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class GetCollectionListingResponse: Codable { - public var page: Page + public var items: [GetCollectionDetailNest]? public var filters: CollectionListingFilter? - public var items: [GetCollectionDetailNest]? + public var page: Page public enum CodingKeys: String, CodingKey { - case page + case items case filters - case items + case page } public init(filters: CollectionListingFilter? = nil, items: [GetCollectionDetailNest]? = nil, page: Page) { - self.page = page + self.items = items self.filters = filters - self.items = items + self.page = page } 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(CollectionListingFilter.self, forKey: .filters) + items = try container.decode([GetCollectionDetailNest].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -43,22 +41,24 @@ public extension ApplicationClient { } 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) 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(page, forKey: .page) + try? container.encodeIfPresent(items, forKey: .items) try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(items, forKey: .items) + try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/application/models/GetFollowListingResponseAppModelClass.swift b/Sources/code/application/models/GetFollowListingResponseAppModelClass.swift index 19d06c2fc7..1e8f6e6c98 100644 --- a/Sources/code/application/models/GetFollowListingResponseAppModelClass.swift +++ b/Sources/code/application/models/GetFollowListingResponseAppModelClass.swift @@ -7,36 +7,36 @@ public extension ApplicationClient { Used By: Catalog */ class GetFollowListingResponse: Codable { - public var page: Page - public var items: [ProductListingDetail] - public enum CodingKeys: String, CodingKey { - case page + public var page: Page + public enum CodingKeys: String, CodingKey { case items + + case page } public init(items: [ProductListingDetail], page: Page) { - self.page = page - self.items = items + + self.page = page } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - page = try container.decode(Page.self, forKey: .page) - items = try container.decode([ProductListingDetail].self, forKey: .items) + + 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(page, forKey: .page) - try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/application/models/GetGroupedProductsAppModelClass.swift b/Sources/code/application/models/GetGroupedProductsAppModelClass.swift index aceb25c76d..e80cc0d4bc 100644 --- a/Sources/code/application/models/GetGroupedProductsAppModelClass.swift +++ b/Sources/code/application/models/GetGroupedProductsAppModelClass.swift @@ -7,75 +7,75 @@ public extension ApplicationClient { Used By: Catalog */ class GetGroupedProducts: Codable { - public var sameStoreAssignment: Bool? - - public var choice: String? - public var companyId: Int? public var name: String? - public var meta: [String: Any]? + public var slug: String? public var products: [Products]? - public var pageVisibility: [String]? + public var meta: [String: Any]? - public var active: Bool? + public var choice: String? - public var logo: String? + public var pageVisibility: [String]? - public var slug: String? + public var logo: String? - public enum CodingKeys: String, CodingKey { - case sameStoreAssignment = "same_store_assignment" + public var active: Bool? - case choice + public var sameStoreAssignment: Bool? + public enum CodingKeys: String, CodingKey { case companyId = "company_id" case name - case meta + case slug case products - case pageVisibility = "page_visibility" + case meta - case active + case choice + + case pageVisibility = "page_visibility" case logo - case slug + case active + + case sameStoreAssignment = "same_store_assignment" } 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.sameStoreAssignment = sameStoreAssignment - - self.choice = choice - self.companyId = companyId self.name = name - self.meta = meta + self.slug = slug self.products = products - self.pageVisibility = pageVisibility + self.meta = meta - self.active = active + self.choice = choice + + self.pageVisibility = pageVisibility self.logo = logo - self.slug = slug + self.active = active + + self.sameStoreAssignment = sameStoreAssignment } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -83,7 +83,7 @@ public extension ApplicationClient { } catch {} do { - choice = try container.decode(String.self, forKey: .choice) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,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) @@ -99,7 +99,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + products = try container.decode([Products].self, forKey: .products) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -115,7 +115,7 @@ public extension ApplicationClient { } catch {} do { - products = try container.decode([Products].self, forKey: .products) + choice = try container.decode(String.self, forKey: .choice) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -131,7 +131,7 @@ public extension ApplicationClient { } catch {} do { - active = try container.decode(Bool.self, forKey: .active) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -139,7 +139,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) @@ -147,7 +147,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) } 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(sameStoreAssignment, forKey: .sameStoreAssignment) - - try? container.encodeIfPresent(choice, forKey: .choice) - try? container.encodeIfPresent(companyId, forKey: .companyId) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(slug, forKey: .slug) try? container.encodeIfPresent(products, forKey: .products) - try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(active, forKey: .active) + try? container.encodeIfPresent(choice, forKey: .choice) + + try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(active, forKey: .active) + + try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) } } } diff --git a/Sources/code/application/models/HomeListingResponseAppModelClass.swift b/Sources/code/application/models/HomeListingResponseAppModelClass.swift index f8c73e8c8a..436d6bf73c 100644 --- a/Sources/code/application/models/HomeListingResponseAppModelClass.swift +++ b/Sources/code/application/models/HomeListingResponseAppModelClass.swift @@ -7,33 +7,31 @@ public extension ApplicationClient { Used By: Catalog */ class HomeListingResponse: Codable { - public var page: Page - public var items: [ProductListingDetail]? + public var page: Page + public var message: String? public enum CodingKeys: String, CodingKey { - case page - case items + case page + case message } public init(items: [ProductListingDetail]? = nil, message: String? = nil, page: Page) { - self.page = page - self.items = items + self.page = page + self.message = message } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - page = try container.decode(Page.self, forKey: .page) - do { items = try container.decode([ProductListingDetail].self, forKey: .items) @@ -42,6 +40,8 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} + page = try container.decode(Page.self, forKey: .page) + do { message = try container.decode(String.self, forKey: .message) @@ -54,10 +54,10 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(page, forKey: .page) - 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 f670a7efab..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 enum CodingKeys: String, CodingKey { - case success + public var success: Bool? + public enum CodingKeys: String, CodingKey { case branchName = "branch_name" case bankName = "bank_name" + + case success } public init(bankName: String, branchName: String, success: Bool? = nil) { - self.success = success - self.branchName = branchName self.bankName = bankName + + 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 {} - - 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(success, forKey: .success) - try? container.encodeIfPresent(branchName, forKey: .branchName) try? container.encodeIfPresent(bankName, forKey: .bankName) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/ImageUrlsAppModelClass.swift b/Sources/code/application/models/ImageUrlsAppModelClass.swift index e39e4b80f8..0ac50612ad 100644 --- a/Sources/code/application/models/ImageUrlsAppModelClass.swift +++ b/Sources/code/application/models/ImageUrlsAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class ImageUrls: Codable { - public var portrait: Media? - public var landscape: Media? - public enum CodingKeys: String, CodingKey { - case portrait + public var portrait: Media? + public enum CodingKeys: String, CodingKey { case landscape + + case portrait } public init(landscape: Media? = nil, portrait: Media? = nil) { - self.portrait = portrait - self.landscape = landscape + + self.portrait = portrait } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - portrait = try container.decode(Media.self, forKey: .portrait) + landscape = try container.decode(Media.self, forKey: .landscape) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - landscape = try container.decode(Media.self, forKey: .landscape) + portrait = try container.decode(Media.self, forKey: .portrait) } 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(portrait, forKey: .portrait) - try? container.encodeIfPresent(landscape, forKey: .landscape) + + try? container.encodeIfPresent(portrait, forKey: .portrait) } } } diff --git a/Sources/code/application/models/IntentAppAppModelClass.swift b/Sources/code/application/models/IntentAppAppModelClass.swift index 4c2c3274d1..0fddbf891d 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 displayName: String? + public var packageName: String? public var code: String? public var logos: PaymentModeLogo? - public var displayName: String? - public enum CodingKeys: String, CodingKey { + case displayName = "display_name" + case packageName = "package_name" case code case logos - - case displayName = "display_name" } public init(code: String? = nil, displayName: String? = nil, logos: PaymentModeLogo? = nil, packageName: String? = nil) { + self.displayName = displayName + self.packageName = packageName self.code = code self.logos = logos - - self.displayName = displayName } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - packageName = try container.decode(String.self, forKey: .packageName) + displayName = try container.decode(String.self, forKey: .displayName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,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) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - logos = try container.decode(PaymentModeLogo.self, forKey: .logos) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - displayName = try container.decode(String.self, forKey: .displayName) + logos = try container.decode(PaymentModeLogo.self, forKey: .logos) } 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(displayName, forKey: .displayName) + try? container.encode(packageName, forKey: .packageName) try? container.encode(code, forKey: .code) try? container.encode(logos, forKey: .logos) - - try? container.encode(displayName, forKey: .displayName) } } } diff --git a/Sources/code/application/models/ListCardsResponseAppModelClass.swift b/Sources/code/application/models/ListCardsResponseAppModelClass.swift index 6be2a4049b..b392a7788b 100644 --- a/Sources/code/application/models/ListCardsResponseAppModelClass.swift +++ b/Sources/code/application/models/ListCardsResponseAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class ListCardsResponse: Codable { public var data: [Card]? - public var success: Bool - public var message: String + public var success: Bool + public enum CodingKeys: String, CodingKey { case data - case success - case message + + case success } public init(data: [Card]? = nil, message: String, success: Bool) { self.data = data - self.success = success - self.message = message + + self.success = success } required public init(from decoder: Decoder) throws { @@ -40,9 +40,9 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} - success = try container.decode(Bool.self, forKey: .success) - message = try container.decode(String.self, forKey: .message) + + success = try container.decode(Bool.self, forKey: .success) } public func encode(to encoder: Encoder) throws { @@ -50,9 +50,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(data, forKey: .data) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(message, forKey: .message) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/MarketPlaceSttributesSchemaV2AppModelClass.swift b/Sources/code/application/models/MarketPlaceSttributesSchemaV2AppModelClass.swift index 899c11c576..c277906cdc 100644 --- a/Sources/code/application/models/MarketPlaceSttributesSchemaV2AppModelClass.swift +++ b/Sources/code/application/models/MarketPlaceSttributesSchemaV2AppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class MarketPlaceSttributesSchemaV2: Codable { - public var title: String? - public var details: [DetailsSchemaV2]? - public enum CodingKeys: String, CodingKey { - case title + public var title: String? + public enum CodingKeys: String, CodingKey { case details + + case title } public init(details: [DetailsSchemaV2]? = nil, title: String? = nil) { - self.title = title - self.details = details + + self.title = title } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - title = try container.decode(String.self, forKey: .title) + details = try container.decode([DetailsSchemaV2].self, forKey: .details) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - details = try container.decode([DetailsSchemaV2].self, forKey: .details) + title = try container.decode(String.self, forKey: .title) } 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(title, forKey: .title) - try? container.encodeIfPresent(details, forKey: .details) + + try? container.encodeIfPresent(title, forKey: .title) } } } diff --git a/Sources/code/application/models/MediaAppModelClass.swift b/Sources/code/application/models/MediaAppModelClass.swift index be9a92b45e..f2a8d0a23c 100644 --- a/Sources/code/application/models/MediaAppModelClass.swift +++ b/Sources/code/application/models/MediaAppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class Media: Codable { + public var url: String? + public var meta: Meta? public var type: String? - public var url: String? - public enum CodingKeys: String, CodingKey { + case url + case meta case type - - case url } public init(meta: Meta? = nil, type: String? = nil, url: String? = nil) { + self.url = url + self.meta = meta self.type = type - - self.url = url } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + 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 { - 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) @@ -60,11 +60,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(url, forKey: .url) + try? container.encodeIfPresent(meta, forKey: .meta) try? container.encodeIfPresent(type, forKey: .type) - - try? container.encodeIfPresent(url, forKey: .url) } } } diff --git a/Sources/code/application/models/MetaFieldsAppModelClass.swift b/Sources/code/application/models/MetaFieldsAppModelClass.swift index 5d36fe64f4..54d2e67be3 100644 --- a/Sources/code/application/models/MetaFieldsAppModelClass.swift +++ b/Sources/code/application/models/MetaFieldsAppModelClass.swift @@ -7,36 +7,36 @@ public extension ApplicationClient { Used By: Catalog */ class MetaFields: Codable { - public var key: String - public var value: String - public enum CodingKeys: String, CodingKey { - case key + public var key: String + public enum CodingKeys: String, CodingKey { case value + + case key } public init(key: String, value: String) { - self.key = key - self.value = value + + self.key = key } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - key = try container.decode(String.self, forKey: .key) - value = try container.decode(String.self, forKey: .value) + + key = try container.decode(String.self, forKey: .key) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(key, forKey: .key) - try? container.encodeIfPresent(value, forKey: .value) + + try? container.encodeIfPresent(key, forKey: .key) } } } diff --git a/Sources/code/application/models/NotFoundResourceErrorAppModelClass.swift b/Sources/code/application/models/NotFoundResourceErrorAppModelClass.swift index 23224fa45d..dde13e3732 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 description: String + public var code: String public var success: Bool - public var description: String - public enum CodingKeys: String, CodingKey { + case description + case code case success - - case description } public init(code: String, description: String, success: Bool) { + self.description = description + self.code = code self.success = success - - self.description = description } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + description = try container.decode(String.self, forKey: .description) + code = try container.decode(String.self, forKey: .code) success = try container.decode(Bool.self, forKey: .success) - - description = try container.decode(String.self, forKey: .description) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(code, forKey: .code) try? container.encodeIfPresent(success, forKey: .success) - - try? container.encodeIfPresent(description, forKey: .description) } } } diff --git a/Sources/code/application/models/OrderBeneficiaryDetailsAppModelClass.swift b/Sources/code/application/models/OrderBeneficiaryDetailsAppModelClass.swift index 5204531f4d..4eca047b3c 100644 --- a/Sources/code/application/models/OrderBeneficiaryDetailsAppModelClass.swift +++ b/Sources/code/application/models/OrderBeneficiaryDetailsAppModelClass.swift @@ -7,128 +7,128 @@ public extension ApplicationClient { Used By: Payment */ class OrderBeneficiaryDetails: Codable { - public var transferMode: String + public var subtitle: String public var mobile: Bool? - public var displayName: String - - public var subtitle: String + public var isActive: Bool - public var createdOn: String + public var id: Int - public var title: String + public var displayName: String - public var email: String + public var bankName: String public var accountNo: String - public var beneficiaryId: String + public var transferMode: String - public var isActive: Bool + public var ifscCode: String - public var comment: Bool? + public var accountHolder: String public var delightsUserName: String? - public var branchName: Bool? + public var title: String - public var bankName: String + public var email: String - public var address: String + public var comment: Bool? - public var accountHolder: String + public var createdOn: String - public var ifscCode: String + public var branchName: Bool? - public var id: Int + public var beneficiaryId: String public var modifiedOn: String + public var address: String + public enum CodingKeys: String, CodingKey { - case transferMode = "transfer_mode" + case subtitle case mobile - case displayName = "display_name" - - case subtitle + case isActive = "is_active" - case createdOn = "created_on" + case id - case title + case displayName = "display_name" - case email + case bankName = "bank_name" case accountNo = "account_no" - case beneficiaryId = "beneficiary_id" + case transferMode = "transfer_mode" - case isActive = "is_active" + case ifscCode = "ifsc_code" - case comment + case accountHolder = "account_holder" case delightsUserName = "delights_user_name" - case branchName = "branch_name" + case title - case bankName = "bank_name" + case email - case address + case comment - case accountHolder = "account_holder" + case createdOn = "created_on" - case ifscCode = "ifsc_code" + case branchName = "branch_name" - case id + case beneficiaryId = "beneficiary_id" case modifiedOn = "modified_on" + + case address } 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.transferMode = transferMode + self.subtitle = subtitle self.mobile = mobile - self.displayName = displayName - - self.subtitle = subtitle + self.isActive = isActive - self.createdOn = createdOn + self.id = id - self.title = title + self.displayName = displayName - self.email = email + self.bankName = bankName self.accountNo = accountNo - self.beneficiaryId = beneficiaryId + self.transferMode = transferMode - self.isActive = isActive + self.ifscCode = ifscCode - self.comment = comment + self.accountHolder = accountHolder self.delightsUserName = delightsUserName - self.branchName = branchName + self.title = title - self.bankName = bankName + self.email = email - self.address = address + self.comment = comment - self.accountHolder = accountHolder + self.createdOn = createdOn - self.ifscCode = ifscCode + self.branchName = branchName - self.id = id + self.beneficiaryId = beneficiaryId self.modifiedOn = modifiedOn + + self.address = address } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - transferMode = try container.decode(String.self, forKey: .transferMode) + subtitle = try container.decode(String.self, forKey: .subtitle) do { mobile = try container.decode(Bool.self, forKey: .mobile) @@ -138,38 +138,44 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} - displayName = try container.decode(String.self, forKey: .displayName) - - subtitle = try container.decode(String.self, forKey: .subtitle) + isActive = try container.decode(Bool.self, forKey: .isActive) - createdOn = try container.decode(String.self, forKey: .createdOn) + id = try container.decode(Int.self, forKey: .id) - title = try container.decode(String.self, forKey: .title) + displayName = try container.decode(String.self, forKey: .displayName) - email = try container.decode(String.self, forKey: .email) + bankName = try container.decode(String.self, forKey: .bankName) accountNo = try container.decode(String.self, forKey: .accountNo) - beneficiaryId = try container.decode(String.self, forKey: .beneficiaryId) + transferMode = try container.decode(String.self, forKey: .transferMode) - isActive = try container.decode(Bool.self, forKey: .isActive) + ifscCode = try container.decode(String.self, forKey: .ifscCode) + + accountHolder = try container.decode(String.self, forKey: .accountHolder) do { - comment = try container.decode(Bool.self, forKey: .comment) + 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 {} + title = try container.decode(String.self, forKey: .title) + + email = try container.decode(String.self, forKey: .email) + do { - delightsUserName = try container.decode(String.self, forKey: .delightsUserName) + 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 {} + createdOn = try container.decode(String.self, forKey: .createdOn) + do { branchName = try container.decode(Bool.self, forKey: .branchName) @@ -178,59 +184,53 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} - bankName = try container.decode(String.self, forKey: .bankName) - - address = try container.decode(String.self, forKey: .address) - - accountHolder = try container.decode(String.self, forKey: .accountHolder) - - ifscCode = try container.decode(String.self, forKey: .ifscCode) - - id = try container.decode(Int.self, forKey: .id) + beneficiaryId = try container.decode(String.self, forKey: .beneficiaryId) modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + + address = try container.decode(String.self, forKey: .address) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(transferMode, forKey: .transferMode) + try? container.encodeIfPresent(subtitle, forKey: .subtitle) try? container.encodeIfPresent(mobile, forKey: .mobile) - try? container.encodeIfPresent(displayName, forKey: .displayName) - - try? container.encodeIfPresent(subtitle, forKey: .subtitle) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(title, forKey: .title) + try? container.encodeIfPresent(displayName, forKey: .displayName) - try? container.encodeIfPresent(email, forKey: .email) + try? container.encodeIfPresent(bankName, forKey: .bankName) try? container.encodeIfPresent(accountNo, forKey: .accountNo) - try? container.encodeIfPresent(beneficiaryId, forKey: .beneficiaryId) + try? container.encodeIfPresent(transferMode, forKey: .transferMode) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) - try? container.encodeIfPresent(comment, forKey: .comment) + try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) try? container.encode(delightsUserName, forKey: .delightsUserName) - try? container.encodeIfPresent(branchName, forKey: .branchName) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(bankName, forKey: .bankName) + try? container.encodeIfPresent(email, forKey: .email) - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(comment, forKey: .comment) - try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) + try? container.encodeIfPresent(branchName, forKey: .branchName) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(beneficiaryId, forKey: .beneficiaryId) try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + try? container.encodeIfPresent(address, forKey: .address) } } } diff --git a/Sources/code/application/models/PaymentFlowAppModelClass.swift b/Sources/code/application/models/PaymentFlowAppModelClass.swift index 8d7bee01c1..754a529624 100644 --- a/Sources/code/application/models/PaymentFlowAppModelClass.swift +++ b/Sources/code/application/models/PaymentFlowAppModelClass.swift @@ -9,72 +9,72 @@ public extension ApplicationClient { class PaymentFlow: Codable { public var razorpay: AggregatorRoute? - public var rupifi: AggregatorRoute? - - public var stripe: AggregatorRoute? + public var ccavenue: AggregatorRoute? - public var upiRazorpay: AggregatorRoute? + public var simpl: AggregatorRoute? - public var bqrRazorpay: AggregatorRoute? + public var fynd: AggregatorRoute? - public var ccavenue: AggregatorRoute? + public var payubiz: AggregatorRoute? - public var fynd: AggregatorRoute? + public var rupifi: AggregatorRoute? public var mswipe: AggregatorRoute? - public var simpl: AggregatorRoute? + public var upiRazorpay: AggregatorRoute? + + public var bqrRazorpay: AggregatorRoute? public var juspay: AggregatorRoute? - public var payubiz: AggregatorRoute? + public var stripe: AggregatorRoute? public enum CodingKeys: String, CodingKey { case razorpay - case rupifi - - case stripe + case ccavenue - case upiRazorpay = "upi_razorpay" + case simpl - case bqrRazorpay = "bqr_razorpay" + case fynd - case ccavenue + case payubiz - case fynd + case rupifi case mswipe - case simpl + case upiRazorpay = "upi_razorpay" + + case bqrRazorpay = "bqr_razorpay" case juspay - case payubiz + case stripe } 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.razorpay = razorpay - self.rupifi = rupifi - - self.stripe = stripe + self.ccavenue = ccavenue - self.upiRazorpay = upiRazorpay + self.simpl = simpl - self.bqrRazorpay = bqrRazorpay + self.fynd = fynd - self.ccavenue = ccavenue + self.payubiz = payubiz - self.fynd = fynd + self.rupifi = rupifi self.mswipe = mswipe - self.simpl = simpl + self.upiRazorpay = upiRazorpay + + self.bqrRazorpay = bqrRazorpay self.juspay = juspay - self.payubiz = payubiz + self.stripe = stripe } required public init(from decoder: Decoder) throws { @@ -89,7 +89,7 @@ public extension ApplicationClient { } catch {} do { - rupifi = try container.decode(AggregatorRoute.self, forKey: .rupifi) + ccavenue = try container.decode(AggregatorRoute.self, forKey: .ccavenue) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -97,7 +97,7 @@ public extension ApplicationClient { } catch {} do { - stripe = try container.decode(AggregatorRoute.self, forKey: .stripe) + simpl = try container.decode(AggregatorRoute.self, forKey: .simpl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - upiRazorpay = try container.decode(AggregatorRoute.self, forKey: .upiRazorpay) + fynd = try container.decode(AggregatorRoute.self, forKey: .fynd) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -113,7 +113,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) @@ -121,7 +121,7 @@ public extension ApplicationClient { } catch {} do { - ccavenue = try container.decode(AggregatorRoute.self, forKey: .ccavenue) + 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 { - fynd = try container.decode(AggregatorRoute.self, forKey: .fynd) + mswipe = try container.decode(AggregatorRoute.self, forKey: .mswipe) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -137,7 +137,7 @@ public extension ApplicationClient { } catch {} 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) @@ -145,7 +145,7 @@ public extension ApplicationClient { } catch {} do { - simpl = try container.decode(AggregatorRoute.self, forKey: .simpl) + bqrRazorpay = try container.decode(AggregatorRoute.self, forKey: .bqrRazorpay) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -161,7 +161,7 @@ public extension ApplicationClient { } catch {} do { - payubiz = try container.decode(AggregatorRoute.self, forKey: .payubiz) + stripe = try container.decode(AggregatorRoute.self, forKey: .stripe) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,25 +174,25 @@ public extension ApplicationClient { try? container.encode(razorpay, forKey: .razorpay) - try? container.encode(rupifi, forKey: .rupifi) - - try? container.encode(stripe, forKey: .stripe) + try? container.encode(ccavenue, forKey: .ccavenue) - try? container.encode(upiRazorpay, forKey: .upiRazorpay) + try? container.encode(simpl, forKey: .simpl) - try? container.encode(bqrRazorpay, forKey: .bqrRazorpay) + try? container.encode(fynd, forKey: .fynd) - try? container.encode(ccavenue, forKey: .ccavenue) + try? container.encode(payubiz, forKey: .payubiz) - try? container.encode(fynd, forKey: .fynd) + try? container.encode(rupifi, forKey: .rupifi) try? container.encode(mswipe, forKey: .mswipe) - try? container.encode(simpl, forKey: .simpl) + try? container.encode(upiRazorpay, forKey: .upiRazorpay) + + try? container.encode(bqrRazorpay, forKey: .bqrRazorpay) try? container.encode(juspay, forKey: .juspay) - try? container.encode(payubiz, forKey: .payubiz) + try? container.encode(stripe, forKey: .stripe) } } } diff --git a/Sources/code/application/models/PaymentInitializationRequestAppModelClass.swift b/Sources/code/application/models/PaymentInitializationRequestAppModelClass.swift index fc438b50af..e2efe6bd58 100644 --- a/Sources/code/application/models/PaymentInitializationRequestAppModelClass.swift +++ b/Sources/code/application/models/PaymentInitializationRequestAppModelClass.swift @@ -7,101 +7,89 @@ public extension ApplicationClient { Used By: Payment */ class PaymentInitializationRequest: Codable { - public var aggregator: String + public var contact: String + + public var merchantOrderId: String + + public var vpa: String? public var orderId: String public var amount: Int - public var method: String + public var aggregator: String - public var customerId: String + public var timeout: Int? - public var contact: String + public var method: String - public var merchantOrderId: String + public var razorpayPaymentId: String? public var currency: String - public var vpa: String? + public var customerId: String public var email: String - public var timeout: Int? + public enum CodingKeys: String, CodingKey { + case contact - public var razorpayPaymentId: String? + case merchantOrderId = "merchant_order_id" - public enum CodingKeys: String, CodingKey { - case aggregator + case vpa case orderId = "order_id" case amount - case method + case aggregator - case customerId = "customer_id" + case timeout - case contact + case method - case merchantOrderId = "merchant_order_id" + case razorpayPaymentId = "razorpay_payment_id" case currency - case vpa + case customerId = "customer_id" case email - - case timeout - - case razorpayPaymentId = "razorpay_payment_id" } 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.aggregator = aggregator + self.contact = contact + + self.merchantOrderId = merchantOrderId + + self.vpa = vpa self.orderId = orderId self.amount = amount - self.method = method + self.aggregator = aggregator - self.customerId = customerId + self.timeout = timeout - self.contact = contact + self.method = method - self.merchantOrderId = merchantOrderId + self.razorpayPaymentId = razorpayPaymentId self.currency = currency - self.vpa = vpa + self.customerId = customerId self.email = email - - self.timeout = timeout - - self.razorpayPaymentId = razorpayPaymentId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - aggregator = try container.decode(String.self, forKey: .aggregator) - - orderId = try container.decode(String.self, forKey: .orderId) - - amount = try container.decode(Int.self, forKey: .amount) - - method = try container.decode(String.self, forKey: .method) - - customerId = try container.decode(String.self, forKey: .customerId) - contact = try container.decode(String.self, forKey: .contact) merchantOrderId = try container.decode(String.self, forKey: .merchantOrderId) - currency = try container.decode(String.self, forKey: .currency) - do { vpa = try container.decode(String.self, forKey: .vpa) @@ -110,7 +98,11 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} - email = try container.decode(String.self, forKey: .email) + orderId = try container.decode(String.self, forKey: .orderId) + + amount = try container.decode(Int.self, forKey: .amount) + + aggregator = try container.decode(String.self, forKey: .aggregator) do { timeout = try container.decode(Int.self, forKey: .timeout) @@ -120,6 +112,8 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} + method = try container.decode(String.self, forKey: .method) + do { razorpayPaymentId = try container.decode(String.self, forKey: .razorpayPaymentId) @@ -127,34 +121,40 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + currency = try container.decode(String.self, forKey: .currency) + + customerId = try container.decode(String.self, forKey: .customerId) + + 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(aggregator, forKey: .aggregator) + try? container.encodeIfPresent(contact, forKey: .contact) + + try? container.encodeIfPresent(merchantOrderId, forKey: .merchantOrderId) + + try? container.encode(vpa, forKey: .vpa) try? container.encodeIfPresent(orderId, forKey: .orderId) try? container.encode(amount, forKey: .amount) - try? container.encodeIfPresent(method, forKey: .method) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encodeIfPresent(customerId, forKey: .customerId) + try? container.encode(timeout, forKey: .timeout) - try? container.encodeIfPresent(contact, forKey: .contact) + try? container.encodeIfPresent(method, forKey: .method) - try? container.encodeIfPresent(merchantOrderId, forKey: .merchantOrderId) + try? container.encode(razorpayPaymentId, forKey: .razorpayPaymentId) try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encode(vpa, forKey: .vpa) + try? container.encodeIfPresent(customerId, forKey: .customerId) try? container.encodeIfPresent(email, forKey: .email) - - try? container.encode(timeout, forKey: .timeout) - - try? container.encode(razorpayPaymentId, forKey: .razorpayPaymentId) } } } diff --git a/Sources/code/application/models/PaymentInitializationResponseAppModelClass.swift b/Sources/code/application/models/PaymentInitializationResponseAppModelClass.swift index f12d13189e..3c45058037 100644 --- a/Sources/code/application/models/PaymentInitializationResponseAppModelClass.swift +++ b/Sources/code/application/models/PaymentInitializationResponseAppModelClass.swift @@ -7,123 +7,117 @@ public extension ApplicationClient { Used By: Payment */ class PaymentInitializationResponse: Codable { - public var aggregator: String - - public var pollingUrl: String - - public var amount: Int? - - public var method: String + public var aggregatorOrderId: String? public var virtualId: String? - public var status: String? + public var currency: String? - public var customerId: String? + public var vpa: String? - public var bqrImage: String? + public var aggregator: String - public var merchantOrderId: String + public var amount: Int? - public var currency: String? + public var upiPollUrl: String? - public var aggregatorOrderId: String? + public var pollingUrl: String - public var vpa: String? + public var timeout: Int? - public var success: Bool + public var bqrImage: String? - public var timeout: Int? + public var success: Bool public var razorpayPaymentId: String? - public var upiPollUrl: String? + public var merchantOrderId: String - public enum CodingKeys: String, CodingKey { - case aggregator + public var customerId: String? - case pollingUrl = "polling_url" + public var status: String? - case amount + public var method: String - case method + public enum CodingKeys: String, CodingKey { + case aggregatorOrderId = "aggregator_order_id" case virtualId = "virtual_id" - case status + case currency - case customerId = "customer_id" + case vpa - case bqrImage = "bqr_image" + case aggregator - case merchantOrderId = "merchant_order_id" + case amount - case currency + case upiPollUrl = "upi_poll_url" - case aggregatorOrderId = "aggregator_order_id" + case pollingUrl = "polling_url" - case vpa + case timeout - case success + case bqrImage = "bqr_image" - case timeout + case success case razorpayPaymentId = "razorpay_payment_id" - case upiPollUrl = "upi_poll_url" - } + case merchantOrderId = "merchant_order_id" - 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.aggregator = aggregator + case customerId = "customer_id" - self.pollingUrl = pollingUrl + case status - self.amount = amount + case method + } - self.method = method + 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.virtualId = virtualId - self.status = status + self.currency = currency - self.customerId = customerId + self.vpa = vpa - self.bqrImage = bqrImage + self.aggregator = aggregator - self.merchantOrderId = merchantOrderId + self.amount = amount - self.currency = currency + self.upiPollUrl = upiPollUrl - self.aggregatorOrderId = aggregatorOrderId + self.pollingUrl = pollingUrl - self.vpa = vpa + self.timeout = timeout - self.success = success + self.bqrImage = bqrImage - self.timeout = timeout + self.success = success self.razorpayPaymentId = razorpayPaymentId - self.upiPollUrl = upiPollUrl + self.merchantOrderId = merchantOrderId + + self.customerId = customerId + + self.status = status + + self.method = method } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - aggregator = try container.decode(String.self, forKey: .aggregator) - - pollingUrl = try container.decode(String.self, forKey: .pollingUrl) - do { - amount = try container.decode(Int.self, forKey: .amount) + 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 {} - method = try container.decode(String.self, forKey: .method) - do { virtualId = try container.decode(String.self, forKey: .virtualId) @@ -133,7 +127,7 @@ public extension ApplicationClient { } catch {} do { - status = try container.decode(String.self, forKey: .status) + currency = try container.decode(String.self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -141,33 +135,35 @@ public extension ApplicationClient { } catch {} do { - customerId = try container.decode(String.self, forKey: .customerId) + 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 {} + aggregator = try container.decode(String.self, forKey: .aggregator) + do { - bqrImage = try container.decode(String.self, forKey: .bqrImage) + amount = try container.decode(Int.self, forKey: .amount) } 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) - do { - currency = try container.decode(String.self, forKey: .currency) + upiPollUrl = try container.decode(String.self, forKey: .upiPollUrl) } 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) + do { - aggregatorOrderId = try container.decode(String.self, forKey: .aggregatorOrderId) + timeout = try container.decode(Int.self, forKey: .timeout) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -175,7 +171,7 @@ public extension ApplicationClient { } catch {} do { - vpa = try container.decode(String.self, forKey: .vpa) + bqrImage = try container.decode(String.self, forKey: .bqrImage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -185,15 +181,17 @@ public extension ApplicationClient { success = try container.decode(Bool.self, forKey: .success) do { - timeout = try container.decode(Int.self, forKey: .timeout) + razorpayPaymentId = try container.decode(String.self, forKey: .razorpayPaymentId) } 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) + do { - razorpayPaymentId = try container.decode(String.self, forKey: .razorpayPaymentId) + customerId = try container.decode(String.self, forKey: .customerId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -201,48 +199,50 @@ public extension ApplicationClient { } catch {} do { - upiPollUrl = try container.decode(String.self, forKey: .upiPollUrl) + 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 {} + + method = try container.decode(String.self, forKey: .method) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) + try? container.encodeIfPresent(aggregatorOrderId, forKey: .aggregatorOrderId) - try? container.encodeIfPresent(pollingUrl, forKey: .pollingUrl) + try? container.encode(virtualId, forKey: .virtualId) - try? container.encode(amount, forKey: .amount) + try? container.encode(currency, forKey: .currency) - try? container.encodeIfPresent(method, forKey: .method) + try? container.encode(vpa, forKey: .vpa) - try? container.encode(virtualId, forKey: .virtualId) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encode(amount, forKey: .amount) - try? container.encode(customerId, forKey: .customerId) + try? container.encode(upiPollUrl, forKey: .upiPollUrl) - try? container.encode(bqrImage, forKey: .bqrImage) + try? container.encodeIfPresent(pollingUrl, forKey: .pollingUrl) - try? container.encodeIfPresent(merchantOrderId, forKey: .merchantOrderId) + try? container.encode(timeout, forKey: .timeout) - try? container.encode(currency, forKey: .currency) + try? container.encode(bqrImage, forKey: .bqrImage) - try? container.encodeIfPresent(aggregatorOrderId, forKey: .aggregatorOrderId) + try? container.encodeIfPresent(success, forKey: .success) - try? container.encode(vpa, forKey: .vpa) + try? container.encode(razorpayPaymentId, forKey: .razorpayPaymentId) - try? container.encodeIfPresent(success, forKey: .success) + try? container.encodeIfPresent(merchantOrderId, forKey: .merchantOrderId) - try? container.encode(timeout, forKey: .timeout) + try? container.encode(customerId, forKey: .customerId) - try? container.encode(razorpayPaymentId, forKey: .razorpayPaymentId) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encode(upiPollUrl, forKey: .upiPollUrl) + try? container.encodeIfPresent(method, forKey: .method) } } } diff --git a/Sources/code/application/models/PaymentModeListAppModelClass.swift b/Sources/code/application/models/PaymentModeListAppModelClass.swift index ad3194f828..156676ef7e 100644 --- a/Sources/code/application/models/PaymentModeListAppModelClass.swift +++ b/Sources/code/application/models/PaymentModeListAppModelClass.swift @@ -7,195 +7,203 @@ public extension ApplicationClient { Used By: Payment */ class PaymentModeList: Codable { - public var displayName: String? - - public var merchantCode: String? - - public var intentApp: [IntentApp]? + public var expMonth: Int? - public var logoUrl: PaymentModeLogo? + public var aggregatorName: String - public var cardType: String? + public var merchantCode: String? - public var cardBrandImage: String? + public var cardName: String? - public var cardBrand: String? + public var intentFlow: Bool? - public var cardName: String? + public var displayPriority: Int? - public var cardId: String? + public var cardIsin: String? - public var name: String? + public var intentAppErrorList: [String]? - public var intentAppErrorDictList: [IntentAppErrorList]? + public var code: String? public var cardFingerprint: String? - public var intentFlow: Bool? + public var cardReference: String? - public var cardNumber: String? + public var expired: Bool? - public var fyndVpa: String? + public var cardType: String? - public var cardIssuer: String? + public var timeout: Int? - public var displayPriority: Int? + public var displayName: String? - public var expYear: Int? + public var intentApp: [IntentApp]? public var nickname: String? - public var aggregatorName: String + public var cardBrand: String? + + public var fyndVpa: String? public var cardToken: String? - public var intentAppErrorList: [String]? + public var cardIssuer: String? - public var cardReference: String? + public var cardId: String? - public var expMonth: Int? + public var logoUrl: PaymentModeLogo? - public var expired: Bool? + public var cardBrandImage: String? - public var timeout: Int? + public var intentAppErrorDictList: [IntentAppErrorList]? - public var retryCount: Int? + public var compliantWithTokenisationGuidelines: Bool? - public var code: String? + public var name: String? - public var cardIsin: String? + public var expYear: Int? - public enum CodingKeys: String, CodingKey { - case displayName = "display_name" + public var cardNumber: String? - case merchantCode = "merchant_code" + public var retryCount: Int? - case intentApp = "intent_app" + public enum CodingKeys: String, CodingKey { + case expMonth = "exp_month" - case logoUrl = "logo_url" + case aggregatorName = "aggregator_name" - case cardType = "card_type" + case merchantCode = "merchant_code" - case cardBrandImage = "card_brand_image" + case cardName = "card_name" - case cardBrand = "card_brand" + case intentFlow = "intent_flow" - case cardName = "card_name" + case displayPriority = "display_priority" - case cardId = "card_id" + case cardIsin = "card_isin" - case name + case intentAppErrorList = "intent_app_error_list" - case intentAppErrorDictList = "intent_app_error_dict_list" + case code case cardFingerprint = "card_fingerprint" - case intentFlow = "intent_flow" + case cardReference = "card_reference" - case cardNumber = "card_number" + case expired - case fyndVpa = "fynd_vpa" + case cardType = "card_type" - case cardIssuer = "card_issuer" + case timeout - case displayPriority = "display_priority" + case displayName = "display_name" - case expYear = "exp_year" + case intentApp = "intent_app" case nickname - case aggregatorName = "aggregator_name" + case cardBrand = "card_brand" + + case fyndVpa = "fynd_vpa" case cardToken = "card_token" - case intentAppErrorList = "intent_app_error_list" + case cardIssuer = "card_issuer" - case cardReference = "card_reference" + case cardId = "card_id" - case expMonth = "exp_month" + case logoUrl = "logo_url" - case expired + case cardBrandImage = "card_brand_image" - case timeout + case intentAppErrorDictList = "intent_app_error_dict_list" - case retryCount = "retry_count" + case compliantWithTokenisationGuidelines = "compliant_with_tokenisation_guidelines" - case code + case name - case cardIsin = "card_isin" - } + case expYear = "exp_year" - 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.displayName = displayName + case cardNumber = "card_number" - self.merchantCode = merchantCode + case retryCount = "retry_count" + } - self.intentApp = intentApp + 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, compliantWithTokenisationGuidelines: Bool? = 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.expMonth = expMonth - self.logoUrl = logoUrl + self.aggregatorName = aggregatorName - self.cardType = cardType + self.merchantCode = merchantCode - self.cardBrandImage = cardBrandImage + self.cardName = cardName - self.cardBrand = cardBrand + self.intentFlow = intentFlow - self.cardName = cardName + self.displayPriority = displayPriority - self.cardId = cardId + self.cardIsin = cardIsin - self.name = name + self.intentAppErrorList = intentAppErrorList - self.intentAppErrorDictList = intentAppErrorDictList + self.code = code self.cardFingerprint = cardFingerprint - self.intentFlow = intentFlow + self.cardReference = cardReference - self.cardNumber = cardNumber + self.expired = expired - self.fyndVpa = fyndVpa + self.cardType = cardType - self.cardIssuer = cardIssuer + self.timeout = timeout - self.displayPriority = displayPriority + self.displayName = displayName - self.expYear = expYear + self.intentApp = intentApp self.nickname = nickname - self.aggregatorName = aggregatorName + self.cardBrand = cardBrand + + self.fyndVpa = fyndVpa self.cardToken = cardToken - self.intentAppErrorList = intentAppErrorList + self.cardIssuer = cardIssuer - self.cardReference = cardReference + self.cardId = cardId - self.expMonth = expMonth + self.logoUrl = logoUrl - self.expired = expired + self.cardBrandImage = cardBrandImage - self.timeout = timeout + self.intentAppErrorDictList = intentAppErrorDictList - self.retryCount = retryCount + self.compliantWithTokenisationGuidelines = compliantWithTokenisationGuidelines - self.code = code + self.name = name - self.cardIsin = cardIsin + self.expYear = expYear + + self.cardNumber = cardNumber + + self.retryCount = retryCount } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - displayName = try container.decode(String.self, forKey: .displayName) + expMonth = try container.decode(Int.self, forKey: .expMonth) } 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 { merchantCode = try container.decode(String.self, forKey: .merchantCode) @@ -205,7 +213,7 @@ public extension ApplicationClient { } catch {} do { - intentApp = try container.decode([IntentApp].self, forKey: .intentApp) + cardName = try container.decode(String.self, forKey: .cardName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -213,7 +221,7 @@ public extension ApplicationClient { } catch {} do { - logoUrl = try container.decode(PaymentModeLogo.self, forKey: .logoUrl) + intentFlow = try container.decode(Bool.self, forKey: .intentFlow) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -221,7 +229,7 @@ public extension ApplicationClient { } catch {} do { - cardType = try container.decode(String.self, forKey: .cardType) + displayPriority = try container.decode(Int.self, forKey: .displayPriority) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -229,7 +237,7 @@ public extension ApplicationClient { } catch {} do { - cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) + cardIsin = try container.decode(String.self, forKey: .cardIsin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -237,7 +245,7 @@ public extension ApplicationClient { } catch {} do { - cardBrand = try container.decode(String.self, forKey: .cardBrand) + intentAppErrorList = try container.decode([String].self, forKey: .intentAppErrorList) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -245,7 +253,7 @@ public extension ApplicationClient { } catch {} do { - cardName = try container.decode(String.self, forKey: .cardName) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -253,7 +261,7 @@ public extension ApplicationClient { } catch {} do { - cardId = try container.decode(String.self, forKey: .cardId) + cardFingerprint = try container.decode(String.self, forKey: .cardFingerprint) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -261,7 +269,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + cardReference = try container.decode(String.self, forKey: .cardReference) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -269,7 +277,7 @@ public extension ApplicationClient { } catch {} do { - intentAppErrorDictList = try container.decode([IntentAppErrorList].self, forKey: .intentAppErrorDictList) + expired = try container.decode(Bool.self, forKey: .expired) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -277,7 +285,7 @@ public extension ApplicationClient { } catch {} do { - cardFingerprint = try container.decode(String.self, forKey: .cardFingerprint) + cardType = try container.decode(String.self, forKey: .cardType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -285,7 +293,7 @@ public extension ApplicationClient { } catch {} do { - intentFlow = try container.decode(Bool.self, forKey: .intentFlow) + timeout = try container.decode(Int.self, forKey: .timeout) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -293,7 +301,7 @@ public extension ApplicationClient { } catch {} do { - cardNumber = try container.decode(String.self, forKey: .cardNumber) + displayName = try container.decode(String.self, forKey: .displayName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -301,7 +309,7 @@ public extension ApplicationClient { } catch {} do { - fyndVpa = try container.decode(String.self, forKey: .fyndVpa) + intentApp = try container.decode([IntentApp].self, forKey: .intentApp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -309,7 +317,7 @@ public extension ApplicationClient { } catch {} do { - cardIssuer = try container.decode(String.self, forKey: .cardIssuer) + nickname = try container.decode(String.self, forKey: .nickname) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -317,7 +325,7 @@ public extension ApplicationClient { } catch {} do { - displayPriority = try container.decode(Int.self, forKey: .displayPriority) + cardBrand = try container.decode(String.self, forKey: .cardBrand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -325,7 +333,7 @@ public extension ApplicationClient { } catch {} do { - expYear = try container.decode(Int.self, forKey: .expYear) + fyndVpa = try container.decode(String.self, forKey: .fyndVpa) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -333,17 +341,23 @@ public extension ApplicationClient { } catch {} do { - nickname = try container.decode(String.self, forKey: .nickname) + cardToken = try container.decode(String.self, forKey: .cardToken) } 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) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch {} do { - cardToken = try container.decode(String.self, forKey: .cardToken) + cardId = try container.decode(String.self, forKey: .cardId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -351,7 +365,7 @@ public extension ApplicationClient { } catch {} do { - intentAppErrorList = try container.decode([String].self, forKey: .intentAppErrorList) + logoUrl = try container.decode(PaymentModeLogo.self, forKey: .logoUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -359,7 +373,7 @@ public extension ApplicationClient { } catch {} do { - cardReference = try container.decode(String.self, forKey: .cardReference) + cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -367,7 +381,7 @@ public extension ApplicationClient { } catch {} do { - expMonth = try container.decode(Int.self, forKey: .expMonth) + intentAppErrorDictList = try container.decode([IntentAppErrorList].self, forKey: .intentAppErrorDictList) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -375,7 +389,7 @@ public extension ApplicationClient { } catch {} do { - expired = try container.decode(Bool.self, forKey: .expired) + compliantWithTokenisationGuidelines = try container.decode(Bool.self, forKey: .compliantWithTokenisationGuidelines) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -383,7 +397,7 @@ public extension ApplicationClient { } catch {} do { - timeout = try container.decode(Int.self, forKey: .timeout) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -391,7 +405,7 @@ public extension ApplicationClient { } catch {} do { - retryCount = try container.decode(Int.self, forKey: .retryCount) + expYear = try container.decode(Int.self, forKey: .expYear) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -399,7 +413,7 @@ public extension ApplicationClient { } catch {} do { - code = try container.decode(String.self, forKey: .code) + cardNumber = try container.decode(String.self, forKey: .cardNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -407,7 +421,7 @@ public extension ApplicationClient { } catch {} do { - cardIsin = try container.decode(String.self, forKey: .cardIsin) + retryCount = try container.decode(Int.self, forKey: .retryCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -418,63 +432,65 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(displayName, forKey: .displayName) - - try? container.encode(merchantCode, forKey: .merchantCode) - - try? container.encode(intentApp, forKey: .intentApp) + try? container.encode(expMonth, forKey: .expMonth) - try? container.encode(logoUrl, forKey: .logoUrl) + try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) - try? container.encode(cardType, forKey: .cardType) + try? container.encode(merchantCode, forKey: .merchantCode) - try? container.encode(cardBrandImage, forKey: .cardBrandImage) + try? container.encode(cardName, forKey: .cardName) - try? container.encode(cardBrand, forKey: .cardBrand) + try? container.encode(intentFlow, forKey: .intentFlow) - try? container.encode(cardName, forKey: .cardName) + try? container.encode(displayPriority, forKey: .displayPriority) - try? container.encode(cardId, forKey: .cardId) + try? container.encode(cardIsin, forKey: .cardIsin) - try? container.encode(name, forKey: .name) + try? container.encode(intentAppErrorList, forKey: .intentAppErrorList) - try? container.encode(intentAppErrorDictList, forKey: .intentAppErrorDictList) + try? container.encode(code, forKey: .code) try? container.encode(cardFingerprint, forKey: .cardFingerprint) - try? container.encode(intentFlow, forKey: .intentFlow) + try? container.encode(cardReference, forKey: .cardReference) - try? container.encode(cardNumber, forKey: .cardNumber) + try? container.encode(expired, forKey: .expired) - try? container.encode(fyndVpa, forKey: .fyndVpa) + try? container.encode(cardType, forKey: .cardType) - try? container.encode(cardIssuer, forKey: .cardIssuer) + try? container.encode(timeout, forKey: .timeout) - try? container.encode(displayPriority, forKey: .displayPriority) + try? container.encode(displayName, forKey: .displayName) - try? container.encode(expYear, forKey: .expYear) + try? container.encode(intentApp, forKey: .intentApp) try? container.encode(nickname, forKey: .nickname) - try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) + try? container.encode(cardBrand, forKey: .cardBrand) + + try? container.encode(fyndVpa, forKey: .fyndVpa) try? container.encode(cardToken, forKey: .cardToken) - try? container.encode(intentAppErrorList, forKey: .intentAppErrorList) + try? container.encode(cardIssuer, forKey: .cardIssuer) - try? container.encode(cardReference, forKey: .cardReference) + try? container.encode(cardId, forKey: .cardId) - try? container.encode(expMonth, forKey: .expMonth) + try? container.encode(logoUrl, forKey: .logoUrl) - try? container.encode(expired, forKey: .expired) + try? container.encode(cardBrandImage, forKey: .cardBrandImage) - try? container.encode(timeout, forKey: .timeout) + try? container.encode(intentAppErrorDictList, forKey: .intentAppErrorDictList) - try? container.encode(retryCount, forKey: .retryCount) + try? container.encode(compliantWithTokenisationGuidelines, forKey: .compliantWithTokenisationGuidelines) - try? container.encode(code, forKey: .code) + try? container.encode(name, forKey: .name) - try? container.encode(cardIsin, forKey: .cardIsin) + try? container.encode(expYear, forKey: .expYear) + + try? container.encode(cardNumber, forKey: .cardNumber) + + try? container.encode(retryCount, forKey: .retryCount) } } } diff --git a/Sources/code/application/models/PaymentOptionAndFlowAppModelClass.swift b/Sources/code/application/models/PaymentOptionAndFlowAppModelClass.swift index 4b34f30eec..d5c0e09ffd 100644 --- a/Sources/code/application/models/PaymentOptionAndFlowAppModelClass.swift +++ b/Sources/code/application/models/PaymentOptionAndFlowAppModelClass.swift @@ -7,36 +7,36 @@ public extension ApplicationClient { Used By: Payment */ class PaymentOptionAndFlow: Codable { - public var paymentOption: [RootPaymentMode] - public var paymentFlows: PaymentFlow - public enum CodingKeys: String, CodingKey { - case paymentOption = "payment_option" + public var paymentOption: [RootPaymentMode] + public enum CodingKeys: String, CodingKey { case paymentFlows = "payment_flows" + + case paymentOption = "payment_option" } public init(paymentFlows: PaymentFlow, paymentOption: [RootPaymentMode]) { - self.paymentOption = paymentOption - self.paymentFlows = paymentFlows + + self.paymentOption = paymentOption } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - paymentOption = try container.decode([RootPaymentMode].self, forKey: .paymentOption) - paymentFlows = try container.decode(PaymentFlow.self, forKey: .paymentFlows) + + paymentOption = try container.decode([RootPaymentMode].self, forKey: .paymentOption) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(paymentOption, forKey: .paymentOption) - try? container.encodeIfPresent(paymentFlows, forKey: .paymentFlows) + + try? container.encodeIfPresent(paymentOption, forKey: .paymentOption) } } } diff --git a/Sources/code/application/models/PaymentStatusUpdateRequestAppModelClass.swift b/Sources/code/application/models/PaymentStatusUpdateRequestAppModelClass.swift index 11628c0256..827736aecc 100644 --- a/Sources/code/application/models/PaymentStatusUpdateRequestAppModelClass.swift +++ b/Sources/code/application/models/PaymentStatusUpdateRequestAppModelClass.swift @@ -7,72 +7,72 @@ public extension ApplicationClient { Used By: Payment */ class PaymentStatusUpdateRequest: Codable { - public var aggregator: String + public var contact: String + + public var merchantOrderId: String + + public var vpa: String public var orderId: String public var amount: Int + public var aggregator: String + public var method: String - public var status: String + public var currency: String public var customerId: String - public var contact: String - - public var merchantOrderId: String - - public var currency: String - - public var vpa: String + public var status: String public var email: String public enum CodingKeys: String, CodingKey { - case aggregator + case contact + + case merchantOrderId = "merchant_order_id" + + case vpa case orderId = "order_id" case amount + case aggregator + case method - case status + case currency case customerId = "customer_id" - case contact - - case merchantOrderId = "merchant_order_id" - - case currency - - case vpa + case status case email } 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.aggregator = aggregator + self.contact = contact + + self.merchantOrderId = merchantOrderId + + self.vpa = vpa self.orderId = orderId self.amount = amount + self.aggregator = aggregator + self.method = method - self.status = status + self.currency = currency self.customerId = customerId - self.contact = contact - - self.merchantOrderId = merchantOrderId - - self.currency = currency - - self.vpa = vpa + self.status = status self.email = email } @@ -80,25 +80,25 @@ 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) + contact = try container.decode(String.self, forKey: .contact) + + merchantOrderId = try container.decode(String.self, forKey: .merchantOrderId) + + vpa = try container.decode(String.self, forKey: .vpa) orderId = try container.decode(String.self, forKey: .orderId) amount = try container.decode(Int.self, forKey: .amount) + aggregator = try container.decode(String.self, forKey: .aggregator) + method = try container.decode(String.self, forKey: .method) - status = try container.decode(String.self, forKey: .status) + currency = try container.decode(String.self, forKey: .currency) customerId = try container.decode(String.self, forKey: .customerId) - contact = try container.decode(String.self, forKey: .contact) - - merchantOrderId = try container.decode(String.self, forKey: .merchantOrderId) - - currency = try container.decode(String.self, forKey: .currency) - - vpa = try container.decode(String.self, forKey: .vpa) + status = try container.decode(String.self, forKey: .status) email = try container.decode(String.self, forKey: .email) } @@ -106,25 +106,25 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) + try? container.encodeIfPresent(contact, forKey: .contact) + + try? container.encodeIfPresent(merchantOrderId, forKey: .merchantOrderId) + + try? container.encodeIfPresent(vpa, forKey: .vpa) try? container.encodeIfPresent(orderId, forKey: .orderId) try? container.encode(amount, forKey: .amount) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) + try? container.encodeIfPresent(method, forKey: .method) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(currency, forKey: .currency) try? container.encodeIfPresent(customerId, forKey: .customerId) - try? container.encodeIfPresent(contact, forKey: .contact) - - try? container.encodeIfPresent(merchantOrderId, forKey: .merchantOrderId) - - try? container.encodeIfPresent(currency, forKey: .currency) - - try? container.encodeIfPresent(vpa, forKey: .vpa) + try? container.encodeIfPresent(status, forKey: .status) try? container.encodeIfPresent(email, forKey: .email) } diff --git a/Sources/code/application/models/PaymentStatusUpdateResponseAppModelClass.swift b/Sources/code/application/models/PaymentStatusUpdateResponseAppModelClass.swift index d188b0f0cb..e014d231d5 100644 --- a/Sources/code/application/models/PaymentStatusUpdateResponseAppModelClass.swift +++ b/Sources/code/application/models/PaymentStatusUpdateResponseAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class PaymentStatusUpdateResponse: Codable { public var aggregatorName: String - public var retry: Bool - public var status: String + public var retry: Bool + public enum CodingKeys: String, CodingKey { case aggregatorName = "aggregator_name" - case retry - case status + + case retry } public init(aggregatorName: String, retry: Bool, status: String) { self.aggregatorName = aggregatorName - self.retry = retry - self.status = status + + self.retry = retry } required public init(from decoder: Decoder) throws { @@ -34,9 +34,9 @@ public extension ApplicationClient { aggregatorName = try container.decode(String.self, forKey: .aggregatorName) - retry = try container.decode(Bool.self, forKey: .retry) - status = try container.decode(String.self, forKey: .status) + + retry = try container.decode(Bool.self, forKey: .retry) } public func encode(to encoder: Encoder) throws { @@ -44,9 +44,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) - try? container.encodeIfPresent(retry, forKey: .retry) - 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 3d7f83f50c..928d9eb6fe 100644 --- a/Sources/code/application/models/Price1AppModelClass.swift +++ b/Sources/code/application/models/Price1AppModelClass.swift @@ -7,8 +7,6 @@ public extension ApplicationClient { Used By: Catalog */ class Price1: Codable { - public var maxEffective: Double? - public var minMarked: Double? public var minEffective: Double? @@ -17,9 +15,9 @@ public extension ApplicationClient { public var currency: String? - public enum CodingKeys: String, CodingKey { - case maxEffective = "max_effective" + public var maxEffective: Double? + public enum CodingKeys: String, CodingKey { case minMarked = "min_marked" case minEffective = "min_effective" @@ -27,11 +25,11 @@ public extension ApplicationClient { case maxMarked = "max_marked" 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.minMarked = minMarked self.minEffective = minEffective @@ -39,13 +37,15 @@ public extension ApplicationClient { self.maxMarked = maxMarked self.currency = currency + + self.maxEffective = maxEffective } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -53,7 +53,7 @@ public extension ApplicationClient { } 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) @@ -61,7 +61,7 @@ public extension ApplicationClient { } catch {} do { - minEffective = try container.decode(Double.self, forKey: .minEffective) + maxMarked = try container.decode(Double.self, forKey: .maxMarked) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -69,7 +69,7 @@ public extension ApplicationClient { } catch {} 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) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - currency = try container.decode(String.self, forKey: .currency) + maxEffective = try container.decode(Double.self, forKey: .maxEffective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -88,8 +88,6 @@ 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(minMarked, forKey: .minMarked) try? container.encodeIfPresent(minEffective, forKey: .minEffective) @@ -97,6 +95,8 @@ public extension ApplicationClient { try? container.encodeIfPresent(maxMarked, forKey: .maxMarked) 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 8d5c1b3921..0bd635771f 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 currencySymbol: String? + public var max: Double? public var min: Double? - public var max: Double? + public var currencySymbol: String? public var currencyCode: String? public enum CodingKeys: String, CodingKey { - case currencySymbol = "currency_symbol" + case max case min - case max + case currencySymbol = "currency_symbol" case currencyCode = "currency_code" } public init(currencyCode: String? = nil, currencySymbol: String? = nil, max: Double? = nil, min: Double? = nil) { - self.currencySymbol = currencySymbol + self.max = max self.min = min - self.max = max + self.currencySymbol = currencySymbol self.currencyCode = currencyCode } @@ -39,7 +39,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} 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) @@ -74,11 +74,11 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) + try? container.encodeIfPresent(max, forKey: .max) try? container.encodeIfPresent(min, forKey: .min) - try? container.encodeIfPresent(max, forKey: .max) + try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) } diff --git a/Sources/code/application/models/ProductBrandAppModelClass.swift b/Sources/code/application/models/ProductBrandAppModelClass.swift index 33421a866f..836bd9a3e8 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 name: String? - public var logo: Media? - public var uid: Int? + public var name: String? public var action: ProductListingAction? - public enum CodingKeys: String, CodingKey { - case name + public var uid: Int? + public enum CodingKeys: String, CodingKey { case logo - case uid + case name case action + + case uid } public init(action: ProductListingAction? = nil, logo: Media? = nil, name: String? = nil, uid: Int? = nil) { - self.name = name - self.logo = logo - self.uid = uid + self.name = name self.action = action + + 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 { - 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) @@ -55,7 +55,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) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - action = try container.decode(ProductListingAction.self, forKey: .action) + 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(logo, forKey: .logo) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(action, forKey: .action) + + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/ProductCompareResponseAppModelClass.swift b/Sources/code/application/models/ProductCompareResponseAppModelClass.swift index 44d1846f6e..58f8a7a2b2 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 items: [ProductDetail]? + public var title: String? public var subtitle: String? public var attributesMetadata: [AttributeMetadata]? - public var items: [ProductDetail]? - public enum CodingKeys: String, CodingKey { + case items + case title case subtitle case attributesMetadata = "attributes_metadata" - - case items } public init(attributesMetadata: [AttributeMetadata]? = nil, items: [ProductDetail]? = nil, subtitle: String? = nil, title: String? = nil) { + self.items = items + self.title = title self.subtitle = subtitle self.attributesMetadata = attributesMetadata - - self.items = items } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - title = try container.decode(String.self, forKey: .title) + 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 { - 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) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - attributesMetadata = try container.decode([AttributeMetadata].self, forKey: .attributesMetadata) + subtitle = try container.decode(String.self, forKey: .subtitle) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,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) @@ -74,13 +74,13 @@ 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(title, forKey: .title) try? container.encodeIfPresent(subtitle, forKey: .subtitle) try? container.encodeIfPresent(attributesMetadata, forKey: .attributesMetadata) - - try? container.encodeIfPresent(items, forKey: .items) } } } diff --git a/Sources/code/application/models/ProductDetailAppModelClass.swift b/Sources/code/application/models/ProductDetailAppModelClass.swift index 5ed4610c5f..99185f3847 100644 --- a/Sources/code/application/models/ProductDetailAppModelClass.swift +++ b/Sources/code/application/models/ProductDetailAppModelClass.swift @@ -9,114 +9,114 @@ public extension ApplicationClient { class ProductDetail: Codable { public var categories: [ProductBrand]? - public var discount: String? - - public var itemCode: String? - - public var attributes: [String: Any]? - public var color: String? - public var productOnlineDate: String? - public var description: String? - public var hasVariant: Bool? + public var itemType: String? - public var highlights: [String]? + public var ratingCount: Int? - public var type: String? + public var similars: [String]? - public var tryouts: [String]? + public var medias: [Media]? - public var price: ProductListingPrice? + public var action: ProductListingAction? - public var teaserTag: String? + public var tryouts: [String]? - public var ratingCount: Int? + public var itemCode: String? public var groupedAttributes: [ProductDetailGroupedAttribute]? - public var shortDescription: String? + public var hasVariant: Bool? - public var customJson: [String: Any]? + public var attributes: [String: Any]? - public var imageNature: String? + public var type: String? public var rating: Double? - public var slug: String + public var highlights: [String]? - public var name: String? + public var discount: String? + + public var price: ProductListingPrice? + + public var uid: Int? + + public var productOnlineDate: String? public var customMeta: [MetaFields]? - public var action: ProductListingAction? + public var slug: String - public var itemType: String? + public var name: String? - public var medias: [Media]? + public var shortDescription: String? - public var uid: Int? + public var customJson: [String: Any]? - public var similars: [String]? + public var teaserTag: String? + + public var imageNature: String? public var brand: ProductBrand? public enum CodingKeys: String, CodingKey { case categories - case discount - - case itemCode = "item_code" - - case attributes - case color - case productOnlineDate = "product_online_date" - case description - case hasVariant = "has_variant" + case itemType = "item_type" - case highlights + case ratingCount = "rating_count" - case type + case similars - case tryouts + case medias - case price + case action - case teaserTag = "teaser_tag" + case tryouts - case ratingCount = "rating_count" + case itemCode = "item_code" case groupedAttributes = "grouped_attributes" - case shortDescription = "short_description" + case hasVariant = "has_variant" - case customJson = "_custom_json" + case attributes - case imageNature = "image_nature" + case type case rating - case slug + case highlights - case name + case discount + + case price + + case uid + + case productOnlineDate = "product_online_date" case customMeta = "_custom_meta" - case action + case slug - case itemType = "item_type" + case name - case medias + case shortDescription = "short_description" - case uid + case customJson = "_custom_json" - case similars + case teaserTag = "teaser_tag" + + case imageNature = "image_nature" case brand } @@ -124,57 +124,57 @@ public extension ApplicationClient { 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.categories = categories - self.discount = discount - - self.itemCode = itemCode - - self.attributes = attributes - self.color = color - self.productOnlineDate = productOnlineDate - self.description = description - self.hasVariant = hasVariant + self.itemType = itemType - self.highlights = highlights + self.ratingCount = ratingCount - self.type = type + self.similars = similars - self.tryouts = tryouts + self.medias = medias - self.price = price + self.action = action - self.teaserTag = teaserTag + self.tryouts = tryouts - self.ratingCount = ratingCount + self.itemCode = itemCode self.groupedAttributes = groupedAttributes - self.shortDescription = shortDescription + self.hasVariant = hasVariant - self.customJson = customJson + self.attributes = attributes - self.imageNature = imageNature + self.type = type self.rating = rating - self.slug = slug + self.highlights = highlights - self.name = name + self.discount = discount + + self.price = price + + self.uid = uid + + self.productOnlineDate = productOnlineDate self.customMeta = customMeta - self.action = action + self.slug = slug - self.itemType = itemType + self.name = name - self.medias = medias + self.shortDescription = shortDescription - self.uid = uid + self.customJson = customJson - self.similars = similars + self.teaserTag = teaserTag + + self.imageNature = imageNature self.brand = brand } @@ -191,7 +191,7 @@ public extension ApplicationClient { } catch {} do { - discount = try container.decode(String.self, forKey: .discount) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -199,7 +199,7 @@ public extension ApplicationClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -207,7 +207,7 @@ public extension ApplicationClient { } catch {} do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -215,7 +215,7 @@ public extension ApplicationClient { } catch {} do { - color = try container.decode(String.self, forKey: .color) + ratingCount = try container.decode(Int.self, forKey: .ratingCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -223,7 +223,7 @@ public extension ApplicationClient { } catch {} do { - productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + similars = try container.decode([String].self, forKey: .similars) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -231,7 +231,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + medias = try container.decode([Media].self, forKey: .medias) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -239,7 +239,7 @@ public extension ApplicationClient { } catch {} do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + action = try container.decode(ProductListingAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -247,7 +247,7 @@ public extension ApplicationClient { } catch {} do { - highlights = try container.decode([String].self, forKey: .highlights) + tryouts = try container.decode([String].self, forKey: .tryouts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -255,7 +255,7 @@ public extension ApplicationClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -263,7 +263,7 @@ public extension ApplicationClient { } catch {} do { - tryouts = try container.decode([String].self, forKey: .tryouts) + groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -271,7 +271,7 @@ public extension ApplicationClient { } catch {} do { - price = try container.decode(ProductListingPrice.self, forKey: .price) + hasVariant = try container.decode(Bool.self, forKey: .hasVariant) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -279,7 +279,7 @@ public extension ApplicationClient { } catch {} do { - teaserTag = try container.decode(String.self, forKey: .teaserTag) + attributes = try container.decode([String: Any].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -287,7 +287,7 @@ public extension ApplicationClient { } catch {} 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) @@ -295,7 +295,7 @@ public extension ApplicationClient { } catch {} do { - groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) + rating = try container.decode(Double.self, forKey: .rating) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -303,7 +303,7 @@ public extension ApplicationClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + highlights = try container.decode([String].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -311,7 +311,7 @@ public extension ApplicationClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -319,7 +319,7 @@ public extension ApplicationClient { } catch {} do { - imageNature = try container.decode(String.self, forKey: .imageNature) + price = try container.decode(ProductListingPrice.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -327,17 +327,15 @@ public extension ApplicationClient { } catch {} do { - rating = try container.decode(Double.self, forKey: .rating) + 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 {} - slug = try container.decode(String.self, forKey: .slug) - do { - name = try container.decode(String.self, forKey: .name) + productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -352,8 +350,10 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} + slug = try container.decode(String.self, forKey: .slug) + 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) @@ -361,7 +361,7 @@ public extension ApplicationClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -369,7 +369,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) @@ -377,7 +377,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + teaserTag = try container.decode(String.self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -385,7 +385,7 @@ public extension ApplicationClient { } catch {} do { - similars = try container.decode([String].self, forKey: .similars) + imageNature = try container.decode(String.self, forKey: .imageNature) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -406,57 +406,57 @@ public extension ApplicationClient { try? container.encodeIfPresent(categories, forKey: .categories) - try? container.encodeIfPresent(discount, forKey: .discount) - - try? container.encodeIfPresent(itemCode, forKey: .itemCode) - - try? container.encodeIfPresent(attributes, forKey: .attributes) - try? container.encodeIfPresent(color, forKey: .color) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) - try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(highlights, forKey: .highlights) + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(similars, forKey: .similars) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) + try? container.encodeIfPresent(medias, forKey: .medias) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + try? container.encodeIfPresent(tryouts, forKey: .tryouts) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(attributes, forKey: .attributes) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(type, forKey: .type) try? container.encodeIfPresent(rating, forKey: .rating) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(highlights, forKey: .highlights) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(discount, forKey: .discount) + + try? container.encodeIfPresent(price, forKey: .price) + + try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) try? container.encodeIfPresent(customMeta, forKey: .customMeta) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(medias, forKey: .medias) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(similars, forKey: .similars) + try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + + try? container.encodeIfPresent(imageNature, forKey: .imageNature) try? container.encodeIfPresent(brand, forKey: .brand) } diff --git a/Sources/code/application/models/ProductDetailAttributeAppModelClass.swift b/Sources/code/application/models/ProductDetailAttributeAppModelClass.swift index d9f76b7bd9..79bfdc8585 100644 --- a/Sources/code/application/models/ProductDetailAttributeAppModelClass.swift +++ b/Sources/code/application/models/ProductDetailAttributeAppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class ProductDetailAttribute: Codable { + public var value: String? + public var key: String? public var type: String? - public var value: String? - public enum CodingKeys: String, CodingKey { + case value + case key case type - - case value } public init(key: String? = nil, type: String? = nil, value: String? = nil) { + self.value = value + self.key = key self.type = type - - self.value = value } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - key = try container.decode(String.self, forKey: .key) + value = try container.decode(String.self, forKey: .value) } 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) + key = try container.decode(String.self, forKey: .key) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} 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) @@ -60,11 +60,11 @@ 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(key, forKey: .key) try? container.encodeIfPresent(type, forKey: .type) - - try? container.encodeIfPresent(value, forKey: .value) } } } diff --git a/Sources/code/application/models/ProductDetailGroupedAttributeAppModelClass.swift b/Sources/code/application/models/ProductDetailGroupedAttributeAppModelClass.swift index 19b9658bab..360763843d 100644 --- a/Sources/code/application/models/ProductDetailGroupedAttributeAppModelClass.swift +++ b/Sources/code/application/models/ProductDetailGroupedAttributeAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class ProductDetailGroupedAttribute: Codable { - public var title: String? - public var details: [ProductDetailAttribute]? - public enum CodingKeys: String, CodingKey { - case title + public var title: String? + public enum CodingKeys: String, CodingKey { case details + + case title } public init(details: [ProductDetailAttribute]? = nil, title: String? = nil) { - self.title = title - self.details = details + + self.title = title } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} 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) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(details, forKey: .details) + + try? container.encodeIfPresent(title, forKey: .title) } } } diff --git a/Sources/code/application/models/ProductDetailsAppModelClass.swift b/Sources/code/application/models/ProductDetailsAppModelClass.swift index e0e8ce138a..ab90cf097e 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 brandUid: Int? + + public var description: String? + + public var ratingCount: Int? + public var countryOfOrigin: String? public var itemCode: String? - public var attributes: [String: Any]? + public var groupedAttributes: [String: Any]? - public var hsnCode: Int? + public var images: [[String: Any]]? - public var description: String? + public var media: [[String: Any]]? + + public var identifier: [String: Any]? public var hasVariant: Bool? - public var media: [[String: Any]]? + public var attributes: [String: Any]? public var templateTag: String? + public var rating: Double? + public var isSet: Bool? - public var outOfStock: Bool? + public var hsnCode: Int? - public var brandUid: Int? + public var outOfStock: Bool? - public var ratingCount: Int? + public var name: String? - public var groupedAttributes: [String: Any]? + public var slug: String? public var shortDescription: String? - public var images: [[String: Any]]? - public var imageNature: String? - public var identifier: [String: Any]? - - public var slug: String? + public enum CodingKeys: String, CodingKey { + case brandUid = "brand_uid" - public var rating: Double? + case description - public var name: String? + case ratingCount = "rating_count" - public enum CodingKeys: String, CodingKey { case countryOfOrigin = "country_of_origin" case itemCode = "item_code" - case attributes + case groupedAttributes = "grouped_attributes" - case hsnCode = "hsn_code" + case images - case description + case media + + case identifier case hasVariant = "has_variant" - case media + case attributes case templateTag = "template_tag" + case rating + case isSet = "is_set" - case outOfStock = "out_of_stock" + case hsnCode = "hsn_code" - case brandUid = "brand_uid" + case outOfStock = "out_of_stock" - case ratingCount = "rating_count" + case name - case groupedAttributes = "grouped_attributes" + case slug case shortDescription = "short_description" - case images - case imageNature = "image_nature" + } - case identifier - - case slug + 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.brandUid = brandUid - case rating + self.description = description - case name - } + self.ratingCount = ratingCount - 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.countryOfOrigin = countryOfOrigin self.itemCode = itemCode - self.attributes = attributes + self.groupedAttributes = groupedAttributes - self.hsnCode = hsnCode + self.images = images - self.description = description + self.media = media + + self.identifier = identifier self.hasVariant = hasVariant - self.media = media + self.attributes = attributes self.templateTag = templateTag + self.rating = rating + self.isSet = isSet - self.outOfStock = outOfStock + self.hsnCode = hsnCode - self.brandUid = brandUid + self.outOfStock = outOfStock - self.ratingCount = ratingCount + self.name = name - self.groupedAttributes = groupedAttributes + self.slug = slug self.shortDescription = shortDescription - self.images = images - self.imageNature = imageNature - - self.identifier = identifier - - self.slug = slug - - self.rating = rating - - self.name = name } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) + brandUid = try container.decode(Int.self, forKey: .brandUid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -143,7 +143,7 @@ public extension ApplicationClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -151,7 +151,7 @@ public extension ApplicationClient { } catch {} do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + ratingCount = try container.decode(Int.self, forKey: .ratingCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -159,7 +159,7 @@ public extension ApplicationClient { } catch {} do { - hsnCode = try container.decode(Int.self, forKey: .hsnCode) + countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -167,7 +167,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -175,7 +175,7 @@ public extension ApplicationClient { } catch {} do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + groupedAttributes = try container.decode([String: Any].self, forKey: .groupedAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -183,7 +183,7 @@ public extension ApplicationClient { } catch {} do { - media = try container.decode([[String: Any]].self, forKey: .media) + images = try container.decode([[String: Any]].self, forKey: .images) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -191,7 +191,7 @@ public extension ApplicationClient { } catch {} do { - templateTag = try container.decode(String.self, forKey: .templateTag) + media = try container.decode([[String: Any]].self, forKey: .media) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -199,7 +199,7 @@ public extension ApplicationClient { } catch {} do { - isSet = try container.decode(Bool.self, forKey: .isSet) + identifier = try container.decode([String: Any].self, forKey: .identifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -207,7 +207,7 @@ public extension ApplicationClient { } catch {} do { - outOfStock = try container.decode(Bool.self, forKey: .outOfStock) + 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 { - brandUid = try container.decode(Int.self, forKey: .brandUid) + attributes = try container.decode([String: Any].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -223,7 +223,7 @@ public extension ApplicationClient { } catch {} do { - ratingCount = try container.decode(Int.self, forKey: .ratingCount) + templateTag = try container.decode(String.self, forKey: .templateTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -231,7 +231,7 @@ public extension ApplicationClient { } catch {} do { - groupedAttributes = try container.decode([String: Any].self, forKey: .groupedAttributes) + rating = try container.decode(Double.self, forKey: .rating) } 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 { - images = try container.decode([[String: Any]].self, forKey: .images) + hsnCode = try container.decode(Int.self, forKey: .hsnCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -255,7 +255,7 @@ public extension ApplicationClient { } catch {} do { - imageNature = try container.decode(String.self, forKey: .imageNature) + outOfStock = try container.decode(Bool.self, forKey: .outOfStock) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -263,7 +263,7 @@ public extension ApplicationClient { } 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) @@ -279,7 +279,7 @@ public extension ApplicationClient { } catch {} do { - rating = try container.decode(Double.self, forKey: .rating) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -287,7 +287,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + imageNature = try container.decode(String.self, forKey: .imageNature) } 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(brandUid, forKey: .brandUid) + + try? container.encodeIfPresent(description, forKey: .description) + + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(attributes, forKey: .attributes) + try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) - try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) + try? container.encodeIfPresent(images, forKey: .images) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(media, forKey: .media) + + try? container.encodeIfPresent(identifier, forKey: .identifier) try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) - try? container.encodeIfPresent(media, forKey: .media) + try? container.encodeIfPresent(attributes, forKey: .attributes) try? container.encodeIfPresent(templateTag, forKey: .templateTag) + try? container.encodeIfPresent(rating, forKey: .rating) + try? container.encodeIfPresent(isSet, forKey: .isSet) - try? container.encodeIfPresent(outOfStock, forKey: .outOfStock) + try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) - try? container.encodeIfPresent(brandUid, forKey: .brandUid) + try? container.encodeIfPresent(outOfStock, forKey: .outOfStock) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(slug, forKey: .slug) try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(images, forKey: .images) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) - - try? container.encodeIfPresent(identifier, forKey: .identifier) - - try? container.encodeIfPresent(slug, forKey: .slug) - - try? container.encodeIfPresent(rating, forKey: .rating) - - try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/application/models/ProductFiltersKeyAppModelClass.swift b/Sources/code/application/models/ProductFiltersKeyAppModelClass.swift index 75d78a59f9..0560313d3e 100644 --- a/Sources/code/application/models/ProductFiltersKeyAppModelClass.swift +++ b/Sources/code/application/models/ProductFiltersKeyAppModelClass.swift @@ -7,49 +7,47 @@ public extension ApplicationClient { Used By: Catalog */ class ProductFiltersKey: Codable { - public var kind: String? - - public var display: String - public var logo: String? - public var name: String + public var kind: String? - public enum CodingKeys: String, CodingKey { - case kind + public var name: String - case display + public var display: String + public enum CodingKeys: String, CodingKey { case logo + case kind + case name + + case display } public init(display: String, kind: String? = nil, logo: String? = nil, name: String) { - self.kind = kind - - self.display = display - self.logo = logo + self.kind = kind + self.name = name + + self.display = display } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - kind = try container.decode(String.self, forKey: .kind) + logo = try container.decode(String.self, forKey: .logo) } 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 { - logo = try container.decode(String.self, forKey: .logo) + kind = try container.decode(String.self, forKey: .kind) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -57,18 +55,20 @@ public extension ApplicationClient { } catch {} name = try container.decode(String.self, forKey: .name) + + 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(kind, forKey: .kind) - - try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(kind, forKey: .kind) + try? container.encodeIfPresent(name, forKey: .name) + + try? container.encodeIfPresent(display, forKey: .display) } } } diff --git a/Sources/code/application/models/ProductFiltersValueAppModelClass.swift b/Sources/code/application/models/ProductFiltersValueAppModelClass.swift index 2eb1d58cf0..7fe6f0f84e 100644 --- a/Sources/code/application/models/ProductFiltersValueAppModelClass.swift +++ b/Sources/code/application/models/ProductFiltersValueAppModelClass.swift @@ -7,87 +7,87 @@ public extension ApplicationClient { Used By: Catalog */ class ProductFiltersValue: Codable { - public var queryFormat: String? - - public var count: Int? - - public var selectedMin: Int? - - public var isSelected: Bool - - public var value: String? - public var max: Int? - public var selectedMax: Int? + public var value: String? public var displayFormat: String? - public var currencySymbol: String? + public var selectedMin: Int? public var min: Int? - public var display: String + public var queryFormat: String? - public var currencyCode: String? + public var display: String - public enum CodingKeys: String, CodingKey { - case queryFormat = "query_format" + public var currencySymbol: String? - case count + public var currencyCode: String? - case selectedMin = "selected_min" + public var isSelected: Bool - case isSelected = "is_selected" + public var count: Int? - case value + public var selectedMax: Int? + public enum CodingKeys: String, CodingKey { case max - case selectedMax = "selected_max" + case value case displayFormat = "display_format" - case currencySymbol = "currency_symbol" + case selectedMin = "selected_min" case min - case display + case queryFormat = "query_format" - case currencyCode = "currency_code" - } + 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.queryFormat = queryFormat + case currencySymbol = "currency_symbol" - self.count = count + case currencyCode = "currency_code" - self.selectedMin = selectedMin + case isSelected = "is_selected" - self.isSelected = isSelected + case count - self.value = value + case selectedMax = "selected_max" + } + 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.max = max - self.selectedMax = selectedMax + self.value = value self.displayFormat = displayFormat - self.currencySymbol = currencySymbol + self.selectedMin = selectedMin self.min = min + self.queryFormat = queryFormat + self.display = display + self.currencySymbol = currencySymbol + self.currencyCode = currencyCode + + self.isSelected = isSelected + + self.count = count + + self.selectedMax = selectedMax } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - queryFormat = try container.decode(String.self, forKey: .queryFormat) + max = try container.decode(Int.self, forKey: .max) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -95,7 +95,7 @@ public extension ApplicationClient { } catch {} do { - count = try container.decode(Int.self, forKey: .count) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -103,17 +103,15 @@ 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) print("codingPath:", context.codingPath) } catch {} - isSelected = try container.decode(Bool.self, forKey: .isSelected) - do { - value = try container.decode(String.self, forKey: .value) + selectedMin = try container.decode(Int.self, forKey: .selectedMin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -121,7 +119,7 @@ public extension ApplicationClient { } 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) @@ -129,15 +127,17 @@ public extension ApplicationClient { } catch {} do { - selectedMax = try container.decode(Int.self, forKey: .selectedMax) + 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 { - displayFormat = try container.decode(String.self, forKey: .displayFormat) + currencySymbol = try container.decode(String.self, forKey: .currencySymbol) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -145,25 +145,25 @@ public extension ApplicationClient { } catch {} do { - currencySymbol = try container.decode(String.self, forKey: .currencySymbol) + currencyCode = try container.decode(String.self, forKey: .currencyCode) } 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 { - min = try container.decode(Int.self, forKey: .min) + count = try container.decode(Int.self, forKey: .count) } 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 { - currencyCode = try container.decode(String.self, forKey: .currencyCode) + selectedMax = try container.decode(Int.self, forKey: .selectedMax) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,29 +174,29 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(queryFormat, forKey: .queryFormat) - - try? container.encodeIfPresent(count, forKey: .count) - - try? container.encodeIfPresent(selectedMin, forKey: .selectedMin) - - try? container.encodeIfPresent(isSelected, forKey: .isSelected) - - try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(max, forKey: .max) - try? container.encodeIfPresent(selectedMax, forKey: .selectedMax) + try? container.encodeIfPresent(value, forKey: .value) try? container.encodeIfPresent(displayFormat, forKey: .displayFormat) - try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) + try? container.encodeIfPresent(selectedMin, forKey: .selectedMin) try? container.encodeIfPresent(min, forKey: .min) + try? container.encodeIfPresent(queryFormat, forKey: .queryFormat) + try? container.encodeIfPresent(display, forKey: .display) + try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) + try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) + + try? container.encodeIfPresent(isSelected, forKey: .isSelected) + + try? container.encodeIfPresent(count, forKey: .count) + + try? container.encodeIfPresent(selectedMax, forKey: .selectedMax) } } } diff --git a/Sources/code/application/models/ProductListingActionAppModelClass.swift b/Sources/code/application/models/ProductListingActionAppModelClass.swift index 633c961d0a..9223287563 100644 --- a/Sources/code/application/models/ProductListingActionAppModelClass.swift +++ b/Sources/code/application/models/ProductListingActionAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class ProductListingAction: Codable { - public var type: String? - public var page: ProductListingActionPage? - public enum CodingKeys: String, CodingKey { - case type + public var type: String? + public enum CodingKeys: String, CodingKey { case page + + case type } public init(page: ProductListingActionPage? = nil, type: String? = nil) { - self.type = type - self.page = page + + 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) + page = try container.decode(ProductListingActionPage.self, forKey: .page) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - page = try container.decode(ProductListingActionPage.self, forKey: .page) + type = try container.decode(String.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(page, forKey: .page) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/application/models/ProductListingActionPageAppModelClass.swift b/Sources/code/application/models/ProductListingActionPageAppModelClass.swift index 19984edbb9..583f1c4880 100644 --- a/Sources/code/application/models/ProductListingActionPageAppModelClass.swift +++ b/Sources/code/application/models/ProductListingActionPageAppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class ProductListingActionPage: Codable { - public var type: String? - public var params: [String: Any]? public var query: [String: Any]? - public enum CodingKeys: String, CodingKey { - case type + public var type: String? + public enum CodingKeys: String, CodingKey { case params case query + + case type } public init(params: [String: Any]? = nil, query: [String: Any]? = nil, type: String? = nil) { - self.type = type - self.params = params self.query = query + + 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) + params = try container.decode([String: Any].self, forKey: .params) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - params = try container.decode([String: Any].self, forKey: .params) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension ApplicationClient { } catch {} 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) @@ -60,11 +60,11 @@ 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(params, forKey: .params) try? container.encodeIfPresent(query, forKey: .query) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/application/models/ProductListingDetailAppModelClass.swift b/Sources/code/application/models/ProductListingDetailAppModelClass.swift index a3fcb4b115..0387b385cc 100644 --- a/Sources/code/application/models/ProductListingDetailAppModelClass.swift +++ b/Sources/code/application/models/ProductListingDetailAppModelClass.swift @@ -9,122 +9,122 @@ public extension ApplicationClient { class ProductListingDetail: Codable { public var categories: [ProductBrand]? - public var sellable: Bool? - - public var discount: String? - - public var itemCode: String? - - public var attributes: [String: Any]? - public var color: String? - public var productOnlineDate: String? - public var description: String? - public var hasVariant: Bool? + public var itemType: String? - public var highlights: [String]? + public var ratingCount: Int? - public var type: String? + public var similars: [String]? - public var tryouts: [String]? + public var medias: [Media]? - public var price: ProductListingPrice? + public var action: ProductListingAction? - public var teaserTag: String? + public var tryouts: [String]? - public var ratingCount: Int? + public var itemCode: String? public var groupedAttributes: [ProductDetailGroupedAttribute]? - public var shortDescription: String? + public var hasVariant: Bool? - public var customJson: [String: Any]? + public var attributes: [String: Any]? - public var imageNature: String? + public var type: String? public var rating: Double? - public var slug: String + public var highlights: [String]? + + public var discount: String? public var variants: [ProductVariantListingResponse]? - public var name: String? + public var price: ProductListingPrice? - public var customMeta: [MetaFields]? + public var uid: Int? - public var action: ProductListingAction? + public var productOnlineDate: String? - public var itemType: String? + public var sellable: Bool? - public var medias: [Media]? + public var customMeta: [MetaFields]? - public var uid: Int? + public var slug: String - public var similars: [String]? + public var name: String? - public var brand: ProductBrand? + public var shortDescription: String? - public enum CodingKeys: String, CodingKey { - case categories + public var customJson: [String: Any]? - case sellable + public var teaserTag: String? - case discount + public var imageNature: String? - case itemCode = "item_code" + public var brand: ProductBrand? - case attributes + public enum CodingKeys: String, CodingKey { + case categories case color - case productOnlineDate = "product_online_date" - case description - case hasVariant = "has_variant" + case itemType = "item_type" - case highlights + case ratingCount = "rating_count" - case type + case similars - case tryouts + case medias - case price + case action - case teaserTag = "teaser_tag" + case tryouts - case ratingCount = "rating_count" + case itemCode = "item_code" case groupedAttributes = "grouped_attributes" - case shortDescription = "short_description" + case hasVariant = "has_variant" - case customJson = "_custom_json" + case attributes - case imageNature = "image_nature" + case type case rating - case slug + case highlights + + case discount case variants - case name + case price + + case uid + + case productOnlineDate = "product_online_date" + + case sellable case customMeta = "_custom_meta" - case action + case slug - case itemType = "item_type" + case name - case medias + case shortDescription = "short_description" - case uid + case customJson = "_custom_json" - case similars + case teaserTag = "teaser_tag" + + case imageNature = "image_nature" case brand } @@ -132,61 +132,61 @@ public extension ApplicationClient { 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.categories = categories - self.sellable = sellable - - self.discount = discount - - self.itemCode = itemCode - - self.attributes = attributes - self.color = color - self.productOnlineDate = productOnlineDate - self.description = description - self.hasVariant = hasVariant + self.itemType = itemType - self.highlights = highlights + self.ratingCount = ratingCount - self.type = type + self.similars = similars - self.tryouts = tryouts + self.medias = medias - self.price = price + self.action = action - self.teaserTag = teaserTag + self.tryouts = tryouts - self.ratingCount = ratingCount + self.itemCode = itemCode self.groupedAttributes = groupedAttributes - self.shortDescription = shortDescription + self.hasVariant = hasVariant - self.customJson = customJson + self.attributes = attributes - self.imageNature = imageNature + self.type = type self.rating = rating - self.slug = slug + self.highlights = highlights + + self.discount = discount self.variants = variants - self.name = name + self.price = price + + self.uid = uid + + self.productOnlineDate = productOnlineDate + + self.sellable = sellable self.customMeta = customMeta - self.action = action + self.slug = slug - self.itemType = itemType + self.name = name - self.medias = medias + self.shortDescription = shortDescription - self.uid = uid + self.customJson = customJson - self.similars = similars + self.teaserTag = teaserTag + + self.imageNature = imageNature self.brand = brand } @@ -203,7 +203,7 @@ public extension ApplicationClient { } catch {} do { - sellable = try container.decode(Bool.self, forKey: .sellable) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -211,7 +211,7 @@ public extension ApplicationClient { } catch {} do { - discount = try container.decode(String.self, forKey: .discount) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -219,7 +219,7 @@ public extension ApplicationClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -227,7 +227,7 @@ public extension ApplicationClient { } catch {} do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + ratingCount = try container.decode(Int.self, forKey: .ratingCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -235,7 +235,7 @@ public extension ApplicationClient { } catch {} do { - color = try container.decode(String.self, forKey: .color) + similars = try container.decode([String].self, forKey: .similars) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -243,7 +243,7 @@ public extension ApplicationClient { } catch {} do { - productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + medias = try container.decode([Media].self, forKey: .medias) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -251,7 +251,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) @@ -259,7 +259,7 @@ public extension ApplicationClient { } catch {} do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + tryouts = try container.decode([String].self, forKey: .tryouts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -267,7 +267,7 @@ public extension ApplicationClient { } catch {} do { - highlights = try container.decode([String].self, forKey: .highlights) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -275,7 +275,7 @@ public extension ApplicationClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -283,7 +283,7 @@ public extension ApplicationClient { } catch {} do { - tryouts = try container.decode([String].self, forKey: .tryouts) + hasVariant = try container.decode(Bool.self, forKey: .hasVariant) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -291,7 +291,7 @@ public extension ApplicationClient { } catch {} do { - price = try container.decode(ProductListingPrice.self, forKey: .price) + attributes = try container.decode([String: Any].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -299,7 +299,7 @@ public extension ApplicationClient { } catch {} do { - teaserTag = try container.decode(String.self, forKey: .teaserTag) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -307,7 +307,7 @@ public extension ApplicationClient { } catch {} do { - ratingCount = try container.decode(Int.self, forKey: .ratingCount) + rating = try container.decode(Double.self, forKey: .rating) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -315,7 +315,7 @@ public extension ApplicationClient { } catch {} do { - groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) + highlights = try container.decode([String].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -323,7 +323,7 @@ public extension ApplicationClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -331,7 +331,7 @@ public extension ApplicationClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + variants = try container.decode([ProductVariantListingResponse].self, forKey: .variants) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -339,7 +339,7 @@ public extension ApplicationClient { } catch {} do { - imageNature = try container.decode(String.self, forKey: .imageNature) + price = try container.decode(ProductListingPrice.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -347,17 +347,15 @@ public extension ApplicationClient { } catch {} do { - rating = try container.decode(Double.self, forKey: .rating) + 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 {} - slug = try container.decode(String.self, forKey: .slug) - do { - variants = try container.decode([ProductVariantListingResponse].self, forKey: .variants) + productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -365,7 +363,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + sellable = try container.decode(Bool.self, forKey: .sellable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -380,8 +378,10 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} + slug = try container.decode(String.self, forKey: .slug) + 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) @@ -389,7 +389,7 @@ public extension ApplicationClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -397,7 +397,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) @@ -405,7 +405,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + teaserTag = try container.decode(String.self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -413,7 +413,7 @@ public extension ApplicationClient { } catch {} do { - similars = try container.decode([String].self, forKey: .similars) + imageNature = try container.decode(String.self, forKey: .imageNature) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -434,61 +434,61 @@ public extension ApplicationClient { try? container.encodeIfPresent(categories, forKey: .categories) - try? container.encodeIfPresent(sellable, forKey: .sellable) - - try? container.encodeIfPresent(discount, forKey: .discount) - - try? container.encodeIfPresent(itemCode, forKey: .itemCode) - - try? container.encodeIfPresent(attributes, forKey: .attributes) - try? container.encodeIfPresent(color, forKey: .color) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) - try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(highlights, forKey: .highlights) + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(similars, forKey: .similars) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) + try? container.encodeIfPresent(medias, forKey: .medias) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + try? container.encodeIfPresent(tryouts, forKey: .tryouts) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(attributes, forKey: .attributes) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(type, forKey: .type) try? container.encodeIfPresent(rating, forKey: .rating) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(highlights, forKey: .highlights) + + try? container.encodeIfPresent(discount, forKey: .discount) try? container.encodeIfPresent(variants, forKey: .variants) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(price, forKey: .price) + + try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) + + try? container.encodeIfPresent(sellable, forKey: .sellable) try? container.encodeIfPresent(customMeta, forKey: .customMeta) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(medias, forKey: .medias) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(similars, forKey: .similars) + try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + + try? container.encodeIfPresent(imageNature, forKey: .imageNature) try? container.encodeIfPresent(brand, forKey: .brand) } diff --git a/Sources/code/application/models/ProductListingResponseAppModelClass.swift b/Sources/code/application/models/ProductListingResponseAppModelClass.swift index a9d62dcc8e..25f1ffec53 100644 --- a/Sources/code/application/models/ProductListingResponseAppModelClass.swift +++ b/Sources/code/application/models/ProductListingResponseAppModelClass.swift @@ -7,49 +7,47 @@ public extension ApplicationClient { Used By: Catalog */ class ProductListingResponse: Codable { - public var sortOn: [ProductSortOn]? + public var items: [ProductListingDetail]? - public var page: Page + public var sortOn: [ProductSortOn]? public var filters: [ProductFilters]? - public var items: [ProductListingDetail]? + public var page: Page public enum CodingKeys: String, CodingKey { - case sortOn = "sort_on" + case items - case page + case sortOn = "sort_on" case filters - case items + 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.sortOn = sortOn self.filters = filters - self.items = items + 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) 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) @@ -57,24 +55,26 @@ 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) } 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(sortOn, forKey: .sortOn) try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(items, forKey: .items) + try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/application/models/ProductSetV2AppModelClass.swift b/Sources/code/application/models/ProductSetV2AppModelClass.swift index 113cdfd617..3aeaad21d5 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 sizeDistribution: ProductSetDistributionV2? - public var quantity: Int? - public enum CodingKeys: String, CodingKey { - case sizeDistribution = "size_distribution" + public var sizeDistribution: ProductSetDistributionV2? + public enum CodingKeys: String, CodingKey { case quantity + + case sizeDistribution = "size_distribution" } public init(quantity: Int? = nil, sizeDistribution: ProductSetDistributionV2? = nil) { - self.sizeDistribution = sizeDistribution - self.quantity = quantity + + self.sizeDistribution = sizeDistribution } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} 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) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(sizeDistribution, forKey: .sizeDistribution) - try? container.encodeIfPresent(quantity, forKey: .quantity) + + try? container.encodeIfPresent(sizeDistribution, forKey: .sizeDistribution) } } } diff --git a/Sources/code/application/models/ProductSimilarItemAppModelClass.swift b/Sources/code/application/models/ProductSimilarItemAppModelClass.swift index 0b8d2c4f20..db586d7dba 100644 --- a/Sources/code/application/models/ProductSimilarItemAppModelClass.swift +++ b/Sources/code/application/models/ProductSimilarItemAppModelClass.swift @@ -7,33 +7,33 @@ public extension ApplicationClient { Used By: Catalog */ class ProductSimilarItem: Codable { + public var items: [ProductDetail]? + public var title: String? public var subtitle: String? - public var items: [ProductDetail]? - public enum CodingKeys: String, CodingKey { + case items + case title case subtitle - - case items } public init(items: [ProductDetail]? = nil, subtitle: String? = nil, title: String? = nil) { + self.items = items + self.title = title self.subtitle = subtitle - - self.items = items } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - title = try container.decode(String.self, forKey: .title) + items = try container.decode([ProductDetail].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 { - 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 { - items = try container.decode([ProductDetail].self, forKey: .items) + subtitle = try container.decode(String.self, forKey: .subtitle) } 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(items, forKey: .items) + try? container.encodeIfPresent(title, forKey: .title) try? container.encodeIfPresent(subtitle, forKey: .subtitle) - - try? container.encodeIfPresent(items, forKey: .items) } } } diff --git a/Sources/code/application/models/ProductSizeAppModelClass.swift b/Sources/code/application/models/ProductSizeAppModelClass.swift index d69e8b7a84..0e1a318848 100644 --- a/Sources/code/application/models/ProductSizeAppModelClass.swift +++ b/Sources/code/application/models/ProductSizeAppModelClass.swift @@ -7,30 +7,30 @@ public extension ApplicationClient { Used By: Catalog */ class ProductSize: Codable { - public var isAvailable: Bool? + public var quantity: Int? public var value: String? - public var quantity: Int? + public var isAvailable: Bool? public var display: String? public enum CodingKeys: String, CodingKey { - case isAvailable = "is_available" + case quantity case value - case quantity + case isAvailable = "is_available" case display } public init(display: String? = nil, isAvailable: Bool? = nil, quantity: Int? = nil, value: String? = nil) { - self.isAvailable = isAvailable + self.quantity = quantity self.value = value - self.quantity = quantity + self.isAvailable = isAvailable self.display = display } @@ -39,7 +39,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - isAvailable = try container.decode(Bool.self, forKey: .isAvailable) + 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) + isAvailable = try container.decode(Bool.self, forKey: .isAvailable) } 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(isAvailable, forKey: .isAvailable) + try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) try? container.encodeIfPresent(display, forKey: .display) } diff --git a/Sources/code/application/models/ProductSizePriceResponseV2AppModelClass.swift b/Sources/code/application/models/ProductSizePriceResponseV2AppModelClass.swift index 560444d848..555dfa7df1 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 articleAssignment: ArticleAssignmentV2? + public var specialBadge: String? - public var pricePerPiece: ProductStockPriceV2? + public var pincode: Int? - public var price: ProductStockPriceV2? + public var itemType: String? - public var sellerCount: Int? + public var longLat: [Double]? public var set: ProductSetV2? + public var articleAssignment: ArticleAssignmentV2? + + public var pricePerPiece: ProductStockPriceV2? + + public var store: StoreV2? + + public var strategyWiseListing: [StrategyWiseListingSchemaV2]? + public var discount: String? - public var groupedAttributes: [SellerGroupAttributes]? + public var quantity: Int? public var returnConfig: ReturnConfigSchemaV2? - public var articleId: String? + public var groupedAttributes: [SellerGroupAttributes]? - public var longLat: [Double]? + public var seller: SellerV2? - public var strategyWiseListing: [StrategyWiseListingSchemaV2]? + public var articleId: String? - public var itemType: String? + public var sellerCount: Int? + + public var price: ProductStockPriceV2? public var marketplaceAttributes: [MarketPlaceSttributesSchemaV2]? - public var store: StoreV2? + public enum CodingKeys: String, CodingKey { + case specialBadge = "special_badge" - public var pincode: Int? + case pincode - public var specialBadge: String? + case itemType = "item_type" - public var quantity: Int? + case longLat = "long_lat" - public var seller: SellerV2? + case set - public enum CodingKeys: String, CodingKey { case articleAssignment = "article_assignment" case pricePerPiece = "price_per_piece" - case price - - case sellerCount = "seller_count" + case store - case set + case strategyWiseListing = "strategy_wise_listing" case discount - case groupedAttributes = "grouped_attributes" + case quantity case returnConfig = "return_config" - case articleId = "article_id" + case groupedAttributes = "grouped_attributes" - case longLat = "long_lat" + case seller - case strategyWiseListing = "strategy_wise_listing" + case articleId = "article_id" - case itemType = "item_type" + case sellerCount = "seller_count" + + case price case marketplaceAttributes = "marketplace_attributes" + } - case store + 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.specialBadge = specialBadge - case pincode + self.pincode = pincode - case specialBadge = "special_badge" + self.itemType = itemType - case quantity + self.longLat = longLat - case seller - } + self.set = set - 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.articleAssignment = articleAssignment self.pricePerPiece = pricePerPiece - self.price = price - - self.sellerCount = sellerCount + self.store = store - self.set = set + self.strategyWiseListing = strategyWiseListing self.discount = discount - self.groupedAttributes = groupedAttributes + self.quantity = quantity self.returnConfig = returnConfig - self.articleId = articleId - - self.longLat = longLat - - self.strategyWiseListing = strategyWiseListing - - self.itemType = itemType - - self.marketplaceAttributes = marketplaceAttributes + self.groupedAttributes = groupedAttributes - self.store = store + self.seller = seller - self.pincode = pincode + self.articleId = articleId - self.specialBadge = specialBadge + self.sellerCount = sellerCount - self.quantity = quantity + self.price = price - self.seller = seller + self.marketplaceAttributes = marketplaceAttributes } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - articleAssignment = try container.decode(ArticleAssignmentV2.self, forKey: .articleAssignment) + specialBadge = try container.decode(String.self, forKey: .specialBadge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -131,7 +131,7 @@ public extension ApplicationClient { } catch {} do { - pricePerPiece = try container.decode(ProductStockPriceV2.self, forKey: .pricePerPiece) + 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 { - price = try container.decode(ProductStockPriceV2.self, forKey: .price) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -147,7 +147,7 @@ public extension ApplicationClient { } catch {} do { - sellerCount = try container.decode(Int.self, forKey: .sellerCount) + longLat = try container.decode([Double].self, forKey: .longLat) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -163,7 +163,7 @@ public extension ApplicationClient { } catch {} do { - discount = try container.decode(String.self, forKey: .discount) + articleAssignment = try container.decode(ArticleAssignmentV2.self, forKey: .articleAssignment) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -171,7 +171,7 @@ public extension ApplicationClient { } catch {} do { - groupedAttributes = try container.decode([SellerGroupAttributes].self, forKey: .groupedAttributes) + pricePerPiece = try container.decode(ProductStockPriceV2.self, forKey: .pricePerPiece) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -179,7 +179,7 @@ public extension ApplicationClient { } catch {} do { - returnConfig = try container.decode(ReturnConfigSchemaV2.self, forKey: .returnConfig) + store = try container.decode(StoreV2.self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -187,7 +187,7 @@ public extension ApplicationClient { } catch {} do { - articleId = try container.decode(String.self, forKey: .articleId) + strategyWiseListing = try container.decode([StrategyWiseListingSchemaV2].self, forKey: .strategyWiseListing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -195,7 +195,7 @@ public extension ApplicationClient { } catch {} do { - longLat = try container.decode([Double].self, forKey: .longLat) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -203,7 +203,7 @@ public extension ApplicationClient { } catch {} do { - strategyWiseListing = try container.decode([StrategyWiseListingSchemaV2].self, forKey: .strategyWiseListing) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -211,7 +211,7 @@ public extension ApplicationClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + returnConfig = try container.decode(ReturnConfigSchemaV2.self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -219,7 +219,7 @@ public extension ApplicationClient { } catch {} do { - marketplaceAttributes = try container.decode([MarketPlaceSttributesSchemaV2].self, forKey: .marketplaceAttributes) + groupedAttributes = try container.decode([SellerGroupAttributes].self, forKey: .groupedAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -227,7 +227,7 @@ public extension ApplicationClient { } catch {} do { - store = try container.decode(StoreV2.self, forKey: .store) + seller = try container.decode(SellerV2.self, forKey: .seller) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -235,7 +235,7 @@ public extension ApplicationClient { } catch {} do { - pincode = try container.decode(Int.self, forKey: .pincode) + articleId = try container.decode(String.self, forKey: .articleId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -243,7 +243,7 @@ public extension ApplicationClient { } catch {} do { - specialBadge = try container.decode(String.self, forKey: .specialBadge) + sellerCount = try container.decode(Int.self, forKey: .sellerCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -251,7 +251,7 @@ public extension ApplicationClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + price = try container.decode(ProductStockPriceV2.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -259,7 +259,7 @@ public extension ApplicationClient { } catch {} do { - seller = try container.decode(SellerV2.self, forKey: .seller) + marketplaceAttributes = try container.decode([MarketPlaceSttributesSchemaV2].self, forKey: .marketplaceAttributes) } 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(articleAssignment, forKey: .articleAssignment) + try? container.encodeIfPresent(specialBadge, forKey: .specialBadge) - try? container.encodeIfPresent(pricePerPiece, forKey: .pricePerPiece) + try? container.encodeIfPresent(pincode, forKey: .pincode) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(sellerCount, forKey: .sellerCount) + try? container.encodeIfPresent(longLat, forKey: .longLat) try? container.encodeIfPresent(set, forKey: .set) - try? container.encodeIfPresent(discount, forKey: .discount) + try? container.encodeIfPresent(articleAssignment, forKey: .articleAssignment) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(pricePerPiece, forKey: .pricePerPiece) - try? container.encodeIfPresent(returnConfig, forKey: .returnConfig) + try? container.encodeIfPresent(store, forKey: .store) - try? container.encodeIfPresent(articleId, forKey: .articleId) + try? container.encodeIfPresent(strategyWiseListing, forKey: .strategyWiseListing) - try? container.encodeIfPresent(longLat, forKey: .longLat) + try? container.encodeIfPresent(discount, forKey: .discount) - try? container.encodeIfPresent(strategyWiseListing, forKey: .strategyWiseListing) + try? container.encodeIfPresent(quantity, forKey: .quantity) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(returnConfig, forKey: .returnConfig) - try? container.encodeIfPresent(marketplaceAttributes, forKey: .marketplaceAttributes) + try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) - try? container.encodeIfPresent(store, forKey: .store) + try? container.encodeIfPresent(seller, forKey: .seller) - try? container.encodeIfPresent(pincode, forKey: .pincode) + try? container.encodeIfPresent(articleId, forKey: .articleId) - try? container.encodeIfPresent(specialBadge, forKey: .specialBadge) + try? container.encodeIfPresent(sellerCount, forKey: .sellerCount) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(seller, forKey: .seller) + try? container.encodeIfPresent(marketplaceAttributes, forKey: .marketplaceAttributes) } } } diff --git a/Sources/code/application/models/ProductSizeSellersResponseV2AppModelClass.swift b/Sources/code/application/models/ProductSizeSellersResponseV2AppModelClass.swift index dc879961de..15595407e3 100644 --- a/Sources/code/application/models/ProductSizeSellersResponseV2AppModelClass.swift +++ b/Sources/code/application/models/ProductSizeSellersResponseV2AppModelClass.swift @@ -7,58 +7,58 @@ public extension ApplicationClient { Used By: Catalog */ class ProductSizeSellersResponseV2: Codable { + public var items: [ProductSizePriceResponseV2]? + public var sortOn: [ProductSizeSellerFilterSchemaV2]? public var page: Page - public var items: [ProductSizePriceResponseV2]? - public enum CodingKeys: String, CodingKey { + case items + case sortOn = "sort_on" case page - - case items } public init(items: [ProductSizePriceResponseV2]? = nil, page: Page, sortOn: [ProductSizeSellerFilterSchemaV2]? = nil) { + self.items = items + self.sortOn = sortOn self.page = page - - self.items = items } required public init(from decoder: Decoder) throws { 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) print("codingPath:", context.codingPath) } catch {} - page = try container.decode(Page.self, forKey: .page) - 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) 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(items, forKey: .items) + try? container.encodeIfPresent(sortOn, forKey: .sortOn) try? container.encodeIfPresent(page, forKey: .page) - - try? container.encodeIfPresent(items, forKey: .items) } } } diff --git a/Sources/code/application/models/ProductSizesAppModelClass.swift b/Sources/code/application/models/ProductSizesAppModelClass.swift index 73fea73afe..93fd225025 100644 --- a/Sources/code/application/models/ProductSizesAppModelClass.swift +++ b/Sources/code/application/models/ProductSizesAppModelClass.swift @@ -9,8 +9,6 @@ public extension ApplicationClient { class ProductSizes: Codable { public var stores: ProductSizeStores? - public var price: ProductListingPrice? - public var sellable: Bool? public var discount: String? @@ -19,11 +17,11 @@ public extension ApplicationClient { public var sizes: [ProductSize]? + public var price: ProductListingPrice? + public enum CodingKeys: String, CodingKey { case stores - case price - case sellable case discount @@ -31,13 +29,13 @@ public extension ApplicationClient { case sizeChart = "size_chart" case sizes + + case price } public init(discount: String? = nil, price: ProductListingPrice? = nil, sellable: Bool? = nil, sizes: [ProductSize]? = nil, sizeChart: SizeChart? = nil, stores: ProductSizeStores? = nil) { self.stores = stores - self.price = price - self.sellable = sellable self.discount = discount @@ -45,6 +43,8 @@ public extension ApplicationClient { self.sizeChart = sizeChart self.sizes = sizes + + self.price = price } required public init(from decoder: Decoder) throws { @@ -59,7 +59,7 @@ public extension ApplicationClient { } catch {} do { - price = try container.decode(ProductListingPrice.self, forKey: .price) + sellable = try container.decode(Bool.self, forKey: .sellable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -67,7 +67,7 @@ public extension ApplicationClient { } catch {} do { - sellable = try container.decode(Bool.self, forKey: .sellable) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,7 +75,7 @@ public extension ApplicationClient { } catch {} do { - discount = try container.decode(String.self, forKey: .discount) + sizeChart = try container.decode(SizeChart.self, forKey: .sizeChart) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -83,7 +83,7 @@ public extension ApplicationClient { } catch {} do { - sizeChart = try container.decode(SizeChart.self, forKey: .sizeChart) + 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 { - 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) @@ -104,8 +104,6 @@ public extension ApplicationClient { try? container.encodeIfPresent(stores, forKey: .stores) - try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(sellable, forKey: .sellable) try? container.encodeIfPresent(discount, forKey: .discount) @@ -113,6 +111,8 @@ public extension ApplicationClient { try? container.encodeIfPresent(sizeChart, forKey: .sizeChart) try? container.encodeIfPresent(sizes, forKey: .sizes) + + try? container.encodeIfPresent(price, forKey: .price) } } } diff --git a/Sources/code/application/models/ProductSortOnAppModelClass.swift b/Sources/code/application/models/ProductSortOnAppModelClass.swift index b2cb05d78b..e176b9db64 100644 --- a/Sources/code/application/models/ProductSortOnAppModelClass.swift +++ b/Sources/code/application/models/ProductSortOnAppModelClass.swift @@ -7,25 +7,25 @@ public extension ApplicationClient { Used By: Catalog */ class ProductSortOn: Codable { - public var name: String? - public var value: String? + public var name: String? + public var isSelected: Bool? public enum CodingKeys: String, CodingKey { - case name - case value + case name + case isSelected = "is_selected" } public init(isSelected: Bool? = nil, name: String? = nil, value: String? = nil) { - self.name = name - self.value = value + self.name = name + self.isSelected = isSelected } @@ -33,7 +33,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - value = try container.decode(String.self, forKey: .value) + name = try container.decode(String.self, forKey: .name) } 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(name, forKey: .name) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(isSelected, forKey: .isSelected) } } diff --git a/Sources/code/application/models/ProductStockPollingAppModelClass.swift b/Sources/code/application/models/ProductStockPollingAppModelClass.swift index ed15a63824..4285976ade 100644 --- a/Sources/code/application/models/ProductStockPollingAppModelClass.swift +++ b/Sources/code/application/models/ProductStockPollingAppModelClass.swift @@ -7,27 +7,25 @@ public extension ApplicationClient { Used By: Catalog */ class ProductStockPolling: Codable { - public var page: Page - public var items: [ProductStockStatusItem]? - public enum CodingKeys: String, CodingKey { - case page + public var page: Page + public enum CodingKeys: String, CodingKey { case items + + case page } public init(items: [ProductStockStatusItem]? = nil, page: Page) { - self.page = page - self.items = items + + self.page = page } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - page = try container.decode(Page.self, forKey: .page) - do { items = try container.decode([ProductStockStatusItem].self, forKey: .items) @@ -35,14 +33,16 @@ 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 { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(page, forKey: .page) - try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/application/models/ProductStockPriceAppModelClass.swift b/Sources/code/application/models/ProductStockPriceAppModelClass.swift index 7d82ad973b..afe43a2443 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 marked: Double? - public var effective: Double? public var currency: String? - public enum CodingKeys: String, CodingKey { - case marked + public var marked: Double? + public enum CodingKeys: String, CodingKey { case effective case currency + + case marked } public init(currency: String? = nil, effective: Double? = nil, marked: Double? = nil) { - self.marked = marked - self.effective = effective self.currency = currency + + self.marked = marked } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - marked = try container.decode(Double.self, forKey: .marked) + effective = try container.decode(Double.self, forKey: .effective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} 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) + marked = try container.decode(Double.self, forKey: .marked) } 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(marked, forKey: .marked) - try? container.encodeIfPresent(effective, forKey: .effective) try? container.encodeIfPresent(currency, forKey: .currency) + + try? container.encodeIfPresent(marked, forKey: .marked) } } } diff --git a/Sources/code/application/models/ProductStockPriceV2AppModelClass.swift b/Sources/code/application/models/ProductStockPriceV2AppModelClass.swift index 03cb14bbf4..b9d4039bd9 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 marked: Double? - public var effective: Double? public var currency: String? - public enum CodingKeys: String, CodingKey { - case marked + public var marked: Double? + public enum CodingKeys: String, CodingKey { case effective case currency + + case marked } public init(currency: String? = nil, effective: Double? = nil, marked: Double? = nil) { - self.marked = marked - self.effective = effective self.currency = currency + + self.marked = marked } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - marked = try container.decode(Double.self, forKey: .marked) + effective = try container.decode(Double.self, forKey: .effective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} 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) + marked = try container.decode(Double.self, forKey: .marked) } 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(marked, forKey: .marked) - try? container.encodeIfPresent(effective, forKey: .effective) try? container.encodeIfPresent(currency, forKey: .currency) + + try? container.encodeIfPresent(marked, forKey: .marked) } } } diff --git a/Sources/code/application/models/ProductStockStatusItemAppModelClass.swift b/Sources/code/application/models/ProductStockStatusItemAppModelClass.swift index 474f1cfc83..946de55404 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 price: ProductStockPrice? - - public var itemId: Int? - public var company: CompanyDetail? - public var size: String? + public var store: StoreDetail? - public var uid: String? + public var quantity: Int? - public var identifier: [String: Any]? + public var itemId: Int? - public var store: StoreDetail? + public var identifier: [String: Any]? - public var quantity: Int? + public var size: String? public var seller: Seller? - public enum CodingKeys: String, CodingKey { - case price + public var price: ProductStockPrice? - case itemId = "item_id" + public var uid: String? + public enum CodingKeys: String, CodingKey { case company - case size + case store - case uid + case quantity - case identifier + case itemId = "item_id" - case store + case identifier - case quantity + case size case seller - } - 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.price = price + case price - self.itemId = itemId + case uid + } + 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.company = company - self.size = size + self.store = store - self.uid = uid + self.quantity = quantity - self.identifier = identifier + self.itemId = itemId - self.store = store + self.identifier = identifier - self.quantity = quantity + self.size = size self.seller = seller + + self.price = price + + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - price = try container.decode(ProductStockPrice.self, forKey: .price) + company = try container.decode(CompanyDetail.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 { - itemId = try container.decode(Int.self, forKey: .itemId) + store = try container.decode(StoreDetail.self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,7 +85,7 @@ public extension ApplicationClient { } catch {} do { - company = try container.decode(CompanyDetail.self, forKey: .company) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +93,7 @@ public extension ApplicationClient { } catch {} do { - size = try container.decode(String.self, forKey: .size) + itemId = try container.decode(Int.self, forKey: .itemId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -101,7 +101,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(String.self, forKey: .uid) + identifier = try container.decode([String: Any].self, forKey: .identifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -109,7 +109,7 @@ public extension ApplicationClient { } catch {} do { - identifier = try container.decode([String: Any].self, forKey: .identifier) + size = try container.decode(String.self, forKey: .size) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -117,7 +117,7 @@ public extension ApplicationClient { } catch {} do { - store = try container.decode(StoreDetail.self, forKey: .store) + seller = try container.decode(Seller.self, forKey: .seller) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -125,7 +125,7 @@ public extension ApplicationClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + price = try container.decode(ProductStockPrice.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -133,7 +133,7 @@ public extension ApplicationClient { } catch {} do { - seller = try container.decode(Seller.self, forKey: .seller) + 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(price, forKey: .price) - - try? container.encodeIfPresent(itemId, forKey: .itemId) - try? container.encodeIfPresent(company, forKey: .company) - try? container.encodeIfPresent(size, forKey: .size) + try? container.encodeIfPresent(store, forKey: .store) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(quantity, forKey: .quantity) - try? container.encodeIfPresent(identifier, forKey: .identifier) + try? container.encodeIfPresent(itemId, forKey: .itemId) - try? container.encodeIfPresent(store, forKey: .store) + try? container.encodeIfPresent(identifier, forKey: .identifier) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(size, forKey: .size) try? container.encodeIfPresent(seller, forKey: .seller) + + try? container.encodeIfPresent(price, forKey: .price) + + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/ProductVariantItemResponseAppModelClass.swift b/Sources/code/application/models/ProductVariantItemResponseAppModelClass.swift index 143a0cef29..94aa9326c6 100644 --- a/Sources/code/application/models/ProductVariantItemResponseAppModelClass.swift +++ b/Sources/code/application/models/ProductVariantItemResponseAppModelClass.swift @@ -7,10 +7,16 @@ public extension ApplicationClient { Used By: Catalog */ class ProductVariantItemResponse: Codable { - public var name: String? + public var value: String? + + public var colorName: String? public var isAvailable: Bool? + public var slug: String? + + public var name: String? + public var action: ProductListingAction? public var color: String? @@ -19,16 +25,16 @@ public extension ApplicationClient { public var uid: Int? - public var colorName: String? + public enum CodingKeys: String, CodingKey { + case value - public var slug: String? + case colorName = "color_name" - public var value: String? + case isAvailable = "is_available" - public enum CodingKeys: String, CodingKey { - case name + case slug - case isAvailable = "is_available" + case name case action @@ -37,19 +43,19 @@ public extension ApplicationClient { case medias case uid - - case colorName = "color_name" - - case slug - - case value } 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.name = name + self.value = value + + self.colorName = colorName self.isAvailable = isAvailable + self.slug = slug + + self.name = name + self.action = action self.color = color @@ -57,19 +63,13 @@ public extension ApplicationClient { self.medias = medias self.uid = uid - - self.colorName = colorName - - self.slug = slug - - self.value = value } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - isAvailable = try container.decode(Bool.self, forKey: .isAvailable) + colorName = try container.decode(String.self, forKey: .colorName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,7 +85,7 @@ public extension ApplicationClient { } catch {} do { - action = try container.decode(ProductListingAction.self, forKey: .action) + isAvailable = try container.decode(Bool.self, forKey: .isAvailable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +93,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) @@ -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) @@ -109,7 +109,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) @@ -117,7 +117,7 @@ public extension ApplicationClient { } catch {} do { - colorName = try container.decode(String.self, forKey: .colorName) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -125,7 +125,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + medias = try container.decode([Media].self, forKey: .medias) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -133,7 +133,7 @@ public extension ApplicationClient { } catch {} do { - value = try container.decode(String.self, forKey: .value) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,10 +144,16 @@ 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(value, forKey: .value) + + try? container.encodeIfPresent(colorName, forKey: .colorName) try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) + try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(action, forKey: .action) try? container.encodeIfPresent(color, forKey: .color) @@ -155,12 +161,6 @@ public extension ApplicationClient { try? container.encodeIfPresent(medias, forKey: .medias) try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(colorName, forKey: .colorName) - - try? container.encodeIfPresent(slug, forKey: .slug) - - try? container.encodeIfPresent(value, forKey: .value) } } } diff --git a/Sources/code/application/models/ProductVariantListingResponseAppModelClass.swift b/Sources/code/application/models/ProductVariantListingResponseAppModelClass.swift index 24b47e9949..d975d61d62 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 header: String? - - public var key: String? - public var items: [ProductVariantItemResponse]? - public var displayType: String? - public var total: Int? - public enum CodingKeys: String, CodingKey { - case header + public var displayType: String? - case key + public var key: String? + + public var header: String? + public enum CodingKeys: String, CodingKey { case items + case total + case displayType = "display_type" - case total + case key + + case header } public init(displayType: String? = nil, header: String? = nil, items: [ProductVariantItemResponse]? = nil, key: String? = nil, total: Int? = nil) { - self.header = header - - self.key = key - self.items = items + self.total = total + self.displayType = displayType - self.total = total + self.key = key + + 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) + 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 { - key = try container.decode(String.self, forKey: .key) + 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 { - 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) @@ -69,7 +69,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) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - total = try container.decode(Int.self, forKey: .total) + 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(header, forKey: .header) - - try? container.encodeIfPresent(key, forKey: .key) - try? container.encodeIfPresent(items, forKey: .items) + try? container.encodeIfPresent(total, forKey: .total) + try? container.encodeIfPresent(displayType, forKey: .displayType) - try? container.encodeIfPresent(total, forKey: .total) + try? container.encodeIfPresent(key, forKey: .key) + + try? container.encodeIfPresent(header, forKey: .header) } } } diff --git a/Sources/code/application/models/ProductVariantResponseAppModelClass.swift b/Sources/code/application/models/ProductVariantResponseAppModelClass.swift index f146fff284..77e2e2111c 100644 --- a/Sources/code/application/models/ProductVariantResponseAppModelClass.swift +++ b/Sources/code/application/models/ProductVariantResponseAppModelClass.swift @@ -11,18 +11,18 @@ public extension ApplicationClient { public var key: String? - public var header: String? - public var items: [ProductVariantItemResponse]? + public var header: String? + public enum CodingKeys: String, CodingKey { case displayType = "display_type" case key - case header - case items + + case header } public init(displayType: String? = nil, header: String? = nil, items: [ProductVariantItemResponse]? = nil, key: String? = nil) { @@ -30,9 +30,9 @@ public extension ApplicationClient { self.key = key - self.header = header - self.items = items + + self.header = header } required public init(from decoder: Decoder) throws { @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - header = try container.decode(String.self, forKey: .header) + items = try container.decode([ProductVariantItemResponse].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,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) @@ -78,9 +78,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(key, forKey: .key) - try? container.encodeIfPresent(header, forKey: .header) - try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(header, forKey: .header) } } } diff --git a/Sources/code/application/models/ProductsAppModelClass.swift b/Sources/code/application/models/ProductsAppModelClass.swift index 91b56d71de..bb413df7a7 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 productDetails: ProductDetails? - - public var price: Price1? - - public var productUid: Int? - public var maxQuantity: Int? + public var autoAddToCart: Bool? + public var minQuantity: Int? - public var autoAddToCart: Bool? + public var productUid: Int? public var autoSelect: Bool? - public var allowRemove: Bool? - public var sizes: [Size]? - public enum CodingKeys: String, CodingKey { - case productDetails = "product_details" + public var productDetails: ProductDetails? - case price + public var allowRemove: Bool? - case productUid = "product_uid" + public var price: Price1? + public enum CodingKeys: String, CodingKey { case maxQuantity = "max_quantity" + case autoAddToCart = "auto_add_to_cart" + case minQuantity = "min_quantity" - case autoAddToCart = "auto_add_to_cart" + case productUid = "product_uid" case autoSelect = "auto_select" - case allowRemove = "allow_remove" - case sizes - } - 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.productDetails = productDetails + case productDetails = "product_details" - self.price = price + case allowRemove = "allow_remove" - self.productUid = productUid + case price + } + 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.maxQuantity = maxQuantity + self.autoAddToCart = autoAddToCart + self.minQuantity = minQuantity - self.autoAddToCart = autoAddToCart + self.productUid = productUid self.autoSelect = autoSelect + self.sizes = sizes + + self.productDetails = productDetails + self.allowRemove = allowRemove - self.sizes = sizes + self.price = price } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - productDetails = try container.decode(ProductDetails.self, forKey: .productDetails) + maxQuantity = try container.decode(Int.self, forKey: .maxQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - price = try container.decode(Price1.self, forKey: .price) + autoAddToCart = try container.decode(Bool.self, forKey: .autoAddToCart) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,7 +85,7 @@ public extension ApplicationClient { } catch {} do { - productUid = try container.decode(Int.self, forKey: .productUid) + minQuantity = try container.decode(Int.self, forKey: .minQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +93,7 @@ public extension ApplicationClient { } catch {} do { - maxQuantity = try container.decode(Int.self, forKey: .maxQuantity) + productUid = try container.decode(Int.self, forKey: .productUid) } 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) + autoSelect = try container.decode(Bool.self, forKey: .autoSelect) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -109,7 +109,7 @@ public extension ApplicationClient { } catch {} do { - autoAddToCart = try container.decode(Bool.self, forKey: .autoAddToCart) + 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 { - autoSelect = try container.decode(Bool.self, forKey: .autoSelect) + productDetails = try container.decode(ProductDetails.self, forKey: .productDetails) } 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) + price = try container.decode(Price1.self, forKey: .price) } 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(productDetails, forKey: .productDetails) - - try? container.encodeIfPresent(price, forKey: .price) - - try? container.encodeIfPresent(productUid, forKey: .productUid) - try? container.encodeIfPresent(maxQuantity, forKey: .maxQuantity) + try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) + try? container.encodeIfPresent(minQuantity, forKey: .minQuantity) - try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) + try? container.encodeIfPresent(productUid, forKey: .productUid) try? container.encodeIfPresent(autoSelect, forKey: .autoSelect) + try? container.encodeIfPresent(sizes, forKey: .sizes) + + try? container.encodeIfPresent(productDetails, forKey: .productDetails) + try? container.encodeIfPresent(allowRemove, forKey: .allowRemove) - try? container.encodeIfPresent(sizes, forKey: .sizes) + try? container.encodeIfPresent(price, forKey: .price) } } } 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..772a8439ef 100644 --- a/Sources/code/application/models/RefundAccountResponseAppModelClass.swift +++ b/Sources/code/application/models/RefundAccountResponseAppModelClass.swift @@ -7,49 +7,47 @@ public extension ApplicationClient { Used By: Payment */ class RefundAccountResponse: Codable { - public var data: [String: Any]? - - public var success: Bool - public var isVerifiedFlag: Bool? - public var message: String + public var data: [String: Any]? - public enum CodingKeys: String, CodingKey { - case data + public var message: String - case success + public var success: Bool + public enum CodingKeys: String, CodingKey { case isVerifiedFlag = "is_verified_flag" + case data + case message + + case success } public init(data: [String: Any]? = nil, isVerifiedFlag: Bool? = nil, message: String, success: Bool) { - self.data = data - - self.success = success - self.isVerifiedFlag = isVerifiedFlag + self.data = data + self.message = message + + self.success = success } 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) + 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) @@ -57,18 +55,20 @@ public extension ApplicationClient { } catch {} message = try container.decode(String.self, forKey: .message) + + 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(data, forKey: .data) - - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(isVerifiedFlag, forKey: .isVerifiedFlag) + try? container.encodeIfPresent(data, forKey: .data) + try? container.encodeIfPresent(message, forKey: .message) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/ReturnConfigSchemaV2AppModelClass.swift b/Sources/code/application/models/ReturnConfigSchemaV2AppModelClass.swift index 844be8b5e2..062da46388 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 time: Int? - public var returnable: Bool? public var unit: String? - public enum CodingKeys: String, CodingKey { - case time + public var time: Int? + public enum CodingKeys: String, CodingKey { case returnable case unit + + case time } public init(returnable: Bool? = nil, time: Int? = nil, unit: String? = nil) { - self.time = time - self.returnable = returnable self.unit = unit + + self.time = time } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - time = try container.decode(Int.self, forKey: .time) + returnable = try container.decode(Bool.self, forKey: .returnable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - returnable = try container.decode(Bool.self, forKey: .returnable) + 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) + time = try container.decode(Int.self, forKey: .time) } 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(time, forKey: .time) - try? container.encodeIfPresent(returnable, forKey: .returnable) try? container.encodeIfPresent(unit, forKey: .unit) + + try? container.encodeIfPresent(time, forKey: .time) } } } diff --git a/Sources/code/application/models/RootPaymentModeAppModelClass.swift b/Sources/code/application/models/RootPaymentModeAppModelClass.swift index 75bf13ea03..7559f49055 100644 --- a/Sources/code/application/models/RootPaymentModeAppModelClass.swift +++ b/Sources/code/application/models/RootPaymentModeAppModelClass.swift @@ -7,69 +7,67 @@ public extension ApplicationClient { Used By: Payment */ class RootPaymentMode: Codable { + public var aggregatorName: String? + public var name: String public var list: [PaymentModeList]? - public var displayName: String - - public var aggregatorName: String? - public var anonymousEnable: Bool? - public var addCardEnabled: Bool? + public var displayName: String public var displayPriority: Int + public var addCardEnabled: Bool? + public enum CodingKeys: String, CodingKey { + case aggregatorName = "aggregator_name" + case name case list - case displayName = "display_name" - - case aggregatorName = "aggregator_name" - case anonymousEnable = "anonymous_enable" - case addCardEnabled = "add_card_enabled" + case displayName = "display_name" case displayPriority = "display_priority" + + case addCardEnabled = "add_card_enabled" } public init(addCardEnabled: Bool? = nil, aggregatorName: String? = nil, anonymousEnable: Bool? = nil, displayName: String, displayPriority: Int, list: [PaymentModeList]? = nil, name: String) { + self.aggregatorName = aggregatorName + self.name = name self.list = list - self.displayName = displayName - - self.aggregatorName = aggregatorName - self.anonymousEnable = anonymousEnable - self.addCardEnabled = addCardEnabled + self.displayName = displayName self.displayPriority = displayPriority + + self.addCardEnabled = addCardEnabled } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - name = try container.decode(String.self, forKey: .name) - do { - list = try container.decode([PaymentModeList].self, forKey: .list) + 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 {} - displayName = try container.decode(String.self, forKey: .displayName) + name = try container.decode(String.self, forKey: .name) 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) @@ -84,6 +82,10 @@ public extension ApplicationClient { print("codingPath:", context.codingPath) } catch {} + displayName = try container.decode(String.self, forKey: .displayName) + + displayPriority = try container.decode(Int.self, forKey: .displayPriority) + do { addCardEnabled = try container.decode(Bool.self, forKey: .addCardEnabled) @@ -91,26 +93,24 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - displayPriority = try container.decode(Int.self, forKey: .displayPriority) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encode(aggregatorName, forKey: .aggregatorName) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(list, forKey: .list) - try? container.encodeIfPresent(displayName, forKey: .displayName) - - try? container.encode(aggregatorName, forKey: .aggregatorName) - try? container.encode(anonymousEnable, forKey: .anonymousEnable) - try? container.encode(addCardEnabled, forKey: .addCardEnabled) + try? container.encodeIfPresent(displayName, forKey: .displayName) try? container.encodeIfPresent(displayPriority, forKey: .displayPriority) + + try? container.encode(addCardEnabled, forKey: .addCardEnabled) } } } 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 b1cd3a30d9..9737feb8f7 100644 --- a/Sources/code/application/models/SecondLevelChildAppModelClass.swift +++ b/Sources/code/application/models/SecondLevelChildAppModelClass.swift @@ -7,7 +7,7 @@ public extension ApplicationClient { Used By: Catalog */ class SecondLevelChild: Codable { - public var childs: [ThirdLevelChild]? + public var slug: String? public var name: String? @@ -15,14 +15,14 @@ public extension ApplicationClient { public var banners: ImageUrls? + public var childs: [ThirdLevelChild]? + public var customJson: [String: Any]? public var uid: Int? - public var slug: String? - public enum CodingKeys: String, CodingKey { - case childs + case slug case name @@ -30,15 +30,15 @@ public extension ApplicationClient { case banners + case childs + case customJson = "_custom_json" case uid - - case slug } 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.childs = childs + self.slug = slug self.name = name @@ -46,18 +46,18 @@ public extension ApplicationClient { self.banners = banners + self.childs = childs + self.customJson = customJson self.uid = uid - - self.slug = slug } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - childs = try container.decode([ThirdLevelChild].self, forKey: .childs) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,7 +89,7 @@ public extension ApplicationClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + childs = try container.decode([ThirdLevelChild].self, forKey: .childs) } 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) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,7 +116,7 @@ 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(slug, forKey: .slug) try? container.encodeIfPresent(name, forKey: .name) @@ -124,11 +124,11 @@ public extension ApplicationClient { try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(childs, forKey: .childs) + try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(slug, forKey: .slug) } } } diff --git a/Sources/code/application/models/SellerGroupAttributesAppModelClass.swift b/Sources/code/application/models/SellerGroupAttributesAppModelClass.swift index e54ae15611..8a79addd40 100644 --- a/Sources/code/application/models/SellerGroupAttributesAppModelClass.swift +++ b/Sources/code/application/models/SellerGroupAttributesAppModelClass.swift @@ -7,27 +7,27 @@ public extension ApplicationClient { Used By: Catalog */ class SellerGroupAttributes: Codable { - public var title: String? - public var details: [DetailsSchemaV2]? - public enum CodingKeys: String, CodingKey { - case title + public var title: String? + public enum CodingKeys: String, CodingKey { case details + + case title } public init(details: [DetailsSchemaV2]? = nil, title: String? = nil) { - self.title = title - self.details = details + + self.title = title } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - title = try container.decode(String.self, forKey: .title) + details = try container.decode([DetailsSchemaV2].self, forKey: .details) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} do { - details = try container.decode([DetailsSchemaV2].self, forKey: .details) + title = try container.decode(String.self, forKey: .title) } 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(title, forKey: .title) - try? container.encodeIfPresent(details, forKey: .details) + + try? container.encodeIfPresent(title, forKey: .title) } } } diff --git a/Sources/code/application/models/SetDefaultBeneficiaryRequestAppModelClass.swift b/Sources/code/application/models/SetDefaultBeneficiaryRequestAppModelClass.swift index d3a4675d9a..a6bd1efe6a 100644 --- a/Sources/code/application/models/SetDefaultBeneficiaryRequestAppModelClass.swift +++ b/Sources/code/application/models/SetDefaultBeneficiaryRequestAppModelClass.swift @@ -7,36 +7,36 @@ public extension ApplicationClient { Used By: Payment */ class SetDefaultBeneficiaryRequest: Codable { - public var orderId: String - public var beneficiaryId: String - public enum CodingKeys: String, CodingKey { - case orderId = "order_id" + public var orderId: String + public enum CodingKeys: String, CodingKey { case beneficiaryId = "beneficiary_id" + + case orderId = "order_id" } public init(beneficiaryId: String, orderId: String) { - self.orderId = orderId - self.beneficiaryId = beneficiaryId + + 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) - beneficiaryId = try container.decode(String.self, forKey: .beneficiaryId) + + 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(beneficiaryId, forKey: .beneficiaryId) + + try? container.encodeIfPresent(orderId, forKey: .orderId) } } } diff --git a/Sources/code/application/models/SizeAppModelClass.swift b/Sources/code/application/models/SizeAppModelClass.swift index f2d0b5cf16..f511c723c2 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 display: String? - - public var isAvailable: Bool? + public var quantity: Int? public var value: String? - public var quantity: Int? + public var isAvailable: Bool? - public enum CodingKeys: String, CodingKey { - case display + public var display: String? - case isAvailable = "is_available" + public enum CodingKeys: String, CodingKey { + case quantity case value - case quantity + case isAvailable = "is_available" + + case display } public init(display: String? = nil, isAvailable: Bool? = nil, quantity: Int? = nil, value: String? = nil) { - self.display = display - - self.isAvailable = isAvailable + self.quantity = quantity self.value = value - self.quantity = quantity + self.isAvailable = isAvailable + + 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) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - isAvailable = try container.decode(Bool.self, forKey: .isAvailable) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,7 @@ public extension ApplicationClient { } catch {} do { - value = try container.decode(String.self, forKey: .value) + isAvailable = try container.decode(Bool.self, forKey: .isAvailable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + 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(display, forKey: .display) - - try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) + try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) + + try? container.encodeIfPresent(display, forKey: .display) } } } diff --git a/Sources/code/application/models/SizeChartAppModelClass.swift b/Sources/code/application/models/SizeChartAppModelClass.swift index ec6c4f67f3..d2ef221e50 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 title: String? - public var unit: String? + public var description: String? public var sizeTip: String? - public var image: String? - - public var title: String? + public var headers: ColumnHeaders? - public var description: String? + public var image: String? public var sizes: [SizeChartValues]? + public var unit: String? + public enum CodingKeys: String, CodingKey { - case headers + case title - case unit + case description case sizeTip = "size_tip" - case image - - case title + case headers - case description + case image case sizes + + case unit } 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.title = title - self.unit = unit + self.description = description self.sizeTip = sizeTip - self.image = image - - self.title = title + self.headers = headers - self.description = description + self.image = image self.sizes = sizes + + self.unit = unit } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - headers = try container.decode(ColumnHeaders.self, forKey: .headers) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -65,7 +65,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) @@ -81,7 +81,7 @@ public extension ApplicationClient { } catch {} do { - image = try container.decode(String.self, forKey: .image) + headers = try container.decode(ColumnHeaders.self, forKey: .headers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,7 +89,7 @@ public extension ApplicationClient { } catch {} do { - title = try container.decode(String.self, forKey: .title) + image = try container.decode(String.self, forKey: .image) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -97,7 +97,7 @@ public extension ApplicationClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + sizes = try container.decode([SizeChartValues].self, forKey: .sizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - sizes = try container.decode([SizeChartValues].self, forKey: .sizes) + unit = try container.decode(String.self, forKey: .unit) } 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(title, forKey: .title) - try? container.encodeIfPresent(unit, forKey: .unit) + try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(sizeTip, forKey: .sizeTip) - try? container.encodeIfPresent(image, forKey: .image) - - try? container.encodeIfPresent(title, forKey: .title) + try? container.encodeIfPresent(headers, forKey: .headers) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(image, forKey: .image) try? container.encodeIfPresent(sizes, forKey: .sizes) + + try? container.encodeIfPresent(unit, forKey: .unit) } } } diff --git a/Sources/code/application/models/SizeChartValuesAppModelClass.swift b/Sources/code/application/models/SizeChartValuesAppModelClass.swift index a3f173edfb..33f41bfde8 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 col2: String? - public var col6: String? - public var col1: String? - public var col3: String? - public var col4: String? + public var col2: String? public var col5: String? - public enum CodingKeys: String, CodingKey { - case col2 = "col_2" + public var col1: String? - case col6 = "col_6" + public var col4: String? - case col1 = "col_1" + public enum CodingKeys: String, CodingKey { + case col6 = "col_6" case col3 = "col_3" - case col4 = "col_4" + case col2 = "col_2" case col5 = "col_5" + + case col1 = "col_1" + + case col4 = "col_4" } public init(col1: String? = nil, col2: String? = nil, col3: String? = nil, col4: String? = nil, col5: String? = nil, col6: String? = nil) { - self.col2 = col2 - self.col6 = col6 - self.col1 = col1 - self.col3 = col3 - self.col4 = col4 + self.col2 = col2 self.col5 = col5 + + self.col1 = col1 + + self.col4 = col4 } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - col2 = try container.decode(String.self, forKey: .col2) + col6 = try container.decode(String.self, forKey: .col6) } 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) + col3 = try container.decode(String.self, forKey: .col3) } 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) + col2 = try container.decode(String.self, forKey: .col2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,7 +75,7 @@ public extension ApplicationClient { } catch {} do { - col3 = try container.decode(String.self, forKey: .col3) + col5 = try container.decode(String.self, forKey: .col5) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -83,7 +83,7 @@ public extension ApplicationClient { } catch {} do { - col4 = try container.decode(String.self, forKey: .col4) + 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 { - col5 = try container.decode(String.self, forKey: .col5) + col4 = try container.decode(String.self, forKey: .col4) } 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(col2, forKey: .col2) - try? container.encodeIfPresent(col6, forKey: .col6) - try? container.encodeIfPresent(col1, forKey: .col1) - try? container.encodeIfPresent(col3, forKey: .col3) - try? container.encodeIfPresent(col4, forKey: .col4) + try? container.encodeIfPresent(col2, forKey: .col2) try? container.encodeIfPresent(col5, forKey: .col5) + + try? container.encodeIfPresent(col1, forKey: .col1) + + try? container.encodeIfPresent(col4, forKey: .col4) } } } diff --git a/Sources/code/application/models/StoreAddressSerializerAppModelClass.swift b/Sources/code/application/models/StoreAddressSerializerAppModelClass.swift index ae2d965a03..7a1abf9632 100644 --- a/Sources/code/application/models/StoreAddressSerializerAppModelClass.swift +++ b/Sources/code/application/models/StoreAddressSerializerAppModelClass.swift @@ -7,69 +7,69 @@ public extension ApplicationClient { Used By: Catalog */ class StoreAddressSerializer: Codable { - public var state: String? + public var address2: String? + + public var pincode: Int? + + public var country: String? public var latitude: Double? public var longitude: Double? - public var address1: String? - public var city: String? - public var address2: String? - - public var pincode: Int? - - public var country: String? + public var address1: String? public var landmark: String? + public var state: String? + public enum CodingKeys: String, CodingKey { - case state + case address2 + + case pincode + + case country case latitude case longitude - case address1 - case city - case address2 - - case pincode - - case country + case address1 case landmark + + case state } 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.state = state + self.address2 = address2 + + self.pincode = pincode + + self.country = country self.latitude = latitude self.longitude = longitude - self.address1 = address1 - self.city = city - self.address2 = address2 - - self.pincode = pincode - - self.country = country + self.address1 = address1 self.landmark = landmark + + self.state = state } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - state = try container.decode(String.self, forKey: .state) + address2 = try container.decode(String.self, forKey: .address2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,7 +77,7 @@ public extension ApplicationClient { } catch {} do { - latitude = try container.decode(Double.self, forKey: .latitude) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,7 +85,7 @@ public extension ApplicationClient { } catch {} do { - longitude = try container.decode(Double.self, forKey: .longitude) + country = try container.decode(String.self, forKey: .country) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +93,7 @@ public extension ApplicationClient { } catch {} do { - address1 = try container.decode(String.self, forKey: .address1) + latitude = try container.decode(Double.self, forKey: .latitude) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -101,7 +101,7 @@ public extension ApplicationClient { } 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) @@ -109,7 +109,7 @@ public extension ApplicationClient { } catch {} do { - address2 = try container.decode(String.self, forKey: .address2) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -117,7 +117,7 @@ public extension ApplicationClient { } catch {} do { - pincode = try container.decode(Int.self, forKey: .pincode) + 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 { - 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) @@ -133,7 +133,7 @@ public extension ApplicationClient { } catch {} do { - landmark = try container.decode(String.self, forKey: .landmark) + state = try container.decode(String.self, forKey: .state) } 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(state, forKey: .state) + try? container.encodeIfPresent(address2, forKey: .address2) + + try? container.encodeIfPresent(pincode, forKey: .pincode) + + try? container.encodeIfPresent(country, forKey: .country) try? container.encodeIfPresent(latitude, forKey: .latitude) try? container.encodeIfPresent(longitude, forKey: .longitude) - try? container.encodeIfPresent(address1, forKey: .address1) - try? container.encodeIfPresent(city, forKey: .city) - try? container.encodeIfPresent(address2, forKey: .address2) - - try? container.encodeIfPresent(pincode, forKey: .pincode) - - try? container.encodeIfPresent(country, forKey: .country) + try? container.encodeIfPresent(address1, forKey: .address1) try? container.encodeIfPresent(landmark, forKey: .landmark) + + try? container.encodeIfPresent(state, forKey: .state) } } } diff --git a/Sources/code/application/models/StoreAppModelClass.swift b/Sources/code/application/models/StoreAppModelClass.swift index 491c43e106..6c9ae5a39a 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 name: String? - - public var city: String? - public var address: String? - public var uid: Int? + public var pincode: Int? - public var state: String? + public var storeCode: String? - public var pincode: Int? + public var storeEmail: String? public var latLong: LatLong? - public var country: String? + public var name: String? - public var storeCode: String? + public var country: String? - public var storeEmail: String? + public var city: String? - public enum CodingKeys: String, CodingKey { - case name + public var state: String? - case city + public var uid: Int? + public enum CodingKeys: String, CodingKey { case address - case uid + case pincode - case state + case storeCode = "store_code" - case pincode + case storeEmail = "store_email" case latLong = "lat_long" + case name + case country - case storeCode = "store_code" + case city - case storeEmail = "store_email" + case state + + 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.name = name - - self.city = city - self.address = address - self.uid = uid + self.pincode = pincode - self.state = state + self.storeCode = storeCode - self.pincode = pincode + self.storeEmail = storeEmail self.latLong = latLong + self.name = name + self.country = country - self.storeCode = storeCode + self.city = city - self.storeEmail = storeEmail + self.state = state + + 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) + address = try container.decode(String.self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -83,7 +83,7 @@ public extension ApplicationClient { } catch {} do { - city = try container.decode(String.self, forKey: .city) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension ApplicationClient { } catch {} do { - address = try container.decode(String.self, forKey: .address) + storeCode = try container.decode(String.self, forKey: .storeCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -99,7 +99,7 @@ public extension ApplicationClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + storeEmail = try container.decode(String.self, forKey: .storeEmail) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -107,7 +107,7 @@ public extension ApplicationClient { } catch {} do { - state = try container.decode(String.self, forKey: .state) + latLong = try container.decode(LatLong.self, forKey: .latLong) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -115,7 +115,7 @@ public extension ApplicationClient { } catch {} do { - pincode = try container.decode(Int.self, forKey: .pincode) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -123,7 +123,7 @@ public extension ApplicationClient { } catch {} do { - latLong = try container.decode(LatLong.self, forKey: .latLong) + 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 { - country = try container.decode(String.self, forKey: .country) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -139,7 +139,7 @@ public extension ApplicationClient { } catch {} do { - storeCode = try container.decode(String.self, forKey: .storeCode) + state = try container.decode(String.self, forKey: .state) } 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(name, forKey: .name) - - try? container.encodeIfPresent(city, forKey: .city) - try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(pincode, forKey: .pincode) - try? container.encodeIfPresent(state, forKey: .state) + try? container.encodeIfPresent(storeCode, forKey: .storeCode) - try? container.encodeIfPresent(pincode, forKey: .pincode) + try? container.encodeIfPresent(storeEmail, forKey: .storeEmail) try? container.encodeIfPresent(latLong, forKey: .latLong) + try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(country, forKey: .country) - try? container.encodeIfPresent(storeCode, forKey: .storeCode) + try? container.encodeIfPresent(city, forKey: .city) - try? container.encodeIfPresent(storeEmail, forKey: .storeEmail) + try? container.encodeIfPresent(state, forKey: .state) + + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/StoreDepartmentsAppModelClass.swift b/Sources/code/application/models/StoreDepartmentsAppModelClass.swift index 4f1ec2faac..170d035841 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 name: String? + public var slug: String? - public var priorityOrder: Int? + public var name: String? public var logo: String? - public var uid: Int? + public var priorityOrder: Int? - public var slug: String? + public var uid: Int? public enum CodingKeys: String, CodingKey { - case name + case slug - case priorityOrder = "priority_order" + case name case logo - case uid + case priorityOrder = "priority_order" - case slug + case uid } public init(logo: String? = nil, name: String? = nil, priorityOrder: Int? = nil, slug: String? = nil, uid: Int? = nil) { - self.name = name + self.slug = slug - self.priorityOrder = priorityOrder + self.name = name self.logo = logo - self.uid = uid + self.priorityOrder = priorityOrder - self.slug = slug + 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) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -53,7 +53,7 @@ public extension ApplicationClient { } catch {} 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) @@ -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 { - slug = try container.decode(String.self, forKey: .slug) + 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(name, forKey: .name) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/application/models/StoreDetailAppModelClass.swift b/Sources/code/application/models/StoreDetailAppModelClass.swift index 28e44b267f..f8fba4d266 100644 --- a/Sources/code/application/models/StoreDetailAppModelClass.swift +++ b/Sources/code/application/models/StoreDetailAppModelClass.swift @@ -9,30 +9,30 @@ public extension ApplicationClient { class StoreDetail: Codable { public var city: String? - public var code: String? + public var name: String? public var id: Int? - public var name: String? + public var code: String? public enum CodingKeys: String, CodingKey { case city - case code + case name case id - case name + case code } public init(city: String? = nil, code: String? = nil, id: Int? = nil, name: String? = nil) { self.city = city - self.code = code + self.name = name self.id = id - self.name = name + self.code = code } required public init(from decoder: Decoder) throws { @@ -47,7 +47,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) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -76,11 +76,11 @@ public extension ApplicationClient { try? container.encodeIfPresent(city, forKey: .city) - try? container.encodeIfPresent(code, forKey: .code) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(code, forKey: .code) } } } diff --git a/Sources/code/application/models/StoreDetailsAppModelClass.swift b/Sources/code/application/models/StoreDetailsAppModelClass.swift index e4d171f10a..4d66721869 100644 --- a/Sources/code/application/models/StoreDetailsAppModelClass.swift +++ b/Sources/code/application/models/StoreDetailsAppModelClass.swift @@ -7,61 +7,61 @@ public extension ApplicationClient { Used By: Catalog */ class StoreDetails: Codable { - public var contactNumbers: [SellerPhoneNumber]? + public var address: StoreAddressSerializer? - public var manager: StoreManagerSerializer? + public var contactNumbers: [SellerPhoneNumber]? - public var departments: [StoreDepartments]? + public var company: CompanyStore? - public var timing: [StoreTiming]? + public var manager: StoreManagerSerializer? public var name: String? - public var company: CompanyStore? - - public var address: StoreAddressSerializer? + public var timing: [StoreTiming]? public var customJson: [String: Any]? + public var departments: [StoreDepartments]? + public var uid: Int? public enum CodingKeys: String, CodingKey { - case contactNumbers = "contact_numbers" + case address - case manager + case contactNumbers = "contact_numbers" - case departments + case company - case timing + case manager case name - case company - - case address + case timing case customJson = "_custom_json" + case departments + case uid } 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.contactNumbers = contactNumbers + self.address = address - self.manager = manager + self.contactNumbers = contactNumbers - self.departments = departments + self.company = company - self.timing = timing + self.manager = manager self.name = name - self.company = company - - self.address = address + self.timing = timing self.customJson = customJson + self.departments = departments + self.uid = uid } @@ -69,7 +69,7 @@ public extension ApplicationClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) + address = try container.decode(StoreAddressSerializer.self, forKey: .address) } 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 { - departments = try container.decode([StoreDepartments].self, forKey: .departments) + company = try container.decode(CompanyStore.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +93,7 @@ public extension ApplicationClient { } catch {} do { - timing = try container.decode([StoreTiming].self, forKey: .timing) + manager = try container.decode(StoreManagerSerializer.self, forKey: .manager) } 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) + timing = try container.decode([StoreTiming].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -117,7 +117,7 @@ public extension ApplicationClient { } catch {} do { - address = try container.decode(StoreAddressSerializer.self, forKey: .address) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -125,7 +125,7 @@ public extension ApplicationClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + departments = try container.decode([StoreDepartments].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,22 +144,22 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) + try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(manager, forKey: .manager) + try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(company, forKey: .company) - try? container.encodeIfPresent(timing, forKey: .timing) + try? container.encodeIfPresent(manager, forKey: .manager) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(company, forKey: .company) - - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(timing, forKey: .timing) try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(uid, forKey: .uid) } } diff --git a/Sources/code/application/models/StoreListingResponseAppModelClass.swift b/Sources/code/application/models/StoreListingResponseAppModelClass.swift index 5226f3a16e..12fff6502f 100644 --- a/Sources/code/application/models/StoreListingResponseAppModelClass.swift +++ b/Sources/code/application/models/StoreListingResponseAppModelClass.swift @@ -7,36 +7,36 @@ public extension ApplicationClient { Used By: Catalog */ class StoreListingResponse: Codable { - public var page: Page - public var items: [Store] - public enum CodingKeys: String, CodingKey { - case page + public var page: Page + public enum CodingKeys: String, CodingKey { case items + + case page } public init(items: [Store], page: Page) { - self.page = page - self.items = items + + self.page = page } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - page = try container.decode(Page.self, forKey: .page) - items = try container.decode([Store].self, forKey: .items) + + 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(page, forKey: .page) - try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/application/models/StoreManagerSerializerAppModelClass.swift b/Sources/code/application/models/StoreManagerSerializerAppModelClass.swift index d9503bc268..e7fb42e34e 100644 --- a/Sources/code/application/models/StoreManagerSerializerAppModelClass.swift +++ b/Sources/code/application/models/StoreManagerSerializerAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class StoreManagerSerializer: Codable { public var name: String? - public var email: String? - public var mobileNo: SellerPhoneNumber? + public var email: String? + public enum CodingKeys: String, CodingKey { case name - case email - case mobileNo = "mobile_no" + + case email } public init(email: String? = nil, mobileNo: SellerPhoneNumber? = nil, name: String? = nil) { self.name = name - self.email = email - self.mobileNo = mobileNo + + self.email = email } required public init(from decoder: Decoder) throws { @@ -41,7 +41,7 @@ public extension ApplicationClient { } catch {} do { - email = try container.decode(String.self, forKey: .email) + mobileNo = try container.decode(SellerPhoneNumber.self, forKey: .mobileNo) } 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) @@ -62,9 +62,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(email, forKey: .email) - try? container.encodeIfPresent(mobileNo, forKey: .mobileNo) + + try? container.encodeIfPresent(email, forKey: .email) } } } diff --git a/Sources/code/application/models/StoreTimingAppModelClass.swift b/Sources/code/application/models/StoreTimingAppModelClass.swift index e369d3ab47..c25cb34fd7 100644 --- a/Sources/code/application/models/StoreTimingAppModelClass.swift +++ b/Sources/code/application/models/StoreTimingAppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class StoreTiming: Codable { - public var closing: Time? - public var opening: Time? public var weekday: String? public var open: Bool? - public enum CodingKeys: String, CodingKey { - case closing + public var closing: Time? + public enum CodingKeys: String, CodingKey { case opening case weekday case open + + case closing } public init(closing: Time? = nil, open: Bool? = nil, opening: Time? = nil, weekday: String? = nil) { - self.closing = closing - self.opening = opening self.weekday = weekday self.open = open + + self.closing = closing } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - closing = try container.decode(Time.self, forKey: .closing) + opening = try container.decode(Time.self, forKey: .opening) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - opening = try container.decode(Time.self, forKey: .opening) + weekday = try container.decode(String.self, forKey: .weekday) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,7 +55,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) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - open = try container.decode(Bool.self, forKey: .open) + closing = try container.decode(Time.self, forKey: .closing) } 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(closing, forKey: .closing) - try? container.encodeIfPresent(opening, forKey: .opening) try? container.encodeIfPresent(weekday, forKey: .weekday) try? container.encodeIfPresent(open, forKey: .open) + + try? container.encodeIfPresent(closing, forKey: .closing) } } } diff --git a/Sources/code/application/models/StrategyWiseListingSchemaV2AppModelClass.swift b/Sources/code/application/models/StrategyWiseListingSchemaV2AppModelClass.swift index 8397cb4b7d..aad4ab8f07 100644 --- a/Sources/code/application/models/StrategyWiseListingSchemaV2AppModelClass.swift +++ b/Sources/code/application/models/StrategyWiseListingSchemaV2AppModelClass.swift @@ -7,39 +7,39 @@ public extension ApplicationClient { Used By: Catalog */ class StrategyWiseListingSchemaV2: Codable { + public var distance: Int? + + public var quantity: Int? + public var pincode: Int? public var tat: Int? - public var quantity: Int? + public enum CodingKeys: String, CodingKey { + case distance - public var distance: Int? + case quantity - public enum CodingKeys: String, CodingKey { case pincode case tat - - case quantity - - case distance } public init(distance: Int? = nil, pincode: Int? = nil, quantity: Int? = nil, tat: Int? = nil) { - self.pincode = pincode - - self.tat = tat + self.distance = distance self.quantity = quantity - self.distance = distance + self.pincode = pincode + + self.tat = tat } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - pincode = try container.decode(Int.self, forKey: .pincode) + distance = try container.decode(Int.self, forKey: .distance) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -47,7 +47,7 @@ public extension ApplicationClient { } catch {} do { - tat = try container.decode(Int.self, forKey: .tat) + 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) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,7 +63,7 @@ public extension ApplicationClient { } catch {} do { - distance = try container.decode(Int.self, forKey: .distance) + tat = try container.decode(Int.self, forKey: .tat) } 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(pincode, forKey: .pincode) - - try? container.encodeIfPresent(tat, forKey: .tat) + try? container.encodeIfPresent(distance, forKey: .distance) try? container.encodeIfPresent(quantity, forKey: .quantity) - try? container.encodeIfPresent(distance, forKey: .distance) + try? container.encodeIfPresent(pincode, forKey: .pincode) + + try? container.encodeIfPresent(tat, forKey: .tat) } } } diff --git a/Sources/code/application/models/ThirdLevelChildAppModelClass.swift b/Sources/code/application/models/ThirdLevelChildAppModelClass.swift index 8118b4f6d6..7b52c393eb 100644 --- a/Sources/code/application/models/ThirdLevelChildAppModelClass.swift +++ b/Sources/code/application/models/ThirdLevelChildAppModelClass.swift @@ -7,7 +7,7 @@ public extension ApplicationClient { Used By: Catalog */ class ThirdLevelChild: Codable { - public var childs: [[String: Any]]? + public var slug: String? public var name: String? @@ -15,14 +15,14 @@ public extension ApplicationClient { public var banners: ImageUrls? + public var childs: [[String: Any]]? + public var customJson: [String: Any]? public var uid: Int? - public var slug: String? - public enum CodingKeys: String, CodingKey { - case childs + case slug case name @@ -30,15 +30,15 @@ public extension ApplicationClient { case banners + case childs + case customJson = "_custom_json" case uid - - case slug } 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.childs = childs + self.slug = slug self.name = name @@ -46,18 +46,18 @@ public extension ApplicationClient { self.banners = banners + self.childs = childs + self.customJson = customJson self.uid = uid - - self.slug = slug } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - childs = try container.decode([[String: Any]].self, forKey: .childs) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,7 +89,7 @@ public extension ApplicationClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + childs = try container.decode([[String: Any]].self, forKey: .childs) } 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) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension ApplicationClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,7 +116,7 @@ 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(slug, forKey: .slug) try? container.encodeIfPresent(name, forKey: .name) @@ -124,11 +124,11 @@ public extension ApplicationClient { try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(childs, forKey: .childs) + try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encodeIfPresent(uid, forKey: .uid) - - try? container.encodeIfPresent(slug, forKey: .slug) } } } diff --git a/Sources/code/application/models/TimeAppModelClass.swift b/Sources/code/application/models/TimeAppModelClass.swift index a913732e52..1c7cdc0120 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 minute: Int? - public var hour: Int? - public enum CodingKeys: String, CodingKey { - case minute + public var minute: Int? + public enum CodingKeys: String, CodingKey { case hour + + case minute } public init(hour: Int? = nil, minute: Int? = nil) { - self.minute = minute - self.hour = hour + + self.minute = minute } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -35,7 +35,7 @@ public extension ApplicationClient { } catch {} 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) @@ -46,9 +46,9 @@ public extension ApplicationClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(minute, forKey: .minute) - try? container.encodeIfPresent(hour, forKey: .hour) + + try? container.encodeIfPresent(minute, forKey: .minute) } } } diff --git a/Sources/code/application/models/TransferItemsDetailsAppModelClass.swift b/Sources/code/application/models/TransferItemsDetailsAppModelClass.swift index e8c6f09242..737d0cb23f 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 name: String - public var displayName: String? - - public var id: Int + public var logoSmall: String public var logoLarge: String - public var logoSmall: String + public var id: Int + + public var displayName: String? public enum CodingKeys: String, CodingKey { case name - case displayName = "display_name" - - case id + case logoSmall = "logo_small" case logoLarge = "logo_large" - case logoSmall = "logo_small" + case id + + case displayName = "display_name" } public init(displayName: String? = nil, id: Int, logoLarge: String, logoSmall: String, name: String) { self.name = name - self.displayName = displayName - - self.id = id + self.logoSmall = logoSmall self.logoLarge = logoLarge - self.logoSmall = logoSmall + self.id = id + + self.displayName = displayName } required public init(from decoder: Decoder) throws { @@ -46,6 +46,12 @@ public extension ApplicationClient { name = try container.decode(String.self, forKey: .name) + logoSmall = try container.decode(String.self, forKey: .logoSmall) + + logoLarge = try container.decode(String.self, forKey: .logoLarge) + + id = try container.decode(Int.self, forKey: .id) + do { displayName = try container.decode(String.self, forKey: .displayName) @@ -53,12 +59,6 @@ public extension ApplicationClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - id = try container.decode(Int.self, forKey: .id) - - logoLarge = try container.decode(String.self, forKey: .logoLarge) - - logoSmall = try container.decode(String.self, forKey: .logoSmall) } public func encode(to encoder: Encoder) throws { @@ -66,13 +66,13 @@ public extension ApplicationClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(displayName, forKey: .displayName) - - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(logoSmall, forKey: .logoSmall) try? container.encodeIfPresent(logoLarge, forKey: .logoLarge) - try? container.encodeIfPresent(logoSmall, forKey: .logoSmall) + try? container.encodeIfPresent(id, forKey: .id) + + try? container.encodeIfPresent(displayName, forKey: .displayName) } } } diff --git a/Sources/code/application/models/TransferModeDetailsAppModelClass.swift b/Sources/code/application/models/TransferModeDetailsAppModelClass.swift index 2fde367500..e9341ba610 100644 --- a/Sources/code/application/models/TransferModeDetailsAppModelClass.swift +++ b/Sources/code/application/models/TransferModeDetailsAppModelClass.swift @@ -7,25 +7,27 @@ public extension ApplicationClient { Used By: Payment */ class TransferModeDetails: Codable { - public var items: [TransferItemsDetails]? - public var displayName: String - public enum CodingKeys: String, CodingKey { - case items + public var items: [TransferItemsDetails]? + public enum CodingKeys: String, CodingKey { case displayName = "display_name" + + case items } public init(displayName: String, items: [TransferItemsDetails]? = nil) { - self.items = items - self.displayName = displayName + + self.items = items } 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) @@ -33,16 +35,14 @@ 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(items, forKey: .items) - try? container.encodeIfPresent(displayName, forKey: .displayName) + + try? container.encodeIfPresent(items, forKey: .items) } } } diff --git a/Sources/code/application/models/ValidateCustomerRequestAppModelClass.swift b/Sources/code/application/models/ValidateCustomerRequestAppModelClass.swift index a2c7845864..d122b48e58 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 transactionAmountInPaise: Int public var payload: String + public var aggregator: String + public var phoneNumber: String public var merchantParams: [String: Any] - public var transactionAmountInPaise: Int - public enum CodingKeys: String, CodingKey { - case aggregator + case transactionAmountInPaise = "transaction_amount_in_paise" case payload + case aggregator + case phoneNumber = "phone_number" case merchantParams = "merchant_params" - - case transactionAmountInPaise = "transaction_amount_in_paise" } public init(aggregator: String, merchantParams: [String: Any], payload: String, phoneNumber: String, transactionAmountInPaise: Int) { - self.aggregator = aggregator + self.transactionAmountInPaise = transactionAmountInPaise self.payload = payload + self.aggregator = aggregator + self.phoneNumber = phoneNumber self.merchantParams = merchantParams - - self.transactionAmountInPaise = transactionAmountInPaise } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - aggregator = try container.decode(String.self, forKey: .aggregator) + 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) - - transactionAmountInPaise = try container.decode(Int.self, forKey: .transactionAmountInPaise) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) + 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) - - try? container.encodeIfPresent(transactionAmountInPaise, forKey: .transactionAmountInPaise) } } } diff --git a/Sources/code/application/models/ValidateCustomerResponseAppModelClass.swift b/Sources/code/application/models/ValidateCustomerResponseAppModelClass.swift index 9e976f8352..c2f657ba11 100644 --- a/Sources/code/application/models/ValidateCustomerResponseAppModelClass.swift +++ b/Sources/code/application/models/ValidateCustomerResponseAppModelClass.swift @@ -9,24 +9,24 @@ public extension ApplicationClient { class ValidateCustomerResponse: Codable { public var data: [String: Any] - public var success: Bool - public var message: String + public var success: Bool + public enum CodingKeys: String, CodingKey { case data - case success - case message + + case success } public init(data: [String: Any], message: String, success: Bool) { self.data = data - self.success = success - self.message = message + + self.success = success } required public init(from decoder: Decoder) throws { @@ -34,9 +34,9 @@ public extension ApplicationClient { data = try container.decode([String: Any].self, forKey: .data) - success = try container.decode(Bool.self, forKey: .success) - message = try container.decode(String.self, forKey: .message) + + success = try container.decode(Bool.self, forKey: .success) } public func encode(to encoder: Encoder) throws { @@ -44,9 +44,9 @@ public extension ApplicationClient { try? container.encodeIfPresent(data, forKey: .data) - try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(message, forKey: .message) + + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/WalletOtpResponseAppModelClass.swift b/Sources/code/application/models/WalletOtpResponseAppModelClass.swift index 393ba5a525..8cada95224 100644 --- a/Sources/code/application/models/WalletOtpResponseAppModelClass.swift +++ b/Sources/code/application/models/WalletOtpResponseAppModelClass.swift @@ -7,31 +7,35 @@ public extension ApplicationClient { Used By: Payment */ class WalletOtpResponse: Codable { - public var success: Bool? + public var isVerifiedFlag: String public var requestId: String - public var isVerifiedFlag: String + public var success: Bool? public enum CodingKeys: String, CodingKey { - case success + case isVerifiedFlag = "is_verified_flag" case requestId = "request_id" - case isVerifiedFlag = "is_verified_flag" + case success } public init(isVerifiedFlag: String, requestId: String, success: Bool? = nil) { - self.success = success + self.isVerifiedFlag = isVerifiedFlag self.requestId = requestId - self.isVerifiedFlag = isVerifiedFlag + self.success = success } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + isVerifiedFlag = try container.decode(String.self, forKey: .isVerifiedFlag) + + requestId = try container.decode(String.self, forKey: .requestId) + 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 {} - - requestId = try container.decode(String.self, forKey: .requestId) - - isVerifiedFlag = try container.decode(String.self, forKey: .isVerifiedFlag) } 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(requestId, forKey: .requestId) - try? container.encodeIfPresent(isVerifiedFlag, forKey: .isVerifiedFlag) + try? container.encodeIfPresent(success, forKey: .success) } } } diff --git a/Sources/code/application/models/WrongOtpErrorAppModelClass.swift b/Sources/code/application/models/WrongOtpErrorAppModelClass.swift index 9c1784ec8b..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 isVerifiedFlag: Bool + public var description: String public var success: String - public var isVerifiedFlag: Bool - public enum CodingKeys: String, CodingKey { + case isVerifiedFlag = "is_verified_flag" + case description case success - - case isVerifiedFlag = "is_verified_flag" } public init(description: String, isVerifiedFlag: Bool, success: String) { + self.isVerifiedFlag = isVerifiedFlag + self.description = description self.success = success - - self.isVerifiedFlag = isVerifiedFlag } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + isVerifiedFlag = try container.decode(Bool.self, forKey: .isVerifiedFlag) + description = try container.decode(String.self, forKey: .description) success = try container.decode(String.self, forKey: .success) - - isVerifiedFlag = try container.decode(Bool.self, forKey: .isVerifiedFlag) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(isVerifiedFlag, forKey: .isVerifiedFlag) + try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(success, forKey: .success) - - try? container.encodeIfPresent(isVerifiedFlag, forKey: .isVerifiedFlag) } } } diff --git a/Sources/code/platform/PlatformClient.swift b/Sources/code/platform/PlatformClient.swift index 9ef8fff787..70cbfd084a 100644 --- a/Sources/code/platform/PlatformClient.swift +++ b/Sources/code/platform/PlatformClient.swift @@ -8133,20 +8133,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 @@ -8157,7 +8157,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 { @@ -8325,20 +8325,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 @@ -8349,7 +8349,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/PlatformPageType.swift b/Sources/code/platform/PlatformPageType.swift index 47ac97217f..84f0cf5146 100644 --- a/Sources/code/platform/PlatformPageType.swift +++ b/Sources/code/platform/PlatformPageType.swift @@ -115,7 +115,7 @@ public extension PlatformClient { case .contactUs: return "/contact-us/" case .external: - return "/external/:url" + return "/external/" case .faq: return "/faq/:category" case .freshchat: diff --git a/Sources/code/platform/client/CatalogPlatformClient.swift b/Sources/code/platform/client/CatalogPlatformClient.swift index c348eae139..c59fac68bc 100644 --- a/Sources/code/platform/client/CatalogPlatformClient.swift +++ b/Sources/code/platform/client/CatalogPlatformClient.swift @@ -100,20 +100,20 @@ public extension PlatformClient { /** * - * Summary: Get a particular Product Bundle details - * Description: Get a particular Bundle details by its `id`. If successful, returns a Product bundle resource in the response body specified in `GetProductBundleResponse` + * Summary: Update a Product Bundle + * Description: Update a Product Bundle by its id. On successful request, returns the updated product bundle **/ - public func getProductBundleDetail( + public func updateProductBundle( id: String, - - onResponse: @escaping (_ response: GetProductBundleResponse?, _ error: FDKError?) -> Void + body: ProductBundleUpdateRequest, + onResponse: @escaping (_ response: GetProductBundleCreateResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "get", + method: "put", url: "/service/platform/catalog/v1.0/company/\(companyId)/productBundle/\(id)/", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -124,7 +124,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetProductBundleResponse.self, from: data) + let response = Utility.decode(GetProductBundleCreateResponse.self, from: data) onResponse(response, nil) } else { @@ -139,20 +139,20 @@ public extension PlatformClient { /** * - * Summary: Update a Product Bundle - * Description: Update a Product Bundle by its id. On successful request, returns the updated product bundle + * Summary: Get a particular Product Bundle details + * Description: Get a particular Bundle details by its `id`. If successful, returns a Product bundle resource in the response body specified in `GetProductBundleResponse` **/ - public func updateProductBundle( + public func getProductBundleDetail( id: String, - body: ProductBundleUpdateRequest, - onResponse: @escaping (_ response: GetProductBundleCreateResponse?, _ error: FDKError?) -> Void + + onResponse: @escaping (_ response: GetProductBundleResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "put", + method: "get", url: "/service/platform/catalog/v1.0/company/\(companyId)/productBundle/\(id)/", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -163,7 +163,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetProductBundleCreateResponse.self, from: data) + let response = Utility.decode(GetProductBundleResponse.self, from: data) onResponse(response, nil) } else { @@ -281,20 +281,20 @@ public extension PlatformClient { /** * - * Summary: Get a single size guide. - * Description: This API helps to get data associated to a size guide. + * Summary: Edit a size guide. + * Description: This API allows to edit a size guide. **/ - public func getSizeGuide( + public func updateSizeGuide( id: String, - - onResponse: @escaping (_ response: SizeGuideResponse?, _ error: FDKError?) -> Void + body: ValidateSizeGuide, + onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "get", + method: "put", url: "/service/platform/catalog/v1.0/company/\(companyId)/sizeguide/\(id)/", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -305,7 +305,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SizeGuideResponse.self, from: data) + let response = Utility.decode(SuccessResponse.self, from: data) onResponse(response, nil) } else { @@ -320,20 +320,20 @@ public extension PlatformClient { /** * - * Summary: Edit a size guide. - * Description: This API allows to edit a size guide. + * Summary: Get a single size guide. + * Description: This API helps to get data associated to a size guide. **/ - public func updateSizeGuide( + public func getSizeGuide( id: String, - body: ValidateSizeGuide, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + + onResponse: @escaping (_ response: SizeGuideResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "put", + method: "get", url: "/service/platform/catalog/v1.0/company/\(companyId)/sizeguide/\(id)/", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -344,7 +344,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SizeGuideResponse.self, from: data) onResponse(response, nil) } else { @@ -1284,20 +1284,20 @@ public extension PlatformClient { /** * - * Summary: Get product category by uid - * Description: This API gets meta associated to product categories. + * Summary: Update product categories + * Description: Update a product category using this apu **/ - public func getCategoryData( + public func updateCategory( uid: String, - - onResponse: @escaping (_ response: SingleCategoryResponse?, _ error: FDKError?) -> Void + body: CategoryRequestBody, + onResponse: @escaping (_ response: CategoryUpdateResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "get", + method: "put", url: "/service/platform/catalog/v1.0/company/\(companyId)/category/\(uid)/", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -1308,7 +1308,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SingleCategoryResponse.self, from: data) + let response = Utility.decode(CategoryUpdateResponse.self, from: data) onResponse(response, nil) } else { @@ -1323,20 +1323,20 @@ public extension PlatformClient { /** * - * Summary: Update product categories - * Description: Update a product category using this apu + * Summary: Get product category by uid + * Description: This API gets meta associated to product categories. **/ - public func updateCategory( + public func getCategoryData( uid: String, - body: CategoryRequestBody, - onResponse: @escaping (_ response: CategoryUpdateResponse?, _ error: FDKError?) -> Void + + onResponse: @escaping (_ response: SingleCategoryResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "put", + method: "get", url: "/service/platform/catalog/v1.0/company/\(companyId)/category/\(uid)/", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -1347,7 +1347,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CategoryUpdateResponse.self, from: data) + let response = Utility.decode(SingleCategoryResponse.self, from: data) onResponse(response, nil) } else { @@ -1485,20 +1485,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 @@ -2622,20 +2622,20 @@ public extension PlatformClient { /** * - * Summary: Fetch Hsn Code. - * Description: Fetch Hsn Code. + * Summary: Update Hsn Code. + * Description: Update Hsn Code. **/ - public func getHsnCode( + public func updateHsnCode( id: String, - + body: HsnUpsert, onResponse: @escaping (_ response: HsnCode?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "get", + method: "put", url: "/service/platform/catalog/v1.0/company/\(companyId)/hsn/\(id)/", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -2661,20 +2661,20 @@ public extension PlatformClient { /** * - * Summary: Update Hsn Code. - * Description: Update Hsn Code. + * Summary: Fetch Hsn Code. + * Description: Fetch Hsn Code. **/ - public func updateHsnCode( + public func getHsnCode( id: String, - body: HsnUpsert, + onResponse: @escaping (_ response: HsnCode?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "put", + method: "get", url: "/service/platform/catalog/v1.0/company/\(companyId)/hsn/\(id)/", 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 02f5e65bc8..e57995b4f8 100644 --- a/Sources/code/platform/client/CompanyProfilePlatformClient.swift +++ b/Sources/code/platform/client/CompanyProfilePlatformClient.swift @@ -12,19 +12,18 @@ public extension PlatformClient { /** * - * Summary: Edit company profile - * Description: This API allows to edit the company profile of the seller account. + * Summary: Get company profile + * Description: This API allows to view the company profile of the seller account. **/ - public func updateCompany( - body: UpdateCompany, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + public func cbsOnboardGet( + onResponse: @escaping (_ response: GetCompanyProfileSerializerResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "patch", + method: "get", url: "/service/platform/company-profile/v1.0/company/\(companyId)", query: nil, - body: body.dictionary, + body: nil, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -35,7 +34,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(GetCompanyProfileSerializerResponse.self, from: data) onResponse(response, nil) } else { @@ -50,18 +49,19 @@ public extension PlatformClient { /** * - * Summary: Get company profile - * Description: This API allows to view the company profile of the seller account. + * Summary: Edit company profile + * Description: This API allows to edit the company profile of the seller account. **/ - public func cbsOnboardGet( - onResponse: @escaping (_ response: GetCompanyProfileSerializerResponse?, _ error: FDKError?) -> Void + public func updateCompany( + body: UpdateCompany, + onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void ) { PlatformAPIClient.execute( config: config, - method: "get", + method: "patch", url: "/service/platform/company-profile/v1.0/company/\(companyId)", query: nil, - body: nil, + body: body.dictionary, headers: [], responseType: "application/json", onResponse: { responseData, error, responseCode in @@ -72,7 +72,7 @@ public extension PlatformClient { } onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetCompanyProfileSerializerResponse.self, from: data) + let response = Utility.decode(SuccessResponse.self, from: data) onResponse(response, nil) } else { @@ -124,20 +124,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 @@ -148,7 +148,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 { @@ -163,20 +163,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 @@ -187,7 +187,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 { @@ -500,20 +500,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 @@ -524,7 +524,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 { @@ -539,20 +539,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 @@ -563,7 +563,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 { diff --git a/Sources/code/platform/models/AddBeneficiaryDetailsRequestPlatformModelClass.swift b/Sources/code/platform/models/AddBeneficiaryDetailsRequestPlatformModelClass.swift index 84ae174fe0..8b965961f9 100644 --- a/Sources/code/platform/models/AddBeneficiaryDetailsRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/AddBeneficiaryDetailsRequestPlatformModelClass.swift @@ -8,75 +8,75 @@ public extension PlatformClient { */ class AddBeneficiaryDetailsRequest: Codable { - public var shipmentId: String + public var delights: Bool + + public var requestId: String? + + public var orderId: String public var details: BeneficiaryModeDetails public var transferMode: String - public var otp: String? + public var shipmentId: String - public var delights: Bool + public var otp: String? - public var orderId: String + public enum CodingKeys: String, CodingKey { + case delights - public var requestId: String? + case requestId = "request_id" - public enum CodingKeys: String, CodingKey { - case shipmentId = "shipment_id" + case orderId = "order_id" case details case transferMode = "transfer_mode" - case otp - - case delights - - case orderId = "order_id" + case shipmentId = "shipment_id" - case requestId = "request_id" + case otp } public init(delights: Bool, details: BeneficiaryModeDetails, orderId: String, otp: String? = nil, requestId: String? = nil, shipmentId: String, transferMode: String) { - self.shipmentId = shipmentId + self.delights = delights - self.details = details + self.requestId = requestId - self.transferMode = transferMode + self.orderId = orderId - self.otp = otp + self.details = details - self.delights = delights + self.transferMode = transferMode - self.orderId = orderId + self.shipmentId = shipmentId - self.requestId = requestId + self.otp = otp } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - shipmentId = try container.decode(String.self, forKey: .shipmentId) - - details = try container.decode(BeneficiaryModeDetails.self, forKey: .details) - - transferMode = try container.decode(String.self, forKey: .transferMode) + 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 {} - delights = try container.decode(Bool.self, forKey: .delights) - orderId = try container.decode(String.self, forKey: .orderId) + details = try container.decode(BeneficiaryModeDetails.self, forKey: .details) + + transferMode = try container.decode(String.self, forKey: .transferMode) + + 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) @@ -87,19 +87,19 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) + try? container.encodeIfPresent(delights, forKey: .delights) - try? container.encodeIfPresent(details, forKey: .details) + try? container.encodeIfPresent(requestId, forKey: .requestId) - try? container.encodeIfPresent(transferMode, forKey: .transferMode) + try? container.encodeIfPresent(orderId, forKey: .orderId) - try? container.encodeIfPresent(otp, forKey: .otp) + try? container.encodeIfPresent(details, forKey: .details) - try? container.encodeIfPresent(delights, forKey: .delights) + try? container.encodeIfPresent(transferMode, forKey: .transferMode) - try? container.encodeIfPresent(orderId, forKey: .orderId) + try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) - try? container.encodeIfPresent(requestId, forKey: .requestId) + try? container.encodeIfPresent(otp, forKey: .otp) } } } diff --git a/Sources/code/platform/models/AppCatalogConfigurationPlatformModelClass.swift b/Sources/code/platform/models/AppCatalogConfigurationPlatformModelClass.swift index 777a546f73..902cc1273c 100644 --- a/Sources/code/platform/models/AppCatalogConfigurationPlatformModelClass.swift +++ b/Sources/code/platform/models/AppCatalogConfigurationPlatformModelClass.swift @@ -8,63 +8,61 @@ public extension PlatformClient { */ class AppCatalogConfiguration: Codable { - public var configId: String? - public var appId: String - public var configType: String - public var product: ConfigurationProduct? + public var id: String? + + public var configId: String? + public var listing: ConfigurationListing? - public var id: String? + public var configType: String public enum CodingKeys: String, CodingKey { - case configId = "config_id" - case appId = "app_id" - case configType = "config_type" - case product + case id + + case configId = "config_id" + case listing - case id + case configType = "config_type" } public init(appId: String, configId: String? = nil, configType: String, id: String? = nil, listing: ConfigurationListing? = nil, product: ConfigurationProduct? = nil) { - self.configId = configId - self.appId = appId - self.configType = configType - self.product = product + self.id = id + + self.configId = configId + self.listing = listing - self.id = id + self.configType = configType } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + 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 {} - appId = try container.decode(String.self, forKey: .appId) - - configType = try container.decode(String.self, forKey: .configType) - do { - product = try container.decode(ConfigurationProduct.self, forKey: .product) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -72,7 +70,7 @@ public extension PlatformClient { } catch {} do { - listing = try container.decode(ConfigurationListing.self, forKey: .listing) + configId = try container.decode(String.self, forKey: .configId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -80,28 +78,30 @@ public extension PlatformClient { } catch {} 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) print("codingPath:", context.codingPath) } catch {} + + 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(configId, forKey: .configId) - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(configType, forKey: .configType) - try? container.encodeIfPresent(product, forKey: .product) + try? container.encodeIfPresent(id, forKey: .id) + + try? container.encodeIfPresent(configId, forKey: .configId) + try? container.encodeIfPresent(listing, forKey: .listing) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(configType, forKey: .configType) } } } diff --git a/Sources/code/platform/models/AppConfigurationPlatformModelClass.swift b/Sources/code/platform/models/AppConfigurationPlatformModelClass.swift index 1d09a71d14..a9783c39c1 100644 --- a/Sources/code/platform/models/AppConfigurationPlatformModelClass.swift +++ b/Sources/code/platform/models/AppConfigurationPlatformModelClass.swift @@ -8,57 +8,55 @@ public extension PlatformClient { */ class AppConfiguration: Codable { - public var configId: String? - public var appId: String - public var configType: String - public var product: ConfigurationProduct? + public var configId: String? + public var listing: ConfigurationListing? - public enum CodingKeys: String, CodingKey { - case configId = "config_id" + public var configType: String + public enum CodingKeys: String, CodingKey { case appId = "app_id" - case configType = "config_type" - case product + case configId = "config_id" + case listing + + case configType = "config_type" } public init(appId: String, configId: String? = nil, configType: String, listing: ConfigurationListing? = nil, product: ConfigurationProduct? = nil) { - self.configId = configId - self.appId = appId - self.configType = configType - self.product = product + self.configId = configId + self.listing = listing + + self.configType = configType } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + 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 {} - appId = try container.decode(String.self, forKey: .appId) - - configType = try container.decode(String.self, forKey: .configType) - 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) @@ -72,20 +70,22 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + 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(configId, forKey: .configId) - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(configType, forKey: .configType) - try? container.encodeIfPresent(product, forKey: .product) + try? container.encodeIfPresent(configId, forKey: .configId) + try? container.encodeIfPresent(listing, forKey: .listing) + + try? container.encodeIfPresent(configType, forKey: .configType) } } } diff --git a/Sources/code/platform/models/ApplicationProductListingResponsePlatformModelClass.swift b/Sources/code/platform/models/ApplicationProductListingResponsePlatformModelClass.swift index 1416acec6f..66053f5409 100644 --- a/Sources/code/platform/models/ApplicationProductListingResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/ApplicationProductListingResponsePlatformModelClass.swift @@ -8,39 +8,41 @@ public extension PlatformClient { */ class ApplicationProductListingResponse: Codable { - public var sortOn: [ProductSortOn]? + public var page: Page public var filters: [ProductFilters]? public var items: [ProductListingDetail]? - public var page: Page + public var sortOn: [ProductSortOn]? public enum CodingKeys: String, CodingKey { - case sortOn = "sort_on" + case page case filters case items - case page + case sortOn = "sort_on" } public init(filters: [ProductFilters]? = nil, items: [ProductListingDetail]? = nil, page: Page, sortOn: [ProductSortOn]? = nil) { - self.sortOn = sortOn + self.page = page self.filters = filters self.items = items - self.page = page + 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 { - 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) @@ -48,7 +50,7 @@ public extension PlatformClient { } catch {} 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) @@ -56,26 +58,24 @@ 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) 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(page, forKey: .page) try? container.encodeIfPresent(filters, forKey: .filters) try? container.encodeIfPresent(items, forKey: .items) - try? container.encodeIfPresent(page, forKey: .page) + try? container.encodeIfPresent(sortOn, forKey: .sortOn) } } } diff --git a/Sources/code/platform/models/ArticleQueryPlatformModelClass.swift b/Sources/code/platform/models/ArticleQueryPlatformModelClass.swift index 7085f99581..87fad44b07 100644 --- a/Sources/code/platform/models/ArticleQueryPlatformModelClass.swift +++ b/Sources/code/platform/models/ArticleQueryPlatformModelClass.swift @@ -8,31 +8,35 @@ public extension PlatformClient { */ class ArticleQuery: Codable { - public var ignoredStores: [Int]? - public var size: String public var itemId: Int - public enum CodingKeys: String, CodingKey { - case ignoredStores = "ignored_stores" + public var ignoredStores: [Int]? + public enum CodingKeys: String, CodingKey { case size case itemId = "item_id" + + case ignoredStores = "ignored_stores" } public init(ignoredStores: [Int]? = nil, itemId: Int, size: String) { - self.ignoredStores = ignoredStores - self.size = size self.itemId = itemId + + self.ignoredStores = ignoredStores } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + size = try container.decode(String.self, forKey: .size) + + itemId = try container.decode(Int.self, forKey: .itemId) + do { ignoredStores = try container.decode([Int].self, forKey: .ignoredStores) @@ -40,20 +44,16 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - size = try container.decode(String.self, forKey: .size) - - itemId = try container.decode(Int.self, forKey: .itemId) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(ignoredStores, forKey: .ignoredStores) - try? container.encodeIfPresent(size, forKey: .size) try? container.encodeIfPresent(itemId, forKey: .itemId) + + try? container.encodeIfPresent(ignoredStores, forKey: .ignoredStores) } } } diff --git a/Sources/code/platform/models/AssignStoreArticlePlatformModelClass.swift b/Sources/code/platform/models/AssignStoreArticlePlatformModelClass.swift index 9bb022ab95..9520283b21 100644 --- a/Sources/code/platform/models/AssignStoreArticlePlatformModelClass.swift +++ b/Sources/code/platform/models/AssignStoreArticlePlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class AssignStoreArticle: Codable { - public var articleAssignment: ArticleAssignment? + public var quantity: Int? - public var query: ArticleQuery? + public var articleAssignment: ArticleAssignment? public var groupId: String? - public var quantity: Int? + public var query: ArticleQuery? public var meta: [String: Any]? public enum CodingKeys: String, CodingKey { - case articleAssignment = "article_assignment" + case quantity - case query + case articleAssignment = "article_assignment" case groupId = "group_id" - case quantity + case query case meta } public init(articleAssignment: ArticleAssignment? = nil, groupId: String? = nil, meta: [String: Any]? = nil, quantity: Int? = nil, query: ArticleQuery? = nil) { - self.articleAssignment = articleAssignment + self.quantity = quantity - self.query = query + self.articleAssignment = articleAssignment self.groupId = groupId - self.quantity = quantity + self.query = query self.meta = meta } @@ -46,7 +46,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -54,7 +54,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) @@ -70,7 +70,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) @@ -89,13 +89,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(articleAssignment, forKey: .articleAssignment) + try? container.encodeIfPresent(quantity, forKey: .quantity) - try? container.encodeIfPresent(query, forKey: .query) + try? container.encodeIfPresent(articleAssignment, forKey: .articleAssignment) try? container.encodeIfPresent(groupId, forKey: .groupId) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(query, forKey: .query) try? container.encodeIfPresent(meta, forKey: .meta) } diff --git a/Sources/code/platform/models/AssignStorePlatformModelClass.swift b/Sources/code/platform/models/AssignStorePlatformModelClass.swift index 73dc2d7cf7..c1e013bf95 100644 --- a/Sources/code/platform/models/AssignStorePlatformModelClass.swift +++ b/Sources/code/platform/models/AssignStorePlatformModelClass.swift @@ -8,56 +8,56 @@ public extension PlatformClient { */ class AssignStore: Codable { - public var articles: [AssignStoreArticle] + public var appId: String public var companyId: Int? - public var appId: String - - public var channelType: String? + public var channelIdentifier: String? - public var pincode: String + public var articles: [AssignStoreArticle] - public var channelIdentifier: String? + public var channelType: String? public var storeIds: [Int]? + public var pincode: String + public enum CodingKeys: String, CodingKey { - case articles + case appId = "app_id" case companyId = "company_id" - case appId = "app_id" - - case channelType = "channel_type" + case channelIdentifier = "channel_identifier" - case pincode + case articles - case channelIdentifier = "channel_identifier" + case channelType = "channel_type" case storeIds = "store_ids" + + case pincode } public init(appId: String, articles: [AssignStoreArticle], channelIdentifier: String? = nil, channelType: String? = nil, companyId: Int? = nil, pincode: String, storeIds: [Int]? = nil) { - self.articles = articles + self.appId = appId self.companyId = companyId - self.appId = appId - - self.channelType = channelType + self.channelIdentifier = channelIdentifier - self.pincode = pincode + self.articles = articles - self.channelIdentifier = channelIdentifier + self.channelType = channelType self.storeIds = storeIds + + self.pincode = pincode } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - articles = try container.decode([AssignStoreArticle].self, forKey: .articles) + appId = try container.decode(String.self, forKey: .appId) do { companyId = try container.decode(Int.self, forKey: .companyId) @@ -67,20 +67,18 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - appId = try container.decode(String.self, forKey: .appId) - do { - channelType = try container.decode(String.self, forKey: .channelType) + 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 {} - pincode = try container.decode(String.self, forKey: .pincode) + articles = try container.decode([AssignStoreArticle].self, forKey: .articles) do { - channelIdentifier = try container.decode(String.self, forKey: .channelIdentifier) + channelType = try container.decode(String.self, forKey: .channelType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -94,24 +92,26 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + pincode = try container.decode(String.self, forKey: .pincode) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(articles, forKey: .articles) + try? container.encodeIfPresent(appId, forKey: .appId) try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(appId, forKey: .appId) - - try? container.encodeIfPresent(channelType, forKey: .channelType) + try? container.encodeIfPresent(channelIdentifier, forKey: .channelIdentifier) - try? container.encodeIfPresent(pincode, forKey: .pincode) + try? container.encodeIfPresent(articles, forKey: .articles) - try? container.encodeIfPresent(channelIdentifier, forKey: .channelIdentifier) + try? container.encodeIfPresent(channelType, forKey: .channelType) try? container.encodeIfPresent(storeIds, forKey: .storeIds) + + try? container.encodeIfPresent(pincode, forKey: .pincode) } } } diff --git a/Sources/code/platform/models/AttributeMasterFilterPlatformModelClass.swift b/Sources/code/platform/models/AttributeMasterFilterPlatformModelClass.swift index 35ae5d0745..eb25026d5b 100644 --- a/Sources/code/platform/models/AttributeMasterFilterPlatformModelClass.swift +++ b/Sources/code/platform/models/AttributeMasterFilterPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class AttributeMasterFilter: Codable { - public var dependsOn: [String]? + public var priority: Int? public var indexing: Bool - public var priority: Int? + public var dependsOn: [String]? public enum CodingKeys: String, CodingKey { - case dependsOn = "depends_on" + case priority case indexing - case priority + case dependsOn = "depends_on" } public init(dependsOn: [String]? = nil, indexing: Bool, priority: Int? = nil) { - self.dependsOn = dependsOn + self.priority = priority self.indexing = indexing - self.priority = priority + self.dependsOn = dependsOn } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -44,7 +44,7 @@ public extension PlatformClient { indexing = try container.decode(Bool.self, forKey: .indexing) 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) @@ -55,11 +55,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(dependsOn, forKey: .dependsOn) + try? container.encodeIfPresent(priority, forKey: .priority) try? container.encodeIfPresent(indexing, forKey: .indexing) - try? container.encodeIfPresent(priority, forKey: .priority) + try? container.encodeIfPresent(dependsOn, forKey: .dependsOn) } } } diff --git a/Sources/code/platform/models/AttributeMasterPlatformModelClass.swift b/Sources/code/platform/models/AttributeMasterPlatformModelClass.swift index 1987d08892..b5871efee8 100644 --- a/Sources/code/platform/models/AttributeMasterPlatformModelClass.swift +++ b/Sources/code/platform/models/AttributeMasterPlatformModelClass.swift @@ -10,42 +10,42 @@ public extension PlatformClient { class AttributeMaster: Codable { public var mandatory: Bool? - public var format: String? - public var allowedValues: [String]? + public var range: AttributeSchemaRange? + public var type: String - public var multi: Bool? + public var format: String? - public var range: AttributeSchemaRange? + public var multi: Bool? public enum CodingKeys: String, CodingKey { case mandatory - case format - case allowedValues = "allowed_values" + case range + case type - case multi + case format - case range + case multi } public init(allowedValues: [String]? = nil, format: String? = nil, mandatory: Bool? = nil, multi: Bool? = nil, range: AttributeSchemaRange? = nil, type: String) { self.mandatory = mandatory - self.format = format - self.allowedValues = allowedValues + self.range = range + self.type = type - self.multi = multi + self.format = format - self.range = range + self.multi = multi } required public init(from decoder: Decoder) throws { @@ -60,7 +60,7 @@ public extension PlatformClient { } catch {} do { - format = try container.decode(String.self, forKey: .format) + allowedValues = try container.decode([String].self, forKey: .allowedValues) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ 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) @@ -78,7 +78,7 @@ public extension PlatformClient { type = try container.decode(String.self, forKey: .type) 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) @@ -86,7 +86,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) @@ -99,15 +99,15 @@ public extension PlatformClient { try? container.encodeIfPresent(mandatory, forKey: .mandatory) - try? container.encodeIfPresent(format, forKey: .format) - try? container.encodeIfPresent(allowedValues, forKey: .allowedValues) + try? container.encodeIfPresent(range, forKey: .range) + try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(multi, forKey: .multi) + try? container.encodeIfPresent(format, forKey: .format) - try? container.encodeIfPresent(range, forKey: .range) + try? container.encodeIfPresent(multi, forKey: .multi) } } } diff --git a/Sources/code/platform/models/AutocompleteActionPlatformModelClass.swift b/Sources/code/platform/models/AutocompleteActionPlatformModelClass.swift index 809c34d10a..15e509496f 100644 --- a/Sources/code/platform/models/AutocompleteActionPlatformModelClass.swift +++ b/Sources/code/platform/models/AutocompleteActionPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class AutocompleteAction: Codable { - public var type: String? - public var page: AutocompletePageAction? - public enum CodingKeys: String, CodingKey { - case type + public var type: String? + public enum CodingKeys: String, CodingKey { case page + + case type } public init(page: AutocompletePageAction? = nil, type: String? = nil) { - self.type = type - self.page = page + + 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) + page = try container.decode(AutocompletePageAction.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(AutocompletePageAction.self, forKey: .page) + 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(page, forKey: .page) + + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/AutocompletePageActionPlatformModelClass.swift b/Sources/code/platform/models/AutocompletePageActionPlatformModelClass.swift index 9d5a9a95ec..dd96673c16 100644 --- a/Sources/code/platform/models/AutocompletePageActionPlatformModelClass.swift +++ b/Sources/code/platform/models/AutocompletePageActionPlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class AutocompletePageAction: Codable { + public var params: [String: Any]? + public var type: String? public var query: [String: Any]? public var url: String? - public var params: [String: Any]? - public enum CodingKeys: String, CodingKey { + case params + case type case query case url - - case params } public init(params: [String: Any]? = nil, query: [String: Any]? = nil, type: String? = nil, url: String? = nil) { + self.params = params + self.type = type self.query = query self.url = url - - self.params = params } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - type = try container.decode(String.self, forKey: .type) + params = try container.decode([String: Any].self, forKey: .params) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} 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) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - params = try container.decode([String: Any].self, forKey: .params) + url = try container.decode(String.self, forKey: .url) } 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(params, forKey: .params) + try? container.encodeIfPresent(type, forKey: .type) try? container.encodeIfPresent(query, forKey: .query) try? container.encodeIfPresent(url, forKey: .url) - - try? container.encodeIfPresent(params, forKey: .params) } } } diff --git a/Sources/code/platform/models/AutocompleteResultPlatformModelClass.swift b/Sources/code/platform/models/AutocompleteResultPlatformModelClass.swift index b1ff56e525..56e8dd0e30 100644 --- a/Sources/code/platform/models/AutocompleteResultPlatformModelClass.swift +++ b/Sources/code/platform/models/AutocompleteResultPlatformModelClass.swift @@ -12,18 +12,18 @@ public extension PlatformClient { public var customJson: [String: Any]? - public var logo: Media? - public var action: AutocompleteAction? + public var logo: Media? + public enum CodingKeys: String, CodingKey { case display case customJson = "_custom_json" - case logo - case action + + case logo } public init(action: AutocompleteAction? = nil, display: String? = nil, logo: Media? = nil, customJson: [String: Any]? = nil) { @@ -31,9 +31,9 @@ public extension PlatformClient { self.customJson = customJson - self.logo = logo - self.action = action + + self.logo = logo } required public init(from decoder: Decoder) throws { @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + action = try container.decode(AutocompleteAction.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,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) @@ -79,9 +79,9 @@ public extension PlatformClient { try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(action, forKey: .action) + + try? container.encodeIfPresent(logo, forKey: .logo) } } } diff --git a/Sources/code/platform/models/BannerImagePlatformModelClass.swift b/Sources/code/platform/models/BannerImagePlatformModelClass.swift index 9a9117ea09..aa1862d8de 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 url: String? - public var aspectRatio: String? - public enum CodingKeys: String, CodingKey { - case url + public var url: String? + public enum CodingKeys: String, CodingKey { case aspectRatio = "aspect_ratio" + + case url } public init(aspectRatio: String? = nil, url: String? = nil) { - self.url = url - self.aspectRatio = aspectRatio + + 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) + aspectRatio = try container.decode(String.self, forKey: .aspectRatio) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} 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) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(url, forKey: .url) - try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) + + try? container.encodeIfPresent(url, forKey: .url) } } } diff --git a/Sources/code/platform/models/BeneficiaryModeDetailsPlatformModelClass.swift b/Sources/code/platform/models/BeneficiaryModeDetailsPlatformModelClass.swift index 5b7c51f527..5f24022f9c 100644 --- a/Sources/code/platform/models/BeneficiaryModeDetailsPlatformModelClass.swift +++ b/Sources/code/platform/models/BeneficiaryModeDetailsPlatformModelClass.swift @@ -8,13 +8,9 @@ public extension PlatformClient { */ class BeneficiaryModeDetails: Codable { - public var bankName: String - - public var email: String - - public var vpa: String? + public var mobile: String - public var accountHolder: String + public var wallet: String? public var branchName: String @@ -24,20 +20,20 @@ public extension PlatformClient { public var comment: String? - public var mobile: String + public var email: String public var accountNo: String - public var wallet: String? + public var vpa: String? - public enum CodingKeys: String, CodingKey { - case bankName = "bank_name" + public var bankName: String - case email + public var accountHolder: String - case vpa + public enum CodingKeys: String, CodingKey { + case mobile - case accountHolder = "account_holder" + case wallet case branchName = "branch_name" @@ -47,21 +43,21 @@ public extension PlatformClient { case comment - case mobile + case email case accountNo = "account_no" - case wallet - } + case vpa - 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.bankName = bankName + case bankName = "bank_name" - self.email = email + case accountHolder = "account_holder" + } - self.vpa = vpa + 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.mobile = mobile - self.accountHolder = accountHolder + self.wallet = wallet self.branchName = branchName @@ -71,30 +67,30 @@ public extension PlatformClient { self.comment = comment - self.mobile = mobile + self.email = email self.accountNo = accountNo - self.wallet = wallet + self.vpa = vpa + + self.bankName = bankName + + self.accountHolder = accountHolder } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - bankName = try container.decode(String.self, forKey: .bankName) - - email = try container.decode(String.self, forKey: .email) + mobile = try container.decode(String.self, forKey: .mobile) do { - vpa = try container.decode(String.self, forKey: .vpa) + 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 {} - accountHolder = try container.decode(String.self, forKey: .accountHolder) - branchName = try container.decode(String.self, forKey: .branchName) ifscCode = try container.decode(String.self, forKey: .ifscCode) @@ -115,29 +111,29 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - mobile = try container.decode(String.self, forKey: .mobile) + email = try container.decode(String.self, forKey: .email) accountNo = try container.decode(String.self, forKey: .accountNo) 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 {} + + bankName = try container.decode(String.self, forKey: .bankName) + + accountHolder = try container.decode(String.self, forKey: .accountHolder) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(bankName, forKey: .bankName) - - try? container.encodeIfPresent(email, forKey: .email) - - try? container.encode(vpa, forKey: .vpa) + try? container.encodeIfPresent(mobile, forKey: .mobile) - try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) + try? container.encode(wallet, forKey: .wallet) try? container.encodeIfPresent(branchName, forKey: .branchName) @@ -147,11 +143,15 @@ public extension PlatformClient { try? container.encodeIfPresent(comment, forKey: .comment) - try? container.encodeIfPresent(mobile, forKey: .mobile) + try? container.encodeIfPresent(email, forKey: .email) try? container.encodeIfPresent(accountNo, forKey: .accountNo) - try? container.encode(wallet, forKey: .wallet) + try? container.encode(vpa, forKey: .vpa) + + try? container.encodeIfPresent(bankName, forKey: .bankName) + + try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) } } } diff --git a/Sources/code/platform/models/BrandItemPlatformModelClass.swift b/Sources/code/platform/models/BrandItemPlatformModelClass.swift index 3acb80d385..ec4e0f88bd 100644 --- a/Sources/code/platform/models/BrandItemPlatformModelClass.swift +++ b/Sources/code/platform/models/BrandItemPlatformModelClass.swift @@ -8,53 +8,53 @@ public extension PlatformClient { */ class BrandItem: Codable { - public var name: String? - public var banners: ImageUrls? - public var departments: [String]? - - public var logo: Media? + public var name: String? public var discount: String? + public var departments: [String]? + public var action: Action? + public var logo: Media? + public var uid: Int? public var slug: String? public enum CodingKeys: String, CodingKey { - case name - case banners - case departments - - case logo + case name case discount + case departments + case action + case logo + case uid case slug } 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.name = name - self.banners = banners - self.departments = departments - - self.logo = logo + self.name = name self.discount = discount + self.departments = departments + self.action = action + self.logo = logo + self.uid = uid self.slug = slug @@ -64,7 +64,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -72,7 +72,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) @@ -80,7 +80,7 @@ public extension PlatformClient { } 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) @@ -88,7 +88,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) @@ -96,7 +96,7 @@ public extension PlatformClient { } catch {} do { - discount = try container.decode(String.self, forKey: .discount) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +104,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) @@ -131,18 +131,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.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(departments, forKey: .departments) - - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(discount, forKey: .discount) + try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(slug, forKey: .slug) diff --git a/Sources/code/platform/models/BrandListingResponsePlatformModelClass.swift b/Sources/code/platform/models/BrandListingResponsePlatformModelClass.swift index 9d659e609b..f21fdd54b5 100644 --- a/Sources/code/platform/models/BrandListingResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/BrandListingResponsePlatformModelClass.swift @@ -8,25 +8,27 @@ public extension PlatformClient { */ class BrandListingResponse: Codable { - public var items: [BrandItem]? - public var page: Page - public enum CodingKeys: String, CodingKey { - case items + public var items: [BrandItem]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [BrandItem]? = nil, page: Page) { - self.items = items - self.page = page + + self.items = items } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + page = try container.decode(Page.self, forKey: .page) + do { items = try container.decode([BrandItem].self, forKey: .items) @@ -34,16 +36,14 @@ public extension PlatformClient { 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(items, forKey: .items) - try? container.encodeIfPresent(page, forKey: .page) + + try? container.encodeIfPresent(items, forKey: .items) } } } diff --git a/Sources/code/platform/models/BrandPlatformModelClass.swift b/Sources/code/platform/models/BrandPlatformModelClass.swift index 5a6c04cbf3..63977f672c 100644 --- a/Sources/code/platform/models/BrandPlatformModelClass.swift +++ b/Sources/code/platform/models/BrandPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class Brand: Codable { public var logo: Logo? - public var name: String? - public var uid: Int? + public var name: String? + public enum CodingKeys: String, CodingKey { case logo - case name - case uid + + case name } public init(logo: Logo? = nil, name: String? = nil, uid: Int? = nil) { self.logo = logo - self.name = name - self.uid = uid + + self.name = name } required public init(from decoder: Decoder) throws { @@ -42,7 +42,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) @@ -50,7 +50,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) @@ -63,9 +63,9 @@ public extension PlatformClient { try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/platform/models/BulkAssetResponsePlatformModelClass.swift b/Sources/code/platform/models/BulkAssetResponsePlatformModelClass.swift index f94caa8a8d..c394e160c8 100644 --- a/Sources/code/platform/models/BulkAssetResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/BulkAssetResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class BulkAssetResponse: Codable { - public var items: [Items]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [Items]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [Items]? = 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([Items].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([Items].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/BulkInventoryGetItemsPlatformModelClass.swift b/Sources/code/platform/models/BulkInventoryGetItemsPlatformModelClass.swift index c7fe27b80f..cba3751817 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 filePath: String? - - public var failedRecords: [String]? - public var total: Int? public var companyId: Int? - public var modifiedBy: [String: Any]? + public var createdBy: [String: Any]? - public var isActive: Bool? + public var failed: Int? - public var createdOn: String? + public var modifiedBy: [String: Any]? - public var createdBy: [String: Any]? + public var id: String? - public var failed: Int? + public var createdOn: String? public var cancelled: Int? - public var succeed: Int? + public var stage: String? public var cancelledRecords: [String]? - public var id: String? - - public var stage: String? + public var failedRecords: [String]? public var modifiedOn: String? - public enum CodingKeys: String, CodingKey { - case filePath = "file_path" + public var succeed: Int? - case failedRecords = "failed_records" + public var isActive: Bool? + + public var filePath: String? + public enum CodingKeys: String, CodingKey { case total case companyId = "company_id" - case modifiedBy = "modified_by" + case createdBy = "created_by" - case isActive = "is_active" + case failed - case createdOn = "created_on" + case modifiedBy = "modified_by" - case createdBy = "created_by" + case id - case failed + case createdOn = "created_on" case cancelled - case succeed + case stage case cancelledRecords = "cancelled_records" - case id - - case stage + case failedRecords = "failed_records" case modifiedOn = "modified_on" - } - 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.filePath = filePath + case succeed - self.failedRecords = failedRecords + case isActive = "is_active" + + case filePath = "file_path" + } + 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.total = total self.companyId = companyId - self.modifiedBy = modifiedBy + self.createdBy = createdBy - self.isActive = isActive + self.failed = failed - self.createdOn = createdOn + self.modifiedBy = modifiedBy - self.createdBy = createdBy + self.id = id - self.failed = failed + self.createdOn = createdOn self.cancelled = cancelled - self.succeed = succeed + self.stage = stage self.cancelledRecords = cancelledRecords - self.id = id - - self.stage = stage + self.failedRecords = failedRecords self.modifiedOn = modifiedOn + + self.succeed = succeed + + self.isActive = isActive + + self.filePath = filePath } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - filePath = try container.decode(String.self, forKey: .filePath) + total = try container.decode(Int.self, forKey: .total) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +114,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) @@ -122,7 +122,7 @@ public extension PlatformClient { } catch {} do { - total = try container.decode(Int.self, forKey: .total) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension PlatformClient { } catch {} do { - companyId = try container.decode(Int.self, forKey: .companyId) + 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 { - isActive = try container.decode(Bool.self, forKey: .isActive) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + cancelled = try container.decode(Int.self, forKey: .cancelled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +170,7 @@ public extension PlatformClient { } catch {} do { - failed = try container.decode(Int.self, forKey: .failed) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -178,7 +178,7 @@ public extension PlatformClient { } catch {} do { - cancelled = try container.decode(Int.self, forKey: .cancelled) + cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,7 +186,7 @@ public extension PlatformClient { } catch {} do { - succeed = try container.decode(Int.self, forKey: .succeed) + failedRecords = try container.decode([String].self, forKey: .failedRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +194,7 @@ public extension PlatformClient { } catch {} do { - cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -202,7 +202,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + succeed = try container.decode(Int.self, forKey: .succeed) } 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) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +218,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + filePath = try container.decode(String.self, forKey: .filePath) } 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(filePath, forKey: .filePath) - - try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) - try? container.encodeIfPresent(total, forKey: .total) try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(failed, forKey: .failed) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(failed, forKey: .failed) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) try? container.encodeIfPresent(cancelled, forKey: .cancelled) - try? container.encodeIfPresent(succeed, forKey: .succeed) + try? container.encodeIfPresent(stage, forKey: .stage) try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) - try? container.encodeIfPresent(id, forKey: .id) - - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + try? container.encodeIfPresent(succeed, forKey: .succeed) + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(filePath, forKey: .filePath) } } } diff --git a/Sources/code/platform/models/BulkInventoryGetPlatformModelClass.swift b/Sources/code/platform/models/BulkInventoryGetPlatformModelClass.swift index 2dd0568840..606fcd5d8e 100644 --- a/Sources/code/platform/models/BulkInventoryGetPlatformModelClass.swift +++ b/Sources/code/platform/models/BulkInventoryGetPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class BulkInventoryGet: Codable { - public var items: [BulkInventoryGetItems]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [BulkInventoryGetItems]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [BulkInventoryGetItems]? = 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([BulkInventoryGetItems].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([BulkInventoryGetItems].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/BulkJobPlatformModelClass.swift b/Sources/code/platform/models/BulkJobPlatformModelClass.swift index 0f73d324cb..78320cada7 100644 --- a/Sources/code/platform/models/BulkJobPlatformModelClass.swift +++ b/Sources/code/platform/models/BulkJobPlatformModelClass.swift @@ -8,117 +8,121 @@ public extension PlatformClient { */ class BulkJob: Codable { - public var filePath: String? - - public var failedRecords: [[String: Any]]? - public var total: Int public var companyId: Int - public var trackingUrl: String? + public var createdBy: UserInfo1? - public var customTemplateTag: String? + public var failed: Int? public var modifiedBy: UserInfo1? - public var isActive: Bool? - - public var templateTag: String? + public var trackingUrl: String? public var createdOn: String - public var createdBy: UserInfo1? - - public var succeed: Int? - public var cancelled: Int? - public var failed: Int? + public var stage: String? public var cancelledRecords: [[String: Any]]? - public var stage: String? + public var failedRecords: [[String: Any]]? public var modifiedOn: String? - public enum CodingKeys: String, CodingKey { - case filePath = "file_path" + public var succeed: Int? - case failedRecords = "failed_records" + public var templateTag: String? + + public var customTemplateTag: String? + + public var isActive: Bool? + + public var filePath: String? + public enum CodingKeys: String, CodingKey { case total case companyId = "company_id" - case trackingUrl = "tracking_url" + case createdBy = "created_by" - case customTemplateTag = "custom_template_tag" + case failed case modifiedBy = "modified_by" - case isActive = "is_active" - - case templateTag = "template_tag" + case trackingUrl = "tracking_url" case createdOn = "created_on" - case createdBy = "created_by" - - case succeed - case cancelled - case failed + case stage case cancelledRecords = "cancelled_records" - case stage + case failedRecords = "failed_records" case modifiedOn = "modified_on" - } - 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.filePath = filePath + case succeed - self.failedRecords = failedRecords + case templateTag = "template_tag" + + case customTemplateTag = "custom_template_tag" + + case isActive = "is_active" + case filePath = "file_path" + } + + 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.total = total self.companyId = companyId - self.trackingUrl = trackingUrl + self.createdBy = createdBy - self.customTemplateTag = customTemplateTag + self.failed = failed self.modifiedBy = modifiedBy - self.isActive = isActive - - self.templateTag = templateTag + self.trackingUrl = trackingUrl self.createdOn = createdOn - self.createdBy = createdBy - - self.succeed = succeed - self.cancelled = cancelled - self.failed = failed + self.stage = stage self.cancelledRecords = cancelledRecords - self.stage = stage + self.failedRecords = failedRecords self.modifiedOn = modifiedOn + + self.succeed = succeed + + self.templateTag = templateTag + + self.customTemplateTag = customTemplateTag + + self.isActive = isActive + + self.filePath = filePath } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + total = try container.decode(Int.self, forKey: .total) + + companyId = try container.decode(Int.self, forKey: .companyId) + do { - filePath = try container.decode(String.self, forKey: .filePath) + createdBy = try container.decode(UserInfo1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,19 +130,15 @@ public extension PlatformClient { } catch {} do { - failedRecords = try container.decode([[String: Any]].self, forKey: .failedRecords) + failed = try container.decode(Int.self, forKey: .failed) } 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) - - companyId = try container.decode(Int.self, forKey: .companyId) - do { - trackingUrl = try container.decode(String.self, forKey: .trackingUrl) + modifiedBy = try container.decode(UserInfo1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,15 +146,17 @@ public extension PlatformClient { } catch {} do { - customTemplateTag = try container.decode(String.self, forKey: .customTemplateTag) + 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 { - modifiedBy = try container.decode(UserInfo1.self, forKey: .modifiedBy) + cancelled = try container.decode(Int.self, forKey: .cancelled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +164,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,17 +172,15 @@ public extension PlatformClient { } catch {} do { - templateTag = try container.decode(String.self, forKey: .templateTag) + cancelledRecords = try container.decode([[String: Any]].self, forKey: .cancelledRecords) } 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 { - createdBy = try container.decode(UserInfo1.self, forKey: .createdBy) + failedRecords = try container.decode([[String: Any]].self, forKey: .failedRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -188,7 +188,7 @@ public extension PlatformClient { } catch {} do { - succeed = try container.decode(Int.self, forKey: .succeed) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -196,7 +196,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) @@ -204,7 +204,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) @@ -212,7 +212,7 @@ public extension PlatformClient { } catch {} do { - cancelledRecords = try container.decode([[String: Any]].self, forKey: .cancelledRecords) + customTemplateTag = try container.decode(String.self, forKey: .customTemplateTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -220,7 +220,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) @@ -228,7 +228,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + filePath = try container.decode(String.self, forKey: .filePath) } 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(filePath, forKey: .filePath) - - try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) - try? container.encodeIfPresent(total, forKey: .total) try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(trackingUrl, forKey: .trackingUrl) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(customTemplateTag, forKey: .customTemplateTag) + try? container.encodeIfPresent(failed, forKey: .failed) try? container.encode(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(isActive, forKey: .isActive) - - try? container.encodeIfPresent(templateTag, forKey: .templateTag) + try? container.encodeIfPresent(trackingUrl, forKey: .trackingUrl) try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - try? container.encodeIfPresent(succeed, forKey: .succeed) - try? container.encodeIfPresent(cancelled, forKey: .cancelled) - try? container.encodeIfPresent(failed, forKey: .failed) + try? container.encodeIfPresent(stage, forKey: .stage) try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + try? container.encodeIfPresent(succeed, forKey: .succeed) + + try? container.encodeIfPresent(templateTag, forKey: .templateTag) + + try? container.encodeIfPresent(customTemplateTag, forKey: .customTemplateTag) + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(filePath, forKey: .filePath) } } } diff --git a/Sources/code/platform/models/BulkResponsePlatformModelClass.swift b/Sources/code/platform/models/BulkResponsePlatformModelClass.swift index c7239da42f..39bdee0b54 100644 --- a/Sources/code/platform/models/BulkResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/BulkResponsePlatformModelClass.swift @@ -8,53 +8,51 @@ public extension PlatformClient { */ class BulkResponse: Codable { - public var batchId: String + public var createdBy: UserInfo1? public var modifiedBy: UserInfo1? - public var isActive: Bool? - public var createdOn: String - public var createdBy: UserInfo1? - public var modifiedOn: String? + public var batchId: String + + public var isActive: Bool? + public enum CodingKeys: String, CodingKey { - case batchId = "batch_id" + case createdBy = "created_by" case modifiedBy = "modified_by" - case isActive = "is_active" - case createdOn = "created_on" - case createdBy = "created_by" - case modifiedOn = "modified_on" + + case batchId = "batch_id" + + case isActive = "is_active" } public init(batchId: String, createdBy: UserInfo1? = nil, createdOn: String, isActive: Bool? = nil, modifiedBy: UserInfo1? = nil, modifiedOn: String? = nil) { - self.batchId = batchId + self.createdBy = createdBy self.modifiedBy = modifiedBy - self.isActive = isActive - self.createdOn = createdOn - self.createdBy = createdBy - self.modifiedOn = modifiedOn + + self.batchId = batchId + + self.isActive = isActive } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - batchId = try container.decode(String.self, forKey: .batchId) - do { - modifiedBy = try container.decode(UserInfo1.self, forKey: .modifiedBy) + createdBy = try container.decode(UserInfo1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +60,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + modifiedBy = try container.decode(UserInfo1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -72,15 +70,17 @@ public extension PlatformClient { createdOn = try container.decode(String.self, forKey: .createdOn) do { - createdBy = try container.decode(UserInfo1.self, forKey: .createdBy) + 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 { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + isActive = try container.decode(Bool.self, forKey: .isActive) } 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(batchId, forKey: .batchId) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) try? container.encode(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + try? container.encodeIfPresent(batchId, forKey: .batchId) + + try? container.encodeIfPresent(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/CatalogInsightBrandPlatformModelClass.swift b/Sources/code/platform/models/CatalogInsightBrandPlatformModelClass.swift index 8f971eb2d6..62ec12aa6f 100644 --- a/Sources/code/platform/models/CatalogInsightBrandPlatformModelClass.swift +++ b/Sources/code/platform/models/CatalogInsightBrandPlatformModelClass.swift @@ -8,8 +8,6 @@ public extension PlatformClient { */ class CatalogInsightBrand: Codable { - public var totalArticles: Int? - public var name: String? public var articleFreshness: Int? @@ -18,11 +16,11 @@ public extension PlatformClient { public var availableSizes: Int? + public var totalArticles: Int? + public var availableArticles: Int? public enum CodingKeys: String, CodingKey { - case totalArticles = "total_articles" - case name case articleFreshness = "article_freshness" @@ -31,12 +29,12 @@ public extension PlatformClient { case availableSizes = "available_sizes" + case totalArticles = "total_articles" + case availableArticles = "available_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.name = name self.articleFreshness = articleFreshness @@ -45,6 +43,8 @@ public extension PlatformClient { self.availableSizes = availableSizes + self.totalArticles = totalArticles + self.availableArticles = availableArticles } @@ -52,7 +52,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - totalArticles = try container.decode(Int.self, forKey: .totalArticles) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -60,7 +60,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + articleFreshness = try container.decode(Int.self, forKey: .articleFreshness) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,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) @@ -76,7 +76,7 @@ public extension PlatformClient { } catch {} do { - totalSizes = try container.decode(Int.self, forKey: .totalSizes) + availableSizes = try container.decode(Int.self, forKey: .availableSizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,7 +84,7 @@ public extension PlatformClient { } catch {} do { - availableSizes = try container.decode(Int.self, forKey: .availableSizes) + totalArticles = try container.decode(Int.self, forKey: .totalArticles) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -103,8 +103,6 @@ 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(name, forKey: .name) try? container.encodeIfPresent(articleFreshness, forKey: .articleFreshness) @@ -113,6 +111,8 @@ public extension PlatformClient { try? container.encodeIfPresent(availableSizes, forKey: .availableSizes) + try? container.encodeIfPresent(totalArticles, forKey: .totalArticles) + try? container.encodeIfPresent(availableArticles, forKey: .availableArticles) } } diff --git a/Sources/code/platform/models/CategoryItemsPlatformModelClass.swift b/Sources/code/platform/models/CategoryItemsPlatformModelClass.swift index ce829390fe..53fb1798dd 100644 --- a/Sources/code/platform/models/CategoryItemsPlatformModelClass.swift +++ b/Sources/code/platform/models/CategoryItemsPlatformModelClass.swift @@ -8,41 +8,41 @@ public extension PlatformClient { */ class CategoryItems: Codable { - public var name: String? - public var banners: ImageUrls? - public var childs: [Child]? + public var name: String? public var action: Action? + public var childs: [Child]? + public var uid: Int? public var slug: String? public enum CodingKeys: String, CodingKey { - case name - case banners - case childs + case name case action + case childs + case uid case slug } public init(action: Action? = nil, banners: ImageUrls? = nil, childs: [Child]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { - self.name = name - self.banners = banners - self.childs = childs + self.name = name self.action = action + self.childs = childs + self.uid = uid self.slug = slug @@ -52,7 +52,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -60,7 +60,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) @@ -68,7 +68,7 @@ public extension PlatformClient { } catch {} do { - childs = try container.decode([Child].self, forKey: .childs) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -76,7 +76,7 @@ public extension PlatformClient { } catch {} do { - action = try container.decode(Action.self, forKey: .action) + childs = try container.decode([Child].self, forKey: .childs) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -103,14 +103,14 @@ 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.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(childs, forKey: .childs) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(childs, forKey: .childs) + try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(slug, forKey: .slug) diff --git a/Sources/code/platform/models/CategoryMappingPlatformModelClass.swift b/Sources/code/platform/models/CategoryMappingPlatformModelClass.swift index a82e924762..1282ac1629 100644 --- a/Sources/code/platform/models/CategoryMappingPlatformModelClass.swift +++ b/Sources/code/platform/models/CategoryMappingPlatformModelClass.swift @@ -8,25 +8,25 @@ public extension PlatformClient { */ class CategoryMapping: Codable { - public var google: CategoryMappingValues? - public var ajio: CategoryMappingValues? + public var google: CategoryMappingValues? + public var facebook: CategoryMappingValues? public enum CodingKeys: String, CodingKey { - case google - case ajio + case google + case facebook } public init(ajio: CategoryMappingValues? = nil, facebook: CategoryMappingValues? = nil, google: CategoryMappingValues? = nil) { - self.google = google - self.ajio = ajio + self.google = google + self.facebook = facebook } @@ -34,7 +34,7 @@ public extension PlatformClient { 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) + google = try container.decode(CategoryMappingValues.self, forKey: .google) } 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(google, forKey: .google) - try? container.encodeIfPresent(ajio, forKey: .ajio) + try? container.encodeIfPresent(google, forKey: .google) + try? container.encodeIfPresent(facebook, forKey: .facebook) } } diff --git a/Sources/code/platform/models/CategoryMappingValuesPlatformModelClass.swift b/Sources/code/platform/models/CategoryMappingValuesPlatformModelClass.swift index 28688aeb58..f5cec0d313 100644 --- a/Sources/code/platform/models/CategoryMappingValuesPlatformModelClass.swift +++ b/Sources/code/platform/models/CategoryMappingValuesPlatformModelClass.swift @@ -8,27 +8,25 @@ public extension PlatformClient { */ class CategoryMappingValues: Codable { - public var name: String - public var catalogId: Int? - public enum CodingKeys: String, CodingKey { - case name + public var name: String + public enum CodingKeys: String, CodingKey { case catalogId = "catalog_id" + + case name } public init(catalogId: Int? = nil, name: String) { - self.name = name - self.catalogId = catalogId + + 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 { catalogId = try container.decode(Int.self, forKey: .catalogId) @@ -36,14 +34,16 @@ public extension PlatformClient { 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(name, forKey: .name) - try? container.encodeIfPresent(catalogId, forKey: .catalogId) + + try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/platform/models/CategoryPlatformModelClass.swift b/Sources/code/platform/models/CategoryPlatformModelClass.swift index fc1db882c6..cf513ced0a 100644 --- a/Sources/code/platform/models/CategoryPlatformModelClass.swift +++ b/Sources/code/platform/models/CategoryPlatformModelClass.swift @@ -8,145 +8,143 @@ public extension PlatformClient { */ class Category: Codable { - public var priority: Int? - - public var modifiedOn: String? - - public var level: Int + public var tryouts: [String]? public var name: String - public var tryouts: [String]? - public var departments: [Int] - public var modifiedBy: [String: Any]? - - public var isActive: Bool - - public var hierarchy: [Hierarchy]? - - public var createdOn: String? + public var media: Media2? public var createdBy: [String: Any]? - public var media: Media2? + public var modifiedBy: [String: Any]? public var id: String? public var synonyms: [String]? - public var marketplaces: CategoryMapping? + public var createdOn: String? + + public var priority: Int? + + public var hierarchy: [Hierarchy]? public var uid: Int? - public var slug: String? + public var modifiedOn: String? - public enum CodingKeys: String, CodingKey { - case priority + public var slug: String? - case modifiedOn = "modified_on" + public var marketplaces: CategoryMapping? - case level + public var level: Int - case name + public var isActive: Bool + public enum CodingKeys: String, CodingKey { case tryouts + case name + case departments + case media + + case createdBy = "created_by" + case modifiedBy = "modified_by" - case isActive = "is_active" + case id = "_id" - case hierarchy + case synonyms case createdOn = "created_on" - case createdBy = "created_by" + case priority - case media + case hierarchy - case id = "_id" + case uid - case synonyms + case modifiedOn = "modified_on" + + case slug case marketplaces - case uid + case level - case slug + case isActive = "is_active" } 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.priority = priority - - self.modifiedOn = modifiedOn - - self.level = level + self.tryouts = tryouts self.name = name - self.tryouts = tryouts - self.departments = departments + self.media = media + + self.createdBy = createdBy + self.modifiedBy = modifiedBy - self.isActive = isActive + self.id = id - self.hierarchy = hierarchy + self.synonyms = synonyms self.createdOn = createdOn - self.createdBy = createdBy + self.priority = priority - self.media = media + self.hierarchy = hierarchy - self.id = id + self.uid = uid - self.synonyms = synonyms + self.modifiedOn = modifiedOn + + self.slug = slug self.marketplaces = marketplaces - self.uid = uid + self.level = level - self.slug = slug + self.isActive = isActive } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - priority = try container.decode(Int.self, forKey: .priority) + 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 {} + name = try container.decode(String.self, forKey: .name) + + departments = try container.decode([Int].self, forKey: .departments) + do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + media = try container.decode(Media2.self, forKey: .media) } 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) - do { - tryouts = try container.decode([String].self, forKey: .tryouts) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } 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 { modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) @@ -155,10 +153,8 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - isActive = try container.decode(Bool.self, forKey: .isActive) - do { - hierarchy = try container.decode([Hierarchy].self, forKey: .hierarchy) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,7 +162,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + synonyms = try container.decode([String].self, forKey: .synonyms) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +170,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +178,7 @@ public extension PlatformClient { } catch {} do { - media = try container.decode(Media2.self, forKey: .media) + priority = try container.decode(Int.self, forKey: .priority) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +186,7 @@ public extension PlatformClient { } catch {} 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) @@ -198,7 +194,7 @@ public extension PlatformClient { } catch {} 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) @@ -206,7 +202,7 @@ public extension PlatformClient { } catch {} do { - marketplaces = try container.decode(CategoryMapping.self, forKey: .marketplaces) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +210,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) @@ -222,50 +218,54 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + 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 {} + + level = try container.decode(Int.self, forKey: .level) + + isActive = try container.decode(Bool.self, forKey: .isActive) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(priority, forKey: .priority) - - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - - try? container.encodeIfPresent(level, forKey: .level) + try? container.encodeIfPresent(tryouts, forKey: .tryouts) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(media, forKey: .media) + + try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(hierarchy, forKey: .hierarchy) + try? container.encodeIfPresent(synonyms, forKey: .synonyms) try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(priority, forKey: .priority) - try? container.encodeIfPresent(media, forKey: .media) + try? container.encodeIfPresent(hierarchy, forKey: .hierarchy) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(synonyms, forKey: .synonyms) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + try? container.encodeIfPresent(slug, forKey: .slug) try? container.encodeIfPresent(marketplaces, forKey: .marketplaces) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(level, forKey: .level) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/CategoryRequestBodyPlatformModelClass.swift b/Sources/code/platform/models/CategoryRequestBodyPlatformModelClass.swift index bc2e1109d6..005b9343a1 100644 --- a/Sources/code/platform/models/CategoryRequestBodyPlatformModelClass.swift +++ b/Sources/code/platform/models/CategoryRequestBodyPlatformModelClass.swift @@ -8,105 +8,101 @@ public extension PlatformClient { */ class CategoryRequestBody: Codable { - public var priority: Int? - - public var level: Int + public var tryouts: [String]? public var name: String - public var tryouts: [String]? - public var departments: [Int] - public var isActive: Bool - - public var hierarchy: [Hierarchy]? - public var media: Media2? public var synonyms: [String]? - public var marketplaces: CategoryMapping? + public var priority: Int? + + public var hierarchy: [Hierarchy]? public var slug: String? - public enum CodingKeys: String, CodingKey { - case priority + public var marketplaces: CategoryMapping? - case level + public var level: Int - case name + public var isActive: Bool + public enum CodingKeys: String, CodingKey { case tryouts - case departments - - case isActive = "is_active" + case name - case hierarchy + case departments case media case synonyms - case marketplaces + case priority + + case hierarchy case slug - } - 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.priority = priority + case marketplaces - self.level = level + case level - self.name = name + case isActive = "is_active" + } + 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.tryouts = tryouts - self.departments = departments - - self.isActive = isActive + self.name = name - self.hierarchy = hierarchy + self.departments = departments self.media = media self.synonyms = synonyms - self.marketplaces = marketplaces + self.priority = priority + + self.hierarchy = hierarchy self.slug = slug + + self.marketplaces = marketplaces + + self.level = level + + self.isActive = isActive } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - priority = try container.decode(Int.self, forKey: .priority) + 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 {} - level = try container.decode(Int.self, forKey: .level) - name = try container.decode(String.self, forKey: .name) + departments = try container.decode([Int].self, forKey: .departments) + do { - tryouts = try container.decode([String].self, forKey: .tryouts) + media = try container.decode(Media2.self, forKey: .media) } 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) - - isActive = try container.decode(Bool.self, forKey: .isActive) - do { - hierarchy = try container.decode([Hierarchy].self, forKey: .hierarchy) + synonyms = try container.decode([String].self, forKey: .synonyms) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +110,7 @@ public extension PlatformClient { } catch {} do { - media = try container.decode(Media2.self, forKey: .media) + priority = try container.decode(Int.self, forKey: .priority) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +118,7 @@ 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) @@ -130,7 +126,7 @@ public extension PlatformClient { } catch {} do { - marketplaces = try container.decode(CategoryMapping.self, forKey: .marketplaces) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,38 +134,42 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + 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 {} + + level = try container.decode(Int.self, forKey: .level) + + isActive = try container.decode(Bool.self, forKey: .isActive) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(priority, forKey: .priority) - - try? container.encodeIfPresent(level, forKey: .level) + try? container.encodeIfPresent(tryouts, forKey: .tryouts) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) - try? container.encodeIfPresent(departments, forKey: .departments) - try? container.encodeIfPresent(isActive, forKey: .isActive) - - try? container.encodeIfPresent(hierarchy, forKey: .hierarchy) - try? container.encodeIfPresent(media, forKey: .media) try? container.encodeIfPresent(synonyms, forKey: .synonyms) - try? container.encodeIfPresent(marketplaces, forKey: .marketplaces) + try? container.encodeIfPresent(priority, forKey: .priority) + + try? container.encodeIfPresent(hierarchy, forKey: .hierarchy) try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(marketplaces, forKey: .marketplaces) + + try? container.encodeIfPresent(level, forKey: .level) + + try? container.encodeIfPresent(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/CategoryResponsePlatformModelClass.swift b/Sources/code/platform/models/CategoryResponsePlatformModelClass.swift index 27eb9c6f05..5c4c96197e 100644 --- a/Sources/code/platform/models/CategoryResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/CategoryResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class CategoryResponse: Codable { - public var items: [Category]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [Category]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [Category]? = 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([Category].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([Category].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/ChildPlatformModelClass.swift b/Sources/code/platform/models/ChildPlatformModelClass.swift index 36bb9af3f4..ce8cc0c862 100644 --- a/Sources/code/platform/models/ChildPlatformModelClass.swift +++ b/Sources/code/platform/models/ChildPlatformModelClass.swift @@ -8,49 +8,49 @@ public extension PlatformClient { */ class Child: Codable { - public var customJson: [String: Any]? + public var banners: ImageUrls? public var name: String? - public var banners: ImageUrls? + public var action: Action? public var childs: [SecondLevelChild]? - public var action: Action? - public var uid: Int? + public var customJson: [String: Any]? + public var slug: String? public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + case banners case name - case banners + case action case childs - case action - case uid + case customJson = "_custom_json" + case slug } 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.banners = banners self.name = name - self.banners = banners + self.action = action self.childs = childs - self.action = action - self.uid = uid + self.customJson = customJson + self.slug = slug } @@ -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) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +74,7 @@ public extension PlatformClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,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) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.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) @@ -117,18 +117,18 @@ 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(banners, forKey: .banners) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(action, forKey: .action) try? container.encodeIfPresent(childs, forKey: .childs) - try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(slug, forKey: .slug) } } diff --git a/Sources/code/platform/models/CollectionCreateResponsePlatformModelClass.swift b/Sources/code/platform/models/CollectionCreateResponsePlatformModelClass.swift index d0406337b2..8c7c6220f3 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 appId: String? + + public var banners: ImageUrls? + public var allowFacets: Bool? public var meta: [String: Any]? + public var tag: [String]? + public var name: String? - public var banners: ImageUrls? + public var cron: [String: Any]? public var schedule: [String: Any]? - public var appId: String? - - public var badge: [String: Any]? - public var type: String? - public var query: [String: Any]? + public var description: String? - public var isActive: Bool? + public var query: [String: Any]? public var logo: BannerImage? - public var tag: [String]? - public var allowSort: Bool? - public var cron: [String: Any]? - - public var description: String? - public var visibleFacetsKeys: [String]? public var slug: String? + public var badge: [String: Any]? + + public var isActive: Bool? + public enum CodingKeys: String, CodingKey { + case appId = "app_id" + + case banners + case allowFacets = "allow_facets" case meta + case tag + case name - case banners + case cron case schedule = "_schedule" - case appId = "app_id" - - case badge - case type - case query + case description - case isActive = "is_active" + case query case logo - case tag - case allowSort = "allow_sort" - case cron - - case description - case visibleFacetsKeys = "visible_facets_keys" case slug + + case badge + + case isActive = "is_active" } 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.appId = appId + + self.banners = banners + self.allowFacets = allowFacets self.meta = meta + self.tag = tag + self.name = name - self.banners = banners + self.cron = cron self.schedule = schedule - self.appId = appId - - self.badge = badge - self.type = type - self.query = query + self.description = description - self.isActive = isActive + self.query = query self.logo = logo - self.tag = tag - self.allowSort = allowSort - self.cron = cron - - self.description = description - self.visibleFacetsKeys = visibleFacetsKeys self.slug = slug + + self.badge = badge + + self.isActive = isActive } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - allowFacets = try container.decode(Bool.self, forKey: .allowFacets) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } 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) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + allowFacets = try container.decode(Bool.self, forKey: .allowFacets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,7 +142,7 @@ public extension PlatformClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - schedule = try container.decode([String: Any].self, forKey: .schedule) + tag = try container.decode([String].self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + 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 { - badge = try container.decode([String: Any].self, forKey: .badge) + cron = try container.decode([String: Any].self, forKey: .cron) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + schedule = try container.decode([String: Any].self, forKey: .schedule) } 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) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +198,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(BannerImage.self, forKey: .logo) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +206,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode([String].self, forKey: .tag) + logo = try container.decode(BannerImage.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -222,7 +222,7 @@ public extension PlatformClient { } catch {} do { - cron = try container.decode([String: Any].self, forKey: .cron) + visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,7 +230,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -238,7 +238,7 @@ public extension PlatformClient { } 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) @@ -246,7 +246,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + isActive = try container.decode(Bool.self, forKey: .isActive) } 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(appId, forKey: .appId) + + try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(tag, forKey: .tag) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(cron, forKey: .cron) try? container.encodeIfPresent(schedule, forKey: .schedule) - try? container.encodeIfPresent(appId, forKey: .appId) - - try? container.encodeIfPresent(badge, forKey: .badge) - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(query, forKey: .query) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(query, forKey: .query) try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(tag, forKey: .tag) - try? container.encodeIfPresent(allowSort, forKey: .allowSort) - try? container.encodeIfPresent(cron, forKey: .cron) - - try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(badge, forKey: .badge) + + try? container.encodeIfPresent(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/CollectionDetailResponsePlatformModelClass.swift b/Sources/code/platform/models/CollectionDetailResponsePlatformModelClass.swift index 1902dbbc9c..68ed167505 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 appId: String? + + public var banners: ImageUrls? + public var allowFacets: Bool? public var meta: [String: Any]? + public var tag: [String]? + public var name: String? - public var banners: ImageUrls? + public var cron: [String: Any]? public var schedule: [String: Any]? - public var appId: String? - - public var badge: [String: Any]? - public var type: String? - public var query: [String: Any]? + public var description: String? - public var isActive: Bool? + public var query: [String: Any]? public var logo: Media1? - public var tag: [String]? - public var allowSort: Bool? - public var cron: [String: Any]? - - public var description: String? - public var visibleFacetsKeys: [String]? public var slug: String? + public var badge: [String: Any]? + + public var isActive: Bool? + public enum CodingKeys: String, CodingKey { + case appId = "app_id" + + case banners + case allowFacets = "allow_facets" case meta + case tag + case name - case banners + case cron case schedule = "_schedule" - case appId = "app_id" - - case badge - case type - case query + case description - case isActive = "is_active" + case query case logo - case tag - case allowSort = "allow_sort" - case cron - - case description - case visibleFacetsKeys = "visible_facets_keys" case slug + + case badge + + case isActive = "is_active" } 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.appId = appId + + self.banners = banners + self.allowFacets = allowFacets self.meta = meta + self.tag = tag + self.name = name - self.banners = banners + self.cron = cron self.schedule = schedule - self.appId = appId - - self.badge = badge - self.type = type - self.query = query + self.description = description - self.isActive = isActive + self.query = query self.logo = logo - self.tag = tag - self.allowSort = allowSort - self.cron = cron - - self.description = description - self.visibleFacetsKeys = visibleFacetsKeys self.slug = slug + + self.badge = badge + + self.isActive = isActive } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - allowFacets = try container.decode(Bool.self, forKey: .allowFacets) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } 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) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + allowFacets = try container.decode(Bool.self, forKey: .allowFacets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,7 +142,7 @@ public extension PlatformClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - schedule = try container.decode([String: Any].self, forKey: .schedule) + tag = try container.decode([String].self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + 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 { - badge = try container.decode([String: Any].self, forKey: .badge) + cron = try container.decode([String: Any].self, forKey: .cron) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + schedule = try container.decode([String: Any].self, forKey: .schedule) } 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) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +198,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(Media1.self, forKey: .logo) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +206,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode([String].self, forKey: .tag) + logo = try container.decode(Media1.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -222,7 +222,7 @@ public extension PlatformClient { } catch {} do { - cron = try container.decode([String: Any].self, forKey: .cron) + visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,7 +230,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -238,7 +238,7 @@ public extension PlatformClient { } 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) @@ -246,7 +246,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + isActive = try container.decode(Bool.self, forKey: .isActive) } 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(appId, forKey: .appId) + + try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(tag, forKey: .tag) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(cron, forKey: .cron) try? container.encodeIfPresent(schedule, forKey: .schedule) - try? container.encodeIfPresent(appId, forKey: .appId) - - try? container.encodeIfPresent(badge, forKey: .badge) - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(query, forKey: .query) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(query, forKey: .query) try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(tag, forKey: .tag) - try? container.encodeIfPresent(allowSort, forKey: .allowSort) - try? container.encodeIfPresent(cron, forKey: .cron) - - try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(badge, forKey: .badge) + + try? container.encodeIfPresent(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/CollectionImagePlatformModelClass.swift b/Sources/code/platform/models/CollectionImagePlatformModelClass.swift index ec1df385c3..38fa4aa2ea 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 url: String - public var aspectRatio: String - public enum CodingKeys: String, CodingKey { - case url + public var url: String + public enum CodingKeys: String, CodingKey { case aspectRatio = "aspect_ratio" + + case url } public init(aspectRatio: String, url: String) { - self.url = url - self.aspectRatio = aspectRatio + + self.url = url } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - url = try container.decode(String.self, forKey: .url) - aspectRatio = try container.decode(String.self, forKey: .aspectRatio) + + 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(url, forKey: .url) - try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) + + try? container.encodeIfPresent(url, forKey: .url) } } } diff --git a/Sources/code/platform/models/CollectionListingFilterTagPlatformModelClass.swift b/Sources/code/platform/models/CollectionListingFilterTagPlatformModelClass.swift index d1582bfe5c..674d71ee53 100644 --- a/Sources/code/platform/models/CollectionListingFilterTagPlatformModelClass.swift +++ b/Sources/code/platform/models/CollectionListingFilterTagPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class CollectionListingFilterTag: Codable { - public var isSelected: Bool? + public var display: String? public var name: String? - public var display: String? + public var isSelected: Bool? public enum CodingKeys: String, CodingKey { - case isSelected = "is_selected" + case display case name - case display + case isSelected = "is_selected" } public init(display: String? = nil, isSelected: Bool? = nil, name: String? = nil) { - self.isSelected = isSelected + self.display = display self.name = name - self.display = display + self.isSelected = isSelected } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - isSelected = try container.decode(Bool.self, forKey: .isSelected) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - display = try container.decode(String.self, forKey: .display) + isSelected = try container.decode(Bool.self, forKey: .isSelected) } 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(isSelected, forKey: .isSelected) + try? container.encodeIfPresent(display, forKey: .display) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(display, forKey: .display) + try? container.encodeIfPresent(isSelected, forKey: .isSelected) } } } diff --git a/Sources/code/platform/models/CollectionListingFilterTypePlatformModelClass.swift b/Sources/code/platform/models/CollectionListingFilterTypePlatformModelClass.swift index ea914b3ee8..8a8f5d6495 100644 --- a/Sources/code/platform/models/CollectionListingFilterTypePlatformModelClass.swift +++ b/Sources/code/platform/models/CollectionListingFilterTypePlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class CollectionListingFilterType: Codable { - public var isSelected: Bool? + public var display: String? public var name: String? - public var display: String? + public var isSelected: Bool? public enum CodingKeys: String, CodingKey { - case isSelected = "is_selected" + case display case name - case display + case isSelected = "is_selected" } public init(display: String? = nil, isSelected: Bool? = nil, name: String? = nil) { - self.isSelected = isSelected + self.display = display self.name = name - self.display = display + self.isSelected = isSelected } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - isSelected = try container.decode(Bool.self, forKey: .isSelected) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - display = try container.decode(String.self, forKey: .display) + isSelected = try container.decode(Bool.self, forKey: .isSelected) } 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(isSelected, forKey: .isSelected) + try? container.encodeIfPresent(display, forKey: .display) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(display, forKey: .display) + try? container.encodeIfPresent(isSelected, forKey: .isSelected) } } } diff --git a/Sources/code/platform/models/CompanyBrandDetailPlatformModelClass.swift b/Sources/code/platform/models/CompanyBrandDetailPlatformModelClass.swift index 433c363fbc..3c12282663 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 brandName: String? - public var brandId: Int? - public var totalArticle: Int? + public var brandName: String? public var companyId: Int? - public enum CodingKeys: String, CodingKey { - case brandName = "brand_name" + public var totalArticle: Int? + public enum CodingKeys: String, CodingKey { case brandId = "brand_id" - case totalArticle = "total_article" + case brandName = "brand_name" case companyId = "company_id" + + case totalArticle = "total_article" } public init(brandId: Int? = nil, brandName: String? = nil, companyId: Int? = nil, totalArticle: Int? = nil) { - self.brandName = brandName - self.brandId = brandId - self.totalArticle = totalArticle + self.brandName = brandName self.companyId = companyId + + self.totalArticle = totalArticle } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - brandName = try container.decode(String.self, forKey: .brandName) + brandId = try container.decode(Int.self, forKey: .brandId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - brandId = try container.decode(Int.self, forKey: .brandId) + brandName = try container.decode(String.self, forKey: .brandName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - totalArticle = try container.decode(Int.self, forKey: .totalArticle) + 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 { - 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) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(brandName, forKey: .brandName) - try? container.encodeIfPresent(brandId, forKey: .brandId) - try? container.encodeIfPresent(totalArticle, forKey: .totalArticle) + try? container.encodeIfPresent(brandName, forKey: .brandName) try? container.encodeIfPresent(companyId, forKey: .companyId) + + try? container.encodeIfPresent(totalArticle, forKey: .totalArticle) } } } diff --git a/Sources/code/platform/models/CompanyBrandListSerializerPlatformModelClass.swift b/Sources/code/platform/models/CompanyBrandListSerializerPlatformModelClass.swift index e2ec1662ed..987eef5ec6 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 page: Page? - public var items: [CompanyBrandSerializer]? - public enum CodingKeys: String, CodingKey { - case page + public var page: Page? + public enum CodingKeys: String, CodingKey { case items + + case page } public init(items: [CompanyBrandSerializer]? = nil, page: Page? = nil) { - self.page = page - self.items = items + + self.page = page } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} 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) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(page, forKey: .page) - try? container.encodeIfPresent(items, forKey: .items) + + try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/platform/models/CompanyBrandPostRequestSerializerPlatformModelClass.swift b/Sources/code/platform/models/CompanyBrandPostRequestSerializerPlatformModelClass.swift index 2910b75395..3326dd5274 100644 --- a/Sources/code/platform/models/CompanyBrandPostRequestSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/CompanyBrandPostRequestSerializerPlatformModelClass.swift @@ -8,33 +8,31 @@ public extension PlatformClient { */ class CompanyBrandPostRequestSerializer: Codable { - public var brands: [Int] - public var company: Int public var uid: Int? - public enum CodingKeys: String, CodingKey { - case brands + public var brands: [Int] + public enum CodingKeys: String, CodingKey { case company case uid + + case brands } public init(brands: [Int], company: Int, uid: Int? = nil) { - self.brands = brands - self.company = company self.uid = uid + + self.brands = brands } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - brands = try container.decode([Int].self, forKey: .brands) - company = try container.decode(Int.self, forKey: .company) do { @@ -44,16 +42,18 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + brands = try container.decode([Int].self, forKey: .brands) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(brands, forKey: .brands) - try? container.encodeIfPresent(company, forKey: .company) try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(brands, forKey: .brands) } } } diff --git a/Sources/code/platform/models/CompanyBrandSerializerPlatformModelClass.swift b/Sources/code/platform/models/CompanyBrandSerializerPlatformModelClass.swift index 27f4a05a57..29412c31d6 100644 --- a/Sources/code/platform/models/CompanyBrandSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/CompanyBrandSerializerPlatformModelClass.swift @@ -8,78 +8,78 @@ public extension PlatformClient { */ class CompanyBrandSerializer: Codable { - public var modifiedOn: String? - - public var brand: GetBrandResponseSerializer? + public var modifiedBy: UserSerializer1? - public var stage: String? + public var rejectReason: String? - public var company: GetCompanySerializer? + public var uid: Int? - public var rejectReason: String? + public var brand: GetBrandResponseSerializer? public var verifiedBy: UserSerializer1? - public var uid: Int? - public var createdOn: String? - public var modifiedBy: UserSerializer1? + public var warnings: [String: Any]? public var verifiedOn: String? - public var warnings: [String: Any]? + public var modifiedOn: String? + + public var stage: String? + + public var company: GetCompanySerializer? public var createdBy: UserSerializer1? public enum CodingKeys: String, CodingKey { - case modifiedOn = "modified_on" - - case brand + case modifiedBy = "modified_by" - case stage + case rejectReason = "reject_reason" - case company + case uid - case rejectReason = "reject_reason" + case brand case verifiedBy = "verified_by" - case uid - case createdOn = "created_on" - case modifiedBy = "modified_by" + case warnings case verifiedOn = "verified_on" - case warnings + case modifiedOn = "modified_on" + + case stage + + case company case createdBy = "created_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.modifiedOn = modifiedOn - - self.brand = brand + self.modifiedBy = modifiedBy - self.stage = stage + self.rejectReason = rejectReason - self.company = company + self.uid = uid - self.rejectReason = rejectReason + self.brand = brand self.verifiedBy = verifiedBy - self.uid = uid - self.createdOn = createdOn - self.modifiedBy = modifiedBy + self.warnings = warnings self.verifiedOn = verifiedOn - self.warnings = warnings + self.modifiedOn = modifiedOn + + self.stage = stage + + self.company = company self.createdBy = createdBy } @@ -88,7 +88,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -96,7 +96,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) @@ -104,7 +104,7 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + 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 { - company = try container.decode(GetCompanySerializer.self, forKey: .company) + brand = try container.decode(GetBrandResponseSerializer.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -120,7 +120,7 @@ public extension PlatformClient { } catch {} do { - rejectReason = try container.decode(String.self, forKey: .rejectReason) + verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +128,7 @@ public extension PlatformClient { } catch {} do { - verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) + createdOn = try container.decode(String.self, forKey: .createdOn) } 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) + warnings = try container.decode([String: Any].self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,7 +144,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + verifiedOn = try container.decode(String.self, forKey: .verifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +152,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) @@ -160,7 +160,7 @@ public extension PlatformClient { } catch {} 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) @@ -168,7 +168,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) @@ -187,27 +187,27 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - - try? container.encodeIfPresent(brand, forKey: .brand) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) - try? container.encodeIfPresent(company, forKey: .company) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) + try? container.encodeIfPresent(brand, forKey: .brand) try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) - try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(warnings, forKey: .warnings) try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) - try? container.encodeIfPresent(warnings, forKey: .warnings) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + try? container.encodeIfPresent(stage, forKey: .stage) + + try? container.encodeIfPresent(company, forKey: .company) try? container.encodeIfPresent(createdBy, forKey: .createdBy) } diff --git a/Sources/code/platform/models/CompanyOptInPlatformModelClass.swift b/Sources/code/platform/models/CompanyOptInPlatformModelClass.swift index 01e19a3ca0..2e166e5d40 100644 --- a/Sources/code/platform/models/CompanyOptInPlatformModelClass.swift +++ b/Sources/code/platform/models/CompanyOptInPlatformModelClass.swift @@ -8,127 +8,127 @@ public extension PlatformClient { */ class CompanyOptIn: Codable { - public var optLevel: String + public var brandIds: [Int] public var companyId: Int - public var modifiedBy: [String: Any]? + public var optLevel: String - public var platform: String + public var createdBy: [String: Any]? - public var brandIds: [Int] + public var modifiedBy: [String: Any]? + + public var storeIds: [Int] public var createdOn: Int - public var createdBy: [String: Any]? + public var platform: String public var enabled: Bool - public var storeIds: [Int] - public var modifiedOn: Int public enum CodingKeys: String, CodingKey { - case optLevel = "opt_level" + case brandIds = "brand_ids" case companyId = "company_id" - case modifiedBy = "modified_by" + case optLevel = "opt_level" - case platform + case createdBy = "created_by" - case brandIds = "brand_ids" + case modifiedBy = "modified_by" + + case storeIds = "store_ids" case createdOn = "created_on" - case createdBy = "created_by" + case platform case enabled - case storeIds = "store_ids" - case modifiedOn = "modified_on" } 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.optLevel = optLevel + self.brandIds = brandIds self.companyId = companyId - self.modifiedBy = modifiedBy + self.optLevel = optLevel - self.platform = platform + self.createdBy = createdBy - self.brandIds = brandIds + self.modifiedBy = modifiedBy + + self.storeIds = storeIds self.createdOn = createdOn - self.createdBy = createdBy + self.platform = platform self.enabled = enabled - self.storeIds = storeIds - self.modifiedOn = modifiedOn } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - optLevel = try container.decode(String.self, forKey: .optLevel) + brandIds = try container.decode([Int].self, forKey: .brandIds) companyId = try container.decode(Int.self, forKey: .companyId) + optLevel = try container.decode(String.self, forKey: .optLevel) + do { - modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - platform = try container.decode(String.self, forKey: .platform) - - brandIds = try container.decode([Int].self, forKey: .brandIds) - - createdOn = try container.decode(Int.self, forKey: .createdOn) - do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - enabled = try container.decode(Bool.self, forKey: .enabled) - storeIds = try container.decode([Int].self, forKey: .storeIds) + createdOn = try container.decode(Int.self, forKey: .createdOn) + + platform = try container.decode(String.self, forKey: .platform) + + enabled = try container.decode(Bool.self, forKey: .enabled) + modifiedOn = try container.decode(Int.self, forKey: .modifiedOn) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(optLevel, forKey: .optLevel) + try? container.encodeIfPresent(brandIds, forKey: .brandIds) try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(optLevel, forKey: .optLevel) - try? container.encodeIfPresent(platform, forKey: .platform) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(brandIds, forKey: .brandIds) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + + try? container.encodeIfPresent(storeIds, forKey: .storeIds) try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(platform, forKey: .platform) try? container.encodeIfPresent(enabled, forKey: .enabled) - try? container.encodeIfPresent(storeIds, forKey: .storeIds) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) } } diff --git a/Sources/code/platform/models/CompleteResponsePlatformModelClass.swift b/Sources/code/platform/models/CompleteResponsePlatformModelClass.swift index 86d73ab5c2..5ea679d654 100644 --- a/Sources/code/platform/models/CompleteResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/CompleteResponsePlatformModelClass.swift @@ -16,8 +16,6 @@ public extension PlatformClient { public var contentType: String - public var method: String - public var namespace: String public var operation: String @@ -28,7 +26,7 @@ public extension PlatformClient { public var cdn: CDN - public var success: String + public var success: Bool public var tags: [String]? @@ -45,8 +43,6 @@ public extension PlatformClient { case contentType = "content_type" - case method - case namespace case operation @@ -66,7 +62,7 @@ public extension PlatformClient { case modifiedOn = "modified_on" } - public init(cdn: CDN, contentType: String, createdOn: String, fileName: String, filePath: String, method: String, modifiedOn: String, namespace: String, operation: String, size: Int, success: String, tags: [String]? = nil, upload: Upload, id: String) { + public init(cdn: CDN, contentType: String, createdOn: String, fileName: String, filePath: String, modifiedOn: String, namespace: String, operation: String, size: Int, success: Bool, tags: [String]? = nil, upload: Upload, id: String) { self.id = id self.fileName = fileName @@ -75,8 +71,6 @@ public extension PlatformClient { self.contentType = contentType - self.method = method - self.namespace = namespace self.operation = operation @@ -107,8 +101,6 @@ public extension PlatformClient { contentType = try container.decode(String.self, forKey: .contentType) - method = try container.decode(String.self, forKey: .method) - namespace = try container.decode(String.self, forKey: .namespace) operation = try container.decode(String.self, forKey: .operation) @@ -119,7 +111,7 @@ public extension PlatformClient { cdn = try container.decode(CDN.self, forKey: .cdn) - success = try container.decode(String.self, forKey: .success) + success = try container.decode(Bool.self, forKey: .success) do { tags = try container.decode([String].self, forKey: .tags) @@ -145,8 +137,6 @@ public extension PlatformClient { try? container.encodeIfPresent(contentType, forKey: .contentType) - try? container.encodeIfPresent(method, forKey: .method) - try? container.encodeIfPresent(namespace, forKey: .namespace) try? container.encodeIfPresent(operation, forKey: .operation) diff --git a/Sources/code/platform/models/ConfigurationBucketPointsPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationBucketPointsPlatformModelClass.swift index b09485ab85..d479ae85ab 100644 --- a/Sources/code/platform/models/ConfigurationBucketPointsPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationBucketPointsPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class ConfigurationBucketPoints: Codable { public var display: String? - public var end: Double? - public var start: Double? + public var end: Double? + public enum CodingKeys: String, CodingKey { case display - case end - case start + + case end } public init(display: String? = nil, end: Double? = nil, start: Double? = nil) { self.display = display - self.end = end - self.start = start + + self.end = end } required public init(from decoder: Decoder) throws { @@ -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) + end = try container.decode(Double.self, forKey: .end) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,9 +63,9 @@ public extension PlatformClient { try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(end, forKey: .end) - try? container.encodeIfPresent(start, forKey: .start) + + try? container.encodeIfPresent(end, forKey: .end) } } } diff --git a/Sources/code/platform/models/ConfigurationListingFilterConfigPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationListingFilterConfigPlatformModelClass.swift index 131e8c9295..84451f6ead 100644 --- a/Sources/code/platform/models/ConfigurationListingFilterConfigPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationListingFilterConfigPlatformModelClass.swift @@ -10,48 +10,48 @@ public extension PlatformClient { class ConfigurationListingFilterConfig: Codable { public var name: String? + public var valueConfig: ConfigurationListingFilterValue? + + public var priority: Int + + public var key: String + public var type: String public var logo: String? public var isActive: Bool - public var key: String + public enum CodingKeys: String, CodingKey { + case name - public var priority: Int + case valueConfig = "value_config" - public var valueConfig: ConfigurationListingFilterValue? + case priority - public enum CodingKeys: String, CodingKey { - case name + case key case type case logo case isActive = "is_active" - - case key - - case priority - - case valueConfig = "value_config" } public init(isActive: Bool, key: String, logo: String? = nil, name: String? = nil, priority: Int, type: String, valueConfig: ConfigurationListingFilterValue? = nil) { self.name = name - self.type = type - - self.logo = logo + self.valueConfig = valueConfig - self.isActive = isActive + self.priority = priority self.key = key - self.priority = priority + self.type = type - self.valueConfig = valueConfig + self.logo = logo + + self.isActive = isActive } required public init(from decoder: Decoder) throws { @@ -65,29 +65,29 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - type = try container.decode(String.self, forKey: .type) - do { - logo = try container.decode(String.self, forKey: .logo) + 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) key = try container.decode(String.self, forKey: .key) - priority = try container.decode(Int.self, forKey: .priority) + type = try container.decode(String.self, forKey: .type) do { - valueConfig = try container.decode(ConfigurationListingFilterValue.self, forKey: .valueConfig) + logo = try container.decode(String.self, forKey: .logo) } 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) } public func encode(to encoder: Encoder) throws { @@ -95,17 +95,17 @@ public extension PlatformClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(type, forKey: .type) - - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(valueConfig, forKey: .valueConfig) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(priority, forKey: .priority) try? container.encodeIfPresent(key, forKey: .key) - try? container.encodeIfPresent(priority, forKey: .priority) + try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(valueConfig, forKey: .valueConfig) + try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/ConfigurationListingFilterValuePlatformModelClass.swift b/Sources/code/platform/models/ConfigurationListingFilterValuePlatformModelClass.swift index ecc17ec228..b30b23b5a3 100644 --- a/Sources/code/platform/models/ConfigurationListingFilterValuePlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationListingFilterValuePlatformModelClass.swift @@ -12,22 +12,22 @@ public extension PlatformClient { public var condition: String? - public var bucketPoints: [ConfigurationBucketPoints]? + public var map: [String: Any]? public var sort: String? - public var map: [String: Any]? + public var bucketPoints: [ConfigurationBucketPoints]? public enum CodingKeys: String, CodingKey { case value case condition - case bucketPoints = "bucket_points" + case map case sort - case map + case bucketPoints = "bucket_points" } public init(bucketPoints: [ConfigurationBucketPoints]? = nil, condition: String? = nil, map: [String: Any]? = nil, sort: String? = nil, value: String? = nil) { @@ -35,11 +35,11 @@ public extension PlatformClient { self.condition = condition - self.bucketPoints = bucketPoints + self.map = map self.sort = sort - self.map = map + self.bucketPoints = bucketPoints } required public init(from decoder: Decoder) throws { @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - bucketPoints = try container.decode([ConfigurationBucketPoints].self, forKey: .bucketPoints) + map = try container.decode([String: Any].self, forKey: .map) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - map = try container.decode([String: Any].self, forKey: .map) + bucketPoints = try container.decode([ConfigurationBucketPoints].self, forKey: .bucketPoints) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,11 +93,11 @@ public extension PlatformClient { try? container.encodeIfPresent(condition, forKey: .condition) - try? container.encodeIfPresent(bucketPoints, forKey: .bucketPoints) + try? container.encodeIfPresent(map, forKey: .map) try? container.encodeIfPresent(sort, forKey: .sort) - try? container.encodeIfPresent(map, forKey: .map) + try? container.encodeIfPresent(bucketPoints, forKey: .bucketPoints) } } } diff --git a/Sources/code/platform/models/ConfigurationListingPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationListingPlatformModelClass.swift index 277543670e..c9e72a1ba0 100644 --- a/Sources/code/platform/models/ConfigurationListingPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationListingPlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class ConfigurationListing: Codable { - public var filter: ConfigurationListingFilter - public var sort: ConfigurationListingSort - public enum CodingKeys: String, CodingKey { - case filter + public var filter: ConfigurationListingFilter + public enum CodingKeys: String, CodingKey { case sort + + case filter } public init(filter: ConfigurationListingFilter, sort: ConfigurationListingSort) { - self.filter = filter - self.sort = sort + + self.filter = filter } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - filter = try container.decode(ConfigurationListingFilter.self, forKey: .filter) - sort = try container.decode(ConfigurationListingSort.self, forKey: .sort) + + filter = try container.decode(ConfigurationListingFilter.self, forKey: .filter) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(filter, forKey: .filter) - try? container.encodeIfPresent(sort, forKey: .sort) + + try? container.encodeIfPresent(filter, forKey: .filter) } } } diff --git a/Sources/code/platform/models/ConfigurationListingSortConfigPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationListingSortConfigPlatformModelClass.swift index 32011e5f7e..ee6eca93d3 100644 --- a/Sources/code/platform/models/ConfigurationListingSortConfigPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationListingSortConfigPlatformModelClass.swift @@ -10,36 +10,36 @@ public extension PlatformClient { class ConfigurationListingSortConfig: Codable { public var name: String? - public var logo: String? - - public var isActive: Bool + public var priority: Int public var key: String - public var priority: Int + public var logo: String? + + public var isActive: Bool public enum CodingKeys: String, CodingKey { case name - case logo - - case isActive = "is_active" + case priority case key - case priority + case logo + + case isActive = "is_active" } public init(isActive: Bool, key: String, logo: String? = nil, name: String? = nil, priority: Int) { self.name = name - self.logo = logo - - self.isActive = isActive + self.priority = priority self.key = key - self.priority = priority + self.logo = logo + + self.isActive = isActive } required public init(from decoder: Decoder) throws { @@ -53,6 +53,10 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + priority = try container.decode(Int.self, forKey: .priority) + + key = try container.decode(String.self, forKey: .key) + do { logo = try container.decode(String.self, forKey: .logo) @@ -62,10 +66,6 @@ public extension PlatformClient { } catch {} isActive = try container.decode(Bool.self, forKey: .isActive) - - key = try container.decode(String.self, forKey: .key) - - priority = try container.decode(Int.self, forKey: .priority) } public func encode(to encoder: Encoder) throws { @@ -73,13 +73,13 @@ public extension PlatformClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(logo, forKey: .logo) - - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(priority, forKey: .priority) try? container.encodeIfPresent(key, forKey: .key) - try? container.encodeIfPresent(priority, forKey: .priority) + try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/ConfigurationListingSortPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationListingSortPlatformModelClass.swift index 89f61c4dce..140d6b538c 100644 --- a/Sources/code/platform/models/ConfigurationListingSortPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationListingSortPlatformModelClass.swift @@ -8,27 +8,25 @@ public extension PlatformClient { */ class ConfigurationListingSort: Codable { - public var defaultKey: String - public var config: [ConfigurationListingSortConfig]? - public enum CodingKeys: String, CodingKey { - case defaultKey = "default_key" + public var defaultKey: String + public enum CodingKeys: String, CodingKey { case config + + case defaultKey = "default_key" } public init(config: [ConfigurationListingSortConfig]? = nil, defaultKey: String) { - self.defaultKey = defaultKey - self.config = config + + self.defaultKey = defaultKey } 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) @@ -36,14 +34,16 @@ 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(defaultKey, forKey: .defaultKey) - try? container.encodeIfPresent(config, forKey: .config) + + try? container.encodeIfPresent(defaultKey, forKey: .defaultKey) } } } diff --git a/Sources/code/platform/models/ConfigurationProductConfigPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationProductConfigPlatformModelClass.swift index 6dcac5ef28..9ce67d4f00 100644 --- a/Sources/code/platform/models/ConfigurationProductConfigPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationProductConfigPlatformModelClass.swift @@ -8,57 +8,61 @@ public extension PlatformClient { */ class ConfigurationProductConfig: Codable { - public var size: ProductSize? + public var priority: Int - public var subtitle: String? + public var key: String - public var title: String? + public var subtitle: String? public var logo: String? - public var isActive: Bool + public var title: String? - public var key: String + public var isActive: Bool - public var priority: Int + public var size: ProductSize? public enum CodingKeys: String, CodingKey { - case size + case priority - case subtitle + case key - case title + case subtitle case logo - case isActive = "is_active" + case title - case key + case isActive = "is_active" - case priority + case size } public init(isActive: Bool, key: String, logo: String? = nil, priority: Int, size: ProductSize? = nil, subtitle: String? = nil, title: String? = nil) { - self.size = size + self.priority = priority - self.subtitle = subtitle + self.key = key - self.title = title + self.subtitle = subtitle self.logo = logo - self.isActive = isActive + self.title = title - self.key = key + self.isActive = isActive - self.priority = priority + self.size = size } 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 { - size = try container.decode(ProductSize.self, forKey: .size) + subtitle = try container.decode(String.self, forKey: .subtitle) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -66,7 +70,7 @@ public extension PlatformClient { } catch {} do { - subtitle = try container.decode(String.self, forKey: .subtitle) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -81,37 +85,33 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + isActive = try container.decode(Bool.self, forKey: .isActive) + do { - logo = try container.decode(String.self, forKey: .logo) + 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 {} - - isActive = try container.decode(Bool.self, forKey: .isActive) - - key = try container.decode(String.self, forKey: .key) - - priority = try container.decode(Int.self, forKey: .priority) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(size, forKey: .size) + try? container.encodeIfPresent(priority, forKey: .priority) - try? container.encodeIfPresent(subtitle, forKey: .subtitle) + try? container.encodeIfPresent(key, forKey: .key) - try? container.encodeIfPresent(title, forKey: .title) + try? container.encodeIfPresent(subtitle, forKey: .subtitle) try? container.encodeIfPresent(logo, forKey: .logo) - 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(priority, forKey: .priority) + try? container.encodeIfPresent(size, forKey: .size) } } } diff --git a/Sources/code/platform/models/ConfigurationProductVariantConfigPlatformModelClass.swift b/Sources/code/platform/models/ConfigurationProductVariantConfigPlatformModelClass.swift index deaa84e98e..55fb6635c7 100644 --- a/Sources/code/platform/models/ConfigurationProductVariantConfigPlatformModelClass.swift +++ b/Sources/code/platform/models/ConfigurationProductVariantConfigPlatformModelClass.swift @@ -8,59 +8,63 @@ public extension PlatformClient { */ class ConfigurationProductVariantConfig: Codable { - public var size: ProductSize - public var name: String - public var logo: String? + public var priority: Int - public var isActive: Bool + public var key: String public var displayType: String - public var key: String + public var logo: String? - public var priority: Int + public var size: ProductSize - public enum CodingKeys: String, CodingKey { - case size + public var isActive: Bool + public enum CodingKeys: String, CodingKey { case name - case logo + case priority - case isActive = "is_active" + case key case displayType = "display_type" - case key + case logo - case priority + case size + + case isActive = "is_active" } public init(displayType: String, isActive: Bool, key: String, logo: String? = nil, name: String, priority: Int, size: ProductSize) { - self.size = size - self.name = name - self.logo = logo + self.priority = priority - self.isActive = isActive + self.key = key self.displayType = displayType - self.key = key + self.logo = logo - self.priority = priority + self.size = size + + self.isActive = isActive } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - size = try container.decode(ProductSize.self, forKey: .size) - name = try container.decode(String.self, forKey: .name) + priority = try container.decode(Int.self, forKey: .priority) + + key = try container.decode(String.self, forKey: .key) + + displayType = try container.decode(String.self, forKey: .displayType) + do { logo = try container.decode(String.self, forKey: .logo) @@ -69,31 +73,27 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - 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) - priority = try container.decode(Int.self, forKey: .priority) + isActive = try container.decode(Bool.self, forKey: .isActive) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(size, forKey: .size) - try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(priority, forKey: .priority) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(key, forKey: .key) try? container.encodeIfPresent(displayType, forKey: .displayType) - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(priority, forKey: .priority) + try? container.encodeIfPresent(size, forKey: .size) + + try? container.encodeIfPresent(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/CreateAutocompleteKeywordPlatformModelClass.swift b/Sources/code/platform/models/CreateAutocompleteKeywordPlatformModelClass.swift index 0f620b1fa1..d2c5efe0e2 100644 --- a/Sources/code/platform/models/CreateAutocompleteKeywordPlatformModelClass.swift +++ b/Sources/code/platform/models/CreateAutocompleteKeywordPlatformModelClass.swift @@ -8,37 +8,37 @@ public extension PlatformClient { */ class CreateAutocompleteKeyword: Codable { - public var words: [String]? - - public var customJson: [String: Any]? - public var appId: String? public var results: [AutocompleteResult]? - public var isActive: Bool? + public var words: [String]? - public enum CodingKeys: String, CodingKey { - case words + public var customJson: [String: Any]? - case customJson = "_custom_json" + public var isActive: Bool? + public enum CodingKeys: String, CodingKey { case appId = "app_id" case results + case words + + case customJson = "_custom_json" + case isActive = "is_active" } public init(appId: String? = nil, isActive: Bool? = nil, results: [AutocompleteResult]? = nil, words: [String]? = nil, customJson: [String: Any]? = nil) { - self.words = words - - self.customJson = customJson - self.appId = appId self.results = results + self.words = words + + self.customJson = customJson + self.isActive = isActive } @@ -46,7 +46,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + 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 { - appId = try container.decode(String.self, forKey: .appId) + words = try container.decode([String].self, forKey: .words) } 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) + customJson = try container.decode([String: Any].self, forKey: .customJson) } 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(words, forKey: .words) - - try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(appId, forKey: .appId) try? container.encodeIfPresent(results, forKey: .results) + try? container.encodeIfPresent(words, forKey: .words) + + try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(isActive, forKey: .isActive) } } diff --git a/Sources/code/platform/models/CreateCollectionPlatformModelClass.swift b/Sources/code/platform/models/CreateCollectionPlatformModelClass.swift index 499e3fecee..6c533347c0 100644 --- a/Sources/code/platform/models/CreateCollectionPlatformModelClass.swift +++ b/Sources/code/platform/models/CreateCollectionPlatformModelClass.swift @@ -8,167 +8,167 @@ public extension PlatformClient { */ class CreateCollection: Codable { - public var badge: CollectionBadge? + public var banners: CollectionBanner - public var appId: String + public var modifiedBy: UserInfo? public var query: [String: Any]? - public var published: Bool? - public var allowSort: Bool? - public var schedule: Schedule? + public var seo: SeoDetail? - public var isActive: Bool? + public var name: String - public var createdBy: UserInfo? + public var isVisible: Bool? + + public var schedule: Schedule? + + public var sortOn: String? public var description: String? public var tags: [String]? - public var slug: String - - public var customJson: [String: Any]? + public var published: Bool? - public var name: String + public var badge: CollectionBadge? - public var banners: CollectionBanner + public var isActive: Bool? - public var seo: SeoDetail? + public var meta: [String: Any]? public var allowFacets: Bool? - public var isVisible: Bool? - - public var sortOn: String? + public var logo: CollectionImage - public var type: String + public var customJson: [String: Any]? - public var modifiedBy: UserInfo? + public var appId: String - public var logo: CollectionImage + public var createdBy: UserInfo? - public var meta: [String: Any]? + public var type: String public var visibleFacetsKeys: [String]? + public var slug: String + public var localeLanguage: [String: Any]? public enum CodingKeys: String, CodingKey { - case badge + case banners - case appId = "app_id" + case modifiedBy = "modified_by" case query - case published - case allowSort = "allow_sort" - case schedule = "_schedule" + case seo - case isActive = "is_active" + case name - case createdBy = "created_by" + case isVisible = "is_visible" + + case schedule = "_schedule" + + case sortOn = "sort_on" case description case tags - case slug - - case customJson = "_custom_json" + case published - case name + case badge - case banners + case isActive = "is_active" - case seo + case meta case allowFacets = "allow_facets" - case isVisible = "is_visible" - - case sortOn = "sort_on" + case logo - case type + case customJson = "_custom_json" - case modifiedBy = "modified_by" + case appId = "app_id" - case logo + case createdBy = "created_by" - case meta + case type case visibleFacetsKeys = "visible_facets_keys" + case slug + case localeLanguage = "_locale_language" } 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.badge = badge + self.banners = banners - self.appId = appId + self.modifiedBy = modifiedBy self.query = query - self.published = published - self.allowSort = allowSort - self.schedule = schedule + self.seo = seo - self.isActive = isActive + self.name = name - self.createdBy = createdBy + self.isVisible = isVisible + + self.schedule = schedule + + self.sortOn = sortOn self.description = description self.tags = tags - self.slug = slug - - self.customJson = customJson + self.published = published - self.name = name + self.badge = badge - self.banners = banners + self.isActive = isActive - self.seo = seo + self.meta = meta self.allowFacets = allowFacets - self.isVisible = isVisible - - self.sortOn = sortOn + self.logo = logo - self.type = type + self.customJson = customJson - self.modifiedBy = modifiedBy + self.appId = appId - self.logo = logo + self.createdBy = createdBy - self.meta = meta + self.type = type self.visibleFacetsKeys = visibleFacetsKeys + self.slug = slug + self.localeLanguage = localeLanguage } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + banners = try container.decode(CollectionBanner.self, forKey: .banners) + do { - badge = try container.decode(CollectionBadge.self, forKey: .badge) + modifiedBy = try container.decode(UserInfo.self, forKey: .modifiedBy) } 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 { query = try container.decode([String: Any].self, forKey: .query) @@ -178,7 +178,7 @@ public extension PlatformClient { } catch {} do { - published = try container.decode(Bool.self, forKey: .published) + allowSort = try container.decode(Bool.self, forKey: .allowSort) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,15 +186,17 @@ public extension PlatformClient { } catch {} do { - allowSort = try container.decode(Bool.self, forKey: .allowSort) + 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) + do { - schedule = try container.decode(Schedule.self, forKey: .schedule) + isVisible = try container.decode(Bool.self, forKey: .isVisible) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -202,7 +204,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + schedule = try container.decode(Schedule.self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -210,7 +212,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserInfo.self, forKey: .createdBy) + sortOn = try container.decode(String.self, forKey: .sortOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -233,22 +235,16 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - slug = try container.decode(String.self, forKey: .slug) - do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + published = try container.decode(Bool.self, forKey: .published) } 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 { - seo = try container.decode(SeoDetail.self, forKey: .seo) + badge = try container.decode(CollectionBadge.self, forKey: .badge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -256,7 +252,7 @@ public extension PlatformClient { } catch {} do { - allowFacets = try container.decode(Bool.self, forKey: .allowFacets) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -264,7 +260,7 @@ public extension PlatformClient { } catch {} do { - isVisible = try container.decode(Bool.self, forKey: .isVisible) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -272,33 +268,35 @@ public extension PlatformClient { } catch {} do { - sortOn = try container.decode(String.self, forKey: .sortOn) + 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 {} - type = try container.decode(String.self, forKey: .type) + logo = try container.decode(CollectionImage.self, forKey: .logo) do { - modifiedBy = try container.decode(UserInfo.self, forKey: .modifiedBy) + 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 {} - logo = try container.decode(CollectionImage.self, forKey: .logo) + appId = try container.decode(String.self, forKey: .appId) do { - meta = try container.decode([String: Any].self, forKey: .meta) + 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 {} + type = try container.decode(String.self, forKey: .type) + do { visibleFacetsKeys = try container.decode([String].self, forKey: .visibleFacetsKeys) @@ -307,6 +305,8 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + slug = try container.decode(String.self, forKey: .slug) + do { localeLanguage = try container.decode([String: Any].self, forKey: .localeLanguage) @@ -319,52 +319,52 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encode(modifiedBy, forKey: .modifiedBy) try? container.encodeIfPresent(query, forKey: .query) - try? container.encodeIfPresent(published, forKey: .published) - try? container.encodeIfPresent(allowSort, forKey: .allowSort) - try? container.encodeIfPresent(schedule, forKey: .schedule) + try? container.encodeIfPresent(seo, forKey: .seo) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encode(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(isVisible, forKey: .isVisible) + + try? container.encodeIfPresent(schedule, forKey: .schedule) + + try? container.encodeIfPresent(sortOn, forKey: .sortOn) try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(tags, forKey: .tags) - try? container.encodeIfPresent(slug, forKey: .slug) - - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(published, forKey: .published) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(badge, forKey: .badge) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(seo, forKey: .seo) + try? container.encodeIfPresent(meta, forKey: .meta) try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) - try? container.encodeIfPresent(isVisible, forKey: .isVisible) - - try? container.encodeIfPresent(sortOn, forKey: .sortOn) + try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encode(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encode(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(type, forKey: .type) try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) + try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) } } diff --git a/Sources/code/platform/models/CreateSearchKeywordPlatformModelClass.swift b/Sources/code/platform/models/CreateSearchKeywordPlatformModelClass.swift index 56e238a7c0..aad0ddc4f2 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 appId: String? + + public var result: SearchKeywordResult + public var words: [String]? public var customJson: [String: Any]? - public var appId: String? - public var isActive: Bool? - public var result: SearchKeywordResult - public enum CodingKeys: String, CodingKey { + case appId = "app_id" + + case result + case words case customJson = "_custom_json" - case appId = "app_id" - case isActive = "is_active" - - case result } public init(appId: String? = nil, isActive: Bool? = nil, result: SearchKeywordResult, words: [String]? = nil, customJson: [String: Any]? = nil) { + self.appId = appId + + self.result = result + self.words = words self.customJson = customJson - self.appId = appId - self.isActive = isActive - - self.result = result } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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 { - 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) @@ -62,7 +64,7 @@ public extension PlatformClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -76,22 +78,20 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - result = try container.decode(SearchKeywordResult.self, forKey: .result) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(appId, forKey: .appId) + + try? container.encodeIfPresent(result, forKey: .result) + try? container.encodeIfPresent(words, forKey: .words) try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(isActive, forKey: .isActive) - - try? container.encodeIfPresent(result, forKey: .result) } } } diff --git a/Sources/code/platform/models/CreateUpdateAddressSerializerPlatformModelClass.swift b/Sources/code/platform/models/CreateUpdateAddressSerializerPlatformModelClass.swift index 8266babf80..4950c29e1d 100644 --- a/Sources/code/platform/models/CreateUpdateAddressSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/CreateUpdateAddressSerializerPlatformModelClass.swift @@ -8,110 +8,104 @@ public extension PlatformClient { */ class CreateUpdateAddressSerializer: Codable { - public var state: String + public var countryCode: String? - public var pincode: Int + public var addressType: String - public var address1: String + public var country: String public var address2: String? - public var longitude: Double + public var address1: String - public var city: String + public var latitude: Double - public var addressType: String + public var state: String - public var latitude: Double + public var landmark: String? - public var countryCode: String? + public var pincode: Int - public var country: String + public var longitude: Double - public var landmark: String? + public var city: String public enum CodingKeys: String, CodingKey { - case state + case countryCode = "country_code" - case pincode + case addressType = "address_type" - case address1 + case country case address2 - case longitude + case address1 - case city + case latitude - case addressType = "address_type" + case state - case latitude + case landmark - case countryCode = "country_code" + case pincode - case country + case longitude - case landmark + case city } 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.state = state + self.countryCode = countryCode - self.pincode = pincode + self.addressType = addressType - self.address1 = address1 + self.country = country self.address2 = address2 - self.longitude = longitude + self.address1 = address1 - self.city = city + self.latitude = latitude - self.addressType = addressType + self.state = state - self.latitude = latitude + self.landmark = landmark - self.countryCode = countryCode + self.pincode = pincode - self.country = country + self.longitude = longitude - self.landmark = landmark + self.city = city } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - state = try container.decode(String.self, forKey: .state) - - pincode = try container.decode(Int.self, forKey: .pincode) - - address1 = try container.decode(String.self, forKey: .address1) - 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 {} - longitude = try container.decode(Double.self, forKey: .longitude) - - city = try container.decode(String.self, forKey: .city) - addressType = try container.decode(String.self, forKey: .addressType) - latitude = try container.decode(Double.self, forKey: .latitude) + country = try container.decode(String.self, forKey: .country) 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 {} - country = try container.decode(String.self, forKey: .country) + address1 = try container.decode(String.self, forKey: .address1) + + latitude = try container.decode(Double.self, forKey: .latitude) + + state = try container.decode(String.self, forKey: .state) do { landmark = try container.decode(String.self, forKey: .landmark) @@ -120,32 +114,38 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + pincode = try container.decode(Int.self, forKey: .pincode) + + longitude = try container.decode(Double.self, forKey: .longitude) + + city = try container.decode(String.self, forKey: .city) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(state, forKey: .state) + try? container.encodeIfPresent(countryCode, forKey: .countryCode) - try? container.encodeIfPresent(pincode, forKey: .pincode) + try? container.encodeIfPresent(addressType, forKey: .addressType) - try? container.encodeIfPresent(address1, forKey: .address1) + try? container.encodeIfPresent(country, forKey: .country) try? container.encodeIfPresent(address2, forKey: .address2) - try? container.encodeIfPresent(longitude, forKey: .longitude) + try? container.encodeIfPresent(address1, forKey: .address1) - try? container.encodeIfPresent(city, forKey: .city) + try? container.encodeIfPresent(latitude, forKey: .latitude) - try? container.encodeIfPresent(addressType, forKey: .addressType) + try? container.encodeIfPresent(state, forKey: .state) - try? container.encodeIfPresent(latitude, forKey: .latitude) + try? container.encodeIfPresent(landmark, forKey: .landmark) - try? container.encodeIfPresent(countryCode, forKey: .countryCode) + try? container.encodeIfPresent(pincode, forKey: .pincode) - try? container.encodeIfPresent(country, forKey: .country) + try? container.encodeIfPresent(longitude, forKey: .longitude) - try? container.encodeIfPresent(landmark, forKey: .landmark) + try? container.encodeIfPresent(city, forKey: .city) } } } diff --git a/Sources/code/platform/models/CreateUpdateBrandRequestSerializerPlatformModelClass.swift b/Sources/code/platform/models/CreateUpdateBrandRequestSerializerPlatformModelClass.swift index cdd76b7869..3b543f6165 100644 --- a/Sources/code/platform/models/CreateUpdateBrandRequestSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/CreateUpdateBrandRequestSerializerPlatformModelClass.swift @@ -8,66 +8,66 @@ public extension PlatformClient { */ class CreateUpdateBrandRequestSerializer: Codable { - public var description: String? - public var logo: String - public var uid: Int? + public var name: String - public var customJson: [String: Any]? + public var description: String? - public var localeLanguage: [String: Any]? + public var companyId: Int? public var synonyms: [String]? - public var brandTier: String? + public var customJson: [String: Any]? - public var companyId: Int? + public var uid: Int? - public var name: String + public var brandTier: String? + + public var localeLanguage: [String: Any]? public var banner: BrandBannerSerializer? public enum CodingKeys: String, CodingKey { - case description - case logo - case uid + case name - case customJson = "_custom_json" + case description - case localeLanguage = "_locale_language" + case companyId = "company_id" case synonyms - case brandTier = "brand_tier" + case customJson = "_custom_json" - case companyId = "company_id" + case uid - case name + case brandTier = "brand_tier" + + case localeLanguage = "_locale_language" case banner } 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.description = description - self.logo = logo - self.uid = uid + self.name = name - self.customJson = customJson + self.description = description - self.localeLanguage = localeLanguage + self.companyId = companyId self.synonyms = synonyms - self.brandTier = brandTier + self.customJson = customJson - self.companyId = companyId + self.uid = uid - self.name = name + self.brandTier = brandTier + + self.localeLanguage = localeLanguage self.banner = banner } @@ -75,6 +75,10 @@ public extension PlatformClient { required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + logo = try container.decode(String.self, forKey: .logo) + + name = try container.decode(String.self, forKey: .name) + do { description = try container.decode(String.self, forKey: .description) @@ -83,10 +87,8 @@ 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) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -94,7 +96,7 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + synonyms = try container.decode([String].self, forKey: .synonyms) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,7 +104,7 @@ 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) @@ -110,7 +112,7 @@ public extension PlatformClient { } catch {} 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) @@ -126,15 +128,13 @@ public extension PlatformClient { } catch {} do { - companyId = try container.decode(Int.self, forKey: .companyId) + 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 {} - name = try container.decode(String.self, forKey: .name) - do { banner = try container.decode(BrandBannerSerializer.self, forKey: .banner) @@ -147,23 +147,23 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) + try? container.encodeIfPresent(companyId, forKey: .companyId) try? container.encodeIfPresent(synonyms, forKey: .synonyms) - try? container.encodeIfPresent(brandTier, forKey: .brandTier) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(brandTier, forKey: .brandTier) + + try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) try? container.encodeIfPresent(banner, forKey: .banner) } diff --git a/Sources/code/platform/models/CrossSellingDataPlatformModelClass.swift b/Sources/code/platform/models/CrossSellingDataPlatformModelClass.swift index 9220a7c8c0..52f4aa3469 100644 --- a/Sources/code/platform/models/CrossSellingDataPlatformModelClass.swift +++ b/Sources/code/platform/models/CrossSellingDataPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class CrossSellingData: Codable { - public var articles: Int? - public var products: Int? - public enum CodingKeys: String, CodingKey { - case articles + public var articles: Int? + public enum CodingKeys: String, CodingKey { case products + + case articles } public init(articles: Int? = nil, products: Int? = nil) { - self.articles = articles - self.products = products + + self.articles = articles } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - articles = try container.decode(Int.self, forKey: .articles) + products = try container.decode(Int.self, forKey: .products) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - products = try container.decode(Int.self, forKey: .products) + articles = try container.decode(Int.self, forKey: .articles) } 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(articles, forKey: .articles) - try? container.encodeIfPresent(products, forKey: .products) + + try? container.encodeIfPresent(articles, forKey: .articles) } } } diff --git a/Sources/code/platform/models/CrossSellingResponsePlatformModelClass.swift b/Sources/code/platform/models/CrossSellingResponsePlatformModelClass.swift index a0f9490ce7..4de9a2237f 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 brandDistribution: CatalogInsightBrand? - public var data: CrossSellingData? - public enum CodingKeys: String, CodingKey { - case brandDistribution = "brand_distribution" + public var brandDistribution: CatalogInsightBrand? + public enum CodingKeys: String, CodingKey { case data + + case brandDistribution = "brand_distribution" } public init(brandDistribution: CatalogInsightBrand? = nil, data: CrossSellingData? = nil) { - self.brandDistribution = brandDistribution - self.data = data + + self.brandDistribution = brandDistribution } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} 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) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(brandDistribution, forKey: .brandDistribution) - try? container.encodeIfPresent(data, forKey: .data) + + try? container.encodeIfPresent(brandDistribution, forKey: .brandDistribution) } } } diff --git a/Sources/code/platform/models/CustomOrderPlatformModelClass.swift b/Sources/code/platform/models/CustomOrderPlatformModelClass.swift index 06f710aa5a..b656731b6f 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 manufacturingTime: Int? public var manufacturingTimeUnit: String? - public enum CodingKeys: String, CodingKey { - case isCustomOrder = "is_custom_order" + public var isCustomOrder: Bool? + public enum CodingKeys: String, CodingKey { case manufacturingTime = "manufacturing_time" case manufacturingTimeUnit = "manufacturing_time_unit" + + case isCustomOrder = "is_custom_order" } public init(isCustomOrder: Bool? = nil, manufacturingTime: Int? = nil, manufacturingTimeUnit: String? = nil) { - self.isCustomOrder = isCustomOrder - self.manufacturingTime = manufacturingTime self.manufacturingTimeUnit = manufacturingTimeUnit + + self.isCustomOrder = isCustomOrder } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -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 { - 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) @@ -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(manufacturingTime, forKey: .manufacturingTime) try? container.encodeIfPresent(manufacturingTimeUnit, forKey: .manufacturingTimeUnit) + + try? container.encodeIfPresent(isCustomOrder, forKey: .isCustomOrder) } } } diff --git a/Sources/code/platform/models/DepartmentErrorResponsePlatformModelClass.swift b/Sources/code/platform/models/DepartmentErrorResponsePlatformModelClass.swift index 9bf486fe8f..321fed2776 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 errors: [String: Any]? public var message: String? - public var status: Int? + public var code: String? public var meta: [String: Any]? - public var code: String? - public enum CodingKeys: String, CodingKey { + case status + case errors case message - case status + case code case meta - - case code } public init(code: String? = nil, errors: [String: Any]? = nil, message: String? = nil, meta: [String: Any]? = nil, status: Int? = nil) { + self.status = status + self.errors = errors self.message = message - self.status = status + self.code = code self.meta = meta - - self.code = code } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - errors = try container.decode([String: Any].self, forKey: .errors) + 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 { - message = try container.decode(String.self, forKey: .message) + errors = try container.decode([String: Any].self, forKey: .errors) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,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) @@ -70,7 +70,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) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} 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) @@ -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(errors, forKey: .errors) try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(code, forKey: .code) try? container.encodeIfPresent(meta, forKey: .meta) - - try? container.encodeIfPresent(code, forKey: .code) } } } diff --git a/Sources/code/platform/models/DepartmentIdentifierPlatformModelClass.swift b/Sources/code/platform/models/DepartmentIdentifierPlatformModelClass.swift index d981dff592..12833139af 100644 --- a/Sources/code/platform/models/DepartmentIdentifierPlatformModelClass.swift +++ b/Sources/code/platform/models/DepartmentIdentifierPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class DepartmentIdentifier: Codable { - public var uid: Int? - public var slug: String? - public enum CodingKeys: String, CodingKey { - case uid + public var uid: Int? + public enum CodingKeys: String, CodingKey { case slug + + case uid } public init(slug: String? = nil, uid: Int? = nil) { - self.uid = uid - self.slug = slug + + self.uid = uid } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + uid = try container.decode(Int.self, forKey: .uid) } 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(uid, forKey: .uid) - try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/platform/models/DepartmentPlatformModelClass.swift b/Sources/code/platform/models/DepartmentPlatformModelClass.swift index faf985074e..a07e4a429c 100644 --- a/Sources/code/platform/models/DepartmentPlatformModelClass.swift +++ b/Sources/code/platform/models/DepartmentPlatformModelClass.swift @@ -10,10 +10,10 @@ public extension PlatformClient { class Department: Codable { public var name: String? - public var logo: Media? - public var priorityOrder: Int? + public var logo: Media? + public var uid: Int? public var slug: String? @@ -21,10 +21,10 @@ public extension PlatformClient { public enum CodingKeys: String, CodingKey { case name - case logo - case priorityOrder = "priority_order" + case logo + case uid case slug @@ -33,10 +33,10 @@ public extension PlatformClient { public init(logo: Media? = nil, name: String? = nil, priorityOrder: Int? = nil, slug: String? = nil, uid: Int? = nil) { self.name = name - self.logo = logo - self.priorityOrder = priorityOrder + self.logo = logo + self.uid = uid self.slug = slug @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(Media.self, forKey: .logo) + priorityOrder = try container.decode(Int.self, forKey: .priorityOrder) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - priorityOrder = try container.decode(Int.self, forKey: .priorityOrder) + logo = try container.decode(Media.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,10 +91,10 @@ public extension PlatformClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) + try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(slug, forKey: .slug) diff --git a/Sources/code/platform/models/DepartmentsResponsePlatformModelClass.swift b/Sources/code/platform/models/DepartmentsResponsePlatformModelClass.swift index 6bfab0d28a..8bdcd87053 100644 --- a/Sources/code/platform/models/DepartmentsResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/DepartmentsResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class DepartmentsResponse: Codable { - public var items: [GetDepartment]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [GetDepartment]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [GetDepartment]? = 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([GetDepartment].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([GetDepartment].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/DocumentPlatformModelClass.swift b/Sources/code/platform/models/DocumentPlatformModelClass.swift index 9a9bb24530..3c586c8949 100644 --- a/Sources/code/platform/models/DocumentPlatformModelClass.swift +++ b/Sources/code/platform/models/DocumentPlatformModelClass.swift @@ -10,35 +10,35 @@ public extension PlatformClient { class Document: Codable { public var value: String + public var legalName: String? + public var verified: Bool? public var type: String - public var legalName: String? - public var url: String? public enum CodingKeys: String, CodingKey { case value + case legalName = "legal_name" + case verified case type - case legalName = "legal_name" - case url } public init(legalName: String? = nil, type: String, url: String? = nil, value: String, verified: Bool? = nil) { self.value = value + self.legalName = legalName + self.verified = verified self.type = type - self.legalName = legalName - self.url = url } @@ -48,23 +48,23 @@ public extension PlatformClient { value = try container.decode(String.self, forKey: .value) do { - verified = try container.decode(Bool.self, forKey: .verified) + legalName = try container.decode(String.self, forKey: .legalName) } 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 { - legalName = try container.decode(String.self, forKey: .legalName) + 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 {} + type = try container.decode(String.self, forKey: .type) + do { url = try container.decode(String.self, forKey: .url) @@ -79,12 +79,12 @@ public extension PlatformClient { try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(legalName, forKey: .legalName) + try? container.encodeIfPresent(verified, forKey: .verified) try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(legalName, forKey: .legalName) - try? container.encodeIfPresent(url, forKey: .url) } } diff --git a/Sources/code/platform/models/EntityConfigurationPlatformModelClass.swift b/Sources/code/platform/models/EntityConfigurationPlatformModelClass.swift index e5c25a9d0b..5becd1cbbe 100644 --- a/Sources/code/platform/models/EntityConfigurationPlatformModelClass.swift +++ b/Sources/code/platform/models/EntityConfigurationPlatformModelClass.swift @@ -8,63 +8,61 @@ public extension PlatformClient { */ class EntityConfiguration: Codable { - public var configId: String? - public var appId: String - public var configType: String - public var product: GetCatalogConfigurationDetailsProduct? + public var id: String? + + public var configId: String? + public var listing: GetCatalogConfigurationDetailsSchemaListing? - public var id: String? + public var configType: String public enum CodingKeys: String, CodingKey { - case configId = "config_id" - case appId = "app_id" - case configType = "config_type" - case product + case id + + case configId = "config_id" + case listing - case id + case configType = "config_type" } public init(appId: String, configId: String? = nil, configType: String, id: String? = nil, listing: GetCatalogConfigurationDetailsSchemaListing? = nil, product: GetCatalogConfigurationDetailsProduct? = nil) { - self.configId = configId - self.appId = appId - self.configType = configType - self.product = product + self.id = id + + self.configId = configId + self.listing = listing - self.id = id + self.configType = configType } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + appId = try container.decode(String.self, forKey: .appId) + 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 {} - appId = try container.decode(String.self, forKey: .appId) - - configType = try container.decode(String.self, forKey: .configType) - do { - product = try container.decode(GetCatalogConfigurationDetailsProduct.self, forKey: .product) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -72,7 +70,7 @@ public extension PlatformClient { } catch {} do { - listing = try container.decode(GetCatalogConfigurationDetailsSchemaListing.self, forKey: .listing) + configId = try container.decode(String.self, forKey: .configId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -80,28 +78,30 @@ public extension PlatformClient { } catch {} 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) print("codingPath:", context.codingPath) } catch {} + + 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(configId, forKey: .configId) - try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(configType, forKey: .configType) - try? container.encodeIfPresent(product, forKey: .product) + try? container.encodeIfPresent(id, forKey: .id) + + try? container.encodeIfPresent(configId, forKey: .configId) + try? container.encodeIfPresent(listing, forKey: .listing) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(configType, forKey: .configType) } } } diff --git a/Sources/code/platform/models/ErrorCodeAndDescriptionPlatformModelClass.swift b/Sources/code/platform/models/ErrorCodeAndDescriptionPlatformModelClass.swift index d773f33d1f..37c8b61f66 100644 --- a/Sources/code/platform/models/ErrorCodeAndDescriptionPlatformModelClass.swift +++ b/Sources/code/platform/models/ErrorCodeAndDescriptionPlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class ErrorCodeAndDescription: Codable { - public var code: String - public var description: String - public enum CodingKeys: String, CodingKey { - case code + public var code: String + public enum CodingKeys: String, CodingKey { case description + + case code } public init(code: String, description: String) { - self.code = code - self.description = description + + self.code = code } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - code = try container.decode(String.self, forKey: .code) - description = try container.decode(String.self, forKey: .description) + + code = try container.decode(String.self, forKey: .code) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(code, forKey: .code) - try? container.encodeIfPresent(description, forKey: .description) + + try? container.encodeIfPresent(code, forKey: .code) } } } diff --git a/Sources/code/platform/models/ErrorCodeDescriptionPlatformModelClass.swift b/Sources/code/platform/models/ErrorCodeDescriptionPlatformModelClass.swift index ec447d3444..5ced9a72f0 100644 --- a/Sources/code/platform/models/ErrorCodeDescriptionPlatformModelClass.swift +++ b/Sources/code/platform/models/ErrorCodeDescriptionPlatformModelClass.swift @@ -8,46 +8,46 @@ public extension PlatformClient { */ class ErrorCodeDescription: Codable { - public var code: String + public var description: String public var success: Bool - public var description: String + public var code: String public enum CodingKeys: String, CodingKey { - case code + case description case success - case description + case code } public init(code: String, description: String, success: Bool) { - self.code = code + self.description = description self.success = success - self.description = description + self.code = code } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - code = try container.decode(String.self, forKey: .code) + description = try container.decode(String.self, forKey: .description) success = try container.decode(Bool.self, forKey: .success) - description = try container.decode(String.self, forKey: .description) + code = try container.decode(String.self, forKey: .code) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(code, forKey: .code) + try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(code, forKey: .code) } } } diff --git a/Sources/code/platform/models/ErrorResponsePlatformModelClass.swift b/Sources/code/platform/models/ErrorResponsePlatformModelClass.swift index 56d4d688d5..07166a083f 100644 --- a/Sources/code/platform/models/ErrorResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/ErrorResponsePlatformModelClass.swift @@ -12,18 +12,18 @@ public extension PlatformClient { public var message: String? - public var status: Int? - public var code: String? + public var status: Int? + public enum CodingKeys: String, CodingKey { case meta case message - case status - case code + + case status } public init(code: String? = nil, message: String? = nil, meta: [String: Any]? = nil, status: Int? = nil) { @@ -31,9 +31,9 @@ public extension PlatformClient { self.message = message - self.status = status - self.code = code + + self.status = status } required public init(from decoder: Decoder) throws { @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - status = try container.decode(Int.self, forKey: .status) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} 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) @@ -79,9 +79,9 @@ public extension PlatformClient { try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(code, forKey: .code) + + try? container.encodeIfPresent(status, forKey: .status) } } } diff --git a/Sources/code/platform/models/GTINPlatformModelClass.swift b/Sources/code/platform/models/GTINPlatformModelClass.swift index 0ef394828b..378ed9b1b6 100644 --- a/Sources/code/platform/models/GTINPlatformModelClass.swift +++ b/Sources/code/platform/models/GTINPlatformModelClass.swift @@ -8,33 +8,31 @@ public extension PlatformClient { */ class GTIN: Codable { - public var gtinValue: String - public var primary: Bool? public var gtinType: String - public enum CodingKeys: String, CodingKey { - case gtinValue = "gtin_value" + public var gtinValue: String + public enum CodingKeys: String, CodingKey { case primary case gtinType = "gtin_type" + + case gtinValue = "gtin_value" } public init(gtinType: String, gtinValue: String, primary: Bool? = nil) { - self.gtinValue = gtinValue - self.primary = primary self.gtinType = gtinType + + self.gtinValue = gtinValue } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - gtinValue = try container.decode(String.self, forKey: .gtinValue) - do { primary = try container.decode(Bool.self, forKey: .primary) @@ -44,16 +42,18 @@ public extension PlatformClient { } catch {} gtinType = try container.decode(String.self, forKey: .gtinType) + + gtinValue = try container.decode(String.self, forKey: .gtinValue) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(gtinValue, forKey: .gtinValue) - try? container.encodeIfPresent(primary, forKey: .primary) try? container.encodeIfPresent(gtinType, forKey: .gtinType) + + try? container.encodeIfPresent(gtinValue, forKey: .gtinValue) } } } diff --git a/Sources/code/platform/models/GenderDetailPlatformModelClass.swift b/Sources/code/platform/models/GenderDetailPlatformModelClass.swift index 9efd442fba..6051e2af15 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 enabledForEndConsumer: Bool? - - public var isNested: Bool? - - public var filters: AttributeMasterFilter? + public var schema: AttributeMaster? public var name: String? public var departments: [String]? - public var logo: String? - - public var schema: AttributeMaster? + public var enabledForEndConsumer: Bool? - public var meta: AttributeMasterMeta? + public var id: String? public var description: String? - public var id: String? + public var isNested: Bool? public var details: AttributeMasterDetails? - public var slug: String? + public var logo: String? - public enum CodingKeys: String, CodingKey { - case enabledForEndConsumer = "enabled_for_end_consumer" + public var filters: AttributeMasterFilter? - case isNested = "is_nested" + public var slug: String? - case filters + public var meta: AttributeMasterMeta? + + public enum CodingKeys: String, CodingKey { + case schema case name case departments - case logo - - case schema + case enabledForEndConsumer = "enabled_for_end_consumer" - case meta + case id case description - case id + case isNested = "is_nested" case details + case logo + + case filters + case slug + + case meta } 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.enabledForEndConsumer = enabledForEndConsumer - - self.isNested = isNested - - self.filters = filters + self.schema = schema self.name = name self.departments = departments - self.logo = logo - - self.schema = schema + self.enabledForEndConsumer = enabledForEndConsumer - self.meta = meta + self.id = id self.description = description - self.id = id + self.isNested = isNested self.details = details + self.logo = logo + + self.filters = filters + self.slug = slug + + self.meta = meta } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - enabledForEndConsumer = try container.decode(Bool.self, forKey: .enabledForEndConsumer) + schema = try container.decode(AttributeMaster.self, forKey: .schema) } 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) + 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 { - filters = try container.decode(AttributeMasterFilter.self, forKey: .filters) + departments = try container.decode([String].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -112,7 +112,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + enabledForEndConsumer = try container.decode(Bool.self, forKey: .enabledForEndConsumer) } 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 { - logo = try container.decode(String.self, forKey: .logo) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -136,7 +136,7 @@ public extension PlatformClient { } catch {} do { - schema = try container.decode(AttributeMaster.self, forKey: .schema) + isNested = try container.decode(Bool.self, forKey: .isNested) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,7 +144,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode(AttributeMasterMeta.self, forKey: .meta) + details = try container.decode(AttributeMasterDetails.self, forKey: .details) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +152,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -160,7 +160,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + filters = try container.decode(AttributeMasterFilter.self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -168,7 +168,7 @@ public extension PlatformClient { } catch {} do { - details = try container.decode(AttributeMasterDetails.self, forKey: .details) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +176,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + meta = try container.decode(AttributeMasterMeta.self, forKey: .meta) } 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(enabledForEndConsumer, forKey: .enabledForEndConsumer) - - try? container.encodeIfPresent(isNested, forKey: .isNested) - - try? container.encodeIfPresent(filters, forKey: .filters) + try? container.encodeIfPresent(schema, forKey: .schema) try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(departments, forKey: .departments) - try? container.encodeIfPresent(logo, forKey: .logo) - - try? container.encodeIfPresent(schema, forKey: .schema) + try? container.encodeIfPresent(enabledForEndConsumer, forKey: .enabledForEndConsumer) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(id, forKey: .id) try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(isNested, forKey: .isNested) try? container.encodeIfPresent(details, forKey: .details) + try? container.encodeIfPresent(logo, forKey: .logo) + + try? container.encodeIfPresent(filters, forKey: .filters) + try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(meta, forKey: .meta) } } } diff --git a/Sources/code/platform/models/GetAddressSerializer1PlatformModelClass.swift b/Sources/code/platform/models/GetAddressSerializer1PlatformModelClass.swift index 585f9a9e18..db9d9c57bc 100644 --- a/Sources/code/platform/models/GetAddressSerializer1PlatformModelClass.swift +++ b/Sources/code/platform/models/GetAddressSerializer1PlatformModelClass.swift @@ -8,81 +8,81 @@ public extension PlatformClient { */ class GetAddressSerializer1: Codable { - public var address1: String? + public var countryCode: String? - public var pincode: Int? + public var addressType: String? public var address2: String? - public var state: String? + public var country: String? - public var longitude: Double? + public var address1: String? - public var city: String? + public var latitude: Double? - public var addressType: String? + public var state: String? - public var latitude: Double? + public var landmark: String? - public var countryCode: String? + public var pincode: Int? - public var country: String? + public var longitude: Double? - public var landmark: String? + public var city: String? public enum CodingKeys: String, CodingKey { - case address1 + case countryCode = "country_code" - case pincode + case addressType = "address_type" case address2 - case state + case country - case longitude + case address1 - case city + case latitude - case addressType = "address_type" + case state - case latitude + case landmark - case countryCode = "country_code" + case pincode - case country + case longitude - case landmark + case city } 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.address1 = address1 + self.countryCode = countryCode - self.pincode = pincode + self.addressType = addressType self.address2 = address2 - self.state = state + self.country = country - self.longitude = longitude + self.address1 = address1 - self.city = city + self.latitude = latitude - self.addressType = addressType + self.state = state - self.latitude = latitude + self.landmark = landmark - self.countryCode = countryCode + self.pincode = pincode - self.country = country + self.longitude = longitude - self.landmark = landmark + self.city = city } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - address1 = try container.decode(String.self, forKey: .address1) + countryCode = try container.decode(String.self, forKey: .countryCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - pincode = try container.decode(Int.self, forKey: .pincode) + addressType = try container.decode(String.self, forKey: .addressType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -106,7 +106,7 @@ public extension PlatformClient { } catch {} do { - state = try container.decode(String.self, forKey: .state) + country = try container.decode(String.self, forKey: .country) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +114,7 @@ public extension PlatformClient { } catch {} do { - longitude = try container.decode(Double.self, forKey: .longitude) + address1 = try container.decode(String.self, forKey: .address1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient { } catch {} do { - city = try container.decode(String.self, forKey: .city) + latitude = try container.decode(Double.self, forKey: .latitude) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,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) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - latitude = try container.decode(Double.self, forKey: .latitude) + landmark = try container.decode(String.self, forKey: .landmark) } 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) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ public extension PlatformClient { } catch {} do { - country = try container.decode(String.self, forKey: .country) + longitude = try container.decode(Double.self, forKey: .longitude) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,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) @@ -173,27 +173,27 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(address1, forKey: .address1) + try? container.encodeIfPresent(countryCode, forKey: .countryCode) - try? container.encodeIfPresent(pincode, forKey: .pincode) + try? container.encodeIfPresent(addressType, forKey: .addressType) try? container.encodeIfPresent(address2, forKey: .address2) - try? container.encodeIfPresent(state, forKey: .state) + try? container.encodeIfPresent(country, forKey: .country) - try? container.encodeIfPresent(longitude, forKey: .longitude) + try? container.encodeIfPresent(address1, forKey: .address1) - try? container.encodeIfPresent(city, forKey: .city) + try? container.encodeIfPresent(latitude, forKey: .latitude) - try? container.encodeIfPresent(addressType, forKey: .addressType) + try? container.encodeIfPresent(state, forKey: .state) - try? container.encodeIfPresent(latitude, forKey: .latitude) + try? container.encodeIfPresent(landmark, forKey: .landmark) - try? container.encodeIfPresent(countryCode, forKey: .countryCode) + try? container.encodeIfPresent(pincode, forKey: .pincode) - try? container.encodeIfPresent(country, forKey: .country) + try? container.encodeIfPresent(longitude, forKey: .longitude) - try? container.encodeIfPresent(landmark, forKey: .landmark) + try? container.encodeIfPresent(city, forKey: .city) } } } diff --git a/Sources/code/platform/models/GetAddressSerializerPlatformModelClass.swift b/Sources/code/platform/models/GetAddressSerializerPlatformModelClass.swift index 838ebee422..d210ee0bb8 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 landmark: String? - - public var state: String? + public var longitude: Double? public var latitude: Double? public var address2: String? - public var countryCode: String? - - public var pincode: Int? + public var state: String? - public var city: String? + public var landmark: String? public var address1: String? - public var longitude: Double? + public var addressType: String? + + public var city: String? public var country: String? - public var addressType: String? + public var pincode: Int? - public enum CodingKeys: String, CodingKey { - case landmark + public var countryCode: String? - case state + public enum CodingKeys: String, CodingKey { + case longitude case latitude case address2 - case countryCode = "country_code" - - case pincode + case state - case city + case landmark case address1 - case longitude + case addressType = "address_type" + + case city case country - case addressType = "address_type" + case pincode + + case countryCode = "country_code" } 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.landmark = landmark - - self.state = state + self.longitude = longitude self.latitude = latitude self.address2 = address2 - self.countryCode = countryCode - - self.pincode = pincode + self.state = state - self.city = city + self.landmark = landmark self.address1 = address1 - self.longitude = longitude + self.addressType = addressType + + self.city = city self.country = country - self.addressType = addressType + self.pincode = pincode + + self.countryCode = countryCode } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - landmark = try container.decode(String.self, forKey: .landmark) + longitude = try container.decode(Double.self, forKey: .longitude) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - state = try container.decode(String.self, forKey: .state) + latitude = try container.decode(Double.self, forKey: .latitude) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,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) @@ -106,7 +106,7 @@ public extension PlatformClient { } catch {} 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) @@ -114,7 +114,7 @@ public extension PlatformClient { } catch {} do { - countryCode = try container.decode(String.self, forKey: .countryCode) + landmark = try container.decode(String.self, forKey: .landmark) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient { } catch {} do { - pincode = try container.decode(Int.self, forKey: .pincode) + address1 = try container.decode(String.self, forKey: .address1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension PlatformClient { } catch {} do { - city = try container.decode(String.self, forKey: .city) + addressType = try container.decode(String.self, forKey: .addressType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - address1 = try container.decode(String.self, forKey: .address1) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient { } catch {} do { - longitude = try container.decode(Double.self, forKey: .longitude) + country = try container.decode(String.self, forKey: .country) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ public extension PlatformClient { } 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) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - addressType = try container.decode(String.self, forKey: .addressType) + countryCode = try container.decode(String.self, forKey: .countryCode) } 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(landmark, forKey: .landmark) - - try? container.encodeIfPresent(state, forKey: .state) + try? container.encodeIfPresent(longitude, forKey: .longitude) try? container.encodeIfPresent(latitude, forKey: .latitude) try? container.encodeIfPresent(address2, forKey: .address2) - try? container.encodeIfPresent(countryCode, forKey: .countryCode) - - try? container.encodeIfPresent(pincode, forKey: .pincode) + try? container.encodeIfPresent(state, forKey: .state) - try? container.encodeIfPresent(city, forKey: .city) + try? container.encodeIfPresent(landmark, forKey: .landmark) try? container.encodeIfPresent(address1, forKey: .address1) - try? container.encodeIfPresent(longitude, forKey: .longitude) + try? container.encodeIfPresent(addressType, forKey: .addressType) + + try? container.encodeIfPresent(city, forKey: .city) try? container.encodeIfPresent(country, forKey: .country) - try? container.encodeIfPresent(addressType, forKey: .addressType) + try? container.encodeIfPresent(pincode, forKey: .pincode) + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) } } } diff --git a/Sources/code/platform/models/GetAutocompleteWordsDataPlatformModelClass.swift b/Sources/code/platform/models/GetAutocompleteWordsDataPlatformModelClass.swift index 6c7e20d529..fa1432da5f 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 words: [String]? - - public var customJson: [String: Any]? - public var appId: String? public var results: [[String: Any]]? - public var uid: String? + public var words: [String]? - public enum CodingKeys: String, CodingKey { - case words + public var uid: String? - case customJson = "_custom_json" + public var customJson: [String: Any]? + public enum CodingKeys: String, CodingKey { case appId = "app_id" case results + case words + case uid + + 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.customJson = customJson - self.appId = appId self.results = results + self.words = words + self.uid = uid + + self.customJson = customJson } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + 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 { - appId = try container.decode(String.self, forKey: .appId) + words = try container.decode([String].self, forKey: .words) } 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) + uid = try container.decode(String.self, forKey: .uid) } 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(words, forKey: .words) - - try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(appId, forKey: .appId) try? container.encodeIfPresent(results, forKey: .results) + try? container.encodeIfPresent(words, forKey: .words) + try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(customJson, forKey: .customJson) } } } diff --git a/Sources/code/platform/models/GetAutocompleteWordsResponsePlatformModelClass.swift b/Sources/code/platform/models/GetAutocompleteWordsResponsePlatformModelClass.swift index e77420318e..d3a3e6e345 100644 --- a/Sources/code/platform/models/GetAutocompleteWordsResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetAutocompleteWordsResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class GetAutocompleteWordsResponse: Codable { - public var items: [GetAutocompleteWordsData]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [GetAutocompleteWordsData]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [GetAutocompleteWordsData]? = 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([GetAutocompleteWordsData].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([GetAutocompleteWordsData].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/GetBrandResponseSerializerPlatformModelClass.swift b/Sources/code/platform/models/GetBrandResponseSerializerPlatformModelClass.swift index 585e8e305e..af49f10218 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 description: String? - - public var logo: String? - - public var createdOn: String? + public var synonyms: [String]? public var customJson: [String: Any]? public var verifiedOn: String? - public var stage: String? + public var localeLanguage: [String: Any]? - public var uid: Int? + public var banner: BrandBannerSerializer? - public var localeLanguage: [String: Any]? + public var logo: String? public var mode: String? - public var slugKey: String? - - public var synonyms: [String]? + public var uid: Int? - public var createdBy: UserSerializer1? + public var verifiedBy: UserSerializer1? - public var name: String + public var createdOn: String? - public var banner: BrandBannerSerializer? + public var warnings: [String: Any]? public var modifiedOn: String? - public var rejectReason: String? + public var description: String? - public var verifiedBy: UserSerializer1? + public var modifiedBy: UserSerializer1? - public var warnings: [String: Any]? + public var name: String - public var modifiedBy: UserSerializer1? + public var rejectReason: String? - public enum CodingKeys: String, CodingKey { - case description + public var slugKey: String? - case logo + public var createdBy: UserSerializer1? - case createdOn = "created_on" + public var stage: String? + + public enum CodingKeys: String, CodingKey { + case synonyms case customJson = "_custom_json" case verifiedOn = "verified_on" - case stage + case localeLanguage = "_locale_language" - case uid + case banner - case localeLanguage = "_locale_language" + case logo case mode - case slugKey = "slug_key" - - case synonyms + case uid - case createdBy = "created_by" + case verifiedBy = "verified_by" - case name + case createdOn = "created_on" - case banner + case warnings case modifiedOn = "modified_on" + case description + + case modifiedBy = "modified_by" + + case name + case rejectReason = "reject_reason" - case verifiedBy = "verified_by" + case slugKey = "slug_key" - case warnings + case createdBy = "created_by" - case modifiedBy = "modified_by" + case stage } 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.description = description - - self.logo = logo - - self.createdOn = createdOn + self.synonyms = synonyms self.customJson = customJson self.verifiedOn = verifiedOn - self.stage = stage + self.localeLanguage = localeLanguage - self.uid = uid + self.banner = banner - self.localeLanguage = localeLanguage + self.logo = logo self.mode = mode - self.slugKey = slugKey - - self.synonyms = synonyms + self.uid = uid - self.createdBy = createdBy + self.verifiedBy = verifiedBy - self.name = name + self.createdOn = createdOn - self.banner = banner + self.warnings = warnings self.modifiedOn = modifiedOn + self.description = description + + self.modifiedBy = modifiedBy + + self.name = name + self.rejectReason = rejectReason - self.verifiedBy = verifiedBy + self.slugKey = slugKey - self.warnings = warnings + self.createdBy = createdBy - self.modifiedBy = modifiedBy + self.stage = stage } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - description = try container.decode(String.self, forKey: .description) + synonyms = try container.decode([String].self, forKey: .synonyms) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(String.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) @@ -146,7 +146,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + verifiedOn = try container.decode(String.self, forKey: .verifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + localeLanguage = try container.decode([String: Any].self, forKey: .localeLanguage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} 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) @@ -170,7 +170,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) @@ -178,7 +178,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + mode = try container.decode(String.self, forKey: .mode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,7 +186,7 @@ public extension PlatformClient { } catch {} do { - localeLanguage = try container.decode([String: Any].self, forKey: .localeLanguage) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +194,7 @@ public extension PlatformClient { } catch {} do { - mode = try container.decode(String.self, forKey: .mode) + verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -202,7 +202,7 @@ public extension PlatformClient { } catch {} do { - slugKey = try container.decode(String.self, forKey: .slugKey) + 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 { - synonyms = try container.decode([String].self, forKey: .synonyms) + warnings = try container.decode([String: Any].self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,17 +218,15 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) + 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 { - 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) @@ -236,13 +234,15 @@ public extension PlatformClient { } catch {} 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) print("codingPath:", context.codingPath) } catch {} + name = try container.decode(String.self, forKey: .name) + do { rejectReason = try container.decode(String.self, forKey: .rejectReason) @@ -252,7 +252,7 @@ public extension PlatformClient { } catch {} do { - verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) + slugKey = try container.decode(String.self, forKey: .slugKey) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -260,7 +260,7 @@ public extension PlatformClient { } catch {} do { - warnings = try container.decode([String: Any].self, forKey: .warnings) + createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -268,7 +268,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) + stage = try container.decode(String.self, forKey: .stage) } 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(description, forKey: .description) - - try? container.encodeIfPresent(logo, forKey: .logo) - - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(synonyms, forKey: .synonyms) try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(banner, forKey: .banner) - try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) + try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(mode, forKey: .mode) - try? container.encodeIfPresent(slugKey, forKey: .slugKey) - - try? container.encodeIfPresent(synonyms, forKey: .synonyms) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(banner, forKey: .banner) + try? container.encodeIfPresent(warnings, forKey: .warnings) try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(description, forKey: .description) + + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + + try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) - try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) + try? container.encodeIfPresent(slugKey, forKey: .slugKey) - try? container.encodeIfPresent(warnings, forKey: .warnings) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(stage, forKey: .stage) } } } diff --git a/Sources/code/platform/models/GetCatalogConfigurationDetailsProductPlatformModelClass.swift b/Sources/code/platform/models/GetCatalogConfigurationDetailsProductPlatformModelClass.swift index 62ab94d128..7dd36e38d2 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 variant: [String: Any]? - public var detail: [String: Any]? - public var similar: [String: Any]? - public var compare: [String: Any]? - public enum CodingKeys: String, CodingKey { - case variant + public var variant: [String: Any]? - case detail + public var similar: [String: Any]? - case similar + public enum CodingKeys: String, CodingKey { + case detail case compare + + case variant + + case similar } public init(compare: [String: Any]? = nil, detail: [String: Any]? = nil, similar: [String: Any]? = nil, variant: [String: Any]? = nil) { - self.variant = variant - self.detail = detail - self.similar = similar - self.compare = compare + + self.variant = variant + + self.similar = similar } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - variant = try container.decode([String: Any].self, forKey: .variant) + 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 { - detail = try container.decode([String: Any].self, forKey: .detail) + compare = try container.decode([String: Any].self, forKey: .compare) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - similar = try container.decode([String: Any].self, forKey: .similar) + 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 { - compare = try container.decode([String: Any].self, forKey: .compare) + similar = try container.decode([String: Any].self, forKey: .similar) } 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(variant, forKey: .variant) - try? container.encodeIfPresent(detail, forKey: .detail) - try? container.encodeIfPresent(similar, forKey: .similar) - try? container.encodeIfPresent(compare, forKey: .compare) + + try? container.encodeIfPresent(variant, forKey: .variant) + + try? container.encodeIfPresent(similar, forKey: .similar) } } } diff --git a/Sources/code/platform/models/GetCatalogConfigurationDetailsSchemaListingPlatformModelClass.swift b/Sources/code/platform/models/GetCatalogConfigurationDetailsSchemaListingPlatformModelClass.swift index f7b66ab8bd..39ee11d0f3 100644 --- a/Sources/code/platform/models/GetCatalogConfigurationDetailsSchemaListingPlatformModelClass.swift +++ b/Sources/code/platform/models/GetCatalogConfigurationDetailsSchemaListingPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class GetCatalogConfigurationDetailsSchemaListing: Codable { - public var filter: [String: Any]? - public var sort: [String: Any]? - public enum CodingKeys: String, CodingKey { - case filter + public var filter: [String: Any]? + public enum CodingKeys: String, CodingKey { case sort + + case filter } public init(filter: [String: Any]? = nil, sort: [String: Any]? = nil) { - self.filter = filter - self.sort = sort + + self.filter = filter } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - filter = try container.decode([String: Any].self, forKey: .filter) + sort = try container.decode([String: Any].self, forKey: .sort) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - sort = try container.decode([String: Any].self, forKey: .sort) + filter = try container.decode([String: Any].self, forKey: .filter) } 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(filter, forKey: .filter) - try? container.encodeIfPresent(sort, forKey: .sort) + + try? container.encodeIfPresent(filter, forKey: .filter) } } } diff --git a/Sources/code/platform/models/GetCollectionDetailNestPlatformModelClass.swift b/Sources/code/platform/models/GetCollectionDetailNestPlatformModelClass.swift index 30e2c1844b..40fbb4bba6 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 badge: [String: Any]? + public var banners: ImageUrls? - public var appId: String? + public var tag: [String]? public var query: [String: Any]? public var allowSort: Bool? - public var cron: [String: Any]? + public var uid: String? - public var schedule: [String: Any]? + public var name: String? - public var isActive: Bool? + public var action: Action? - public var description: String? + public var schedule: [String: Any]? - public var uid: String? + public var description: String? - public var slug: String? + public var badge: [String: Any]? - public var name: String? + public var meta: [String: Any]? - public var banners: ImageUrls? + public var isActive: Bool? public var allowFacets: Bool? - public var type: String? + public var cron: [String: Any]? public var logo: Media1? - public var tag: [String]? - - public var action: Action? + public var appId: String? - public var meta: [String: Any]? + public var type: String? public var visibleFacetsKeys: [String]? + public var slug: String? + public enum CodingKeys: String, CodingKey { - case badge + case banners - case appId = "app_id" + case tag case query case allowSort = "allow_sort" - case cron + case uid - case schedule = "_schedule" + case name - case isActive = "is_active" + case action - case description + case schedule = "_schedule" - case uid + case description - case slug + case badge - case name + case meta - case banners + case isActive = "is_active" case allowFacets = "allow_facets" - case type + case cron case logo - case tag - - case action + case appId = "app_id" - case meta + case type case visibleFacetsKeys = "visible_facets_keys" + + case slug } 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.badge = badge + self.banners = banners - self.appId = appId + self.tag = tag self.query = query self.allowSort = allowSort - self.cron = cron + self.uid = uid - self.schedule = schedule + self.name = name - self.isActive = isActive + self.action = action - self.description = description + self.schedule = schedule - self.uid = uid + self.description = description - self.slug = slug + self.badge = badge - self.name = name + self.meta = meta - self.banners = banners + self.isActive = isActive self.allowFacets = allowFacets - self.type = type + self.cron = cron self.logo = logo - self.tag = tag - - self.action = action + self.appId = appId - self.meta = meta + self.type = type self.visibleFacetsKeys = visibleFacetsKeys + + self.slug = slug } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - badge = try container.decode([String: Any].self, forKey: .badge) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - appId = try container.decode(String.self, forKey: .appId) + tag = try container.decode([String].self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - cron = try container.decode([String: Any].self, forKey: .cron) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +170,7 @@ public extension PlatformClient { } catch {} do { - schedule = try container.decode([String: Any].self, forKey: .schedule) + name = try container.decode(String.self, forKey: .name) } 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) + action = try container.decode(Action.self, forKey: .action) } 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) + schedule = try container.decode([String: Any].self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +194,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(String.self, forKey: .uid) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -202,7 +202,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + 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 { - name = try container.decode(String.self, forKey: .name) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +218,7 @@ public extension PlatformClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + 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 { - 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) @@ -250,7 +250,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode([String].self, forKey: .tag) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -258,7 +258,7 @@ public extension PlatformClient { } catch {} do { - action = try container.decode(Action.self, forKey: .action) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -266,7 +266,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) @@ -274,7 +274,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) @@ -285,43 +285,43 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encodeIfPresent(tag, forKey: .tag) try? container.encodeIfPresent(query, forKey: .query) try? container.encodeIfPresent(allowSort, forKey: .allowSort) - try? container.encodeIfPresent(cron, forKey: .cron) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(schedule, forKey: .schedule) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(schedule, forKey: .schedule) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(badge, forKey: .badge) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(cron, forKey: .cron) try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(tag, forKey: .tag) - - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(type, forKey: .type) try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) + + try? container.encodeIfPresent(slug, forKey: .slug) } } } diff --git a/Sources/code/platform/models/GetCollectionItemsResponsePlatformModelClass.swift b/Sources/code/platform/models/GetCollectionItemsResponsePlatformModelClass.swift index e829b14ec0..381e13012b 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 sortOn: [ProductSortOn]? + public var page: Page? public var filters: [ProductFilters]? public var items: [ProductListingDetail]? - public var page: Page? + public var sortOn: [ProductSortOn]? public enum CodingKeys: String, CodingKey { - case sortOn = "sort_on" + case page case filters case items - case page + case sortOn = "sort_on" } public init(filters: [ProductFilters]? = nil, items: [ProductListingDetail]? = nil, page: Page? = nil, sortOn: [ProductSortOn]? = nil) { - self.sortOn = sortOn + self.page = page self.filters = filters self.items = items - self.page = page + self.sortOn = sortOn } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - sortOn = try container.decode([ProductSortOn].self, forKey: .sortOn) + page = try container.decode(Page.self, forKey: .page) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - page = try container.decode(Page.self, forKey: .page) + 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(sortOn, forKey: .sortOn) + try? container.encodeIfPresent(page, forKey: .page) try? container.encodeIfPresent(filters, forKey: .filters) try? container.encodeIfPresent(items, forKey: .items) - try? container.encodeIfPresent(page, forKey: .page) + try? container.encodeIfPresent(sortOn, forKey: .sortOn) } } } diff --git a/Sources/code/platform/models/GetCollectionListingResponsePlatformModelClass.swift b/Sources/code/platform/models/GetCollectionListingResponsePlatformModelClass.swift index af66f18272..a0474d6574 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 page: Page? + public var filters: CollectionListingFilter? public var items: [GetCollectionDetailNest]? - public var page: Page? - public enum CodingKeys: String, CodingKey { + case page + case filters case items - - case page } public init(filters: CollectionListingFilter? = nil, items: [GetCollectionDetailNest]? = nil, page: Page? = nil) { + self.page = page + self.filters = filters self.items = items - - self.page = page } 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 { - 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) @@ -50,7 +50,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) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(page, forKey: .page) + try? container.encodeIfPresent(filters, forKey: .filters) try? container.encodeIfPresent(items, forKey: .items) - - try? container.encodeIfPresent(page, forKey: .page) } } } diff --git a/Sources/code/platform/models/GetCollectionQueryOptionResponsePlatformModelClass.swift b/Sources/code/platform/models/GetCollectionQueryOptionResponsePlatformModelClass.swift index fda3105805..e8028b4d9f 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 sortOn: [ProductSortOn]? - public var filters: [ProductFilters]? - public enum CodingKeys: String, CodingKey { - case sortOn = "sort_on" + public var sortOn: [ProductSortOn]? + public enum CodingKeys: String, CodingKey { case filters + + case sortOn = "sort_on" } public init(filters: [ProductFilters]? = nil, sortOn: [ProductSortOn]? = nil) { - self.sortOn = sortOn - self.filters = filters + + self.sortOn = sortOn } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} 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) @@ -47,9 +47,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(sortOn, forKey: .sortOn) - try? container.encodeIfPresent(filters, forKey: .filters) + + try? container.encodeIfPresent(sortOn, forKey: .sortOn) } } } diff --git a/Sources/code/platform/models/GetCompanyProfileSerializerResponsePlatformModelClass.swift b/Sources/code/platform/models/GetCompanyProfileSerializerResponsePlatformModelClass.swift index 19e37f47f5..a9aef74e84 100644 --- a/Sources/code/platform/models/GetCompanyProfileSerializerResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetCompanyProfileSerializerResponsePlatformModelClass.swift @@ -8,147 +8,147 @@ public extension PlatformClient { */ class GetCompanyProfileSerializerResponse: Codable { - public var businessCountryInfo: BusinessCountryInfo? + public var taxes: [[String: Any]]? - public var createdOn: String? + public var contactDetails: ContactDetails? public var verifiedOn: String? - public var franchiseEnabled: Bool? - - public var stage: String? - - public var addresses: [GetAddressSerializer]? + public var mode: String? public var uid: Int - public var mode: String? - - public var notificationEmails: [String]? + public var verifiedBy: UserSerializer? - public var createdBy: UserSerializer? + public var createdOn: String? - public var businessInfo: String? + public var companyType: String - public var name: String? + public var warnings: [String: Any]? public var modifiedOn: String? - public var businessDetails: BusinessDetails? + public var businessInfo: String? + + public var notificationEmails: [String]? public var documents: [Document]? - public var verifiedBy: UserSerializer? + public var modifiedBy: UserSerializer? - public var companyType: String + public var name: String? - public var warnings: [String: Any]? + public var businessCountryInfo: BusinessCountryInfo? - public var modifiedBy: UserSerializer? + public var createdBy: UserSerializer? - public var taxes: [[String: Any]]? + public var businessDetails: BusinessDetails? - public var contactDetails: ContactDetails? + public var franchiseEnabled: Bool? public var businessType: String - public enum CodingKeys: String, CodingKey { - case businessCountryInfo = "business_country_info" + public var addresses: [GetAddressSerializer]? - case createdOn = "created_on" + public var stage: String? - case verifiedOn = "verified_on" + public enum CodingKeys: String, CodingKey { + case taxes - case franchiseEnabled = "franchise_enabled" + case contactDetails = "contact_details" - case stage + case verifiedOn = "verified_on" - case addresses + case mode case uid - case mode - - case notificationEmails = "notification_emails" + case verifiedBy = "verified_by" - case createdBy = "created_by" + case createdOn = "created_on" - case businessInfo = "business_info" + case companyType = "company_type" - case name + case warnings case modifiedOn = "modified_on" - case businessDetails = "business_details" + case businessInfo = "business_info" + + case notificationEmails = "notification_emails" case documents - case verifiedBy = "verified_by" + case modifiedBy = "modified_by" - case companyType = "company_type" + case name - case warnings + case businessCountryInfo = "business_country_info" - case modifiedBy = "modified_by" + case createdBy = "created_by" - case taxes + case businessDetails = "business_details" - case contactDetails = "contact_details" + case franchiseEnabled = "franchise_enabled" case businessType = "business_type" + + case addresses + + case stage } 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, taxes: [[String: Any]]? = nil, uid: Int, verifiedBy: UserSerializer? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil) { - self.businessCountryInfo = businessCountryInfo + self.taxes = taxes - self.createdOn = createdOn + self.contactDetails = contactDetails self.verifiedOn = verifiedOn - self.franchiseEnabled = franchiseEnabled - - self.stage = stage - - self.addresses = addresses + self.mode = mode self.uid = uid - self.mode = mode - - self.notificationEmails = notificationEmails + self.verifiedBy = verifiedBy - self.createdBy = createdBy + self.createdOn = createdOn - self.businessInfo = businessInfo + self.companyType = companyType - self.name = name + self.warnings = warnings self.modifiedOn = modifiedOn - self.businessDetails = businessDetails + self.businessInfo = businessInfo + + self.notificationEmails = notificationEmails self.documents = documents - self.verifiedBy = verifiedBy + self.modifiedBy = modifiedBy - self.companyType = companyType + self.name = name - self.warnings = warnings + self.businessCountryInfo = businessCountryInfo - self.modifiedBy = modifiedBy + self.createdBy = createdBy - self.taxes = taxes + self.businessDetails = businessDetails - self.contactDetails = contactDetails + self.franchiseEnabled = franchiseEnabled self.businessType = businessType + + self.addresses = addresses + + self.stage = stage } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - businessCountryInfo = try container.decode(BusinessCountryInfo.self, forKey: .businessCountryInfo) + taxes = try container.decode([[String: Any]].self, forKey: .taxes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -156,7 +156,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + contactDetails = try container.decode(ContactDetails.self, forKey: .contactDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -172,15 +172,17 @@ public extension PlatformClient { } catch {} do { - franchiseEnabled = try container.decode(Bool.self, forKey: .franchiseEnabled) + mode = try container.decode(String.self, forKey: .mode) } 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 { - stage = try container.decode(String.self, forKey: .stage) + verifiedBy = try container.decode(UserSerializer.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -188,17 +190,17 @@ public extension PlatformClient { } catch {} 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) print("codingPath:", context.codingPath) } catch {} - uid = try container.decode(Int.self, forKey: .uid) + companyType = try container.decode(String.self, forKey: .companyType) do { - mode = try container.decode(String.self, forKey: .mode) + warnings = try container.decode([String: Any].self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +208,7 @@ public extension PlatformClient { } catch {} do { - notificationEmails = try container.decode([String].self, forKey: .notificationEmails) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +216,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + businessInfo = try container.decode(String.self, forKey: .businessInfo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -222,7 +224,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) @@ -230,7 +232,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + documents = try container.decode([Document].self, forKey: .documents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -238,7 +240,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -246,7 +248,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) @@ -254,7 +256,7 @@ public extension PlatformClient { } catch {} do { - documents = try container.decode([Document].self, forKey: .documents) + businessCountryInfo = try container.decode(BusinessCountryInfo.self, forKey: .businessCountryInfo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -262,17 +264,15 @@ public extension PlatformClient { } catch {} do { - verifiedBy = try container.decode(UserSerializer.self, forKey: .verifiedBy) + createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) } 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) - do { - warnings = try container.decode([String: Any].self, forKey: .warnings) + businessDetails = try container.decode(BusinessDetails.self, forKey: .businessDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -280,15 +280,17 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + franchiseEnabled = try container.decode(Bool.self, forKey: .franchiseEnabled) } 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) + do { - taxes = try container.decode([[String: Any]].self, forKey: .taxes) + addresses = try container.decode([GetAddressSerializer].self, forKey: .addresses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -296,62 +298,60 @@ public extension PlatformClient { } catch {} do { - contactDetails = try container.decode(ContactDetails.self, forKey: .contactDetails) + 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 {} - - businessType = try container.decode(String.self, forKey: .businessType) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(businessCountryInfo, forKey: .businessCountryInfo) + try? container.encodeIfPresent(taxes, forKey: .taxes) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(contactDetails, forKey: .contactDetails) try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) - try? container.encodeIfPresent(franchiseEnabled, forKey: .franchiseEnabled) - - try? container.encodeIfPresent(stage, forKey: .stage) - - try? container.encodeIfPresent(addresses, forKey: .addresses) + try? container.encodeIfPresent(mode, forKey: .mode) try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(mode, forKey: .mode) - - try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) + try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(businessInfo, forKey: .businessInfo) + try? container.encodeIfPresent(companyType, forKey: .companyType) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(warnings, forKey: .warnings) try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(businessDetails, forKey: .businessDetails) + try? container.encodeIfPresent(businessInfo, forKey: .businessInfo) + + try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) try? container.encodeIfPresent(documents, forKey: .documents) - try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(companyType, forKey: .companyType) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(warnings, forKey: .warnings) + try? container.encodeIfPresent(businessCountryInfo, forKey: .businessCountryInfo) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(taxes, forKey: .taxes) + try? container.encodeIfPresent(businessDetails, forKey: .businessDetails) - try? container.encodeIfPresent(contactDetails, forKey: .contactDetails) + try? container.encodeIfPresent(franchiseEnabled, forKey: .franchiseEnabled) try? container.encodeIfPresent(businessType, forKey: .businessType) + + try? container.encodeIfPresent(addresses, forKey: .addresses) + + try? container.encodeIfPresent(stage, forKey: .stage) } } } diff --git a/Sources/code/platform/models/GetCompanySerializerPlatformModelClass.swift b/Sources/code/platform/models/GetCompanySerializerPlatformModelClass.swift index 812f56bd48..47e44c961a 100644 --- a/Sources/code/platform/models/GetCompanySerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/GetCompanySerializerPlatformModelClass.swift @@ -10,84 +10,84 @@ public extension PlatformClient { class GetCompanySerializer: Codable { public var name: String? - public var verifiedBy: UserSerializer1? - - public var verifiedOn: String? - - public var companyType: String? + public var createdBy: UserSerializer1? - public var addresses: [GetAddressSerializer]? + public var businessType: String? public var modifiedBy: UserSerializer1? - public var rejectReason: String? + public var addresses: [GetAddressSerializer]? public var createdOn: String? - public var businessType: String? - - public var createdBy: UserSerializer1? - public var stage: String? + public var companyType: String? + public var uid: Int? public var modifiedOn: String? - public enum CodingKeys: String, CodingKey { - case name + public var verifiedBy: UserSerializer1? - case verifiedBy = "verified_by" + public var verifiedOn: String? - case verifiedOn = "verified_on" + public var rejectReason: String? - case companyType = "company_type" + public enum CodingKeys: String, CodingKey { + case name - case addresses + case createdBy = "created_by" + + case businessType = "business_type" case modifiedBy = "modified_by" - case rejectReason = "reject_reason" + case addresses case createdOn = "created_on" - case businessType = "business_type" - - case createdBy = "created_by" - case stage + case companyType = "company_type" + case uid case modifiedOn = "modified_on" + + case verifiedBy = "verified_by" + + case verifiedOn = "verified_on" + + case rejectReason = "reject_reason" } 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.name = name - self.verifiedBy = verifiedBy - - self.verifiedOn = verifiedOn - - self.companyType = companyType + self.createdBy = createdBy - self.addresses = addresses + self.businessType = businessType self.modifiedBy = modifiedBy - self.rejectReason = rejectReason + self.addresses = addresses self.createdOn = createdOn - self.businessType = businessType - - self.createdBy = createdBy - self.stage = stage + self.companyType = companyType + self.uid = uid self.modifiedOn = modifiedOn + + self.verifiedBy = verifiedBy + + self.verifiedOn = verifiedOn + + self.rejectReason = rejectReason } required public init(from decoder: Decoder) throws { @@ -102,7 +102,7 @@ public extension PlatformClient { } catch {} do { - verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) + createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +110,7 @@ public extension PlatformClient { } catch {} do { - verifiedOn = try container.decode(String.self, forKey: .verifiedOn) + businessType = try container.decode(String.self, forKey: .businessType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -118,7 +118,7 @@ public extension PlatformClient { } catch {} do { - companyType = try container.decode(String.self, forKey: .companyType) + modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) } 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) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,7 +142,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) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + companyType = try container.decode(String.self, forKey: .companyType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,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) @@ -166,7 +166,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) + 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 { - stage = try container.decode(String.self, forKey: .stage) + verifiedBy = try container.decode(UserSerializer1.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +182,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + verifiedOn = try container.decode(String.self, forKey: .verifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + rejectReason = try container.decode(String.self, forKey: .rejectReason) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -203,29 +203,29 @@ public extension PlatformClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) - - try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) - - try? container.encodeIfPresent(companyType, forKey: .companyType) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(addresses, forKey: .addresses) + try? container.encodeIfPresent(businessType, forKey: .businessType) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) + try? container.encodeIfPresent(addresses, forKey: .addresses) try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(businessType, forKey: .businessType) - - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(companyType, forKey: .companyType) + try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) + + try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) + + try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) } } } diff --git a/Sources/code/platform/models/GetDepartmentPlatformModelClass.swift b/Sources/code/platform/models/GetDepartmentPlatformModelClass.swift index f62f10f52a..77ddbf8cd7 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 search: String? - - public var modifiedOn: String? + public var itemType: String? public var name: String? - public var pageSize: Int? - public var pageNo: Int? - public var itemType: String? + public var createdBy: UserSerializer? public var modifiedBy: UserSerializer? - public var isActive: Bool? - - public var logo: String? - public var createdOn: String? - public var createdBy: UserSerializer? + public var search: String? public var priorityOrder: Int? - public var synonyms: [String]? + public var logo: String? public var uid: Int? + public var modifiedOn: String? + public var slug: String? - public enum CodingKeys: String, CodingKey { - case search + public var synonyms: [String]? - case modifiedOn = "modified_on" + public var isActive: Bool? - case name + public var pageSize: Int? - case pageSize = "page_size" + public enum CodingKeys: String, CodingKey { + case itemType = "item_type" + + case name case pageNo = "page_no" - case itemType = "item_type" + case createdBy = "created_by" case modifiedBy = "modified_by" - case isActive = "is_active" - - case logo - case createdOn = "created_on" - case createdBy = "created_by" + case search case priorityOrder = "priority_order" - case synonyms + case logo case uid + case modifiedOn = "modified_on" + case slug + + case synonyms + + case isActive = "is_active" + + 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.search = search - - self.modifiedOn = modifiedOn + self.itemType = itemType self.name = name - self.pageSize = pageSize - self.pageNo = pageNo - self.itemType = itemType + self.createdBy = createdBy self.modifiedBy = modifiedBy - self.isActive = isActive - - self.logo = logo - self.createdOn = createdOn - self.createdBy = createdBy + self.search = search self.priorityOrder = priorityOrder - self.synonyms = synonyms + self.logo = logo self.uid = uid + self.modifiedOn = modifiedOn + self.slug = slug + + self.synonyms = synonyms + + self.isActive = isActive + + self.pageSize = pageSize } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - search = try container.decode(String.self, forKey: .search) + itemType = try container.decode(String.self, forKey: .itemType) } 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) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + pageNo = try container.decode(Int.self, forKey: .pageNo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension PlatformClient { } catch {} do { - pageSize = try container.decode(Int.self, forKey: .pageSize) + createdBy = try container.decode(UserSerializer.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 { - pageNo = try container.decode(Int.self, forKey: .pageNo) + modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,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) @@ -154,7 +154,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + search = try container.decode(String.self, forKey: .search) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + 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 { - createdOn = try container.decode(String.self, forKey: .createdOn) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,7 +186,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +194,7 @@ public extension PlatformClient { } catch {} 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) @@ -210,7 +210,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +218,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode(String.self, forKey: .slug) + 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(search, forKey: .search) - - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(itemType, forKey: .itemType) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(pageSize, forKey: .pageSize) - try? container.encodeIfPresent(pageNo, forKey: .pageNo) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(isActive, forKey: .isActive) - - try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(search, forKey: .search) try? container.encodeIfPresent(priorityOrder, forKey: .priorityOrder) - try? container.encodeIfPresent(synonyms, forKey: .synonyms) + try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(synonyms, forKey: .synonyms) + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(pageSize, forKey: .pageSize) } } } diff --git a/Sources/code/platform/models/GetLocationSerializerPlatformModelClass.swift b/Sources/code/platform/models/GetLocationSerializerPlatformModelClass.swift index 1c6854108b..65eb9de12b 100644 --- a/Sources/code/platform/models/GetLocationSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/GetLocationSerializerPlatformModelClass.swift @@ -10,156 +10,156 @@ public extension PlatformClient { class GetLocationSerializer: Codable { public var company: GetCompanySerializer? - public var warnings: [String: Any]? - - public var storeType: String? + public var address: GetAddressSerializer - public var documents: [Document]? + public var contactNumbers: [SellerPhoneNumber]? - public var timing: [LocationDayWiseSerializer]? + public var modifiedBy: UserSerializer2? - public var notificationEmails: [String]? + public var createdOn: String? - public var displayName: String + public var uid: Int? - public var manager: LocationManagerSerializer? + public var modifiedOn: String? - public var createdOn: String? + public var code: String - public var createdBy: UserSerializer2? + public var gstCredentials: InvoiceDetailsSerializer? - public var integrationType: LocationIntegrationType? + public var name: String - public var contactNumbers: [SellerPhoneNumber]? + public var documents: [Document]? - public var uid: Int? + public var stage: String? - public var customJson: [String: Any]? + public var verifiedOn: String? - public var name: String + public var verifiedBy: UserSerializer2? - public var modifiedOn: String? + public var customJson: [String: Any]? public var productReturnConfig: ProductReturnConfigSerializer? - public var gstCredentials: InvoiceDetailsSerializer? - - public var verifiedBy: UserSerializer2? + public var timing: [LocationDayWiseSerializer]? - public var verifiedOn: String? + public var createdBy: UserSerializer2? - public var modifiedBy: UserSerializer2? + public var integrationType: LocationIntegrationType? public var phoneNumber: String - public var address: GetAddressSerializer + public var notificationEmails: [String]? - public var stage: String? + public var warnings: [String: Any]? - public var code: String + public var storeType: String? + + public var displayName: String + + public var manager: LocationManagerSerializer? public enum CodingKeys: String, CodingKey { case company - case warnings - - case storeType = "store_type" + case address - case documents + case contactNumbers = "contact_numbers" - case timing + case modifiedBy = "modified_by" - case notificationEmails = "notification_emails" + case createdOn = "created_on" - case displayName = "display_name" + case uid - case manager + case modifiedOn = "modified_on" - case createdOn = "created_on" + case code - case createdBy = "created_by" + case gstCredentials = "gst_credentials" - case integrationType = "integration_type" + case name - case contactNumbers = "contact_numbers" + case documents - case uid + case stage - case customJson = "_custom_json" + case verifiedOn = "verified_on" - case name + case verifiedBy = "verified_by" - case modifiedOn = "modified_on" + case customJson = "_custom_json" case productReturnConfig = "product_return_config" - case gstCredentials = "gst_credentials" - - case verifiedBy = "verified_by" + case timing - case verifiedOn = "verified_on" + case createdBy = "created_by" - case modifiedBy = "modified_by" + case integrationType = "integration_type" case phoneNumber = "phone_number" - case address + case notificationEmails = "notification_emails" - case stage + case warnings - case code + case storeType = "store_type" + + case displayName = "display_name" + + case manager } 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.company = company - self.warnings = warnings - - self.storeType = storeType + self.address = address - self.documents = documents + self.contactNumbers = contactNumbers - self.timing = timing + self.modifiedBy = modifiedBy - self.notificationEmails = notificationEmails + self.createdOn = createdOn - self.displayName = displayName + self.uid = uid - self.manager = manager + self.modifiedOn = modifiedOn - self.createdOn = createdOn + self.code = code - self.createdBy = createdBy + self.gstCredentials = gstCredentials - self.integrationType = integrationType + self.name = name - self.contactNumbers = contactNumbers + self.documents = documents - self.uid = uid + self.stage = stage - self.customJson = customJson + self.verifiedOn = verifiedOn - self.name = name + self.verifiedBy = verifiedBy - self.modifiedOn = modifiedOn + self.customJson = customJson self.productReturnConfig = productReturnConfig - self.gstCredentials = gstCredentials - - self.verifiedBy = verifiedBy + self.timing = timing - self.verifiedOn = verifiedOn + self.createdBy = createdBy - self.modifiedBy = modifiedBy + self.integrationType = integrationType self.phoneNumber = phoneNumber - self.address = address + self.notificationEmails = notificationEmails - self.stage = stage + self.warnings = warnings - self.code = code + self.storeType = storeType + + self.displayName = displayName + + self.manager = manager } required public init(from decoder: Decoder) throws { @@ -173,8 +173,10 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + address = try container.decode(GetAddressSerializer.self, forKey: .address) + do { - warnings = try container.decode([String: Any].self, forKey: .warnings) + contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +184,7 @@ public extension PlatformClient { } catch {} do { - storeType = try container.decode(String.self, forKey: .storeType) + modifiedBy = try container.decode(UserSerializer2.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +192,7 @@ public extension PlatformClient { } catch {} do { - documents = try container.decode([Document].self, forKey: .documents) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +200,7 @@ public extension PlatformClient { } catch {} do { - timing = try container.decode([LocationDayWiseSerializer].self, forKey: .timing) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,25 +208,27 @@ public extension PlatformClient { } catch {} do { - notificationEmails = try container.decode([String].self, forKey: .notificationEmails) + 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 {} - displayName = try container.decode(String.self, forKey: .displayName) + code = try container.decode(String.self, forKey: .code) do { - manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) + gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) } 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) + documents = try container.decode([Document].self, forKey: .documents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -232,7 +236,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserSerializer2.self, forKey: .createdBy) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -240,7 +244,7 @@ public extension PlatformClient { } catch {} do { - integrationType = try container.decode(LocationIntegrationType.self, forKey: .integrationType) + verifiedOn = try container.decode(String.self, forKey: .verifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -248,7 +252,7 @@ public extension PlatformClient { } catch {} do { - contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) + verifiedBy = try container.decode(UserSerializer2.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -256,7 +260,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.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) @@ -264,17 +268,15 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + 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 {} - name = try container.decode(String.self, forKey: .name) - do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + timing = try container.decode([LocationDayWiseSerializer].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -282,7 +284,7 @@ public extension PlatformClient { } catch {} do { - productReturnConfig = try container.decode(ProductReturnConfigSerializer.self, forKey: .productReturnConfig) + createdBy = try container.decode(UserSerializer2.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -290,15 +292,17 @@ public extension PlatformClient { } catch {} do { - gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) + integrationType = try container.decode(LocationIntegrationType.self, forKey: .integrationType) } 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) + do { - verifiedBy = try container.decode(UserSerializer2.self, forKey: .verifiedBy) + notificationEmails = try container.decode([String].self, forKey: .notificationEmails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -306,7 +310,7 @@ public extension PlatformClient { } catch {} do { - verifiedOn = try container.decode(String.self, forKey: .verifiedOn) + warnings = try container.decode([String: Any].self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -314,26 +318,22 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserSerializer2.self, forKey: .modifiedBy) + storeType = try container.decode(String.self, forKey: .storeType) } 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) - - address = try container.decode(GetAddressSerializer.self, forKey: .address) + displayName = try container.decode(String.self, forKey: .displayName) do { - stage = try container.decode(String.self, forKey: .stage) + manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) } 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) } public func encode(to encoder: Encoder) throws { @@ -341,53 +341,53 @@ public extension PlatformClient { try? container.encodeIfPresent(company, forKey: .company) - try? container.encodeIfPresent(warnings, forKey: .warnings) - - try? container.encodeIfPresent(storeType, forKey: .storeType) + try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(documents, forKey: .documents) + try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) - try? container.encodeIfPresent(timing, forKey: .timing) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(manager, forKey: .manager) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(code, forKey: .code) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(gstCredentials, forKey: .gstCredentials) - try? container.encodeIfPresent(integrationType, forKey: .integrationType) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) + try? container.encodeIfPresent(documents, forKey: .documents) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(stage, forKey: .stage) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encodeIfPresent(productReturnConfig, forKey: .productReturnConfig) - try? container.encodeIfPresent(gstCredentials, forKey: .gstCredentials) - - try? container.encodeIfPresent(verifiedBy, forKey: .verifiedBy) + try? container.encodeIfPresent(timing, forKey: .timing) - try? container.encodeIfPresent(verifiedOn, forKey: .verifiedOn) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(integrationType, forKey: .integrationType) try? container.encodeIfPresent(phoneNumber, forKey: .phoneNumber) - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(warnings, forKey: .warnings) - try? container.encodeIfPresent(code, forKey: .code) + try? container.encodeIfPresent(storeType, forKey: .storeType) + + try? container.encodeIfPresent(displayName, forKey: .displayName) + + try? container.encodeIfPresent(manager, forKey: .manager) } } } diff --git a/Sources/code/platform/models/GetOptInPlatformPlatformModelClass.swift b/Sources/code/platform/models/GetOptInPlatformPlatformModelClass.swift index f1e1baf8f1..62f3013d4f 100644 --- a/Sources/code/platform/models/GetOptInPlatformPlatformModelClass.swift +++ b/Sources/code/platform/models/GetOptInPlatformPlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class GetOptInPlatform: Codable { - public var items: [CompanyOptIn] - public var page: Page - public enum CodingKeys: String, CodingKey { - case items + public var items: [CompanyOptIn] + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [CompanyOptIn], page: Page) { - self.items = items - self.page = page + + self.items = items } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - items = try container.decode([CompanyOptIn].self, forKey: .items) - page = try container.decode(Page.self, forKey: .page) + + items = try container.decode([CompanyOptIn].self, forKey: .items) } 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/GetProductBundleCreateResponsePlatformModelClass.swift b/Sources/code/platform/models/GetProductBundleCreateResponsePlatformModelClass.swift index 96a1373c8b..10bc5b8794 100644 --- a/Sources/code/platform/models/GetProductBundleCreateResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetProductBundleCreateResponsePlatformModelClass.swift @@ -8,105 +8,105 @@ public extension PlatformClient { */ class GetProductBundleCreateResponse: Codable { - public var modifiedOn: String? + public var sameStoreAssignment: Bool? public var name: String public var choice: String - public var sameStoreAssignment: Bool? + public var products: [ProductBundleItem] - public var companyId: Int? + public var createdBy: [String: Any]? - public var pageVisibility: [String]? + public var companyId: Int? public var modifiedBy: [String: Any]? - public var logo: String? + public var id: String? public var isActive: Bool public var createdOn: String? - public var createdBy: [String: Any]? - - public var products: [ProductBundleItem] + public var pageVisibility: [String]? - public var meta: [String: Any]? + public var logo: String? - public var id: String? + public var modifiedOn: String? public var slug: String + public var meta: [String: Any]? + public enum CodingKeys: String, CodingKey { - case modifiedOn = "modified_on" + case sameStoreAssignment = "same_store_assignment" case name case choice - case sameStoreAssignment = "same_store_assignment" + case products - case companyId = "company_id" + case createdBy = "created_by" - case pageVisibility = "page_visibility" + case companyId = "company_id" case modifiedBy = "modified_by" - case logo + case id case isActive = "is_active" case createdOn = "created_on" - case createdBy = "created_by" - - case products + case pageVisibility = "page_visibility" - case meta + case logo - case id + case modifiedOn = "modified_on" case slug + + case meta } 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.modifiedOn = modifiedOn + self.sameStoreAssignment = sameStoreAssignment self.name = name self.choice = choice - self.sameStoreAssignment = sameStoreAssignment + self.products = products - self.companyId = companyId + self.createdBy = createdBy - self.pageVisibility = pageVisibility + self.companyId = companyId self.modifiedBy = modifiedBy - self.logo = logo + self.id = id self.isActive = isActive self.createdOn = createdOn - self.createdBy = createdBy - - self.products = products + self.pageVisibility = pageVisibility - self.meta = meta + self.logo = logo - self.id = id + self.modifiedOn = modifiedOn self.slug = slug + + self.meta = meta } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -117,8 +117,10 @@ public extension PlatformClient { choice = try container.decode(String.self, forKey: .choice) + products = try container.decode([ProductBundleItem].self, forKey: .products) + do { - sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +136,7 @@ public extension PlatformClient { } catch {} do { - pageVisibility = try container.decode([String].self, forKey: .pageVisibility) + modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,25 +144,25 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) + 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 {} + isActive = try container.decode(Bool.self, forKey: .isActive) + do { - logo = try container.decode(String.self, forKey: .logo) + 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 {} - isActive = try container.decode(Bool.self, forKey: .isActive) - do { - createdOn = try container.decode(String.self, forKey: .createdOn) + pageVisibility = try container.decode([String].self, forKey: .pageVisibility) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -168,66 +170,64 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + logo = try container.decode(String.self, forKey: .logo) } 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 { - 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 {} + slug = try container.decode(String.self, forKey: .slug) + do { - id = try container.decode(String.self, forKey: .id) + 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 {} - - slug = try container.decode(String.self, forKey: .slug) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(choice, forKey: .choice) - try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) + try? container.encodeIfPresent(products, forKey: .products) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) + try? container.encodeIfPresent(companyId, forKey: .companyId) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encode(logo, forKey: .logo) + try? container.encodeIfPresent(id, forKey: .id) try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - try? container.encodeIfPresent(products, forKey: .products) + try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encode(logo, forKey: .logo) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(meta, forKey: .meta) } } } diff --git a/Sources/code/platform/models/GetProductBundleListingResponsePlatformModelClass.swift b/Sources/code/platform/models/GetProductBundleListingResponsePlatformModelClass.swift index a73c28559e..b90002acef 100644 --- a/Sources/code/platform/models/GetProductBundleListingResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetProductBundleListingResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class GetProductBundleListingResponse: Codable { - public var items: [GetProductBundleCreateResponse]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [GetProductBundleCreateResponse]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [GetProductBundleCreateResponse]? = 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([GetProductBundleCreateResponse].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([GetProductBundleCreateResponse].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/GetProductBundleResponsePlatformModelClass.swift b/Sources/code/platform/models/GetProductBundleResponsePlatformModelClass.swift index 73e244606e..7a65c13baf 100644 --- a/Sources/code/platform/models/GetProductBundleResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetProductBundleResponsePlatformModelClass.swift @@ -8,75 +8,75 @@ public extension PlatformClient { */ class GetProductBundleResponse: Codable { - public var name: String? + public var sameStoreAssignment: Bool? - public var choice: String? + public var name: String? public var companyId: Int? - public var sameStoreAssignment: Bool? - - public var pageVisibility: [String]? + public var products: [GetProducts]? - public var logo: String? + public var choice: String? public var isActive: Bool? - public var products: [GetProducts]? + public var pageVisibility: [String]? - public var meta: [String: Any]? + public var logo: String? public var slug: String? + public var meta: [String: Any]? + public enum CodingKeys: String, CodingKey { - case name + case sameStoreAssignment = "same_store_assignment" - case choice + case name case companyId = "company_id" - case sameStoreAssignment = "same_store_assignment" - - case pageVisibility = "page_visibility" + case products - case logo + case choice case isActive = "is_active" - case products + case pageVisibility = "page_visibility" - case meta + case logo case slug + + case meta } 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.name = name + self.sameStoreAssignment = sameStoreAssignment - self.choice = choice + self.name = name self.companyId = companyId - self.sameStoreAssignment = sameStoreAssignment - - self.pageVisibility = pageVisibility + self.products = products - self.logo = logo + self.choice = choice self.isActive = isActive - self.products = products + self.pageVisibility = pageVisibility - self.meta = meta + self.logo = logo self.slug = slug + + self.meta = meta } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -84,7 +84,7 @@ public extension PlatformClient { } catch {} do { - choice = try container.decode(String.self, forKey: .choice) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -100,7 +100,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) @@ -108,7 +108,7 @@ public extension PlatformClient { } catch {} do { - pageVisibility = try container.decode([String].self, forKey: .pageVisibility) + choice = try container.decode(String.self, forKey: .choice) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,7 +116,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(String.self, forKey: .logo) + isActive = try container.decode(Bool.self, forKey: .isActive) } 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) + pageVisibility = try container.decode([String].self, forKey: .pageVisibility) } 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) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -140,7 +140,7 @@ public extension PlatformClient { } catch {} do { - meta = try container.decode([String: Any].self, forKey: .meta) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -148,7 +148,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) @@ -159,25 +159,25 @@ 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.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) - try? container.encodeIfPresent(choice, forKey: .choice) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) - - try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) + try? container.encodeIfPresent(products, forKey: .products) - try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(choice, forKey: .choice) try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(products, forKey: .products) + try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(meta, forKey: .meta) } } } diff --git a/Sources/code/platform/models/GetProductsPlatformModelClass.swift b/Sources/code/platform/models/GetProductsPlatformModelClass.swift index 1b7d218293..9a6641d5b3 100644 --- a/Sources/code/platform/models/GetProductsPlatformModelClass.swift +++ b/Sources/code/platform/models/GetProductsPlatformModelClass.swift @@ -8,61 +8,61 @@ public extension PlatformClient { */ class GetProducts: Codable { - public var price: Price? - - public var autoAddToCart: Bool? - - public var autoSelect: Bool? - public var productDetails: LimitedProductData? public var maxQuantity: Int? - public var minQuantity: Int? + public var price: Price? public var allowRemove: Bool? public var sizes: [Size]? - public var productUid: Int? + public var autoAddToCart: Bool? - public enum CodingKeys: String, CodingKey { - case price + public var autoSelect: Bool? - case autoAddToCart = "auto_add_to_cart" + public var minQuantity: Int? - case autoSelect = "auto_select" + public var productUid: Int? + public enum CodingKeys: String, CodingKey { case productDetails = "product_details" case maxQuantity = "max_quantity" - case minQuantity = "min_quantity" + case price case allowRemove = "allow_remove" case sizes - case productUid = "product_uid" - } + case autoAddToCart = "auto_add_to_cart" - 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.price = price + case autoSelect = "auto_select" - self.autoAddToCart = autoAddToCart + case minQuantity = "min_quantity" - self.autoSelect = autoSelect + case productUid = "product_uid" + } + 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.productDetails = productDetails self.maxQuantity = maxQuantity - self.minQuantity = minQuantity + self.price = price self.allowRemove = allowRemove self.sizes = sizes + self.autoAddToCart = autoAddToCart + + self.autoSelect = autoSelect + + self.minQuantity = minQuantity + self.productUid = productUid } @@ -70,7 +70,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - autoAddToCart = try container.decode(Bool.self, forKey: .autoAddToCart) + maxQuantity = try container.decode(Int.self, forKey: .maxQuantity) } 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) + price = try container.decode(Price.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -94,7 +94,7 @@ public extension PlatformClient { } catch {} do { - productDetails = try container.decode(LimitedProductData.self, forKey: .productDetails) + allowRemove = try container.decode(Bool.self, forKey: .allowRemove) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,7 +102,7 @@ public extension PlatformClient { } catch {} do { - maxQuantity = try container.decode(Int.self, forKey: .maxQuantity) + sizes = try container.decode([Size].self, forKey: .sizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +110,7 @@ public extension PlatformClient { } catch {} do { - minQuantity = try container.decode(Int.self, forKey: .minQuantity) + autoAddToCart = try container.decode(Bool.self, forKey: .autoAddToCart) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -118,7 +118,7 @@ public extension PlatformClient { } catch {} do { - allowRemove = try container.decode(Bool.self, forKey: .allowRemove) + autoSelect = try container.decode(Bool.self, forKey: .autoSelect) } 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) + minQuantity = try container.decode(Int.self, forKey: .minQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -145,22 +145,22 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(price, forKey: .price) - - try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) - - try? container.encodeIfPresent(autoSelect, forKey: .autoSelect) - try? container.encodeIfPresent(productDetails, forKey: .productDetails) try? container.encodeIfPresent(maxQuantity, forKey: .maxQuantity) - try? container.encodeIfPresent(minQuantity, forKey: .minQuantity) + try? container.encodeIfPresent(price, forKey: .price) try? container.encodeIfPresent(allowRemove, forKey: .allowRemove) try? container.encodeIfPresent(sizes, forKey: .sizes) + try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) + + try? container.encodeIfPresent(autoSelect, forKey: .autoSelect) + + try? container.encodeIfPresent(minQuantity, forKey: .minQuantity) + try? container.encodeIfPresent(productUid, forKey: .productUid) } } diff --git a/Sources/code/platform/models/GetSearchWordsDataPlatformModelClass.swift b/Sources/code/platform/models/GetSearchWordsDataPlatformModelClass.swift index 5a60d76db6..b318ef7905 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 words: [String]? - - public var customJson: [String: Any]? - public var appId: String? public var result: [String: Any]? - public var uid: String? + public var words: [String]? - public enum CodingKeys: String, CodingKey { - case words + public var uid: String? - case customJson = "_custom_json" + public var customJson: [String: Any]? + public enum CodingKeys: String, CodingKey { case appId = "app_id" case result + case words + case uid + + 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.customJson = customJson - self.appId = appId self.result = result + self.words = words + self.uid = uid + + self.customJson = customJson } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + 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 { - appId = try container.decode(String.self, forKey: .appId) + words = try container.decode([String].self, forKey: .words) } 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) + uid = try container.decode(String.self, forKey: .uid) } 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(words, forKey: .words) - - try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(appId, forKey: .appId) try? container.encodeIfPresent(result, forKey: .result) + try? container.encodeIfPresent(words, forKey: .words) + try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(customJson, forKey: .customJson) } } } diff --git a/Sources/code/platform/models/GetSearchWordsDetailResponsePlatformModelClass.swift b/Sources/code/platform/models/GetSearchWordsDetailResponsePlatformModelClass.swift index 1a5a25c1bc..f22143f2c3 100644 --- a/Sources/code/platform/models/GetSearchWordsDetailResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetSearchWordsDetailResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class GetSearchWordsDetailResponse: Codable { - public var items: GetSearchWordsData? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: GetSearchWordsData? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: GetSearchWordsData? = 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(GetSearchWordsData.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(GetSearchWordsData.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/GetSearchWordsResponsePlatformModelClass.swift b/Sources/code/platform/models/GetSearchWordsResponsePlatformModelClass.swift index d54aae6c22..6e406c1446 100644 --- a/Sources/code/platform/models/GetSearchWordsResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/GetSearchWordsResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class GetSearchWordsResponse: Codable { - public var items: [GetSearchWordsData]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [GetSearchWordsData]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [GetSearchWordsData]? = 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([GetSearchWordsData].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([GetSearchWordsData].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/GlobalValidationPlatformModelClass.swift b/Sources/code/platform/models/GlobalValidationPlatformModelClass.swift index bd1c639805..77e936fc62 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 properties: Properties? + public var definitions: [String: Any]? public var type: String? + public var description: String? + public var title: String? public var required: [String]? - public var definitions: [String: Any]? - - public var description: String? + public var properties: Properties? public enum CodingKeys: String, CodingKey { - case properties + case definitions case type + case description + case title case required - case definitions - - case description + case properties } public init(definitions: [String: Any]? = nil, description: String? = nil, properties: Properties? = nil, required: [String]? = nil, title: String? = nil, type: String? = nil) { - self.properties = properties + self.definitions = definitions self.type = type + self.description = description + self.title = title self.required = required - self.definitions = definitions - - self.description = description + self.properties = properties } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - properties = try container.decode(Properties.self, forKey: .properties) + definitions = try container.decode([String: Any].self, forKey: .definitions) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ public extension PlatformClient { } catch {} do { - title = try container.decode(String.self, forKey: .title) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -76,7 +76,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) @@ -84,7 +84,7 @@ public extension PlatformClient { } catch {} do { - definitions = try container.decode([String: Any].self, forKey: .definitions) + required = try container.decode([String].self, forKey: .required) } 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) + properties = try container.decode(Properties.self, forKey: .properties) } 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(properties, forKey: .properties) + try? container.encodeIfPresent(definitions, forKey: .definitions) try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(title, forKey: .title) try? container.encodeIfPresent(required, forKey: .required) - try? container.encodeIfPresent(definitions, forKey: .definitions) - - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(properties, forKey: .properties) } } } 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 82e94e0214..3a3ad8d3f1 100644 --- a/Sources/code/platform/models/HierarchyPlatformModelClass.swift +++ b/Sources/code/platform/models/HierarchyPlatformModelClass.swift @@ -8,46 +8,46 @@ public extension PlatformClient { */ class Hierarchy: Codable { - public var l2: Int + public var l1: Int public var department: Int - public var l1: Int + public var l2: Int public enum CodingKeys: String, CodingKey { - case l2 + case l1 case department - case l1 + case l2 } public init(department: Int, l1: Int, l2: Int) { - self.l2 = l2 + self.l1 = l1 self.department = department - self.l1 = l1 + self.l2 = l2 } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - l2 = try container.decode(Int.self, forKey: .l2) + l1 = try container.decode(Int.self, forKey: .l1) department = try container.decode(Int.self, forKey: .department) - l1 = try container.decode(Int.self, forKey: .l1) + l2 = try container.decode(Int.self, forKey: .l2) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(l2, forKey: .l2) + try? container.encodeIfPresent(l1, forKey: .l1) try? container.encodeIfPresent(department, forKey: .department) - try? container.encodeIfPresent(l1, forKey: .l1) + try? container.encodeIfPresent(l2, forKey: .l2) } } } diff --git a/Sources/code/platform/models/HsnCodesListingResponsePlatformModelClass.swift b/Sources/code/platform/models/HsnCodesListingResponsePlatformModelClass.swift index 169239ae96..6e8be3f323 100644 --- a/Sources/code/platform/models/HsnCodesListingResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/HsnCodesListingResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class HsnCodesListingResponse: Codable { - public var items: [HsnCodesObject]? - public var page: PageResponse? - public enum CodingKeys: String, CodingKey { - case items + public var items: [HsnCodesObject]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [HsnCodesObject]? = nil, page: PageResponse? = 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([HsnCodesObject].self, forKey: .items) + page = try container.decode(PageResponse.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(PageResponse.self, forKey: .page) + items = try container.decode([HsnCodesObject].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/HsnCodesObjectPlatformModelClass.swift b/Sources/code/platform/models/HsnCodesObjectPlatformModelClass.swift index cc9ee817e5..c1b8d2c62b 100644 --- a/Sources/code/platform/models/HsnCodesObjectPlatformModelClass.swift +++ b/Sources/code/platform/models/HsnCodesObjectPlatformModelClass.swift @@ -10,72 +10,72 @@ public extension PlatformClient { class HsnCodesObject: Codable { public var modifiedOn: String? - public var hs2Code: String? - - public var tax2: Double? - public var companyId: Int? - public var tax1: Double? - - public var threshold1: Double? + public var taxOnEsp: Bool? public var threshold2: Double? public var taxOnMrp: Bool? + public var hsnCode: String? + public var id: String? - public var hsnCode: String? + public var tax1: Double? - public var taxOnEsp: Bool? + public var hs2Code: String? - public enum CodingKeys: String, CodingKey { - case modifiedOn = "modified_on" + public var threshold1: Double? - case hs2Code = "hs2_code" + public var tax2: Double? - case tax2 + public enum CodingKeys: String, CodingKey { + case modifiedOn = "modified_on" case companyId = "company_id" - case tax1 - - case threshold1 + case taxOnEsp = "tax_on_esp" case threshold2 case taxOnMrp = "tax_on_mrp" + case hsnCode = "hsn_code" + case id - case hsnCode = "hsn_code" + case tax1 - case taxOnEsp = "tax_on_esp" + case hs2Code = "hs2_code" + + case threshold1 + + 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.modifiedOn = modifiedOn - self.hs2Code = hs2Code - - self.tax2 = tax2 - self.companyId = companyId - self.tax1 = tax1 - - self.threshold1 = threshold1 + self.taxOnEsp = taxOnEsp self.threshold2 = threshold2 self.taxOnMrp = taxOnMrp + self.hsnCode = hsnCode + self.id = id - self.hsnCode = hsnCode + self.tax1 = tax1 - self.taxOnEsp = taxOnEsp + self.hs2Code = hs2Code + + self.threshold1 = threshold1 + + self.tax2 = tax2 } required public init(from decoder: Decoder) throws { @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - hs2Code = try container.decode(String.self, forKey: .hs2Code) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} 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) @@ -106,7 +106,7 @@ public extension PlatformClient { } catch {} do { - companyId = try container.decode(Int.self, forKey: .companyId) + threshold2 = try container.decode(Double.self, forKey: .threshold2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +114,7 @@ public extension PlatformClient { } catch {} do { - tax1 = try container.decode(Double.self, forKey: .tax1) + taxOnMrp = try container.decode(Bool.self, forKey: .taxOnMrp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient { } catch {} do { - threshold1 = try container.decode(Double.self, forKey: .threshold1) + hsnCode = try container.decode(String.self, forKey: .hsnCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension PlatformClient { } catch {} do { - threshold2 = try container.decode(Double.self, forKey: .threshold2) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +138,7 @@ public extension PlatformClient { } catch {} do { - taxOnMrp = try container.decode(Bool.self, forKey: .taxOnMrp) + tax1 = try container.decode(Double.self, forKey: .tax1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + hs2Code = try container.decode(String.self, forKey: .hs2Code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ public extension PlatformClient { } catch {} do { - hsnCode = try container.decode(String.self, forKey: .hsnCode) + threshold1 = try container.decode(Double.self, forKey: .threshold1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - taxOnEsp = try container.decode(Bool.self, forKey: .taxOnEsp) + tax2 = try container.decode(Double.self, forKey: .tax2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -175,25 +175,25 @@ public extension PlatformClient { try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(hs2Code, forKey: .hs2Code) - - try? container.encodeIfPresent(tax2, forKey: .tax2) - try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(tax1, forKey: .tax1) - - try? container.encodeIfPresent(threshold1, forKey: .threshold1) + try? container.encodeIfPresent(taxOnEsp, forKey: .taxOnEsp) try? container.encodeIfPresent(threshold2, forKey: .threshold2) try? container.encodeIfPresent(taxOnMrp, forKey: .taxOnMrp) + try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) + try? container.encodeIfPresent(tax1, forKey: .tax1) - try? container.encodeIfPresent(taxOnEsp, forKey: .taxOnEsp) + try? container.encodeIfPresent(hs2Code, forKey: .hs2Code) + + try? container.encodeIfPresent(threshold1, forKey: .threshold1) + + try? container.encodeIfPresent(tax2, forKey: .tax2) } } } diff --git a/Sources/code/platform/models/HsnUpsertPlatformModelClass.swift b/Sources/code/platform/models/HsnUpsertPlatformModelClass.swift index eceb943c0d..07b7d0faa3 100644 --- a/Sources/code/platform/models/HsnUpsertPlatformModelClass.swift +++ b/Sources/code/platform/models/HsnUpsertPlatformModelClass.swift @@ -8,15 +8,9 @@ public extension PlatformClient { */ class HsnUpsert: Codable { - public var hs2Code: String - - public var tax2: Double? - public var companyId: Int - public var tax1: Double - - public var threshold1: Double + public var taxOnEsp: Bool? public var threshold2: Double? @@ -26,18 +20,18 @@ public extension PlatformClient { public var uid: Int? - public var taxOnEsp: Bool? + public var tax1: Double - public enum CodingKeys: String, CodingKey { - case hs2Code = "hs2_code" + public var hs2Code: String - case tax2 + public var threshold1: Double - case companyId = "company_id" + public var tax2: Double? - case tax1 + public enum CodingKeys: String, CodingKey { + case companyId = "company_id" - case threshold1 + case taxOnEsp = "tax_on_esp" case threshold2 @@ -47,19 +41,19 @@ public extension PlatformClient { case uid - case taxOnEsp = "tax_on_esp" - } + case tax1 - 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.hs2Code = hs2Code + case hs2Code = "hs2_code" - self.tax2 = tax2 + case threshold1 - self.companyId = companyId + case tax2 + } - self.tax1 = tax1 + 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.taxOnEsp = taxOnEsp self.threshold2 = threshold2 @@ -69,28 +63,28 @@ public extension PlatformClient { self.uid = uid - self.taxOnEsp = taxOnEsp + self.tax1 = tax1 + + self.hs2Code = hs2Code + + self.threshold1 = threshold1 + + self.tax2 = tax2 } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - hs2Code = try container.decode(String.self, forKey: .hs2Code) + companyId = try container.decode(Int.self, forKey: .companyId) 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 {} - companyId = try container.decode(Int.self, forKey: .companyId) - - tax1 = try container.decode(Double.self, forKey: .tax1) - - threshold1 = try container.decode(Double.self, forKey: .threshold1) - do { threshold2 = try container.decode(Double.self, forKey: .threshold2) @@ -111,8 +105,14 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + tax1 = try container.decode(Double.self, forKey: .tax1) + + hs2Code = try container.decode(String.self, forKey: .hs2Code) + + threshold1 = try container.decode(Double.self, forKey: .threshold1) + do { - taxOnEsp = try container.decode(Bool.self, forKey: .taxOnEsp) + tax2 = try container.decode(Double.self, forKey: .tax2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -123,15 +123,9 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(hs2Code, forKey: .hs2Code) - - try? container.encodeIfPresent(tax2, forKey: .tax2) - try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(tax1, forKey: .tax1) - - try? container.encodeIfPresent(threshold1, forKey: .threshold1) + try? container.encodeIfPresent(taxOnEsp, forKey: .taxOnEsp) try? container.encodeIfPresent(threshold2, forKey: .threshold2) @@ -141,7 +135,13 @@ public extension PlatformClient { try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(taxOnEsp, forKey: .taxOnEsp) + try? container.encodeIfPresent(tax1, forKey: .tax1) + + try? container.encode(hs2Code, forKey: .hs2Code) + + try? container.encodeIfPresent(threshold1, forKey: .threshold1) + + try? container.encodeIfPresent(tax2, forKey: .tax2) } } } diff --git a/Sources/code/platform/models/IfscCodeResponsePlatformModelClass.swift b/Sources/code/platform/models/IfscCodeResponsePlatformModelClass.swift index 0b9f6d2899..2760c00107 100644 --- a/Sources/code/platform/models/IfscCodeResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/IfscCodeResponsePlatformModelClass.swift @@ -8,33 +8,31 @@ public extension PlatformClient { */ class IfscCodeResponse: Codable { - public var bankName: String - public var success: Bool? public var branchName: String - public enum CodingKeys: String, CodingKey { - case bankName = "bank_name" + public var bankName: String + public enum CodingKeys: String, CodingKey { case success case branchName = "branch_name" + + case bankName = "bank_name" } public init(bankName: String, branchName: String, success: Bool? = nil) { - self.bankName = bankName - 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) - do { success = try container.decode(Bool.self, forKey: .success) @@ -44,16 +42,18 @@ public extension PlatformClient { } 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(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 532bff6ef5..fa505cec1a 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 secureUrl: String? + public var aspectRatioF: Double? - public var url: String? + public var secureUrl: String? public var aspectRatio: String? - public var aspectRatioF: Double? + public var url: String? public enum CodingKeys: String, CodingKey { - case secureUrl = "secure_url" + case aspectRatioF = "aspect_ratio_f" - case url + case secureUrl = "secure_url" case aspectRatio = "aspect_ratio" - case aspectRatioF = "aspect_ratio_f" + case url } public init(aspectRatio: String? = nil, aspectRatioF: Double? = nil, secureUrl: String? = nil, url: String? = nil) { - self.secureUrl = secureUrl + self.aspectRatioF = aspectRatioF - self.url = url + self.secureUrl = secureUrl self.aspectRatio = aspectRatio - self.aspectRatioF = aspectRatioF + self.url = url } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + 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 { - aspectRatioF = try container.decode(Double.self, forKey: .aspectRatioF) + url = try container.decode(String.self, forKey: .url) } 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(secureUrl, forKey: .secureUrl) + try? container.encodeIfPresent(aspectRatioF, forKey: .aspectRatioF) - try? container.encodeIfPresent(url, forKey: .url) + try? container.encodeIfPresent(secureUrl, forKey: .secureUrl) try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) - try? container.encodeIfPresent(aspectRatioF, forKey: .aspectRatioF) + try? container.encodeIfPresent(url, forKey: .url) } } } diff --git a/Sources/code/platform/models/IntentAppPlatformModelClass.swift b/Sources/code/platform/models/IntentAppPlatformModelClass.swift index d98f6a5c27..4175adcc0d 100644 --- a/Sources/code/platform/models/IntentAppPlatformModelClass.swift +++ b/Sources/code/platform/models/IntentAppPlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class IntentApp: Codable { - public var displayName: String? + public var logos: PaymentModeLogo? public var code: String? - public var packageName: String? + public var displayName: String? - public var logos: PaymentModeLogo? + public var packageName: String? public enum CodingKeys: String, CodingKey { - case displayName = "display_name" + case logos case code - case packageName = "package_name" + case displayName = "display_name" - case logos + case packageName = "package_name" } public init(code: String? = nil, displayName: String? = nil, logos: PaymentModeLogo? = nil, packageName: String? = nil) { - self.displayName = displayName + self.logos = logos self.code = code - self.packageName = packageName + self.displayName = displayName - self.logos = logos + self.packageName = packageName } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - displayName = try container.decode(String.self, forKey: .displayName) + logos = try container.decode(PaymentModeLogo.self, forKey: .logos) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - packageName = try container.decode(String.self, forKey: .packageName) + 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 { - 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) @@ -75,13 +75,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(displayName, forKey: .displayName) + try? container.encode(logos, forKey: .logos) try? container.encode(code, forKey: .code) - try? container.encode(packageName, forKey: .packageName) + try? container.encode(displayName, forKey: .displayName) - try? container.encode(logos, forKey: .logos) + try? container.encode(packageName, forKey: .packageName) } } } diff --git a/Sources/code/platform/models/InvSizePlatformModelClass.swift b/Sources/code/platform/models/InvSizePlatformModelClass.swift index 5505914fdf..d860beb17d 100644 --- a/Sources/code/platform/models/InvSizePlatformModelClass.swift +++ b/Sources/code/platform/models/InvSizePlatformModelClass.swift @@ -8,119 +8,117 @@ public extension PlatformClient { */ class InvSize: Codable { - public var size: String - - public var priceTransfer: Double? + public var expirationDate: String? - public var itemDimensionsUnitOfMeasure: String? + public var itemWeightUnitOfMeasure: String? - public var price: Double + public var quantity: Int public var currency: String - public var itemWeight: Double? + public var isSet: Bool? - public var identifiers: [GTIN] + public var itemHeight: Double? - public var itemLength: Double? + public var set: InventorySet? - public var expirationDate: String? + public var priceEffective: Double - public var quantity: Int + public var itemWidth: Double? - public var itemHeight: Double? + public var price: Double - public var isSet: Bool? + public var itemLength: Double? - public var itemWidth: Double? + public var itemWeight: Double? - public var itemWeightUnitOfMeasure: String? + public var identifiers: [GTIN] public var storeCode: String - public var set: InventorySet? + public var itemDimensionsUnitOfMeasure: String? - public var priceEffective: Double + public var priceTransfer: Double? - public enum CodingKeys: String, CodingKey { - case size + public var size: String - case priceTransfer = "price_transfer" + public enum CodingKeys: String, CodingKey { + case expirationDate = "expiration_date" - case itemDimensionsUnitOfMeasure = "item_dimensions_unit_of_measure" + case itemWeightUnitOfMeasure = "item_weight_unit_of_measure" - case price + case quantity case currency - case itemWeight = "item_weight" + case isSet = "is_set" - case identifiers + case itemHeight = "item_height" - case itemLength = "item_length" + case set - case expirationDate = "expiration_date" + case priceEffective = "price_effective" - case quantity + case itemWidth = "item_width" - case itemHeight = "item_height" + case price - case isSet = "is_set" + case itemLength = "item_length" - case itemWidth = "item_width" + case itemWeight = "item_weight" - case itemWeightUnitOfMeasure = "item_weight_unit_of_measure" + case identifiers case storeCode = "store_code" - case set + case itemDimensionsUnitOfMeasure = "item_dimensions_unit_of_measure" - case priceEffective = "price_effective" + case priceTransfer = "price_transfer" + + case size } 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.size = size - - self.priceTransfer = priceTransfer + self.expirationDate = expirationDate - self.itemDimensionsUnitOfMeasure = itemDimensionsUnitOfMeasure + self.itemWeightUnitOfMeasure = itemWeightUnitOfMeasure - self.price = price + self.quantity = quantity self.currency = currency - self.itemWeight = itemWeight + self.isSet = isSet - self.identifiers = identifiers + self.itemHeight = itemHeight - self.itemLength = itemLength + self.set = set - self.expirationDate = expirationDate + self.priceEffective = priceEffective - self.quantity = quantity + self.itemWidth = itemWidth - self.itemHeight = itemHeight + self.price = price - self.isSet = isSet + self.itemLength = itemLength - self.itemWidth = itemWidth + self.itemWeight = itemWeight - self.itemWeightUnitOfMeasure = itemWeightUnitOfMeasure + self.identifiers = identifiers self.storeCode = storeCode - self.set = set + self.itemDimensionsUnitOfMeasure = itemDimensionsUnitOfMeasure - self.priceEffective = priceEffective + self.priceTransfer = priceTransfer + + self.size = size } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - size = try container.decode(String.self, forKey: .size) - do { - priceTransfer = try container.decode(Double.self, forKey: .priceTransfer) + expirationDate = try container.decode(String.self, forKey: .expirationDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,29 +126,27 @@ public extension PlatformClient { } catch {} do { - itemDimensionsUnitOfMeasure = try container.decode(String.self, forKey: .itemDimensionsUnitOfMeasure) + 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 {} - price = try container.decode(Double.self, forKey: .price) + quantity = try container.decode(Int.self, forKey: .quantity) currency = try container.decode(String.self, forKey: .currency) do { - itemWeight = try container.decode(Double.self, forKey: .itemWeight) + 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 {} - identifiers = try container.decode([GTIN].self, forKey: .identifiers) - do { - itemLength = try container.decode(Double.self, forKey: .itemLength) + itemHeight = try container.decode(Double.self, forKey: .itemHeight) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,25 +154,27 @@ public extension PlatformClient { } catch {} do { - expirationDate = try container.decode(String.self, forKey: .expirationDate) + 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 {} - quantity = try container.decode(Int.self, forKey: .quantity) + priceEffective = try container.decode(Double.self, forKey: .priceEffective) do { - itemHeight = try container.decode(Double.self, forKey: .itemHeight) + itemWidth = try container.decode(Double.self, forKey: .itemWidth) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + price = try container.decode(Double.self, forKey: .price) + do { - isSet = try container.decode(Bool.self, forKey: .isSet) + itemLength = try container.decode(Double.self, forKey: .itemLength) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -184,70 +182,72 @@ public extension PlatformClient { } catch {} do { - itemWidth = try container.decode(Double.self, forKey: .itemWidth) + 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 {} + identifiers = try container.decode([GTIN].self, forKey: .identifiers) + + storeCode = try container.decode(String.self, forKey: .storeCode) + do { - itemWeightUnitOfMeasure = try container.decode(String.self, forKey: .itemWeightUnitOfMeasure) + itemDimensionsUnitOfMeasure = try container.decode(String.self, forKey: .itemDimensionsUnitOfMeasure) } 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) + priceTransfer = try container.decode(Double.self, forKey: .priceTransfer) } 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) + 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(size, forKey: .size) - - try? container.encode(priceTransfer, forKey: .priceTransfer) + try? container.encodeIfPresent(expirationDate, forKey: .expirationDate) - try? container.encode(itemDimensionsUnitOfMeasure, forKey: .itemDimensionsUnitOfMeasure) + try? container.encode(itemWeightUnitOfMeasure, forKey: .itemWeightUnitOfMeasure) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encode(itemWeight, forKey: .itemWeight) + try? container.encodeIfPresent(isSet, forKey: .isSet) - try? container.encodeIfPresent(identifiers, forKey: .identifiers) + try? container.encode(itemHeight, forKey: .itemHeight) - try? container.encode(itemLength, forKey: .itemLength) + try? container.encodeIfPresent(set, forKey: .set) - try? container.encodeIfPresent(expirationDate, forKey: .expirationDate) + try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encode(itemWidth, forKey: .itemWidth) - try? container.encode(itemHeight, forKey: .itemHeight) + try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(isSet, forKey: .isSet) + try? container.encode(itemLength, forKey: .itemLength) - try? container.encode(itemWidth, forKey: .itemWidth) + 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(set, forKey: .set) + try? container.encode(itemDimensionsUnitOfMeasure, forKey: .itemDimensionsUnitOfMeasure) - try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + try? container.encode(priceTransfer, forKey: .priceTransfer) + + try? container.encodeIfPresent(size, forKey: .size) } } } diff --git a/Sources/code/platform/models/InventoryConfigPlatformModelClass.swift b/Sources/code/platform/models/InventoryConfigPlatformModelClass.swift index 28b8208e4a..263b6132c5 100644 --- a/Sources/code/platform/models/InventoryConfigPlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryConfigPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class InventoryConfig: Codable { - public var multivalues: Bool? - public var data: [FilerList]? - public enum CodingKeys: String, CodingKey { - case multivalues + public var multivalues: Bool? + public enum CodingKeys: String, CodingKey { case data + + case multivalues } public init(data: [FilerList]? = nil, multivalues: Bool? = nil) { - self.multivalues = multivalues - self.data = data + + self.multivalues = multivalues } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - multivalues = try container.decode(Bool.self, forKey: .multivalues) + data = try container.decode([FilerList].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([FilerList].self, forKey: .data) + multivalues = try container.decode(Bool.self, forKey: .multivalues) } 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(multivalues, forKey: .multivalues) - try? container.encodeIfPresent(data, forKey: .data) + + try? container.encodeIfPresent(multivalues, forKey: .multivalues) } } } diff --git a/Sources/code/platform/models/InventoryExportJobPlatformModelClass.swift b/Sources/code/platform/models/InventoryExportJobPlatformModelClass.swift index 00a0508272..d7c0efb40a 100644 --- a/Sources/code/platform/models/InventoryExportJobPlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryExportJobPlatformModelClass.swift @@ -8,55 +8,57 @@ public extension PlatformClient { */ class InventoryExportJob: Codable { - public var triggerOn: String? - - public var url: String? - public var sellerId: Int - public var status: String? + public var triggerOn: String? public var completedOn: String? + public var status: String? + public var taskId: String public var requestParams: [String: Any]? - public enum CodingKeys: String, CodingKey { - case triggerOn = "trigger_on" - - case url + public var url: String? + public enum CodingKeys: String, CodingKey { case sellerId = "seller_id" - case status + case triggerOn = "trigger_on" case completedOn = "completed_on" + case status + case taskId = "task_id" case requestParams = "request_params" + + case url } public init(completedOn: String? = nil, requestParams: [String: Any]? = nil, sellerId: Int, status: String? = nil, taskId: String, triggerOn: String? = nil, url: String? = nil) { - self.triggerOn = triggerOn - - self.url = url - self.sellerId = sellerId - self.status = status + self.triggerOn = triggerOn self.completedOn = completedOn + self.status = status + self.taskId = taskId self.requestParams = requestParams + + self.url = url } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + sellerId = try container.decode(Int.self, forKey: .sellerId) + do { triggerOn = try container.decode(String.self, forKey: .triggerOn) @@ -66,15 +68,13 @@ public extension PlatformClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + completedOn = try container.decode(String.self, forKey: .completedOn) } 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 { status = try container.decode(String.self, forKey: .status) @@ -83,18 +83,18 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + taskId = try container.decode(String.self, forKey: .taskId) + do { - completedOn = try container.decode(String.self, forKey: .completedOn) + 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) - do { - requestParams = try container.decode([String: Any].self, forKey: .requestParams) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,19 +105,19 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) - - try? container.encodeIfPresent(url, forKey: .url) - try? container.encodeIfPresent(sellerId, forKey: .sellerId) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) try? container.encodeIfPresent(completedOn, forKey: .completedOn) + try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(taskId, forKey: .taskId) try? container.encodeIfPresent(requestParams, forKey: .requestParams) + + try? container.encodeIfPresent(url, forKey: .url) } } } diff --git a/Sources/code/platform/models/InventoryExportRequestPlatformModelClass.swift b/Sources/code/platform/models/InventoryExportRequestPlatformModelClass.swift index 771b6ec8df..f3b732610c 100644 --- a/Sources/code/platform/models/InventoryExportRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryExportRequestPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class InventoryExportRequest: Codable { + public var store: [Int]? + public var type: String? public var brand: [Int]? - public var store: [Int]? - public enum CodingKeys: String, CodingKey { + case store + case type case brand - - case store } public init(brand: [Int]? = nil, store: [Int]? = nil, type: String? = nil) { + self.store = store + self.type = type self.brand = brand - - self.store = store } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - type = try container.decode(String.self, forKey: .type) + 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 { - brand = try container.decode([Int].self, forKey: .brand) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,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,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(store, forKey: .store) + try? container.encode(type, forKey: .type) try? container.encodeIfPresent(brand, forKey: .brand) - - try? container.encodeIfPresent(store, forKey: .store) } } } diff --git a/Sources/code/platform/models/InventoryExportResponsePlatformModelClass.swift b/Sources/code/platform/models/InventoryExportResponsePlatformModelClass.swift index 1787a70d39..3448570567 100644 --- a/Sources/code/platform/models/InventoryExportResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryExportResponsePlatformModelClass.swift @@ -8,10 +8,10 @@ public extension PlatformClient { */ class InventoryExportResponse: Codable { - public var triggerOn: String? - public var sellerId: Int + public var triggerOn: String? + public var status: String? public var taskId: String @@ -19,10 +19,10 @@ public extension PlatformClient { public var requestParams: [String: Any]? public enum CodingKeys: String, CodingKey { - case triggerOn = "trigger_on" - case sellerId = "seller_id" + case triggerOn = "trigger_on" + case status case taskId = "task_id" @@ -31,10 +31,10 @@ public extension PlatformClient { } public init(requestParams: [String: Any]? = nil, sellerId: Int, status: String? = nil, taskId: String, triggerOn: String? = nil) { - self.triggerOn = triggerOn - self.sellerId = sellerId + self.triggerOn = triggerOn + self.status = status self.taskId = taskId @@ -45,6 +45,8 @@ public extension PlatformClient { required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + sellerId = try container.decode(Int.self, forKey: .sellerId) + do { triggerOn = try container.decode(String.self, forKey: .triggerOn) @@ -53,8 +55,6 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - sellerId = try container.decode(Int.self, forKey: .sellerId) - do { status = try container.decode(String.self, forKey: .status) @@ -77,10 +77,10 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) - try? container.encodeIfPresent(sellerId, forKey: .sellerId) + try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) + try? container.encodeIfPresent(status, forKey: .status) try? container.encodeIfPresent(taskId, forKey: .taskId) diff --git a/Sources/code/platform/models/InventoryResponsePaginatedPlatformModelClass.swift b/Sources/code/platform/models/InventoryResponsePaginatedPlatformModelClass.swift index bd751826f0..4d6980328d 100644 --- a/Sources/code/platform/models/InventoryResponsePaginatedPlatformModelClass.swift +++ b/Sources/code/platform/models/InventoryResponsePaginatedPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class InventoryResponsePaginated: Codable { - public var items: [InventoryResponse]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [InventoryResponse]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [InventoryResponse]? = 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([InventoryResponse].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([InventoryResponse].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/InventoryResponsePlatformModelClass.swift b/Sources/code/platform/models/InventoryResponsePlatformModelClass.swift index 0c70979455..2b6b87d120 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 uid: String? - - public var size: String? + public var currency: String? - public var priceTransfer: Int? + public var quantity: Int? public var sellableQuantity: Int? + public var priceEffective: Int? + public var price: Int? - public var itemId: Int? + public var inventoryUpdatedOn: String? - public var currency: String? + public var identifiers: [String: Any]? - public var sellerIdentifier: Int? + public var store: [String: Any]? - public var inventoryUpdatedOn: String? + public var priceTransfer: Int? - public var quantity: Int? + public var itemId: Int? - public var identifiers: [String: Any]? + public var sellerIdentifier: Int? - public var store: [String: Any]? + public var uid: String? - public var priceEffective: Int? + public var size: String? public enum CodingKeys: String, CodingKey { - case uid - - case size + case currency - case priceTransfer = "price_transfer" + case quantity case sellableQuantity = "sellable_quantity" + case priceEffective = "price_effective" + case price - case itemId = "item_id" + case inventoryUpdatedOn = "inventory_updated_on" - case currency + case identifiers - case sellerIdentifier = "seller_identifier" + case store - case inventoryUpdatedOn = "inventory_updated_on" + case priceTransfer = "price_transfer" - case quantity + case itemId = "item_id" - case identifiers + case sellerIdentifier = "seller_identifier" - case store + case uid - case priceEffective = "price_effective" + case size } 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.uid = uid - - self.size = size + self.currency = currency - self.priceTransfer = priceTransfer + self.quantity = quantity self.sellableQuantity = sellableQuantity + self.priceEffective = priceEffective + self.price = price - self.itemId = itemId + self.inventoryUpdatedOn = inventoryUpdatedOn - self.currency = currency + self.identifiers = identifiers - self.sellerIdentifier = sellerIdentifier + self.store = store - self.inventoryUpdatedOn = inventoryUpdatedOn + self.priceTransfer = priceTransfer - self.quantity = quantity + self.itemId = itemId - self.identifiers = identifiers + self.sellerIdentifier = sellerIdentifier - self.store = store + self.uid = uid - self.priceEffective = priceEffective + self.size = size } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - uid = try container.decode(String.self, forKey: .uid) + currency = try container.decode(String.self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,7 +102,7 @@ public extension PlatformClient { } catch {} do { - size = try container.decode(String.self, forKey: .size) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +110,7 @@ public extension PlatformClient { } catch {} do { - priceTransfer = try container.decode(Int.self, forKey: .priceTransfer) + 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 { - sellableQuantity = try container.decode(Int.self, forKey: .sellableQuantity) + priceEffective = try container.decode(Int.self, forKey: .priceEffective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - itemId = try container.decode(Int.self, forKey: .itemId) + inventoryUpdatedOn = try container.decode(String.self, forKey: .inventoryUpdatedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,7 +142,7 @@ public extension PlatformClient { } catch {} do { - currency = try container.decode(String.self, forKey: .currency) + identifiers = try container.decode([String: Any].self, forKey: .identifiers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - sellerIdentifier = try container.decode(Int.self, forKey: .sellerIdentifier) + store = try container.decode([String: Any].self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient { } catch {} do { - inventoryUpdatedOn = try container.decode(String.self, forKey: .inventoryUpdatedOn) + priceTransfer = try container.decode(Int.self, forKey: .priceTransfer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,7 +166,7 @@ public extension PlatformClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + itemId = try container.decode(Int.self, forKey: .itemId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - identifiers = try container.decode([String: Any].self, forKey: .identifiers) + sellerIdentifier = try container.decode(Int.self, forKey: .sellerIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +182,7 @@ public extension PlatformClient { } catch {} do { - store = try container.decode([String: Any].self, forKey: .store) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - priceEffective = try container.decode(Int.self, forKey: .priceEffective) + size = try container.decode(String.self, forKey: .size) } 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(uid, forKey: .uid) - - try? container.encodeIfPresent(size, forKey: .size) + try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encodeIfPresent(priceTransfer, forKey: .priceTransfer) + try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(sellableQuantity, forKey: .sellableQuantity) + try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(itemId, forKey: .itemId) + try? container.encodeIfPresent(inventoryUpdatedOn, forKey: .inventoryUpdatedOn) - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(identifiers, forKey: .identifiers) - try? container.encodeIfPresent(sellerIdentifier, forKey: .sellerIdentifier) + try? container.encodeIfPresent(store, forKey: .store) - try? container.encodeIfPresent(inventoryUpdatedOn, forKey: .inventoryUpdatedOn) + try? container.encodeIfPresent(priceTransfer, forKey: .priceTransfer) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(itemId, forKey: .itemId) - try? container.encodeIfPresent(identifiers, forKey: .identifiers) + try? container.encodeIfPresent(sellerIdentifier, forKey: .sellerIdentifier) - try? container.encodeIfPresent(store, forKey: .store) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + try? container.encodeIfPresent(size, forKey: .size) } } } diff --git a/Sources/code/platform/models/InventorySetPlatformModelClass.swift b/Sources/code/platform/models/InventorySetPlatformModelClass.swift index 5d471a2448..7b486a7cd6 100644 --- a/Sources/code/platform/models/InventorySetPlatformModelClass.swift +++ b/Sources/code/platform/models/InventorySetPlatformModelClass.swift @@ -8,27 +8,25 @@ public extension PlatformClient { */ class InventorySet: Codable { - public var sizeDistribution: SizeDistribution - public var quantity: Int? - public enum CodingKeys: String, CodingKey { - case sizeDistribution = "size_distribution" + public var sizeDistribution: SizeDistribution + public enum CodingKeys: String, CodingKey { case quantity + + case sizeDistribution = "size_distribution" } public init(quantity: Int? = nil, sizeDistribution: SizeDistribution) { - self.sizeDistribution = sizeDistribution - self.quantity = quantity + + self.sizeDistribution = sizeDistribution } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - sizeDistribution = try container.decode(SizeDistribution.self, forKey: .sizeDistribution) - do { quantity = try container.decode(Int.self, forKey: .quantity) @@ -36,14 +34,16 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + sizeDistribution = try container.decode(SizeDistribution.self, forKey: .sizeDistribution) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(sizeDistribution, forKey: .sizeDistribution) - try? container.encodeIfPresent(quantity, forKey: .quantity) + + try? container.encodeIfPresent(sizeDistribution, forKey: .sizeDistribution) } } } diff --git a/Sources/code/platform/models/InvoiceDetailsSerializerPlatformModelClass.swift b/Sources/code/platform/models/InvoiceDetailsSerializerPlatformModelClass.swift index f3e137abcf..51ec528771 100644 --- a/Sources/code/platform/models/InvoiceDetailsSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/InvoiceDetailsSerializerPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class InvoiceDetailsSerializer: Codable { - public var eWaybill: InvoiceCredSerializer? - public var eInvoice: InvoiceCredSerializer? - public enum CodingKeys: String, CodingKey { - case eWaybill = "e_waybill" + public var eWaybill: InvoiceCredSerializer? + public enum CodingKeys: String, CodingKey { case eInvoice = "e_invoice" + + case eWaybill = "e_waybill" } public init(eInvoice: InvoiceCredSerializer? = nil, eWaybill: InvoiceCredSerializer? = nil) { - self.eWaybill = eWaybill - self.eInvoice = eInvoice + + self.eWaybill = eWaybill } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - eWaybill = try container.decode(InvoiceCredSerializer.self, forKey: .eWaybill) + eInvoice = try container.decode(InvoiceCredSerializer.self, forKey: .eInvoice) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - eInvoice = try container.decode(InvoiceCredSerializer.self, forKey: .eInvoice) + eWaybill = try container.decode(InvoiceCredSerializer.self, forKey: .eWaybill) } 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(eWaybill, forKey: .eWaybill) - try? container.encodeIfPresent(eInvoice, forKey: .eInvoice) + + try? container.encodeIfPresent(eWaybill, forKey: .eWaybill) } } } diff --git a/Sources/code/platform/models/ItemQueryPlatformModelClass.swift b/Sources/code/platform/models/ItemQueryPlatformModelClass.swift index 45421fdcbe..4ace567c9a 100644 --- a/Sources/code/platform/models/ItemQueryPlatformModelClass.swift +++ b/Sources/code/platform/models/ItemQueryPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class ItemQuery: Codable { public var brandUid: Int? - public var itemCode: String? - public var uid: Int? + public var itemCode: String? + public enum CodingKeys: String, CodingKey { case brandUid = "brand_uid" - case itemCode = "item_code" - case uid + + case itemCode = "item_code" } public init(brandUid: Int? = nil, itemCode: String? = nil, uid: Int? = nil) { self.brandUid = brandUid - self.itemCode = itemCode - self.uid = uid + + self.itemCode = itemCode } required public init(from decoder: Decoder) throws { @@ -42,7 +42,7 @@ public extension PlatformClient { } 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) @@ -50,7 +50,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) @@ -63,9 +63,9 @@ public extension PlatformClient { try? container.encodeIfPresent(brandUid, forKey: .brandUid) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(itemCode, forKey: .itemCode) } } } diff --git a/Sources/code/platform/models/ItemsPlatformModelClass.swift b/Sources/code/platform/models/ItemsPlatformModelClass.swift index 2ff5a92c45..ffda92d6bc 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 filePath: String? - - public var failedRecords: [String]? - public var retry: Int? public var total: Int? public var companyId: Int? - public var trackingUrl: String? + public var createdBy: UserCommon? - public var modifiedBy: UserCommon? + public var failed: Int? - public var isActive: Bool? + public var modifiedBy: UserCommon? - public var createdOn: String? + public var trackingUrl: String? - public var createdBy: UserCommon? + public var id: String? - public var succeed: Int? + public var createdOn: String? - public var failed: Int? + public var stage: String? public var cancelled: Int? public var cancelledRecords: [String]? - public var id: String? - - public var stage: String? + public var failedRecords: [String]? public var modifiedOn: String? - public enum CodingKeys: String, CodingKey { - case filePath = "file_path" + public var succeed: Int? - case failedRecords = "failed_records" + public var isActive: Bool? + public var filePath: String? + + public enum CodingKeys: String, CodingKey { case retry case total case companyId = "company_id" - case trackingUrl = "tracking_url" + case createdBy = "created_by" - case modifiedBy = "modified_by" + case failed - case isActive = "is_active" + case modifiedBy = "modified_by" - case createdOn = "created_on" + case trackingUrl = "tracking_url" - case createdBy = "created_by" + case id - case succeed + case createdOn = "created_on" - case failed + case stage case cancelled case cancelledRecords = "cancelled_records" - case id - - case stage + case failedRecords = "failed_records" case modifiedOn = "modified_on" - } - 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.filePath = filePath + case succeed - self.failedRecords = failedRecords + case isActive = "is_active" + case filePath = "file_path" + } + + 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.retry = retry self.total = total self.companyId = companyId - self.trackingUrl = trackingUrl + self.createdBy = createdBy - self.modifiedBy = modifiedBy + self.failed = failed - self.isActive = isActive + self.modifiedBy = modifiedBy - self.createdOn = createdOn + self.trackingUrl = trackingUrl - self.createdBy = createdBy + self.id = id - self.succeed = succeed + self.createdOn = createdOn - self.failed = failed + self.stage = stage self.cancelled = cancelled self.cancelledRecords = cancelledRecords - self.id = id - - self.stage = stage + self.failedRecords = failedRecords self.modifiedOn = modifiedOn + + self.succeed = succeed + + self.isActive = isActive + + self.filePath = filePath } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - filePath = try container.decode(String.self, forKey: .filePath) + retry = try container.decode(Int.self, forKey: .retry) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } catch {} do { - failedRecords = try container.decode([String].self, forKey: .failedRecords) + total = try container.decode(Int.self, forKey: .total) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - retry = try container.decode(Int.self, forKey: .retry) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -142,7 +142,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) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - companyId = try container.decode(Int.self, forKey: .companyId) + failed = try container.decode(Int.self, forKey: .failed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,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) @@ -166,7 +166,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserCommon.self, forKey: .modifiedBy) + trackingUrl = try container.decode(String.self, forKey: .trackingUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserCommon.self, forKey: .createdBy) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +198,7 @@ public extension PlatformClient { } catch {} do { - succeed = try container.decode(Int.self, forKey: .succeed) + cancelled = try container.decode(Int.self, forKey: .cancelled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +206,7 @@ public extension PlatformClient { } catch {} do { - failed = try container.decode(Int.self, forKey: .failed) + cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +214,7 @@ public extension PlatformClient { } catch {} do { - cancelled = try container.decode(Int.self, forKey: .cancelled) + failedRecords = try container.decode([String].self, forKey: .failedRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -222,7 +222,7 @@ public extension PlatformClient { } catch {} do { - cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,7 +230,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + succeed = try container.decode(Int.self, forKey: .succeed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -238,7 +238,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) @@ -246,7 +246,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + filePath = try container.decode(String.self, forKey: .filePath) } 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(filePath, forKey: .filePath) - - try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) - try? container.encodeIfPresent(retry, forKey: .retry) try? container.encodeIfPresent(total, forKey: .total) try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(trackingUrl, forKey: .trackingUrl) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(failed, forKey: .failed) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(trackingUrl, forKey: .trackingUrl) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(succeed, forKey: .succeed) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(failed, forKey: .failed) + try? container.encodeIfPresent(stage, forKey: .stage) try? container.encodeIfPresent(cancelled, forKey: .cancelled) try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) - try? container.encodeIfPresent(id, forKey: .id) - - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + try? container.encodeIfPresent(succeed, forKey: .succeed) + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + try? container.encodeIfPresent(filePath, forKey: .filePath) } } } diff --git a/Sources/code/platform/models/LimitedProductDataPlatformModelClass.swift b/Sources/code/platform/models/LimitedProductDataPlatformModelClass.swift index b3dea7ef48..c230cfd0e9 100644 --- a/Sources/code/platform/models/LimitedProductDataPlatformModelClass.swift +++ b/Sources/code/platform/models/LimitedProductDataPlatformModelClass.swift @@ -8,50 +8,50 @@ public extension PlatformClient { */ class LimitedProductData: Codable { - public var images: [String]? + public var attributes: [String: Any]? - public var price: [String: Any]? + public var quantity: Int? public var name: String? public var identifier: [String: Any]? - public var itemCode: String? + public var price: [String: Any]? - public var quantity: Int? + public var shortDescription: String? public var countryOfOrigin: String? - public var sizes: [String]? + public var images: [String]? - public var attributes: [String: Any]? + public var itemCode: String? - public var shortDescription: String? + public var sizes: [String]? public var uid: Int? public var slug: String? public enum CodingKeys: String, CodingKey { - case images + case attributes - case price + case quantity case name case identifier - case itemCode = "item_code" + case price - case quantity + case shortDescription = "short_description" case countryOfOrigin = "country_of_origin" - case sizes + case images - case attributes + case itemCode = "item_code" - case shortDescription = "short_description" + case sizes case uid @@ -59,25 +59,25 @@ public extension PlatformClient { } 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.images = images + self.attributes = attributes - self.price = price + self.quantity = quantity self.name = name self.identifier = identifier - self.itemCode = itemCode + self.price = price - self.quantity = quantity + self.shortDescription = shortDescription self.countryOfOrigin = countryOfOrigin - self.sizes = sizes + self.images = images - self.attributes = attributes + self.itemCode = itemCode - self.shortDescription = shortDescription + self.sizes = sizes self.uid = uid @@ -88,7 +88,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - images = try container.decode([String].self, forKey: .images) + attributes = try container.decode([String: Any].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -96,7 +96,7 @@ public extension PlatformClient { } catch {} do { - price = try container.decode([String: Any].self, forKey: .price) + quantity = try container.decode(Int.self, forKey: .quantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -120,7 +120,7 @@ public extension PlatformClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + price = try container.decode([String: Any].self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +128,7 @@ public extension PlatformClient { } catch {} do { - quantity = try container.decode(Int.self, forKey: .quantity) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,7 +144,7 @@ public extension PlatformClient { } catch {} do { - sizes = try container.decode([String].self, forKey: .sizes) + images = try container.decode([String].self, forKey: .images) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +152,7 @@ public extension PlatformClient { } catch {} do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -160,7 +160,7 @@ public extension PlatformClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + sizes = try container.decode([String].self, forKey: .sizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -187,25 +187,25 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(images, forKey: .images) + try? container.encodeIfPresent(attributes, forKey: .attributes) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(identifier, forKey: .identifier) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) - try? container.encodeIfPresent(sizes, forKey: .sizes) + try? container.encodeIfPresent(images, forKey: .images) - try? container.encodeIfPresent(attributes, forKey: .attributes) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(sizes, forKey: .sizes) try? container.encodeIfPresent(uid, forKey: .uid) diff --git a/Sources/code/platform/models/ListSizeGuidePlatformModelClass.swift b/Sources/code/platform/models/ListSizeGuidePlatformModelClass.swift index 08d1e40f87..61763a1995 100644 --- a/Sources/code/platform/models/ListSizeGuidePlatformModelClass.swift +++ b/Sources/code/platform/models/ListSizeGuidePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ListSizeGuide: Codable { - public var items: [[String: Any]]? - public var page: [String: Any]? - public enum CodingKeys: String, CodingKey { - case items + public var items: [[String: Any]]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [[String: Any]]? = nil, page: [String: Any]? = 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([[String: Any]].self, forKey: .items) + page = try container.decode([String: Any].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([String: Any].self, forKey: .page) + items = try container.decode([[String: Any]].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/LocationDayWiseSerializerPlatformModelClass.swift b/Sources/code/platform/models/LocationDayWiseSerializerPlatformModelClass.swift index 9156482d71..fe3ed6b814 100644 --- a/Sources/code/platform/models/LocationDayWiseSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/LocationDayWiseSerializerPlatformModelClass.swift @@ -10,30 +10,30 @@ public extension PlatformClient { class LocationDayWiseSerializer: Codable { public var closing: LocationTimingSerializer? + public var opening: LocationTimingSerializer? + public var weekday: String public var open: Bool - public var opening: LocationTimingSerializer? - public enum CodingKeys: String, CodingKey { case closing + case opening + case weekday case open - - case opening } public init(closing: LocationTimingSerializer? = nil, open: Bool, opening: LocationTimingSerializer? = nil, weekday: String) { self.closing = closing + self.opening = opening + self.weekday = weekday self.open = open - - self.opening = opening } required public init(from decoder: Decoder) throws { @@ -47,10 +47,6 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - weekday = try container.decode(String.self, forKey: .weekday) - - open = try container.decode(Bool.self, forKey: .open) - do { opening = try container.decode(LocationTimingSerializer.self, forKey: .opening) @@ -58,6 +54,10 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + weekday = try container.decode(String.self, forKey: .weekday) + + open = try container.decode(Bool.self, forKey: .open) } public func encode(to encoder: Encoder) throws { @@ -65,11 +65,11 @@ public extension PlatformClient { try? container.encodeIfPresent(closing, forKey: .closing) + try? container.encodeIfPresent(opening, forKey: .opening) + try? container.encodeIfPresent(weekday, forKey: .weekday) try? container.encodeIfPresent(open, forKey: .open) - - try? container.encodeIfPresent(opening, forKey: .opening) } } } diff --git a/Sources/code/platform/models/LocationListSerializerPlatformModelClass.swift b/Sources/code/platform/models/LocationListSerializerPlatformModelClass.swift index 8f9bef9dbd..5235de0ad4 100644 --- a/Sources/code/platform/models/LocationListSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/LocationListSerializerPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class LocationListSerializer: Codable { - public var items: [GetLocationSerializer]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [GetLocationSerializer]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [GetLocationSerializer]? = 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([GetLocationSerializer].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([GetLocationSerializer].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/LocationManagerSerializerPlatformModelClass.swift b/Sources/code/platform/models/LocationManagerSerializerPlatformModelClass.swift index b59efc8a6e..dbd47a9699 100644 --- a/Sources/code/platform/models/LocationManagerSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/LocationManagerSerializerPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class LocationManagerSerializer: Codable { public var email: String? - public var name: String? - public var mobileNo: SellerPhoneNumber + public var name: String? + public enum CodingKeys: String, CodingKey { case email - case name - case mobileNo = "mobile_no" + + case name } public init(email: String? = nil, mobileNo: SellerPhoneNumber, name: String? = nil) { self.email = email - self.name = name - self.mobileNo = mobileNo + + self.name = name } required public init(from decoder: Decoder) throws { @@ -41,6 +41,8 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + mobileNo = try container.decode(SellerPhoneNumber.self, forKey: .mobileNo) + do { name = try container.decode(String.self, forKey: .name) @@ -48,8 +50,6 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - mobileNo = try container.decode(SellerPhoneNumber.self, forKey: .mobileNo) } public func encode(to encoder: Encoder) throws { @@ -57,9 +57,9 @@ public extension PlatformClient { try? container.encodeIfPresent(email, forKey: .email) - try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(mobileNo, forKey: .mobileNo) + + try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/platform/models/LocationSerializerPlatformModelClass.swift b/Sources/code/platform/models/LocationSerializerPlatformModelClass.swift index 925f181e22..fbd2b3a6e5 100644 --- a/Sources/code/platform/models/LocationSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/LocationSerializerPlatformModelClass.swift @@ -8,135 +8,137 @@ public extension PlatformClient { */ class LocationSerializer: Codable { - public var stage: String? - - public var company: Int - - public var documents: [Document]? + public var name: String public var gstCredentials: InvoiceDetailsSerializer? - public var uid: Int? + public var contactNumbers: [SellerPhoneNumber]? - public var warnings: [String: Any]? + public var displayName: String public var productReturnConfig: ProductReturnConfigSerializer? + public var notificationEmails: [String]? + public var customJson: [String: Any]? + public var uid: Int? + + public var address: GetAddressSerializer1 + public var code: String public var timing: [LocationDayWiseSerializer]? - public var notificationEmails: [String]? - - public var storeType: String? + public var warnings: [String: Any]? - public var name: String + public var stage: String? - public var address: GetAddressSerializer1 + public var company: Int - public var manager: LocationManagerSerializer? + public var storeType: String? - public var displayName: String + public var documents: [Document]? - public var contactNumbers: [SellerPhoneNumber]? + public var manager: LocationManagerSerializer? public enum CodingKeys: String, CodingKey { - case stage - - case company - - case documents + case name case gstCredentials = "gst_credentials" - case uid + case contactNumbers = "contact_numbers" - case warnings + case displayName = "display_name" case productReturnConfig = "product_return_config" + case notificationEmails = "notification_emails" + case customJson = "_custom_json" + case uid + + case address + case code case timing - case notificationEmails = "notification_emails" - - case storeType = "store_type" + case warnings - case name + case stage - case address + case company - case manager + case storeType = "store_type" - case displayName = "display_name" + case documents - case contactNumbers = "contact_numbers" + case manager } 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.stage = stage - - self.company = company - - self.documents = documents + self.name = name self.gstCredentials = gstCredentials - self.uid = uid + self.contactNumbers = contactNumbers - self.warnings = warnings + self.displayName = displayName self.productReturnConfig = productReturnConfig + self.notificationEmails = notificationEmails + self.customJson = customJson + self.uid = uid + + self.address = address + self.code = code self.timing = timing - self.notificationEmails = notificationEmails - - self.storeType = storeType + self.warnings = warnings - self.name = name + self.stage = stage - self.address = address + self.company = company - self.manager = manager + self.storeType = storeType - self.displayName = displayName + self.documents = documents - self.contactNumbers = contactNumbers + self.manager = manager } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + name = try container.decode(String.self, forKey: .name) + do { - stage = try container.decode(String.self, forKey: .stage) + gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) } 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 { - documents = try container.decode([Document].self, forKey: .documents) + contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) } 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) + do { - gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) + productReturnConfig = try container.decode(ProductReturnConfigSerializer.self, forKey: .productReturnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,7 +146,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + notificationEmails = try container.decode([String].self, forKey: .notificationEmails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +154,7 @@ public extension PlatformClient { } catch {} do { - warnings = try container.decode([String: Any].self, forKey: .warnings) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -160,25 +162,27 @@ public extension PlatformClient { } catch {} do { - productReturnConfig = try container.decode(ProductReturnConfigSerializer.self, forKey: .productReturnConfig) + 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 {} + address = try container.decode(GetAddressSerializer1.self, forKey: .address) + + code = try container.decode(String.self, forKey: .code) + do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + 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 {} - code = try container.decode(String.self, forKey: .code) - do { - timing = try container.decode([LocationDayWiseSerializer].self, forKey: .timing) + warnings = try container.decode([String: Any].self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,13 +190,15 @@ public extension PlatformClient { } catch {} do { - notificationEmails = try container.decode([String].self, forKey: .notificationEmails) + 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 {} + company = try container.decode(Int.self, forKey: .company) + do { storeType = try container.decode(String.self, forKey: .storeType) @@ -201,22 +207,16 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - name = try container.decode(String.self, forKey: .name) - - address = try container.decode(GetAddressSerializer1.self, forKey: .address) - do { - manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) + 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 {} - displayName = try container.decode(String.self, forKey: .displayName) - do { - contactNumbers = try container.decode([SellerPhoneNumber].self, forKey: .contactNumbers) + manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) } 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(stage, forKey: .stage) - - try? container.encodeIfPresent(company, forKey: .company) - - try? container.encodeIfPresent(documents, forKey: .documents) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(gstCredentials, forKey: .gstCredentials) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) - try? container.encodeIfPresent(warnings, forKey: .warnings) + try? container.encodeIfPresent(displayName, forKey: .displayName) try? container.encodeIfPresent(productReturnConfig, forKey: .productReturnConfig) + try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) + try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(code, forKey: .code) try? container.encodeIfPresent(timing, forKey: .timing) - try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) - - try? container.encodeIfPresent(storeType, forKey: .storeType) + try? container.encodeIfPresent(warnings, forKey: .warnings) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(stage, forKey: .stage) - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(company, forKey: .company) - try? container.encodeIfPresent(manager, forKey: .manager) + try? container.encodeIfPresent(storeType, forKey: .storeType) - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(documents, forKey: .documents) - try? container.encodeIfPresent(contactNumbers, forKey: .contactNumbers) + try? container.encodeIfPresent(manager, forKey: .manager) } } } diff --git a/Sources/code/platform/models/LogoPlatformModelClass.swift b/Sources/code/platform/models/LogoPlatformModelClass.swift index 02570030da..0618c3eae7 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 secureUrl: String? + public var aspectRatioF: Int? - public var url: String? + public var secureUrl: String? public var aspectRatio: String? - public var aspectRatioF: Int? + public var url: String? public enum CodingKeys: String, CodingKey { - case secureUrl = "secure_url" + case aspectRatioF = "aspect_ratio_f" - case url + case secureUrl = "secure_url" case aspectRatio = "aspect_ratio" - case aspectRatioF = "aspect_ratio_f" + case url } public init(aspectRatio: String? = nil, aspectRatioF: Int? = nil, secureUrl: String? = nil, url: String? = nil) { - self.secureUrl = secureUrl + self.aspectRatioF = aspectRatioF - self.url = url + self.secureUrl = secureUrl self.aspectRatio = aspectRatio - self.aspectRatioF = aspectRatioF + self.url = url } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + 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 { - aspectRatioF = try container.decode(Int.self, forKey: .aspectRatioF) + url = try container.decode(String.self, forKey: .url) } 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(secureUrl, forKey: .secureUrl) + try? container.encodeIfPresent(aspectRatioF, forKey: .aspectRatioF) - try? container.encodeIfPresent(url, forKey: .url) + try? container.encodeIfPresent(secureUrl, forKey: .secureUrl) try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) - try? container.encodeIfPresent(aspectRatioF, forKey: .aspectRatioF) + try? container.encodeIfPresent(url, forKey: .url) } } } diff --git a/Sources/code/platform/models/Media1PlatformModelClass.swift b/Sources/code/platform/models/Media1PlatformModelClass.swift index 7c7e29a5f1..58f3152a30 100644 --- a/Sources/code/platform/models/Media1PlatformModelClass.swift +++ b/Sources/code/platform/models/Media1PlatformModelClass.swift @@ -8,25 +8,25 @@ public extension PlatformClient { */ class Media1: Codable { - public var meta: [String: Any]? - public var type: String? + public var meta: [String: Any]? + public var url: String public enum CodingKeys: String, CodingKey { - case meta - case type + case meta + case url } public init(meta: [String: Any]? = nil, type: String? = nil, url: String) { - self.meta = meta - self.type = type + self.meta = meta + self.url = url } @@ -34,7 +34,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} 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) @@ -55,10 +55,10 @@ 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(type, forKey: .type) + try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(url, forKey: .url) } } diff --git a/Sources/code/platform/models/Media2PlatformModelClass.swift b/Sources/code/platform/models/Media2PlatformModelClass.swift index f636609cf1..12909d0b65 100644 --- a/Sources/code/platform/models/Media2PlatformModelClass.swift +++ b/Sources/code/platform/models/Media2PlatformModelClass.swift @@ -8,46 +8,46 @@ public extension PlatformClient { */ class Media2: Codable { - public var logo: String - public var portrait: String public var landscape: String - public enum CodingKeys: String, CodingKey { - case logo + public var logo: String + public enum CodingKeys: String, CodingKey { case portrait case landscape + + case logo } public init(landscape: String, logo: String, portrait: String) { - self.logo = logo - self.portrait = portrait self.landscape = landscape + + self.logo = logo } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - logo = try container.decode(String.self, forKey: .logo) - portrait = try container.decode(String.self, forKey: .portrait) landscape = try container.decode(String.self, forKey: .landscape) + + logo = try container.decode(String.self, forKey: .logo) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(portrait, forKey: .portrait) try? container.encodeIfPresent(landscape, forKey: .landscape) + + try? container.encodeIfPresent(logo, forKey: .logo) } } } diff --git a/Sources/code/platform/models/MetaDataListingFilterMetaResponsePlatformModelClass.swift b/Sources/code/platform/models/MetaDataListingFilterMetaResponsePlatformModelClass.swift index 9b14b50b61..13639eae35 100644 --- a/Sources/code/platform/models/MetaDataListingFilterMetaResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/MetaDataListingFilterMetaResponsePlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class MetaDataListingFilterMetaResponse: Codable { - public var units: [[String: Any]]? - public var display: String? public var key: String? public var filterTypes: [String]? - public enum CodingKeys: String, CodingKey { - case units + public var units: [[String: Any]]? + public enum CodingKeys: String, CodingKey { case display case key case filterTypes = "filter_types" + + case units } public init(display: String? = nil, filterTypes: [String]? = nil, key: String? = nil, units: [[String: Any]]? = nil) { - self.units = units - self.display = display self.key = key self.filterTypes = filterTypes + + self.units = units } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - units = try container.decode([[String: Any]].self, forKey: .units) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - display = try container.decode(String.self, forKey: .display) + key = try container.decode(String.self, forKey: .key) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - key = try container.decode(String.self, forKey: .key) + filterTypes = try container.decode([String].self, forKey: .filterTypes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - filterTypes = try container.decode([String].self, forKey: .filterTypes) + units = try container.decode([[String: Any]].self, forKey: .units) } 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(units, forKey: .units) - try? container.encodeIfPresent(display, forKey: .display) try? container.encodeIfPresent(key, forKey: .key) try? container.encodeIfPresent(filterTypes, forKey: .filterTypes) + + try? container.encodeIfPresent(units, forKey: .units) } } } diff --git a/Sources/code/platform/models/MetaDataListingResponsePlatformModelClass.swift b/Sources/code/platform/models/MetaDataListingResponsePlatformModelClass.swift index d3ded9e7c8..c9eba27d45 100644 --- a/Sources/code/platform/models/MetaDataListingResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/MetaDataListingResponsePlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class MetaDataListingResponse: Codable { - public var filter: MetaDataListingFilterResponse - public var sort: MetaDataListingSortResponse - public enum CodingKeys: String, CodingKey { - case filter + public var filter: MetaDataListingFilterResponse + public enum CodingKeys: String, CodingKey { case sort + + case filter } public init(filter: MetaDataListingFilterResponse, sort: MetaDataListingSortResponse) { - self.filter = filter - self.sort = sort + + self.filter = filter } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - filter = try container.decode(MetaDataListingFilterResponse.self, forKey: .filter) - sort = try container.decode(MetaDataListingSortResponse.self, forKey: .sort) + + filter = try container.decode(MetaDataListingFilterResponse.self, forKey: .filter) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(filter, forKey: .filter) - try? container.encodeIfPresent(sort, forKey: .sort) + + try? container.encodeIfPresent(filter, forKey: .filter) } } } diff --git a/Sources/code/platform/models/MetaFieldsPlatformModelClass.swift b/Sources/code/platform/models/MetaFieldsPlatformModelClass.swift index 21ffc8799a..832b50533d 100644 --- a/Sources/code/platform/models/MetaFieldsPlatformModelClass.swift +++ b/Sources/code/platform/models/MetaFieldsPlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class MetaFields: Codable { - public var key: String - public var value: String - public enum CodingKeys: String, CodingKey { - case key + public var key: String + public enum CodingKeys: String, CodingKey { case value + + case key } public init(key: String, value: String) { - self.key = key - self.value = value + + self.key = key } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - key = try container.decode(String.self, forKey: .key) - value = try container.decode(String.self, forKey: .value) + + key = try container.decode(String.self, forKey: .key) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(key, forKey: .key) - try? container.encodeIfPresent(value, forKey: .value) + + try? container.encodeIfPresent(key, forKey: .key) } } } diff --git a/Sources/code/platform/models/MetaPlatformModelClass.swift b/Sources/code/platform/models/MetaPlatformModelClass.swift index bb7fb50d45..6395e28381 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 values: [[String: Any]]? + public var headers: [String: Any]? public var unit: String? - public var headers: [String: Any]? + public var values: [[String: Any]]? public enum CodingKeys: String, CodingKey { - case values + case headers case unit - case headers + case values } public init(headers: [String: Any]? = nil, unit: String? = nil, values: [[String: Any]]? = nil) { - self.values = values + self.headers = headers self.unit = unit - self.headers = headers + self.values = values } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - values = try container.decode([[String: Any]].self, forKey: .values) + headers = try container.decode([String: Any].self, forKey: .headers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} 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) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(values, forKey: .values) + try? container.encodeIfPresent(headers, forKey: .headers) try? container.encodeIfPresent(unit, forKey: .unit) - try? container.encodeIfPresent(headers, forKey: .headers) + try? container.encodeIfPresent(values, forKey: .values) } } } diff --git a/Sources/code/platform/models/MetricsSerializerPlatformModelClass.swift b/Sources/code/platform/models/MetricsSerializerPlatformModelClass.swift index cbe79e12ae..3ef8569b28 100644 --- a/Sources/code/platform/models/MetricsSerializerPlatformModelClass.swift +++ b/Sources/code/platform/models/MetricsSerializerPlatformModelClass.swift @@ -8,57 +8,57 @@ public extension PlatformClient { */ class MetricsSerializer: Codable { - public var brand: DocumentsObj? - - public var stage: String? + public var companyDocuments: DocumentsObj? public var uid: Int? - public var storeDocuments: DocumentsObj? + public var brand: DocumentsObj? - public var store: DocumentsObj? + public var stage: String? public var product: DocumentsObj? - public var companyDocuments: DocumentsObj? + public var store: DocumentsObj? - public enum CodingKeys: String, CodingKey { - case brand + public var storeDocuments: DocumentsObj? - case stage + public enum CodingKeys: String, CodingKey { + case companyDocuments = "company_documents" case uid - case storeDocuments = "store_documents" + case brand - case store + case stage case product - case companyDocuments = "company_documents" + case store + + case storeDocuments = "store_documents" } public init(brand: DocumentsObj? = nil, companyDocuments: DocumentsObj? = nil, product: DocumentsObj? = nil, stage: String? = nil, store: DocumentsObj? = nil, storeDocuments: DocumentsObj? = nil, uid: Int? = nil) { - self.brand = brand - - self.stage = stage + self.companyDocuments = companyDocuments self.uid = uid - self.storeDocuments = storeDocuments + self.brand = brand - self.store = store + self.stage = stage self.product = product - self.companyDocuments = companyDocuments + self.store = store + + self.storeDocuments = storeDocuments } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - brand = try container.decode(DocumentsObj.self, forKey: .brand) + companyDocuments = try container.decode(DocumentsObj.self, forKey: .companyDocuments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -66,7 +66,7 @@ public extension PlatformClient { } catch {} do { - stage = try container.decode(String.self, forKey: .stage) + uid = try container.decode(Int.self, forKey: .uid) } 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) + brand = try container.decode(DocumentsObj.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -82,7 +82,7 @@ public extension PlatformClient { } catch {} do { - storeDocuments = try container.decode(DocumentsObj.self, forKey: .storeDocuments) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - store = try container.decode(DocumentsObj.self, forKey: .store) + product = try container.decode(DocumentsObj.self, forKey: .product) } 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) + store = try container.decode(DocumentsObj.self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -106,7 +106,7 @@ public extension PlatformClient { } catch {} do { - companyDocuments = try container.decode(DocumentsObj.self, forKey: .companyDocuments) + storeDocuments = try container.decode(DocumentsObj.self, forKey: .storeDocuments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -117,19 +117,19 @@ 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(stage, forKey: .stage) + try? container.encodeIfPresent(companyDocuments, forKey: .companyDocuments) try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(storeDocuments, forKey: .storeDocuments) + try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(store, forKey: .store) + try? container.encodeIfPresent(stage, forKey: .stage) try? container.encodeIfPresent(product, forKey: .product) - try? container.encodeIfPresent(companyDocuments, forKey: .companyDocuments) + try? container.encodeIfPresent(store, forKey: .store) + + try? container.encodeIfPresent(storeDocuments, forKey: .storeDocuments) } } } diff --git a/Sources/code/platform/models/MultiTenderPaymentMetaPlatformModelClass.swift b/Sources/code/platform/models/MultiTenderPaymentMetaPlatformModelClass.swift index 13e5c350c3..0d782c6266 100644 --- a/Sources/code/platform/models/MultiTenderPaymentMetaPlatformModelClass.swift +++ b/Sources/code/platform/models/MultiTenderPaymentMetaPlatformModelClass.swift @@ -14,10 +14,10 @@ public extension PlatformClient { public var orderId: String? - public var extraMeta: [String: Any]? - public var paymentId: String? + public var extraMeta: [String: Any]? + public enum CodingKeys: String, CodingKey { case paymentGateway = "payment_gateway" @@ -25,9 +25,9 @@ public extension PlatformClient { case orderId = "order_id" - case extraMeta = "extra_meta" - case paymentId = "payment_id" + + case extraMeta = "extra_meta" } public init(currentStatus: String? = nil, extraMeta: [String: Any]? = nil, orderId: String? = nil, paymentGateway: String? = nil, paymentId: String? = nil) { @@ -37,9 +37,9 @@ public extension PlatformClient { self.orderId = orderId - self.extraMeta = extraMeta - self.paymentId = paymentId + + self.extraMeta = extraMeta } required public init(from decoder: Decoder) throws { @@ -70,7 +70,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) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - paymentId = try container.decode(String.self, forKey: .paymentId) + extraMeta = try container.decode([String: Any].self, forKey: .extraMeta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -95,9 +95,9 @@ public extension PlatformClient { try? container.encodeIfPresent(orderId, forKey: .orderId) - try? container.encode(extraMeta, forKey: .extraMeta) - try? container.encodeIfPresent(paymentId, forKey: .paymentId) + + try? container.encode(extraMeta, forKey: .extraMeta) } } } diff --git a/Sources/code/platform/models/MultiTenderPaymentMethodPlatformModelClass.swift b/Sources/code/platform/models/MultiTenderPaymentMethodPlatformModelClass.swift index 0a99611f45..826699c0b4 100644 --- a/Sources/code/platform/models/MultiTenderPaymentMethodPlatformModelClass.swift +++ b/Sources/code/platform/models/MultiTenderPaymentMethodPlatformModelClass.swift @@ -8,31 +8,31 @@ public extension PlatformClient { */ class MultiTenderPaymentMethod: Codable { + public var meta: MultiTenderPaymentMeta? + public var name: String? public var amount: Double - public var meta: MultiTenderPaymentMeta? - public var mode: String public enum CodingKeys: String, CodingKey { + case meta + case name case amount - case meta - case mode } public init(amount: Double, meta: MultiTenderPaymentMeta? = nil, mode: String, name: String? = nil) { + self.meta = meta + self.name = name self.amount = amount - self.meta = meta - self.mode = mode } @@ -40,35 +40,35 @@ public extension PlatformClient { 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) print("codingPath:", context.codingPath) } catch {} + amount = try container.decode(Double.self, forKey: .amount) + mode = try container.decode(String.self, forKey: .mode) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(amount, forKey: .amount) - try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(mode, forKey: .mode) } } diff --git a/Sources/code/platform/models/NotFoundResourceErrorPlatformModelClass.swift b/Sources/code/platform/models/NotFoundResourceErrorPlatformModelClass.swift index bc3b957f1d..ffae8e9432 100644 --- a/Sources/code/platform/models/NotFoundResourceErrorPlatformModelClass.swift +++ b/Sources/code/platform/models/NotFoundResourceErrorPlatformModelClass.swift @@ -8,46 +8,46 @@ public extension PlatformClient { */ class NotFoundResourceError: Codable { - public var code: String + public var description: String public var success: Bool - public var description: String + public var code: String public enum CodingKeys: String, CodingKey { - case code + case description case success - case description + case code } public init(code: String, description: String, success: Bool) { - self.code = code + self.description = description self.success = success - self.description = description + self.code = code } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - code = try container.decode(String.self, forKey: .code) + description = try container.decode(String.self, forKey: .description) success = try container.decode(Bool.self, forKey: .success) - description = try container.decode(String.self, forKey: .description) + code = try container.decode(String.self, forKey: .code) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(code, forKey: .code) + try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(code, forKey: .code) } } } diff --git a/Sources/code/platform/models/OptInPostRequestPlatformModelClass.swift b/Sources/code/platform/models/OptInPostRequestPlatformModelClass.swift index 850c723b61..a096b2b3d9 100644 --- a/Sources/code/platform/models/OptInPostRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/OptInPostRequestPlatformModelClass.swift @@ -12,18 +12,18 @@ public extension PlatformClient { public var storeIds: [Int]? - public var optLevel: String - public var enabled: Bool? + public var optLevel: String + public enum CodingKeys: String, CodingKey { case brandIds = "brand_ids" case storeIds = "store_ids" - case optLevel = "opt_level" - case enabled + + case optLevel = "opt_level" } public init(brandIds: [Int]? = nil, enabled: Bool? = nil, optLevel: String, storeIds: [Int]? = nil) { @@ -31,9 +31,9 @@ public extension PlatformClient { self.storeIds = storeIds - self.optLevel = optLevel - self.enabled = enabled + + self.optLevel = optLevel } required public init(from decoder: Decoder) throws { @@ -55,8 +55,6 @@ 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) @@ -64,6 +62,8 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + + optLevel = try container.decode(String.self, forKey: .optLevel) } public func encode(to encoder: Encoder) throws { @@ -73,9 +73,9 @@ public extension PlatformClient { try? container.encodeIfPresent(storeIds, forKey: .storeIds) - try? container.encodeIfPresent(optLevel, forKey: .optLevel) - try? container.encodeIfPresent(enabled, forKey: .enabled) + + try? container.encodeIfPresent(optLevel, forKey: .optLevel) } } } diff --git a/Sources/code/platform/models/OptinCompanyBrandDetailsViewPlatformModelClass.swift b/Sources/code/platform/models/OptinCompanyBrandDetailsViewPlatformModelClass.swift index 940aa2e185..647a562fb0 100644 --- a/Sources/code/platform/models/OptinCompanyBrandDetailsViewPlatformModelClass.swift +++ b/Sources/code/platform/models/OptinCompanyBrandDetailsViewPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class OptinCompanyBrandDetailsView: Codable { - public var items: [CompanyBrandDetail]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [CompanyBrandDetail]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [CompanyBrandDetail]? = 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([CompanyBrandDetail].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([CompanyBrandDetail].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/OptinCompanyDetailPlatformModelClass.swift b/Sources/code/platform/models/OptinCompanyDetailPlatformModelClass.swift index ef1028c15a..e231f2d133 100644 --- a/Sources/code/platform/models/OptinCompanyDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/OptinCompanyDetailPlatformModelClass.swift @@ -8,29 +8,29 @@ public extension PlatformClient { */ class OptinCompanyDetail: Codable { - public var companyType: String? - public var businessType: String? + public var companyType: String? + public var name: String? public var uid: Int? public enum CodingKeys: String, CodingKey { - case companyType = "company_type" - case businessType = "business_type" + case companyType = "company_type" + case name case uid } public init(businessType: String? = nil, companyType: String? = nil, name: String? = nil, uid: Int? = nil) { - self.companyType = companyType - self.businessType = businessType + self.companyType = companyType + self.name = name self.uid = uid @@ -40,7 +40,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} 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) @@ -75,10 +75,10 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(companyType, forKey: .companyType) - try? container.encodeIfPresent(businessType, forKey: .businessType) + try? container.encodeIfPresent(companyType, forKey: .companyType) + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(uid, forKey: .uid) diff --git a/Sources/code/platform/models/OptinCompanyMetricsPlatformModelClass.swift b/Sources/code/platform/models/OptinCompanyMetricsPlatformModelClass.swift index fe39cb71d2..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 store: Int? + public var company: String? public var brand: Int? - public var store: Int? - public enum CodingKeys: String, CodingKey { + case store + case company case brand - - case store } public init(brand: Int? = nil, company: String? = nil, store: Int? = nil) { + self.store = store + self.company = company self.brand = brand - - self.store = store } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - company = try container.decode(String.self, forKey: .company) + 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 { - brand = try container.decode(Int.self, forKey: .brand) + 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 { - 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,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(store, forKey: .store) + try? container.encodeIfPresent(company, forKey: .company) try? container.encodeIfPresent(brand, forKey: .brand) - - try? container.encodeIfPresent(store, forKey: .store) } } } diff --git a/Sources/code/platform/models/OptinStoreDetailsPlatformModelClass.swift b/Sources/code/platform/models/OptinStoreDetailsPlatformModelClass.swift index b4a53da7c9..6d24c8cd76 100644 --- a/Sources/code/platform/models/OptinStoreDetailsPlatformModelClass.swift +++ b/Sources/code/platform/models/OptinStoreDetailsPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class OptinStoreDetails: Codable { - public var items: [StoreDetail]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [StoreDetail]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [StoreDetail]? = 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([StoreDetail].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([StoreDetail].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/OrderBeneficiaryDetailsPlatformModelClass.swift b/Sources/code/platform/models/OrderBeneficiaryDetailsPlatformModelClass.swift index 3924b5ad03..46121ff917 100644 --- a/Sources/code/platform/models/OrderBeneficiaryDetailsPlatformModelClass.swift +++ b/Sources/code/platform/models/OrderBeneficiaryDetailsPlatformModelClass.swift @@ -8,145 +8,155 @@ public extension PlatformClient { */ class OrderBeneficiaryDetails: Codable { - public var bankName: String + public var displayName: String public var isActive: Bool - public var id: Int - - public var address: String - - public var comment: Bool? - - public var branchName: Bool? - - public var mobile: Bool? - public var delightsUserName: String? - public var subtitle: String + public var createdOn: String public var accountHolder: String - public var transferMode: String + public var beneficiaryId: String - public var ifscCode: String + public var subtitle: String - public var beneficiaryId: String + public var ifscCode: String public var modifiedOn: String - public var title: String - public var accountNo: String - public var createdOn: String + public var mobile: Bool? - public var email: String + public var branchName: Bool? - public var displayName: String + public var comment: Bool? - public enum CodingKeys: String, CodingKey { - case bankName = "bank_name" + public var transferMode: String - case isActive = "is_active" + public var bankName: String - case id + public var id: Int - case address + public var email: String - case comment + public var address: String - case branchName = "branch_name" + public var title: String - case mobile + public enum CodingKeys: String, CodingKey { + case displayName = "display_name" + + case isActive = "is_active" case delightsUserName = "delights_user_name" - case subtitle + case createdOn = "created_on" case accountHolder = "account_holder" - case transferMode = "transfer_mode" + case beneficiaryId = "beneficiary_id" - case ifscCode = "ifsc_code" + case subtitle - case beneficiaryId = "beneficiary_id" + case ifscCode = "ifsc_code" case modifiedOn = "modified_on" - case title - case accountNo = "account_no" - case createdOn = "created_on" + case mobile - case email + case branchName = "branch_name" - case displayName = "display_name" - } + case comment - 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.bankName = bankName + case transferMode = "transfer_mode" - self.isActive = isActive + case bankName = "bank_name" - self.id = id + case id - self.address = address + case email - self.comment = comment + case address - self.branchName = branchName + case title + } - self.mobile = mobile + 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.displayName = displayName + + self.isActive = isActive self.delightsUserName = delightsUserName - self.subtitle = subtitle + self.createdOn = createdOn self.accountHolder = accountHolder - self.transferMode = transferMode + self.beneficiaryId = beneficiaryId - self.ifscCode = ifscCode + self.subtitle = subtitle - self.beneficiaryId = beneficiaryId + self.ifscCode = ifscCode self.modifiedOn = modifiedOn - self.title = title - self.accountNo = accountNo - self.createdOn = createdOn + self.mobile = mobile + + self.branchName = branchName + + self.comment = comment + + self.transferMode = transferMode + + self.bankName = bankName + + self.id = id self.email = email - self.displayName = displayName + self.address = address + + self.title = title } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - bankName = try container.decode(String.self, forKey: .bankName) + displayName = try container.decode(String.self, forKey: .displayName) isActive = try container.decode(Bool.self, forKey: .isActive) - id = try container.decode(Int.self, forKey: .id) - - address = try container.decode(String.self, forKey: .address) - do { - comment = try container.decode(Bool.self, forKey: .comment) + 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 {} + createdOn = try container.decode(String.self, forKey: .createdOn) + + accountHolder = try container.decode(String.self, forKey: .accountHolder) + + beneficiaryId = try container.decode(String.self, forKey: .beneficiaryId) + + subtitle = try container.decode(String.self, forKey: .subtitle) + + ifscCode = try container.decode(String.self, forKey: .ifscCode) + + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + + accountNo = try container.decode(String.self, forKey: .accountNo) + do { - branchName = try container.decode(Bool.self, forKey: .branchName) + mobile = try container.decode(Bool.self, forKey: .mobile) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +164,7 @@ public extension PlatformClient { } catch {} do { - mobile = try container.decode(Bool.self, forKey: .mobile) + branchName = try container.decode(Bool.self, forKey: .branchName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,76 +172,66 @@ public extension PlatformClient { } catch {} do { - delightsUserName = try container.decode(String.self, forKey: .delightsUserName) + 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 {} - subtitle = try container.decode(String.self, forKey: .subtitle) - - accountHolder = try container.decode(String.self, forKey: .accountHolder) - transferMode = try container.decode(String.self, forKey: .transferMode) - ifscCode = try container.decode(String.self, forKey: .ifscCode) - - beneficiaryId = try container.decode(String.self, forKey: .beneficiaryId) - - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) - - title = try container.decode(String.self, forKey: .title) - - accountNo = try container.decode(String.self, forKey: .accountNo) + bankName = try container.decode(String.self, forKey: .bankName) - createdOn = try container.decode(String.self, forKey: .createdOn) + id = try container.decode(Int.self, forKey: .id) email = try container.decode(String.self, forKey: .email) - displayName = try container.decode(String.self, forKey: .displayName) + address = try container.decode(String.self, forKey: .address) + + title = try container.decode(String.self, forKey: .title) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(bankName, forKey: .bankName) + try? container.encodeIfPresent(displayName, forKey: .displayName) try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(id, forKey: .id) - - try? container.encodeIfPresent(address, forKey: .address) - - try? container.encodeIfPresent(comment, forKey: .comment) + try? container.encode(delightsUserName, forKey: .delightsUserName) - try? container.encodeIfPresent(branchName, forKey: .branchName) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(mobile, forKey: .mobile) + try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) - try? container.encode(delightsUserName, forKey: .delightsUserName) + try? container.encodeIfPresent(beneficiaryId, forKey: .beneficiaryId) try? container.encodeIfPresent(subtitle, forKey: .subtitle) - try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) + try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) - try? container.encodeIfPresent(transferMode, forKey: .transferMode) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) + try? container.encodeIfPresent(accountNo, forKey: .accountNo) - try? container.encodeIfPresent(beneficiaryId, forKey: .beneficiaryId) + try? container.encodeIfPresent(mobile, forKey: .mobile) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(branchName, forKey: .branchName) - try? container.encodeIfPresent(title, forKey: .title) + try? container.encodeIfPresent(comment, forKey: .comment) - try? container.encodeIfPresent(accountNo, forKey: .accountNo) + try? container.encodeIfPresent(transferMode, forKey: .transferMode) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(bankName, forKey: .bankName) + + try? container.encodeIfPresent(id, forKey: .id) try? container.encodeIfPresent(email, forKey: .email) - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(address, forKey: .address) + + try? container.encodeIfPresent(title, forKey: .title) } } } diff --git a/Sources/code/platform/models/OrderQuantityPlatformModelClass.swift b/Sources/code/platform/models/OrderQuantityPlatformModelClass.swift index 8be69d8cb1..e3159066b6 100644 --- a/Sources/code/platform/models/OrderQuantityPlatformModelClass.swift +++ b/Sources/code/platform/models/OrderQuantityPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class OrderQuantity: Codable { public var minimum: Int? - public var maximum: Int? - public var isSet: Bool? + public var maximum: Int? + public enum CodingKeys: String, CodingKey { case minimum - case maximum - case isSet = "is_set" + + case maximum } public init(isSet: Bool? = nil, maximum: Int? = nil, minimum: Int? = nil) { self.minimum = minimum - self.maximum = maximum - self.isSet = isSet + + self.maximum = maximum } required public init(from decoder: Decoder) throws { @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} 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) @@ -63,9 +63,9 @@ public extension PlatformClient { try? container.encodeIfPresent(minimum, forKey: .minimum) - try? container.encodeIfPresent(maximum, forKey: .maximum) - 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 7a8faf7fc7..a414588b98 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 errors: [String: Any]? public var message: String? - public var status: Int? + public var code: String? public var meta: [String: Any]? - public var code: String? - public enum CodingKeys: String, CodingKey { + case status + case errors case message - case status + case code case meta - - case code } public init(code: String? = nil, errors: [String: Any]? = nil, message: String? = nil, meta: [String: Any]? = nil, status: Int? = nil) { + self.status = status + self.errors = errors self.message = message - self.status = status + self.code = code self.meta = meta - - self.code = code } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - errors = try container.decode([String: Any].self, forKey: .errors) + 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 { - message = try container.decode(String.self, forKey: .message) + errors = try container.decode([String: Any].self, forKey: .errors) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +62,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) @@ -70,7 +70,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) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} 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) @@ -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(errors, forKey: .errors) try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(code, forKey: .code) try? container.encodeIfPresent(meta, forKey: .meta) - - try? container.encodeIfPresent(code, forKey: .code) } } } diff --git a/Sources/code/platform/models/PageResponsePlatformModelClass.swift b/Sources/code/platform/models/PageResponsePlatformModelClass.swift index 6eb5b25f4d..986e59c8d7 100644 --- a/Sources/code/platform/models/PageResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/PageResponsePlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class PageResponse: Codable { - public var size: Int? + public var current: String? - public var hasNext: Bool? + public var size: Int? public var itemTotal: Int? - public var current: String? + public var hasNext: Bool? public var hasPrevious: Bool? public enum CodingKeys: String, CodingKey { - case size + case current - case hasNext = "has_next" + case size case itemTotal = "item_total" - case current + case hasNext = "has_next" case hasPrevious = "has_previous" } public init(current: String? = nil, hasNext: Bool? = nil, hasPrevious: Bool? = nil, itemTotal: Int? = nil, size: Int? = nil) { - self.size = size + self.current = current - self.hasNext = hasNext + self.size = size self.itemTotal = itemTotal - self.current = current + self.hasNext = hasNext self.hasPrevious = hasPrevious } @@ -46,7 +46,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - size = try container.decode(Int.self, forKey: .size) + current = try container.decode(String.self, forKey: .current) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -54,7 +54,7 @@ public extension PlatformClient { } catch {} do { - hasNext = try container.decode(Bool.self, forKey: .hasNext) + size = try container.decode(Int.self, forKey: .size) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } catch {} do { - current = try container.decode(String.self, forKey: .current) + hasNext = try container.decode(Bool.self, forKey: .hasNext) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -89,13 +89,13 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(size, forKey: .size) + try? container.encodeIfPresent(current, forKey: .current) - try? container.encodeIfPresent(hasNext, forKey: .hasNext) + try? container.encodeIfPresent(size, forKey: .size) try? container.encodeIfPresent(itemTotal, forKey: .itemTotal) - try? container.encodeIfPresent(current, forKey: .current) + try? container.encodeIfPresent(hasNext, forKey: .hasNext) try? container.encodeIfPresent(hasPrevious, forKey: .hasPrevious) } diff --git a/Sources/code/platform/models/PaymentGatewayConfigPlatformModelClass.swift b/Sources/code/platform/models/PaymentGatewayConfigPlatformModelClass.swift index 53a9be2032..a3659c0ce9 100644 --- a/Sources/code/platform/models/PaymentGatewayConfigPlatformModelClass.swift +++ b/Sources/code/platform/models/PaymentGatewayConfigPlatformModelClass.swift @@ -8,44 +8,44 @@ public extension PlatformClient { */ class PaymentGatewayConfig: Codable { - public var secret: String + public var key: String public var isActive: Bool? - public var key: String - public var merchantSalt: String public var configType: String + public var secret: String + public enum CodingKeys: String, CodingKey { - case secret + case key case isActive = "is_active" - case key - case merchantSalt = "merchant_salt" case configType = "config_type" + + case secret } public init(configType: String, isActive: Bool? = nil, key: String, merchantSalt: String, secret: String) { - self.secret = secret + self.key = key self.isActive = isActive - self.key = key - self.merchantSalt = merchantSalt self.configType = configType + + self.secret = secret } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - secret = try container.decode(String.self, forKey: .secret) + key = try container.decode(String.self, forKey: .key) do { isActive = try container.decode(Bool.self, forKey: .isActive) @@ -55,25 +55,25 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - key = try container.decode(String.self, forKey: .key) - merchantSalt = try container.decode(String.self, forKey: .merchantSalt) configType = try container.decode(String.self, forKey: .configType) + + secret = try container.decode(String.self, forKey: .secret) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(secret, forKey: .secret) + try? container.encodeIfPresent(key, forKey: .key) try? container.encode(isActive, forKey: .isActive) - try? container.encodeIfPresent(key, forKey: .key) - try? container.encodeIfPresent(merchantSalt, forKey: .merchantSalt) try? container.encodeIfPresent(configType, forKey: .configType) + + try? container.encodeIfPresent(secret, forKey: .secret) } } } diff --git a/Sources/code/platform/models/PaymentGatewayConfigRequestPlatformModelClass.swift b/Sources/code/platform/models/PaymentGatewayConfigRequestPlatformModelClass.swift index b1eaf75793..42200cd990 100644 --- a/Sources/code/platform/models/PaymentGatewayConfigRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/PaymentGatewayConfigRequestPlatformModelClass.swift @@ -8,43 +8,43 @@ public extension PlatformClient { */ class PaymentGatewayConfigRequest: Codable { - public var isActive: Bool? - public var appId: String public var aggregatorName: PaymentGatewayConfig? - public enum CodingKeys: String, CodingKey { - case isActive = "is_active" + public var isActive: Bool? + public enum CodingKeys: String, CodingKey { case appId = "app_id" case aggregatorName = "aggregator_name" + + case isActive = "is_active" } public init(aggregatorName: PaymentGatewayConfig? = nil, appId: String, isActive: Bool? = nil) { - self.isActive = isActive - self.appId = appId self.aggregatorName = aggregatorName + + self.isActive = isActive } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + appId = try container.decode(String.self, forKey: .appId) + do { - isActive = try container.decode(Bool.self, forKey: .isActive) + aggregatorName = try container.decode(PaymentGatewayConfig.self, forKey: .aggregatorName) } 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 { - aggregatorName = try container.decode(PaymentGatewayConfig.self, forKey: .aggregatorName) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,11 +55,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(isActive, forKey: .isActive) - try? container.encodeIfPresent(appId, forKey: .appId) try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) + + try? container.encode(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/PaymentGatewayConfigResponsePlatformModelClass.swift b/Sources/code/platform/models/PaymentGatewayConfigResponsePlatformModelClass.swift index fc29d47ab9..63dcc9abb7 100644 --- a/Sources/code/platform/models/PaymentGatewayConfigResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/PaymentGatewayConfigResponsePlatformModelClass.swift @@ -8,50 +8,52 @@ public extension PlatformClient { */ class PaymentGatewayConfigResponse: Codable { - public var success: Bool + public var displayFields: [String] + + public var excludedFields: [String] public var aggregators: [[String: Any]]? public var appId: String - public var created: Bool - - public var excludedFields: [String] + public var success: Bool - public var displayFields: [String] + public var created: Bool public enum CodingKeys: String, CodingKey { - case success + case displayFields = "display_fields" + + case excludedFields = "excluded_fields" case aggregators case appId = "app_id" - case created - - case excludedFields = "excluded_fields" + case success - case displayFields = "display_fields" + case created } public init(aggregators: [[String: Any]]? = nil, appId: String, created: Bool, displayFields: [String], excludedFields: [String], success: Bool) { - self.success = success + self.displayFields = displayFields + + self.excludedFields = excludedFields self.aggregators = aggregators self.appId = appId - self.created = created - - self.excludedFields = excludedFields + self.success = success - self.displayFields = displayFields + self.created = created } 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) + + excludedFields = try container.decode([String].self, forKey: .excludedFields) do { aggregators = try container.decode([[String: Any]].self, forKey: .aggregators) @@ -63,27 +65,25 @@ public extension PlatformClient { appId = try container.decode(String.self, forKey: .appId) - created = try container.decode(Bool.self, forKey: .created) - - excludedFields = try container.decode([String].self, forKey: .excludedFields) + success = try container.decode(Bool.self, forKey: .success) - displayFields = try container.decode([String].self, forKey: .displayFields) + created = try container.decode(Bool.self, forKey: .created) } 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(excludedFields, forKey: .excludedFields) try? container.encodeIfPresent(aggregators, forKey: .aggregators) try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(created, forKey: .created) - - try? container.encodeIfPresent(excludedFields, forKey: .excludedFields) + try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(displayFields, forKey: .displayFields) + try? container.encodeIfPresent(created, forKey: .created) } } } diff --git a/Sources/code/platform/models/PaymentModeListPlatformModelClass.swift b/Sources/code/platform/models/PaymentModeListPlatformModelClass.swift index c7d25d6943..016c67a06d 100644 --- a/Sources/code/platform/models/PaymentModeListPlatformModelClass.swift +++ b/Sources/code/platform/models/PaymentModeListPlatformModelClass.swift @@ -8,189 +8,195 @@ public extension PlatformClient { */ class PaymentModeList: Codable { - public var cardNumber: String? + public var cardId: String? + + public var expYear: Int? + + public var cardType: String? + + public var intentFlow: Bool? public var expMonth: Int? - public var cardIssuer: String? + public var displayName: String? - public var displayPriority: Int? + public var cardNumber: String? - public var cardType: String? + public var logoUrl: PaymentModeLogo? public var timeout: Int? - public var cardBrandImage: String? + public var aggregatorName: String - public var cardReference: String? + public var cardBrandImage: String? - public var name: String? + public var retryCount: Int? - public var code: String? + public var intentApp: [IntentApp]? - public var nickname: String? + public var cardToken: String? - public var fyndVpa: String? + public var merchantCode: String? - public var logoUrl: PaymentModeLogo? + public var intentAppErrorDictList: [IntentAppErrorList]? - public var cardIsin: String? + public var intentAppErrorList: [String]? - public var merchantCode: String? + public var displayPriority: Int? - public var intentApp: [IntentApp]? + public var cardIssuer: String? - public var cardFingerprint: String? + public var cardReference: String? - public var retryCount: Int? + public var cardBrand: String? - public var intentFlow: Bool? + public var cardIsin: String? - public var aggregatorName: String + public var code: String? - public var intentAppErrorList: [String]? + public var cardName: String? public var expired: Bool? - public var cardId: String? + public var nickname: String? - public var expYear: Int? + public var name: String? - public var displayName: String? + public var cardFingerprint: String? - public var intentAppErrorDictList: [IntentAppErrorList]? + public var fyndVpa: String? - public var cardToken: String? + public var compliantWithTokenisationGuidelines: Bool? - public var cardBrand: String? + public enum CodingKeys: String, CodingKey { + case cardId = "card_id" - public var cardName: String? + case expYear = "exp_year" - public enum CodingKeys: String, CodingKey { - case cardNumber = "card_number" + case cardType = "card_type" + + case intentFlow = "intent_flow" case expMonth = "exp_month" - case cardIssuer = "card_issuer" + case displayName = "display_name" - case displayPriority = "display_priority" + case cardNumber = "card_number" - case cardType = "card_type" + case logoUrl = "logo_url" case timeout - case cardBrandImage = "card_brand_image" + case aggregatorName = "aggregator_name" - case cardReference = "card_reference" + case cardBrandImage = "card_brand_image" - case name + case retryCount = "retry_count" - case code + case intentApp = "intent_app" - case nickname + case cardToken = "card_token" - case fyndVpa = "fynd_vpa" + case merchantCode = "merchant_code" - case logoUrl = "logo_url" + case intentAppErrorDictList = "intent_app_error_dict_list" - case cardIsin = "card_isin" + case intentAppErrorList = "intent_app_error_list" - case merchantCode = "merchant_code" + case displayPriority = "display_priority" - case intentApp = "intent_app" + case cardIssuer = "card_issuer" - case cardFingerprint = "card_fingerprint" + case cardReference = "card_reference" - case retryCount = "retry_count" + case cardBrand = "card_brand" - case intentFlow = "intent_flow" + case cardIsin = "card_isin" - case aggregatorName = "aggregator_name" + case code - case intentAppErrorList = "intent_app_error_list" + case cardName = "card_name" case expired - case cardId = "card_id" + case nickname - case expYear = "exp_year" + case name - case displayName = "display_name" + case cardFingerprint = "card_fingerprint" - case intentAppErrorDictList = "intent_app_error_dict_list" + case fyndVpa = "fynd_vpa" - case cardToken = "card_token" + case compliantWithTokenisationGuidelines = "compliant_with_tokenisation_guidelines" + } - case cardBrand = "card_brand" + 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, compliantWithTokenisationGuidelines: Bool? = 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.cardId = cardId - case cardName = "card_name" - } + self.expYear = expYear - 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.cardNumber = cardNumber + self.cardType = cardType + + self.intentFlow = intentFlow self.expMonth = expMonth - self.cardIssuer = cardIssuer + self.displayName = displayName - self.displayPriority = displayPriority + self.cardNumber = cardNumber - self.cardType = cardType + self.logoUrl = logoUrl self.timeout = timeout - self.cardBrandImage = cardBrandImage + self.aggregatorName = aggregatorName - self.cardReference = cardReference + self.cardBrandImage = cardBrandImage - self.name = name + self.retryCount = retryCount - self.code = code + self.intentApp = intentApp - self.nickname = nickname + self.cardToken = cardToken - self.fyndVpa = fyndVpa + self.merchantCode = merchantCode - self.logoUrl = logoUrl + self.intentAppErrorDictList = intentAppErrorDictList - self.cardIsin = cardIsin + self.intentAppErrorList = intentAppErrorList - self.merchantCode = merchantCode + self.displayPriority = displayPriority - self.intentApp = intentApp + self.cardIssuer = cardIssuer - self.cardFingerprint = cardFingerprint + self.cardReference = cardReference - self.retryCount = retryCount + self.cardBrand = cardBrand - self.intentFlow = intentFlow + self.cardIsin = cardIsin - self.aggregatorName = aggregatorName + self.code = code - self.intentAppErrorList = intentAppErrorList + self.cardName = cardName self.expired = expired - self.cardId = cardId - - self.expYear = expYear - - self.displayName = displayName + self.nickname = nickname - self.intentAppErrorDictList = intentAppErrorDictList + self.name = name - self.cardToken = cardToken + self.cardFingerprint = cardFingerprint - self.cardBrand = cardBrand + self.fyndVpa = fyndVpa - self.cardName = cardName + self.compliantWithTokenisationGuidelines = compliantWithTokenisationGuidelines } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - cardNumber = try container.decode(String.self, forKey: .cardNumber) + cardId = try container.decode(String.self, forKey: .cardId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +204,7 @@ public extension PlatformClient { } catch {} do { - expMonth = try container.decode(Int.self, forKey: .expMonth) + expYear = try container.decode(Int.self, forKey: .expYear) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +212,7 @@ public extension PlatformClient { } catch {} do { - cardIssuer = try container.decode(String.self, forKey: .cardIssuer) + cardType = try container.decode(String.self, forKey: .cardType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +220,7 @@ public extension PlatformClient { } catch {} do { - displayPriority = try container.decode(Int.self, forKey: .displayPriority) + intentFlow = try container.decode(Bool.self, forKey: .intentFlow) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -222,7 +228,7 @@ public extension PlatformClient { } 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) @@ -230,7 +236,7 @@ public extension PlatformClient { } catch {} do { - timeout = try container.decode(Int.self, forKey: .timeout) + displayName = try container.decode(String.self, forKey: .displayName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -238,7 +244,7 @@ public extension PlatformClient { } catch {} do { - cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) + cardNumber = try container.decode(String.self, forKey: .cardNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -246,7 +252,7 @@ public extension PlatformClient { } catch {} do { - cardReference = try container.decode(String.self, forKey: .cardReference) + logoUrl = try container.decode(PaymentModeLogo.self, forKey: .logoUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -254,15 +260,17 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + 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 {} + aggregatorName = try container.decode(String.self, forKey: .aggregatorName) + do { - code = try container.decode(String.self, forKey: .code) + cardBrandImage = try container.decode(String.self, forKey: .cardBrandImage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -270,7 +278,7 @@ public extension PlatformClient { } catch {} do { - nickname = try container.decode(String.self, forKey: .nickname) + retryCount = try container.decode(Int.self, forKey: .retryCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -278,7 +286,7 @@ public extension PlatformClient { } catch {} do { - fyndVpa = try container.decode(String.self, forKey: .fyndVpa) + intentApp = try container.decode([IntentApp].self, forKey: .intentApp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -286,7 +294,7 @@ public extension PlatformClient { } catch {} do { - logoUrl = try container.decode(PaymentModeLogo.self, forKey: .logoUrl) + cardToken = try container.decode(String.self, forKey: .cardToken) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -294,7 +302,7 @@ public extension PlatformClient { } catch {} do { - cardIsin = try container.decode(String.self, forKey: .cardIsin) + merchantCode = try container.decode(String.self, forKey: .merchantCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -302,7 +310,7 @@ public extension PlatformClient { } catch {} do { - merchantCode = try container.decode(String.self, forKey: .merchantCode) + intentAppErrorDictList = try container.decode([IntentAppErrorList].self, forKey: .intentAppErrorDictList) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -310,7 +318,7 @@ public extension PlatformClient { } catch {} do { - intentApp = try container.decode([IntentApp].self, forKey: .intentApp) + intentAppErrorList = try container.decode([String].self, forKey: .intentAppErrorList) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -318,7 +326,7 @@ public extension PlatformClient { } catch {} do { - cardFingerprint = try container.decode(String.self, forKey: .cardFingerprint) + displayPriority = try container.decode(Int.self, forKey: .displayPriority) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -326,7 +334,7 @@ public extension PlatformClient { } catch {} do { - retryCount = try container.decode(Int.self, forKey: .retryCount) + cardIssuer = try container.decode(String.self, forKey: .cardIssuer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -334,17 +342,23 @@ public extension PlatformClient { } catch {} do { - intentFlow = try container.decode(Bool.self, forKey: .intentFlow) + cardReference = try container.decode(String.self, forKey: .cardReference) } 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) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch {} do { - intentAppErrorList = try container.decode([String].self, forKey: .intentAppErrorList) + cardIsin = try container.decode(String.self, forKey: .cardIsin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -352,7 +366,7 @@ public extension PlatformClient { } catch {} do { - expired = try container.decode(Bool.self, forKey: .expired) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -360,7 +374,7 @@ public extension PlatformClient { } catch {} do { - cardId = try container.decode(String.self, forKey: .cardId) + cardName = try container.decode(String.self, forKey: .cardName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -368,7 +382,7 @@ public extension PlatformClient { } 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) @@ -376,7 +390,7 @@ public extension PlatformClient { } catch {} do { - displayName = try container.decode(String.self, forKey: .displayName) + nickname = try container.decode(String.self, forKey: .nickname) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -384,7 +398,7 @@ public extension PlatformClient { } catch {} do { - intentAppErrorDictList = try container.decode([IntentAppErrorList].self, forKey: .intentAppErrorDictList) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -392,7 +406,7 @@ public extension PlatformClient { } catch {} do { - cardToken = try container.decode(String.self, forKey: .cardToken) + cardFingerprint = try container.decode(String.self, forKey: .cardFingerprint) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -400,7 +414,7 @@ public extension PlatformClient { } catch {} do { - cardBrand = try container.decode(String.self, forKey: .cardBrand) + fyndVpa = try container.decode(String.self, forKey: .fyndVpa) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -408,7 +422,7 @@ public extension PlatformClient { } catch {} do { - cardName = try container.decode(String.self, forKey: .cardName) + compliantWithTokenisationGuidelines = try container.decode(Bool.self, forKey: .compliantWithTokenisationGuidelines) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -419,63 +433,65 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(cardNumber, forKey: .cardNumber) + try? container.encode(cardId, forKey: .cardId) - try? container.encode(expMonth, forKey: .expMonth) + try? container.encode(expYear, forKey: .expYear) - try? container.encode(cardIssuer, forKey: .cardIssuer) + try? container.encode(cardType, forKey: .cardType) - try? container.encode(displayPriority, forKey: .displayPriority) + try? container.encode(intentFlow, forKey: .intentFlow) - try? container.encode(cardType, forKey: .cardType) + try? container.encode(expMonth, forKey: .expMonth) - try? container.encode(timeout, forKey: .timeout) + try? container.encode(displayName, forKey: .displayName) - try? container.encode(cardBrandImage, forKey: .cardBrandImage) + try? container.encode(cardNumber, forKey: .cardNumber) - try? container.encode(cardReference, forKey: .cardReference) + try? container.encode(logoUrl, forKey: .logoUrl) - try? container.encode(name, forKey: .name) + try? container.encode(timeout, forKey: .timeout) - try? container.encode(code, forKey: .code) + try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) - try? container.encode(nickname, forKey: .nickname) + try? container.encode(cardBrandImage, forKey: .cardBrandImage) - try? container.encode(fyndVpa, forKey: .fyndVpa) + try? container.encode(retryCount, forKey: .retryCount) - try? container.encode(logoUrl, forKey: .logoUrl) + try? container.encode(intentApp, forKey: .intentApp) - try? container.encode(cardIsin, forKey: .cardIsin) + try? container.encode(cardToken, forKey: .cardToken) try? container.encode(merchantCode, forKey: .merchantCode) - try? container.encode(intentApp, forKey: .intentApp) + try? container.encode(intentAppErrorDictList, forKey: .intentAppErrorDictList) - try? container.encode(cardFingerprint, forKey: .cardFingerprint) + try? container.encode(intentAppErrorList, forKey: .intentAppErrorList) - try? container.encode(retryCount, forKey: .retryCount) + try? container.encode(displayPriority, forKey: .displayPriority) - try? container.encode(intentFlow, forKey: .intentFlow) + try? container.encode(cardIssuer, forKey: .cardIssuer) - try? container.encodeIfPresent(aggregatorName, forKey: .aggregatorName) + try? container.encode(cardReference, forKey: .cardReference) - try? container.encode(intentAppErrorList, forKey: .intentAppErrorList) + try? container.encode(cardBrand, forKey: .cardBrand) - try? container.encode(expired, forKey: .expired) + try? container.encode(cardIsin, forKey: .cardIsin) - try? container.encode(cardId, forKey: .cardId) + try? container.encode(code, forKey: .code) - try? container.encode(expYear, forKey: .expYear) + try? container.encode(cardName, forKey: .cardName) - try? container.encode(displayName, forKey: .displayName) + try? container.encode(expired, forKey: .expired) - try? container.encode(intentAppErrorDictList, forKey: .intentAppErrorDictList) + try? container.encode(nickname, forKey: .nickname) - try? container.encode(cardToken, forKey: .cardToken) + try? container.encode(name, forKey: .name) - try? container.encode(cardBrand, forKey: .cardBrand) + try? container.encode(cardFingerprint, forKey: .cardFingerprint) - try? container.encode(cardName, forKey: .cardName) + try? container.encode(fyndVpa, forKey: .fyndVpa) + + try? container.encode(compliantWithTokenisationGuidelines, forKey: .compliantWithTokenisationGuidelines) } } } diff --git a/Sources/code/platform/models/PaymentModeLogoPlatformModelClass.swift b/Sources/code/platform/models/PaymentModeLogoPlatformModelClass.swift index 093b9e7414..93e3128b7a 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 small: String - public var large: String - public enum CodingKeys: String, CodingKey { - case small + public var small: String + public enum CodingKeys: String, CodingKey { case large + + case small } public init(large: String, small: String) { - self.small = small - self.large = large + + self.small = small } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - small = try container.decode(String.self, forKey: .small) - large = try container.decode(String.self, forKey: .large) + + small = try container.decode(String.self, forKey: .small) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(small, forKey: .small) - try? container.encodeIfPresent(large, forKey: .large) + + try? container.encodeIfPresent(small, forKey: .small) } } } diff --git a/Sources/code/platform/models/PaymentOptionsResponsePlatformModelClass.swift b/Sources/code/platform/models/PaymentOptionsResponsePlatformModelClass.swift index 20aaf33da7..c280dc1c1e 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 paymentOptions: PaymentOptions - public var success: Bool - public enum CodingKeys: String, CodingKey { - case paymentOptions = "payment_options" + public var paymentOptions: PaymentOptions + public enum CodingKeys: String, CodingKey { case success + + case paymentOptions = "payment_options" } public init(paymentOptions: PaymentOptions, success: Bool) { - self.paymentOptions = paymentOptions - self.success = success + + self.paymentOptions = paymentOptions } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - paymentOptions = try container.decode(PaymentOptions.self, forKey: .paymentOptions) - success = try container.decode(Bool.self, forKey: .success) + + paymentOptions = try container.decode(PaymentOptions.self, forKey: .paymentOptions) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(paymentOptions, forKey: .paymentOptions) - try? container.encodeIfPresent(success, forKey: .success) + + try? container.encodeIfPresent(paymentOptions, forKey: .paymentOptions) } } } diff --git a/Sources/code/platform/models/PayoutBankDetailsPlatformModelClass.swift b/Sources/code/platform/models/PayoutBankDetailsPlatformModelClass.swift index 76dbfefb78..880d8be5cd 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 bankName: String? - - public var accountHolder: String? + public var city: String? public var pincode: Int? public var branchName: String? - public var city: String? + public var accountType: String public var ifscCode: String public var state: String? - public var country: String? - - public var accountType: String + public var bankName: String? public var accountNo: String? - public enum CodingKeys: String, CodingKey { - case bankName = "bank_name" + public var accountHolder: String? - case accountHolder = "account_holder" + public var country: String? + + public enum CodingKeys: String, CodingKey { + case city case pincode case branchName = "branch_name" - case city + case accountType = "account_type" case ifscCode = "ifsc_code" case state - case country - - case accountType = "account_type" + case bankName = "bank_name" case accountNo = "account_no" + + case accountHolder = "account_holder" + + 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.bankName = bankName - - self.accountHolder = accountHolder + self.city = city self.pincode = pincode self.branchName = branchName - self.city = city + self.accountType = accountType self.ifscCode = ifscCode self.state = state - self.country = country - - self.accountType = accountType + self.bankName = bankName self.accountNo = accountNo + + self.accountHolder = accountHolder + + self.country = country } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - bankName = try container.decode(String.self, forKey: .bankName) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,7 +84,7 @@ public extension PlatformClient { } catch {} do { - accountHolder = try container.decode(String.self, forKey: .accountHolder) + pincode = try container.decode(Int.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,15 +92,19 @@ public extension PlatformClient { } catch {} do { - pincode = try container.decode(Int.self, forKey: .pincode) + branchName = try container.decode(String.self, forKey: .branchName) } 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 { - branchName = try container.decode(String.self, forKey: .branchName) + state = try container.decode(String.self, forKey: .state) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -108,17 +112,15 @@ 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) - do { - state = try container.decode(String.self, forKey: .state) + accountNo = try container.decode(String.self, forKey: .accountNo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,17 +128,15 @@ public extension PlatformClient { } catch {} do { - country = try container.decode(String.self, forKey: .country) + accountHolder = try container.decode(String.self, forKey: .accountHolder) } 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) - do { - accountNo = try container.decode(String.self, forKey: .accountNo) + 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(bankName, forKey: .bankName) - - try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) + try? container.encodeIfPresent(city, forKey: .city) try? container.encodeIfPresent(pincode, forKey: .pincode) try? container.encodeIfPresent(branchName, forKey: .branchName) - try? container.encodeIfPresent(city, forKey: .city) + try? container.encodeIfPresent(accountType, forKey: .accountType) try? container.encodeIfPresent(ifscCode, forKey: .ifscCode) try? container.encodeIfPresent(state, forKey: .state) - try? container.encodeIfPresent(country, forKey: .country) - - try? container.encodeIfPresent(accountType, forKey: .accountType) + try? container.encodeIfPresent(bankName, forKey: .bankName) try? container.encodeIfPresent(accountNo, forKey: .accountNo) + + try? container.encodeIfPresent(accountHolder, forKey: .accountHolder) + + try? container.encodeIfPresent(country, forKey: .country) } } } diff --git a/Sources/code/platform/models/PayoutRequestPlatformModelClass.swift b/Sources/code/platform/models/PayoutRequestPlatformModelClass.swift index f841bf41c1..2daac9e4be 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 users: [String: Any] - public var transferType: String - public var aggregator: String + public var isActive: Bool - public var bankDetails: PayoutBankDetails + public var users: [String: Any] - public var isActive: Bool + public var aggregator: String public var uniqueExternalId: String - public enum CodingKeys: String, CodingKey { - case users + public var bankDetails: PayoutBankDetails + public enum CodingKeys: String, CodingKey { case transferType = "transfer_type" - case aggregator + case isActive = "is_active" - case bankDetails = "bank_details" + case users - case isActive = "is_active" + case aggregator case uniqueExternalId = "unique_external_id" + + case bankDetails = "bank_details" } public init(aggregator: String, bankDetails: PayoutBankDetails, isActive: Bool, transferType: String, uniqueExternalId: String, users: [String: Any]) { - self.users = users - self.transferType = transferType - self.aggregator = aggregator + self.isActive = isActive - self.bankDetails = bankDetails + self.users = users - self.isActive = isActive + self.aggregator = aggregator self.uniqueExternalId = uniqueExternalId + + self.bankDetails = bankDetails } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - users = try container.decode([String: Any].self, forKey: .users) - transferType = try container.decode(String.self, forKey: .transferType) - aggregator = try container.decode(String.self, forKey: .aggregator) + 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) - isActive = try container.decode(Bool.self, forKey: .isActive) + aggregator = try container.decode(String.self, forKey: .aggregator) uniqueExternalId = try container.decode(String.self, forKey: .uniqueExternalId) + + bankDetails = try container.decode(PayoutBankDetails.self, forKey: .bankDetails) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(users, forKey: .users) - try? container.encodeIfPresent(transferType, forKey: .transferType) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(bankDetails, forKey: .bankDetails) + try? container.encodeIfPresent(users, forKey: .users) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) try? container.encodeIfPresent(uniqueExternalId, forKey: .uniqueExternalId) + + try? container.encodeIfPresent(bankDetails, forKey: .bankDetails) } } } diff --git a/Sources/code/platform/models/PayoutResponsePlatformModelClass.swift b/Sources/code/platform/models/PayoutResponsePlatformModelClass.swift index 8c59499637..728ed54c17 100644 --- a/Sources/code/platform/models/PayoutResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/PayoutResponsePlatformModelClass.swift @@ -8,116 +8,116 @@ public extension PlatformClient { */ class PayoutResponse: Codable { - public var users: [String: Any] + public var uniqueTransferNo: String - public var success: Bool + public var payouts: [String: Any] - public var aggregator: String + public var paymentStatus: String public var transferType: String - public var bankDetails: [String: Any] - public var isActive: Bool - public var uniqueTransferNo: String + public var users: [String: Any] - public var created: Bool + public var aggregator: String - public var paymentStatus: String + public var success: Bool - public var payouts: [String: Any] + public var bankDetails: [String: Any] + + public var created: Bool public enum CodingKeys: String, CodingKey { - case users + case uniqueTransferNo = "unique_transfer_no" - case success + case payouts - case aggregator + case paymentStatus = "payment_status" case transferType = "transfer_type" - case bankDetails = "bank_details" - case isActive = "is_active" - case uniqueTransferNo = "unique_transfer_no" + case users - case created + case aggregator - case paymentStatus = "payment_status" + case success - case payouts + case bankDetails = "bank_details" + + case created } 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.users = users + self.uniqueTransferNo = uniqueTransferNo - self.success = success + self.payouts = payouts - self.aggregator = aggregator + self.paymentStatus = paymentStatus self.transferType = transferType - self.bankDetails = bankDetails - self.isActive = isActive - self.uniqueTransferNo = uniqueTransferNo + self.users = users - self.created = created + self.aggregator = aggregator - self.paymentStatus = paymentStatus + self.success = success - self.payouts = payouts + self.bankDetails = bankDetails + + self.created = created } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - users = try container.decode([String: Any].self, forKey: .users) + uniqueTransferNo = try container.decode(String.self, forKey: .uniqueTransferNo) - success = try container.decode(Bool.self, forKey: .success) + payouts = try container.decode([String: Any].self, forKey: .payouts) - aggregator = try container.decode(String.self, forKey: .aggregator) + paymentStatus = try container.decode(String.self, forKey: .paymentStatus) transferType = try container.decode(String.self, forKey: .transferType) - bankDetails = try container.decode([String: Any].self, forKey: .bankDetails) - isActive = try container.decode(Bool.self, forKey: .isActive) - uniqueTransferNo = try container.decode(String.self, forKey: .uniqueTransferNo) + users = try container.decode([String: Any].self, forKey: .users) - created = try container.decode(Bool.self, forKey: .created) + aggregator = try container.decode(String.self, forKey: .aggregator) - paymentStatus = try container.decode(String.self, forKey: .paymentStatus) + success = try container.decode(Bool.self, forKey: .success) - payouts = try container.decode([String: Any].self, forKey: .payouts) + bankDetails = try container.decode([String: Any].self, forKey: .bankDetails) + + created = try container.decode(Bool.self, forKey: .created) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(users, forKey: .users) + try? container.encodeIfPresent(uniqueTransferNo, forKey: .uniqueTransferNo) - try? container.encodeIfPresent(success, forKey: .success) + try? container.encodeIfPresent(payouts, forKey: .payouts) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) + try? container.encodeIfPresent(paymentStatus, forKey: .paymentStatus) try? container.encodeIfPresent(transferType, forKey: .transferType) - try? container.encodeIfPresent(bankDetails, forKey: .bankDetails) - try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(uniqueTransferNo, forKey: .uniqueTransferNo) + try? container.encodeIfPresent(users, forKey: .users) - try? container.encodeIfPresent(created, forKey: .created) + try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encodeIfPresent(paymentStatus, forKey: .paymentStatus) + try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(payouts, forKey: .payouts) + try? container.encodeIfPresent(bankDetails, forKey: .bankDetails) + + try? container.encodeIfPresent(created, forKey: .created) } } } diff --git a/Sources/code/platform/models/PayoutsResponsePlatformModelClass.swift b/Sources/code/platform/models/PayoutsResponsePlatformModelClass.swift index 9b4f74d79c..539cdd59b1 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 payoutsAggregators: [[String: Any]] + public var customers: [String: Any] - public var transferType: String + public var isDefault: Bool - public var customers: [String: Any] + public var transferType: String public var isActive: Bool + public var payoutsAggregators: [[String: Any]] + public var uniqueTransferNo: [String: Any] public var moreAttributes: [String: Any] - public var isDefault: Bool - public enum CodingKeys: String, CodingKey { - case payoutsAggregators = "payouts_aggregators" + case customers - case transferType = "transfer_type" + case isDefault = "is_default" - case customers + case transferType = "transfer_type" case isActive = "is_active" + case payoutsAggregators = "payouts_aggregators" + case uniqueTransferNo = "unique_transfer_no" case moreAttributes = "more_attributes" - - 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.payoutsAggregators = payoutsAggregators + self.customers = customers - self.transferType = transferType + self.isDefault = isDefault - self.customers = customers + self.transferType = transferType self.isActive = isActive + self.payoutsAggregators = payoutsAggregators + self.uniqueTransferNo = uniqueTransferNo self.moreAttributes = moreAttributes - - self.isDefault = isDefault } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - payoutsAggregators = try container.decode([[String: Any]].self, forKey: .payoutsAggregators) + customers = try container.decode([String: Any].self, forKey: .customers) - transferType = try container.decode(String.self, forKey: .transferType) + isDefault = try container.decode(Bool.self, forKey: .isDefault) - customers = try container.decode([String: Any].self, forKey: .customers) + transferType = try container.decode(String.self, forKey: .transferType) isActive = try container.decode(Bool.self, forKey: .isActive) + payoutsAggregators = try container.decode([[String: Any]].self, forKey: .payoutsAggregators) + uniqueTransferNo = try container.decode([String: Any].self, forKey: .uniqueTransferNo) moreAttributes = try container.decode([String: Any].self, forKey: .moreAttributes) - - 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(payoutsAggregators, forKey: .payoutsAggregators) + try? container.encodeIfPresent(customers, forKey: .customers) - try? container.encodeIfPresent(transferType, forKey: .transferType) + try? container.encodeIfPresent(isDefault, forKey: .isDefault) - try? container.encodeIfPresent(customers, forKey: .customers) + try? container.encodeIfPresent(transferType, forKey: .transferType) try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(payoutsAggregators, forKey: .payoutsAggregators) + try? container.encodeIfPresent(uniqueTransferNo, forKey: .uniqueTransferNo) try? container.encodeIfPresent(moreAttributes, forKey: .moreAttributes) - - try? container.encodeIfPresent(isDefault, forKey: .isDefault) } } } diff --git a/Sources/code/platform/models/Price1PlatformModelClass.swift b/Sources/code/platform/models/Price1PlatformModelClass.swift index 73dae3ad18..4ff3423511 100644 --- a/Sources/code/platform/models/Price1PlatformModelClass.swift +++ b/Sources/code/platform/models/Price1PlatformModelClass.swift @@ -8,31 +8,31 @@ public extension PlatformClient { */ class Price1: Codable { - public var currencySymbol: String? - public var max: Double? public var min: Double? + public var currencySymbol: String? + public var currencyCode: String? public enum CodingKeys: String, CodingKey { - case currencySymbol = "currency_symbol" - case max case min + case currencySymbol = "currency_symbol" + case currencyCode = "currency_code" } public init(currencyCode: String? = nil, currencySymbol: String? = nil, max: Double? = nil, min: Double? = nil) { - self.currencySymbol = currencySymbol - self.max = max self.min = min + self.currencySymbol = currencySymbol + self.currencyCode = currencyCode } @@ -40,7 +40,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - max = try container.decode(Double.self, forKey: .max) + min = try container.decode(Double.self, forKey: .min) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - min = try container.decode(Double.self, forKey: .min) + currencySymbol = try container.decode(String.self, forKey: .currencySymbol) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -75,12 +75,12 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) - try? container.encodeIfPresent(max, forKey: .max) try? container.encodeIfPresent(min, forKey: .min) + try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) + try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) } } diff --git a/Sources/code/platform/models/PricePlatformModelClass.swift b/Sources/code/platform/models/PricePlatformModelClass.swift index 50ebd54333..1b5f9c82c9 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 minEffective: Double? + public var currency: String? + + public var minMarked: Double? public var maxEffective: Double? - public var currency: String? + public var minEffective: Double? public var maxMarked: Double? - public var minMarked: Double? - public enum CodingKeys: String, CodingKey { - case minEffective = "min_effective" + case currency + + case minMarked = "min_marked" case maxEffective = "max_effective" - case currency + case minEffective = "min_effective" case maxMarked = "max_marked" - - case minMarked = "min_marked" } public init(currency: String? = nil, maxEffective: Double? = nil, maxMarked: Double? = nil, minEffective: Double? = nil, minMarked: Double? = nil) { - self.minEffective = minEffective + self.currency = currency + + self.minMarked = minMarked self.maxEffective = maxEffective - self.currency = currency + self.minEffective = minEffective self.maxMarked = maxMarked - - self.minMarked = minMarked } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - minEffective = try container.decode(Double.self, forKey: .minEffective) + 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 { - 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) @@ -62,7 +62,7 @@ public extension PlatformClient { } catch {} do { - currency = try container.decode(String.self, forKey: .currency) + maxEffective = try container.decode(Double.self, forKey: .maxEffective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -70,7 +70,7 @@ public extension PlatformClient { } 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) @@ -78,7 +78,7 @@ public extension PlatformClient { } catch {} do { - minMarked = try container.decode(Double.self, forKey: .minMarked) + maxMarked = try container.decode(Double.self, forKey: .maxMarked) } 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(minEffective, forKey: .minEffective) + try? container.encodeIfPresent(currency, forKey: .currency) + + try? container.encodeIfPresent(minMarked, forKey: .minMarked) try? container.encodeIfPresent(maxEffective, forKey: .maxEffective) - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(minEffective, forKey: .minEffective) try? container.encodeIfPresent(maxMarked, forKey: .maxMarked) - - try? container.encodeIfPresent(minMarked, forKey: .minMarked) } } } diff --git a/Sources/code/platform/models/ProdcutTemplateCategoriesResponsePlatformModelClass.swift b/Sources/code/platform/models/ProdcutTemplateCategoriesResponsePlatformModelClass.swift index 1b6939cd17..8599d981e9 100644 --- a/Sources/code/platform/models/ProdcutTemplateCategoriesResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/ProdcutTemplateCategoriesResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ProdcutTemplateCategoriesResponse: Codable { - public var items: [[String: Any]]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [[String: Any]]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [[String: Any]]? = 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([[String: Any]].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([[String: Any]].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/ProductBrandPlatformModelClass.swift b/Sources/code/platform/models/ProductBrandPlatformModelClass.swift index b7b0ea8748..14d61deca1 100644 --- a/Sources/code/platform/models/ProductBrandPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBrandPlatformModelClass.swift @@ -10,30 +10,30 @@ public extension PlatformClient { class ProductBrand: Codable { public var logo: Media1? + public var uid: Int? + public var action: Action? public var name: String? - public var uid: Int? - public enum CodingKeys: String, CodingKey { case logo + case uid + case action case name - - case uid } public init(action: Action? = nil, logo: Media1? = nil, name: String? = nil, uid: Int? = nil) { self.logo = logo + self.uid = uid + self.action = action self.name = name - - self.uid = uid } required public init(from decoder: Decoder) throws { @@ -48,7 +48,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) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,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) @@ -77,11 +77,11 @@ public extension PlatformClient { try? container.encodeIfPresent(logo, forKey: .logo) + try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(action, forKey: .action) try? container.encodeIfPresent(name, forKey: .name) - - try? container.encodeIfPresent(uid, forKey: .uid) } } } diff --git a/Sources/code/platform/models/ProductBulkAssetsPlatformModelClass.swift b/Sources/code/platform/models/ProductBulkAssetsPlatformModelClass.swift index a347dae80d..c0d751caee 100644 --- a/Sources/code/platform/models/ProductBulkAssetsPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBulkAssetsPlatformModelClass.swift @@ -8,35 +8,31 @@ public extension PlatformClient { */ class ProductBulkAssets: Codable { - public var url: String + public var companyId: Int? public var user: [String: Any] - public var companyId: Int? + public var url: String public enum CodingKeys: String, CodingKey { - case url + case companyId = "company_id" case user - case companyId = "company_id" + case url } public init(companyId: Int? = nil, url: String, user: [String: Any]) { - self.url = url + self.companyId = companyId self.user = user - self.companyId = companyId + self.url = url } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - url = try container.decode(String.self, forKey: .url) - - user = try container.decode([String: Any].self, forKey: .user) - do { companyId = try container.decode(Int.self, forKey: .companyId) @@ -44,16 +40,20 @@ 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(url, forKey: .url) + try? container.encodeIfPresent(companyId, forKey: .companyId) try? container.encodeIfPresent(user, forKey: .user) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(url, forKey: .url) } } } diff --git a/Sources/code/platform/models/ProductBulkRequestListPlatformModelClass.swift b/Sources/code/platform/models/ProductBulkRequestListPlatformModelClass.swift index 2a1ca800ca..1f9b874dce 100644 --- a/Sources/code/platform/models/ProductBulkRequestListPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBulkRequestListPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ProductBulkRequestList: Codable { - public var items: ProductBulkRequest? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: ProductBulkRequest? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: ProductBulkRequest? = 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(ProductBulkRequest.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(ProductBulkRequest.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/ProductBulkRequestPlatformModelClass.swift b/Sources/code/platform/models/ProductBulkRequestPlatformModelClass.swift index 94cb8bb2bf..c3874803d1 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 filePath: String? - - public var failedRecords: [String]? + public var template: ProductTemplate? public var total: Int? + public var modifiedOn: String? + public var companyId: Int? - public var modifiedBy: UserDetail? + public var failed: Int? - public var isActive: Bool? + public var createdBy: UserDetail? - public var template: ProductTemplate? + public var modifiedBy: UserDetail? public var createdOn: String? - public var failed: Int? + public var stage: String? - public var createdBy: UserDetail? + public var cancelled: Int? - public var succeed: Int? + public var cancelledRecords: [String]? - public var templateTag: String? + public var failedRecords: [String]? - public var cancelled: Int? + public var templateTag: String? - public var cancelledRecords: [String]? + public var succeed: Int? - public var stage: String? + public var isActive: Bool? - public var modifiedOn: String? + public var filePath: String? public enum CodingKeys: String, CodingKey { - case filePath = "file_path" - - case failedRecords = "failed_records" + case template case total + case modifiedOn = "modified_on" + case companyId = "company_id" - case modifiedBy = "modified_by" + case failed - case isActive = "is_active" + case createdBy = "created_by" - case template + case modifiedBy = "modified_by" case createdOn = "created_on" - case failed + case stage - case createdBy = "created_by" + case cancelled - case succeed + case cancelledRecords = "cancelled_records" - case templateTag = "template_tag" + case failedRecords = "failed_records" - case cancelled + case templateTag = "template_tag" - case cancelledRecords = "cancelled_records" + case succeed - case stage + case isActive = "is_active" - case modifiedOn = "modified_on" + case filePath = "file_path" } 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.filePath = filePath - - self.failedRecords = failedRecords + self.template = template self.total = total + self.modifiedOn = modifiedOn + self.companyId = companyId - self.modifiedBy = modifiedBy + self.failed = failed - self.isActive = isActive + self.createdBy = createdBy - self.template = template + self.modifiedBy = modifiedBy self.createdOn = createdOn - self.failed = failed + self.stage = stage - self.createdBy = createdBy + self.cancelled = cancelled - self.succeed = succeed + self.cancelledRecords = cancelledRecords - self.templateTag = templateTag + self.failedRecords = failedRecords - self.cancelled = cancelled + self.templateTag = templateTag - self.cancelledRecords = cancelledRecords + self.succeed = succeed - self.stage = stage + self.isActive = isActive - self.modifiedOn = modifiedOn + self.filePath = filePath } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - filePath = try container.decode(String.self, forKey: .filePath) + template = try container.decode(ProductTemplate.self, forKey: .template) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -120,7 +120,7 @@ public extension PlatformClient { } catch {} do { - failedRecords = try container.decode([String].self, forKey: .failedRecords) + total = try container.decode(Int.self, forKey: .total) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +128,7 @@ public extension PlatformClient { } catch {} do { - total = try container.decode(Int.self, forKey: .total) + 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 { - modifiedBy = try container.decode(UserDetail.self, forKey: .modifiedBy) + failed = try container.decode(Int.self, forKey: .failed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +152,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + createdBy = try container.decode(UserDetail.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -160,7 +160,7 @@ public extension PlatformClient { } catch {} do { - template = try container.decode(ProductTemplate.self, forKey: .template) + modifiedBy = try container.decode(UserDetail.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 { - failed = try container.decode(Int.self, forKey: .failed) + stage = try container.decode(String.self, forKey: .stage) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -184,7 +184,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(UserDetail.self, forKey: .createdBy) + cancelled = try container.decode(Int.self, forKey: .cancelled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -192,7 +192,7 @@ public extension PlatformClient { } catch {} do { - succeed = try container.decode(Int.self, forKey: .succeed) + cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -200,7 +200,7 @@ public extension PlatformClient { } catch {} do { - templateTag = try container.decode(String.self, forKey: .templateTag) + failedRecords = try container.decode([String].self, forKey: .failedRecords) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -208,7 +208,7 @@ public extension PlatformClient { } catch {} do { - cancelled = try container.decode(Int.self, forKey: .cancelled) + 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 { - cancelledRecords = try container.decode([String].self, forKey: .cancelledRecords) + succeed = try container.decode(Int.self, forKey: .succeed) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -224,7 +224,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) @@ -232,7 +232,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + filePath = try container.decode(String.self, forKey: .filePath) } 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(filePath, forKey: .filePath) - - try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) + try? container.encodeIfPresent(template, forKey: .template) try? container.encodeIfPresent(total, forKey: .total) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(failed, forKey: .failed) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(template, forKey: .template) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(failed, forKey: .failed) + try? container.encodeIfPresent(stage, forKey: .stage) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(cancelled, forKey: .cancelled) - try? container.encodeIfPresent(succeed, forKey: .succeed) + try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) - try? container.encodeIfPresent(templateTag, forKey: .templateTag) + try? container.encodeIfPresent(failedRecords, forKey: .failedRecords) - try? container.encodeIfPresent(cancelled, forKey: .cancelled) + try? container.encodeIfPresent(templateTag, forKey: .templateTag) - try? container.encodeIfPresent(cancelledRecords, forKey: .cancelledRecords) + try? container.encodeIfPresent(succeed, forKey: .succeed) - try? container.encodeIfPresent(stage, forKey: .stage) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(filePath, forKey: .filePath) } } } diff --git a/Sources/code/platform/models/ProductBundleItemPlatformModelClass.swift b/Sources/code/platform/models/ProductBundleItemPlatformModelClass.swift index 385ef0b73b..e566958ac7 100644 --- a/Sources/code/platform/models/ProductBundleItemPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBundleItemPlatformModelClass.swift @@ -8,51 +8,55 @@ public extension PlatformClient { */ class ProductBundleItem: Codable { - public var autoSelect: Bool? - - public var autoAddToCart: Bool? - public var maxQuantity: Int - public var minQuantity: Int + public var productUid: Int public var allowRemove: Bool? - public var productUid: Int + public var autoAddToCart: Bool? - public enum CodingKeys: String, CodingKey { - case autoSelect = "auto_select" + public var minQuantity: Int - case autoAddToCart = "auto_add_to_cart" + public var autoSelect: Bool? + public enum CodingKeys: String, CodingKey { case maxQuantity = "max_quantity" - case minQuantity = "min_quantity" + case productUid = "product_uid" case allowRemove = "allow_remove" - case productUid = "product_uid" - } + case autoAddToCart = "auto_add_to_cart" - public init(allowRemove: Bool? = nil, autoAddToCart: Bool? = nil, autoSelect: Bool? = nil, maxQuantity: Int, minQuantity: Int, productUid: Int) { - self.autoSelect = autoSelect + case minQuantity = "min_quantity" - self.autoAddToCart = autoAddToCart + 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.minQuantity = minQuantity + self.productUid = productUid self.allowRemove = allowRemove - self.productUid = productUid + self.autoAddToCart = autoAddToCart + + self.minQuantity = minQuantity + + self.autoSelect = autoSelect } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + maxQuantity = try container.decode(Int.self, forKey: .maxQuantity) + + 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) @@ -67,35 +71,31 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - 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) + autoSelect = try container.decode(Bool.self, forKey: .autoSelect) } 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) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(autoSelect, forKey: .autoSelect) - - try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) - try? container.encodeIfPresent(maxQuantity, forKey: .maxQuantity) - try? container.encodeIfPresent(minQuantity, forKey: .minQuantity) + try? container.encodeIfPresent(productUid, forKey: .productUid) try? container.encodeIfPresent(allowRemove, forKey: .allowRemove) - try? container.encodeIfPresent(productUid, forKey: .productUid) + try? container.encodeIfPresent(autoAddToCart, forKey: .autoAddToCart) + + try? container.encodeIfPresent(minQuantity, forKey: .minQuantity) + + try? container.encodeIfPresent(autoSelect, forKey: .autoSelect) } } } diff --git a/Sources/code/platform/models/ProductBundleRequestPlatformModelClass.swift b/Sources/code/platform/models/ProductBundleRequestPlatformModelClass.swift index b984f70134..2774e441ac 100644 --- a/Sources/code/platform/models/ProductBundleRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBundleRequestPlatformModelClass.swift @@ -8,93 +8,93 @@ public extension PlatformClient { */ class ProductBundleRequest: Codable { - public var modifiedOn: String? + public var sameStoreAssignment: Bool? public var name: String public var choice: String - public var sameStoreAssignment: Bool? + public var products: [ProductBundleItem] - public var pageVisibility: [String]? + public var createdBy: [String: Any]? public var modifiedBy: [String: Any]? - public var logo: String? - public var isActive: Bool public var createdOn: String? - public var createdBy: [String: Any]? + public var pageVisibility: [String]? - public var products: [ProductBundleItem] + public var logo: String? - public var meta: [String: Any]? + public var modifiedOn: String? public var slug: String + public var meta: [String: Any]? + public enum CodingKeys: String, CodingKey { - case modifiedOn = "modified_on" + case sameStoreAssignment = "same_store_assignment" case name case choice - case sameStoreAssignment = "same_store_assignment" + case products - case pageVisibility = "page_visibility" + case createdBy = "created_by" case modifiedBy = "modified_by" - case logo - case isActive = "is_active" case createdOn = "created_on" - case createdBy = "created_by" + case pageVisibility = "page_visibility" - case products + case logo - case meta + case modifiedOn = "modified_on" case slug + + case meta } 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.modifiedOn = modifiedOn + self.sameStoreAssignment = sameStoreAssignment self.name = name self.choice = choice - self.sameStoreAssignment = sameStoreAssignment + self.products = products - self.pageVisibility = pageVisibility + self.createdBy = createdBy self.modifiedBy = modifiedBy - self.logo = logo - self.isActive = isActive self.createdOn = createdOn - self.createdBy = createdBy + self.pageVisibility = pageVisibility - self.products = products + self.logo = logo - self.meta = meta + self.modifiedOn = modifiedOn self.slug = slug + + self.meta = meta } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -105,8 +105,10 @@ public extension PlatformClient { choice = try container.decode(String.self, forKey: .choice) + products = try container.decode([ProductBundleItem].self, forKey: .products) + do { - sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,15 +116,17 @@ public extension PlatformClient { } catch {} do { - pageVisibility = try container.decode([String].self, forKey: .pageVisibility) + modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) } 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 { - modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,17 +134,15 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(String.self, forKey: .logo) + pageVisibility = try container.decode([String].self, forKey: .pageVisibility) } 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 { - createdOn = try container.decode(String.self, forKey: .createdOn) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -148,14 +150,14 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + 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 {} - products = try container.decode([ProductBundleItem].self, forKey: .products) + slug = try container.decode(String.self, forKey: .slug) do { meta = try container.decode([String: Any].self, forKey: .meta) @@ -164,38 +166,36 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - slug = try container.decode(String.self, forKey: .slug) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(choice, forKey: .choice) - try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) + try? container.encodeIfPresent(products, forKey: .products) - try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encode(logo, forKey: .logo) - try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) - try? container.encodeIfPresent(products, forKey: .products) + try? container.encode(logo, forKey: .logo) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(meta, forKey: .meta) } } } diff --git a/Sources/code/platform/models/ProductBundleUpdateRequestPlatformModelClass.swift b/Sources/code/platform/models/ProductBundleUpdateRequestPlatformModelClass.swift index c5df2f7bc0..bd18813261 100644 --- a/Sources/code/platform/models/ProductBundleUpdateRequestPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductBundleUpdateRequestPlatformModelClass.swift @@ -8,81 +8,81 @@ public extension PlatformClient { */ class ProductBundleUpdateRequest: Codable { - public var modifiedOn: String? + public var sameStoreAssignment: Bool? public var name: String public var choice: String - public var sameStoreAssignment: Bool? - - public var pageVisibility: [String]? + public var products: [ProductBundleItem] public var modifiedBy: [String: Any]? - public var logo: String? - public var isActive: Bool - public var products: [ProductBundleItem] + public var pageVisibility: [String]? - public var meta: [String: Any]? + public var logo: String? + + public var modifiedOn: String? public var slug: String + public var meta: [String: Any]? + public enum CodingKeys: String, CodingKey { - case modifiedOn = "modified_on" + case sameStoreAssignment = "same_store_assignment" case name case choice - case sameStoreAssignment = "same_store_assignment" - - case pageVisibility = "page_visibility" + case products case modifiedBy = "modified_by" - case logo - case isActive = "is_active" - case products + case pageVisibility = "page_visibility" - case meta + case logo + + case modifiedOn = "modified_on" case slug + + case meta } 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.modifiedOn = modifiedOn + self.sameStoreAssignment = sameStoreAssignment self.name = name self.choice = choice - self.sameStoreAssignment = sameStoreAssignment - - self.pageVisibility = pageVisibility + self.products = products self.modifiedBy = modifiedBy - self.logo = logo - self.isActive = isActive - self.products = products + self.pageVisibility = pageVisibility - self.meta = meta + self.logo = logo + + self.modifiedOn = modifiedOn self.slug = slug + + self.meta = meta } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -93,14 +93,18 @@ public extension PlatformClient { choice = try container.decode(String.self, forKey: .choice) + products = try container.decode([ProductBundleItem].self, forKey: .products) + do { - sameStoreAssignment = try container.decode(Bool.self, forKey: .sameStoreAssignment) + modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) } 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 { pageVisibility = try container.decode([String].self, forKey: .pageVisibility) @@ -110,7 +114,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) + logo = try container.decode(String.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -118,16 +122,14 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(String.self, forKey: .logo) + 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) - - products = try container.decode([ProductBundleItem].self, forKey: .products) + slug = try container.decode(String.self, forKey: .slug) do { meta = try container.decode([String: Any].self, forKey: .meta) @@ -136,34 +138,32 @@ public extension PlatformClient { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} - - slug = try container.decode(String.self, forKey: .slug) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(choice, forKey: .choice) - try? container.encodeIfPresent(sameStoreAssignment, forKey: .sameStoreAssignment) - - try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) + try? container.encodeIfPresent(products, forKey: .products) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encode(logo, forKey: .logo) - try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(products, forKey: .products) + try? container.encodeIfPresent(pageVisibility, forKey: .pageVisibility) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encode(logo, forKey: .logo) + + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(meta, forKey: .meta) } } } diff --git a/Sources/code/platform/models/ProductConfigurationDownloadsPlatformModelClass.swift b/Sources/code/platform/models/ProductConfigurationDownloadsPlatformModelClass.swift index f4feabc12c..761d39ecba 100644 --- a/Sources/code/platform/models/ProductConfigurationDownloadsPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductConfigurationDownloadsPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ProductConfigurationDownloads: Codable { - public var multivalue: Bool? - public var data: [[String: Any]]? - public enum CodingKeys: String, CodingKey { - case multivalue + public var multivalue: Bool? + public enum CodingKeys: String, CodingKey { case data + + case multivalue } public init(data: [[String: Any]]? = nil, multivalue: Bool? = nil) { - self.multivalue = multivalue - self.data = data + + self.multivalue = multivalue } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - multivalue = try container.decode(Bool.self, forKey: .multivalue) + 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) + multivalue = try container.decode(Bool.self, forKey: .multivalue) } 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(multivalue, forKey: .multivalue) - try? container.encodeIfPresent(data, forKey: .data) + + try? container.encodeIfPresent(multivalue, forKey: .multivalue) } } } diff --git a/Sources/code/platform/models/ProductCreateUpdatePlatformModelClass.swift b/Sources/code/platform/models/ProductCreateUpdatePlatformModelClass.swift index 91735411d1..23c15e2635 100644 --- a/Sources/code/platform/models/ProductCreateUpdatePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductCreateUpdatePlatformModelClass.swift @@ -8,251 +8,253 @@ public extension PlatformClient { */ class ProductCreateUpdate: Codable { - public var trader: [Trader] + public var companyId: Int - public var requester: String? + public var shortDescription: String? + + public var taxIdentifier: TaxIdentifier public var changeRequestId: String? - public var media: [Media1]? + public var uid: Int? - public var isDependent: Bool? + public var requester: String? public var returnConfig: ReturnConfig - public var isImageLessProduct: Bool? - - public var brandUid: Int + public var customOrder: CustomOrder? - public var currency: String + public var sizeGuide: String? - public var bulkJobId: String? + public var brandUid: Int - public var isActive: Bool? + public var productGroupTag: [String]? - public var variants: [String: Any]? + public var isSet: Bool? - public var description: String? + public var name: String - public var customOrder: CustomOrder? + public var multiSize: Bool? - public var categorySlug: String + public var bulkJobId: String? - public var uid: Int? + public var media: [Media1]? - public var slug: String + public var action: String? - public var tags: [String]? + public var itemCode: String - public var customJson: [String: Any]? + public var noOfBoxes: Int? - public var name: String + public var description: String? - public var highlights: [String]? + public var tags: [String]? public var itemType: String - public var itemCode: String + public var isActive: Bool? - public var teaserTag: TeaserTag? + public var departments: [Int] - public var noOfBoxes: Int? + public var highlights: [String]? - public var multiSize: Bool? + public var countryOfOrigin: String - public var moq: OrderQuantity? + public var trader: [Trader] - public var shortDescription: String? + public var moq: OrderQuantity? - public var taxIdentifier: TaxIdentifier + public var categorySlug: String - public var countryOfOrigin: String + public var templateTag: String - public var companyId: Int + public var customJson: [String: Any]? - public var productPublish: ProductPublish? + public var isDependent: Bool? - public var departments: [Int] + public var variants: [String: Any]? - public var productGroupTag: [String]? + public var currency: String - public var action: String? + public var teaserTag: TeaserTag? - public var sizeGuide: String? + public var isImageLessProduct: Bool? - public var isSet: Bool? + public var slug: String - public var templateTag: String + public var productPublish: ProductPublish? public enum CodingKeys: String, CodingKey { - case trader + case companyId = "company_id" - case requester + case shortDescription = "short_description" + + case taxIdentifier = "tax_identifier" case changeRequestId = "change_request_id" - case media + case uid - case isDependent = "is_dependent" + case requester case returnConfig = "return_config" - case isImageLessProduct = "is_image_less_product" - - case brandUid = "brand_uid" + case customOrder = "custom_order" - case currency + case sizeGuide = "size_guide" - case bulkJobId = "bulk_job_id" + case brandUid = "brand_uid" - case isActive = "is_active" + case productGroupTag = "product_group_tag" - case variants + case isSet = "is_set" - case description + case name - case customOrder = "custom_order" + case multiSize = "multi_size" - case categorySlug = "category_slug" + case bulkJobId = "bulk_job_id" - case uid + case media - case slug + case action - case tags + case itemCode = "item_code" - case customJson = "_custom_json" + case noOfBoxes = "no_of_boxes" - case name + case description - case highlights + case tags case itemType = "item_type" - case itemCode = "item_code" + case isActive = "is_active" - case teaserTag = "teaser_tag" + case departments - case noOfBoxes = "no_of_boxes" + case highlights - case multiSize = "multi_size" + case countryOfOrigin = "country_of_origin" - case moq + case trader - case shortDescription = "short_description" + case moq - case taxIdentifier = "tax_identifier" + case categorySlug = "category_slug" - case countryOfOrigin = "country_of_origin" + case templateTag = "template_tag" - case companyId = "company_id" + case customJson = "_custom_json" - case productPublish = "product_publish" + case isDependent = "is_dependent" - case departments + case variants - case productGroupTag = "product_group_tag" + case currency - case action + case teaserTag = "teaser_tag" - case sizeGuide = "size_guide" + case isImageLessProduct = "is_image_less_product" - case isSet = "is_set" + case slug - case templateTag = "template_tag" + case productPublish = "product_publish" } 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, 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, taxIdentifier: TaxIdentifier, teaserTag: TeaserTag? = nil, templateTag: String, trader: [Trader], uid: Int? = nil, variants: [String: Any]? = nil, customJson: [String: Any]? = nil) { - self.trader = trader + self.companyId = companyId - self.requester = requester + self.shortDescription = shortDescription + + self.taxIdentifier = taxIdentifier self.changeRequestId = changeRequestId - self.media = media + self.uid = uid - self.isDependent = isDependent + self.requester = requester self.returnConfig = returnConfig - self.isImageLessProduct = isImageLessProduct - - self.brandUid = brandUid + self.customOrder = customOrder - self.currency = currency + self.sizeGuide = sizeGuide - self.bulkJobId = bulkJobId + self.brandUid = brandUid - self.isActive = isActive + self.productGroupTag = productGroupTag - self.variants = variants + self.isSet = isSet - self.description = description + self.name = name - self.customOrder = customOrder + self.multiSize = multiSize - self.categorySlug = categorySlug + self.bulkJobId = bulkJobId - self.uid = uid + self.media = media - self.slug = slug + self.action = action - self.tags = tags + self.itemCode = itemCode - self.customJson = customJson + self.noOfBoxes = noOfBoxes - self.name = name + self.description = description - self.highlights = highlights + self.tags = tags self.itemType = itemType - self.itemCode = itemCode + self.isActive = isActive - self.teaserTag = teaserTag + self.departments = departments - self.noOfBoxes = noOfBoxes + self.highlights = highlights - self.multiSize = multiSize + self.countryOfOrigin = countryOfOrigin - self.moq = moq + self.trader = trader - self.shortDescription = shortDescription + self.moq = moq - self.taxIdentifier = taxIdentifier + self.categorySlug = categorySlug - self.countryOfOrigin = countryOfOrigin + self.templateTag = templateTag - self.companyId = companyId + self.customJson = customJson - self.productPublish = productPublish + self.isDependent = isDependent - self.departments = departments + self.variants = variants - self.productGroupTag = productGroupTag + self.currency = currency - self.action = action + self.teaserTag = teaserTag - self.sizeGuide = sizeGuide + self.isImageLessProduct = isImageLessProduct - self.isSet = isSet + self.slug = slug - self.templateTag = templateTag + self.productPublish = productPublish } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - trader = try container.decode([Trader].self, forKey: .trader) + companyId = try container.decode(Int.self, forKey: .companyId) do { - requester = try container.decode(String.self, forKey: .requester) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) + do { changeRequestId = try container.decode(String.self, forKey: .changeRequestId) @@ -262,7 +264,7 @@ public extension PlatformClient { } catch {} do { - media = try container.decode([Media1].self, forKey: .media) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -270,7 +272,7 @@ public extension PlatformClient { } catch {} do { - isDependent = try container.decode(Bool.self, forKey: .isDependent) + requester = try container.decode(String.self, forKey: .requester) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -280,27 +282,25 @@ public extension PlatformClient { returnConfig = try container.decode(ReturnConfig.self, forKey: .returnConfig) do { - isImageLessProduct = try container.decode(Bool.self, forKey: .isImageLessProduct) + 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 {} - brandUid = try container.decode(Int.self, forKey: .brandUid) - - currency = try container.decode(String.self, forKey: .currency) - do { - bulkJobId = try container.decode(String.self, forKey: .bulkJobId) + 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 {} + brandUid = try container.decode(Int.self, forKey: .brandUid) + do { - isActive = try container.decode(Bool.self, forKey: .isActive) + productGroupTag = try container.decode([String].self, forKey: .productGroupTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -308,15 +308,17 @@ public extension PlatformClient { } catch {} do { - variants = try container.decode([String: Any].self, forKey: .variants) + 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 {} + name = try container.decode(String.self, forKey: .name) + do { - description = try container.decode(String.self, forKey: .description) + multiSize = try container.decode(Bool.self, forKey: .multiSize) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -324,79 +326,79 @@ public extension PlatformClient { } catch {} do { - customOrder = try container.decode(CustomOrder.self, forKey: .customOrder) + bulkJobId = try container.decode(String.self, forKey: .bulkJobId) } 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 { - uid = try container.decode(Int.self, forKey: .uid) + media = try container.decode([Media1].self, forKey: .media) } 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 { - 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) print("codingPath:", context.codingPath) } catch {} + itemCode = try container.decode(String.self, forKey: .itemCode) + do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + 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 {} - name = try container.decode(String.self, forKey: .name) - do { - highlights = try container.decode([String].self, forKey: .highlights) + 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 {} - itemType = try container.decode(String.self, forKey: .itemType) - - itemCode = try container.decode(String.self, forKey: .itemCode) - do { - teaserTag = try container.decode(TeaserTag.self, forKey: .teaserTag) + 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 {} + itemType = try container.decode(String.self, forKey: .itemType) + do { - noOfBoxes = try container.decode(Int.self, forKey: .noOfBoxes) + 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 {} + departments = try container.decode([Int].self, forKey: .departments) + do { - multiSize = try container.decode(Bool.self, forKey: .multiSize) + 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 {} + countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) + + trader = try container.decode([Trader].self, forKey: .trader) + do { moq = try container.decode(OrderQuantity.self, forKey: .moq) @@ -405,40 +407,38 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + categorySlug = try container.decode(String.self, forKey: .categorySlug) + + templateTag = try container.decode(String.self, forKey: .templateTag) + do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + 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 {} - taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) - - countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) - - companyId = try container.decode(Int.self, forKey: .companyId) - do { - productPublish = try container.decode(ProductPublish.self, forKey: .productPublish) + isDependent = try container.decode(Bool.self, forKey: .isDependent) } 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 { - productGroupTag = try container.decode([String].self, forKey: .productGroupTag) + 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 {} + currency = try container.decode(String.self, forKey: .currency) + do { - action = try container.decode(String.self, forKey: .action) + teaserTag = try container.decode(TeaserTag.self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -446,102 +446,102 @@ public extension PlatformClient { } catch {} do { - sizeGuide = try container.decode(String.self, forKey: .sizeGuide) + isImageLessProduct = try container.decode(Bool.self, forKey: .isImageLessProduct) } 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 { - isSet = try container.decode(Bool.self, forKey: .isSet) + productPublish = try container.decode(ProductPublish.self, forKey: .productPublish) } 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) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(trader, forKey: .trader) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(requester, forKey: .requester) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + + try? container.encodeIfPresent(taxIdentifier, forKey: .taxIdentifier) try? container.encode(changeRequestId, forKey: .changeRequestId) - try? container.encode(media, forKey: .media) + try? container.encode(uid, forKey: .uid) - try? container.encodeIfPresent(isDependent, forKey: .isDependent) + try? container.encodeIfPresent(requester, forKey: .requester) try? container.encodeIfPresent(returnConfig, forKey: .returnConfig) - try? container.encodeIfPresent(isImageLessProduct, forKey: .isImageLessProduct) - - try? container.encodeIfPresent(brandUid, forKey: .brandUid) + try? container.encodeIfPresent(customOrder, forKey: .customOrder) - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) - try? container.encodeIfPresent(bulkJobId, forKey: .bulkJobId) + try? container.encodeIfPresent(brandUid, forKey: .brandUid) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(productGroupTag, forKey: .productGroupTag) - try? container.encodeIfPresent(variants, forKey: .variants) + try? container.encodeIfPresent(isSet, forKey: .isSet) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(customOrder, forKey: .customOrder) + try? container.encodeIfPresent(multiSize, forKey: .multiSize) - try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) + try? container.encodeIfPresent(bulkJobId, forKey: .bulkJobId) - try? container.encode(uid, forKey: .uid) + try? container.encode(media, forKey: .media) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(tags, forKey: .tags) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(noOfBoxes, forKey: .noOfBoxes) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encode(highlights, forKey: .highlights) + try? container.encodeIfPresent(tags, forKey: .tags) try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + try? container.encodeIfPresent(departments, forKey: .departments) - try? container.encodeIfPresent(noOfBoxes, forKey: .noOfBoxes) + try? container.encode(highlights, forKey: .highlights) - try? container.encodeIfPresent(multiSize, forKey: .multiSize) + try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) - try? container.encodeIfPresent(moq, forKey: .moq) + try? container.encodeIfPresent(trader, forKey: .trader) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(moq, forKey: .moq) - try? container.encodeIfPresent(taxIdentifier, forKey: .taxIdentifier) + try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) - try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) + try? container.encodeIfPresent(templateTag, forKey: .templateTag) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(productPublish, forKey: .productPublish) + try? container.encodeIfPresent(isDependent, forKey: .isDependent) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(variants, forKey: .variants) - try? container.encodeIfPresent(productGroupTag, forKey: .productGroupTag) + try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) - try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) + try? container.encodeIfPresent(isImageLessProduct, forKey: .isImageLessProduct) - try? container.encodeIfPresent(isSet, forKey: .isSet) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(templateTag, forKey: .templateTag) + try? container.encodeIfPresent(productPublish, forKey: .productPublish) } } } diff --git a/Sources/code/platform/models/ProductDetailAttributePlatformModelClass.swift b/Sources/code/platform/models/ProductDetailAttributePlatformModelClass.swift index e7594f8696..48857d5949 100644 --- a/Sources/code/platform/models/ProductDetailAttributePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductDetailAttributePlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class ProductDetailAttribute: Codable { - public var type: String? + public var value: String? public var key: String? - public var value: String? + public var type: String? public enum CodingKeys: String, CodingKey { - case type + case value case key - case value + case type } public init(key: String? = nil, type: String? = nil, value: String? = nil) { - self.type = type + self.value = value self.key = key - self.value = value + 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) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} 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) @@ -61,11 +61,11 @@ 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(value, forKey: .value) try? container.encodeIfPresent(key, forKey: .key) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(type, forKey: .type) } } } diff --git a/Sources/code/platform/models/ProductDetailPlatformModelClass.swift b/Sources/code/platform/models/ProductDetailPlatformModelClass.swift index e083f15a07..ae9a6d0197 100644 --- a/Sources/code/platform/models/ProductDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductDetailPlatformModelClass.swift @@ -8,153 +8,153 @@ public extension PlatformClient { */ class ProductDetail: Codable { - public var brand: ProductBrand? + public var tryouts: [String]? - public var ratingCount: Int? + public var medias: [Media1]? + + public var shortDescription: String? public var similars: [String]? - public var imageNature: String? + public var uid: Int? - public var hasVariant: Bool? + public var name: String? - public var color: String? + public var brand: ProductBrand? - public var rating: Double? + public var itemCode: String? public var description: String? - public var uid: Int? + public var imageNature: String? - public var slug: String + public var rating: Double? - public var promoMeta: [String: Any]? + public var itemType: String? - public var name: String? + public var groupedAttributes: [ProductDetailGroupedAttribute]? - public var highlights: [String]? + public var attributes: [String: Any]? - public var itemType: String? + public var highlights: [String]? - public var medias: [Media1]? + public var productOnlineDate: String? - public var itemCode: String? + public var ratingCount: Int? public var teaserTag: [String: Any]? - public var shortDescription: String? - - public var tryouts: [String]? + public var color: String? public var type: String? - public var productOnlineDate: String? + public var promoMeta: [String: Any]? - public var groupedAttributes: [ProductDetailGroupedAttribute]? + public var hasVariant: Bool? - public var attributes: [String: Any]? + public var slug: String public enum CodingKeys: String, CodingKey { - case brand + case tryouts - case ratingCount = "rating_count" + case medias + + case shortDescription = "short_description" case similars - case imageNature = "image_nature" + case uid - case hasVariant = "has_variant" + case name - case color + case brand - case rating + case itemCode = "item_code" case description - case uid + case imageNature = "image_nature" - case slug + case rating - case promoMeta = "promo_meta" + case itemType = "item_type" - case name + case groupedAttributes = "grouped_attributes" - case highlights + case attributes - case itemType = "item_type" + case highlights - case medias + case productOnlineDate = "product_online_date" - case itemCode = "item_code" + case ratingCount = "rating_count" case teaserTag = "teaser_tag" - case shortDescription = "short_description" - - case tryouts + case color case type - case productOnlineDate = "product_online_date" + case promoMeta = "promo_meta" - case groupedAttributes = "grouped_attributes" + case hasVariant = "has_variant" - case attributes + case slug } 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.brand = brand + self.tryouts = tryouts - self.ratingCount = ratingCount + self.medias = medias + + self.shortDescription = shortDescription self.similars = similars - self.imageNature = imageNature + self.uid = uid - self.hasVariant = hasVariant + self.name = name - self.color = color + self.brand = brand - self.rating = rating + self.itemCode = itemCode self.description = description - self.uid = uid + self.imageNature = imageNature - self.slug = slug + self.rating = rating - self.promoMeta = promoMeta + self.itemType = itemType - self.name = name + self.groupedAttributes = groupedAttributes - self.highlights = highlights + self.attributes = attributes - self.itemType = itemType + self.highlights = highlights - self.medias = medias + self.productOnlineDate = productOnlineDate - self.itemCode = itemCode + self.ratingCount = ratingCount self.teaserTag = teaserTag - self.shortDescription = shortDescription - - self.tryouts = tryouts + self.color = color self.type = type - self.productOnlineDate = productOnlineDate + self.promoMeta = promoMeta - self.groupedAttributes = groupedAttributes + self.hasVariant = hasVariant - self.attributes = attributes + self.slug = slug } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - brand = try container.decode(ProductBrand.self, forKey: .brand) + tryouts = try container.decode([String].self, forKey: .tryouts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - ratingCount = try container.decode(Int.self, forKey: .ratingCount) + medias = try container.decode([Media1].self, forKey: .medias) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +170,7 @@ public extension PlatformClient { } catch {} do { - similars = try container.decode([String].self, forKey: .similars) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -178,7 +178,7 @@ public extension PlatformClient { } catch {} do { - imageNature = try container.decode(String.self, forKey: .imageNature) + similars = try container.decode([String].self, forKey: .similars) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,7 +186,7 @@ public extension PlatformClient { } catch {} do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +194,7 @@ public extension PlatformClient { } catch {} do { - color = try container.decode(String.self, forKey: .color) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -202,7 +202,7 @@ public extension PlatformClient { } catch {} do { - rating = try container.decode(Double.self, forKey: .rating) + brand = try container.decode(ProductBrand.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -210,7 +210,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,17 +218,15 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + 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 { - promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) + imageNature = try container.decode(String.self, forKey: .imageNature) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -236,7 +234,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + rating = try container.decode(Double.self, forKey: .rating) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -244,7 +242,7 @@ public extension PlatformClient { } catch {} do { - highlights = try container.decode([String].self, forKey: .highlights) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -252,7 +250,7 @@ public extension PlatformClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -260,7 +258,7 @@ public extension PlatformClient { } catch {} do { - medias = try container.decode([Media1].self, forKey: .medias) + attributes = try container.decode([String: Any].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -268,7 +266,7 @@ public extension PlatformClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + highlights = try container.decode([String].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -276,7 +274,7 @@ public extension PlatformClient { } catch {} do { - teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) + productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -284,7 +282,7 @@ public extension PlatformClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + ratingCount = try container.decode(Int.self, forKey: .ratingCount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -292,7 +290,7 @@ public extension PlatformClient { } catch {} do { - tryouts = try container.decode([String].self, forKey: .tryouts) + teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -300,7 +298,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -308,7 +306,7 @@ public extension PlatformClient { } catch {} do { - productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -316,7 +314,7 @@ public extension PlatformClient { } catch {} do { - groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) + promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -324,62 +322,64 @@ public extension PlatformClient { } catch {} do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + hasVariant = try container.decode(Bool.self, forKey: .hasVariant) } 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) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(brand, forKey: .brand) + try? container.encodeIfPresent(tryouts, forKey: .tryouts) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(medias, forKey: .medias) + + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) try? container.encodeIfPresent(similars, forKey: .similars) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(color, forKey: .color) + try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(rating, forKey: .rating) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(imageNature, forKey: .imageNature) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(rating, forKey: .rating) - try? container.encodeIfPresent(promoMeta, forKey: .promoMeta) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) - try? container.encodeIfPresent(highlights, forKey: .highlights) + try? container.encodeIfPresent(attributes, forKey: .attributes) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(highlights, forKey: .highlights) - try? container.encodeIfPresent(medias, forKey: .medias) + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - - try? container.encodeIfPresent(tryouts, forKey: .tryouts) + try? container.encodeIfPresent(color, forKey: .color) try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) + try? container.encodeIfPresent(promoMeta, forKey: .promoMeta) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) - try? container.encodeIfPresent(attributes, forKey: .attributes) + try? container.encodeIfPresent(slug, forKey: .slug) } } } diff --git a/Sources/code/platform/models/ProductDownloadItemsDataPlatformModelClass.swift b/Sources/code/platform/models/ProductDownloadItemsDataPlatformModelClass.swift index e1d22925bf..da2faba39a 100644 --- a/Sources/code/platform/models/ProductDownloadItemsDataPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductDownloadItemsDataPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class ProductDownloadItemsData: Codable { + public var templates: [String]? + public var type: String? public var brand: [String]? - public var templates: [String]? - public enum CodingKeys: String, CodingKey { + case templates + case type case brand - - case templates } public init(brand: [String]? = nil, templates: [String]? = nil, type: String? = nil) { + self.templates = templates + self.type = type self.brand = brand - - self.templates = templates } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} do { - brand = try container.decode([String].self, forKey: .brand) + type = try container.decode(String.self, forKey: .type) } 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) + brand = try container.decode([String].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(templates, forKey: .templates) + try? container.encodeIfPresent(type, forKey: .type) try? container.encodeIfPresent(brand, forKey: .brand) - - try? container.encodeIfPresent(templates, forKey: .templates) } } } diff --git a/Sources/code/platform/models/ProductDownloadsItemsPlatformModelClass.swift b/Sources/code/platform/models/ProductDownloadsItemsPlatformModelClass.swift index d48a6840a5..1e43784cc6 100644 --- a/Sources/code/platform/models/ProductDownloadsItemsPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductDownloadsItemsPlatformModelClass.swift @@ -10,66 +10,66 @@ public extension PlatformClient { class ProductDownloadsItems: Codable { public var templateTags: [String: Any]? - public var triggerOn: String? - - public var url: String? - - public var data: ProductDownloadItemsData? - public var sellerId: Double? - public var status: String? + public var triggerOn: String? + + public var completedOn: String? public var createdBy: VerifiedBy? - public var completedOn: String? + public var status: String? public var taskId: String? public var id: String? - public enum CodingKeys: String, CodingKey { - case templateTags = "template_tags" - - case triggerOn = "trigger_on" + public var url: String? - case url + public var data: ProductDownloadItemsData? - case data + public enum CodingKeys: String, CodingKey { + case templateTags = "template_tags" case sellerId = "seller_id" - case status + case triggerOn = "trigger_on" + + case completedOn = "completed_on" case createdBy = "created_by" - case completedOn = "completed_on" + case status case taskId = "task_id" case id + + case url + + case data } 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.templateTags = templateTags - self.triggerOn = triggerOn - - self.url = url - - self.data = data - self.sellerId = sellerId - self.status = status + self.triggerOn = triggerOn + + self.completedOn = completedOn self.createdBy = createdBy - self.completedOn = completedOn + self.status = status self.taskId = taskId self.id = id + + self.url = url + + self.data = data } required public init(from decoder: Decoder) throws { @@ -84,7 +84,7 @@ public extension PlatformClient { } catch {} do { - triggerOn = try container.decode(String.self, forKey: .triggerOn) + sellerId = try container.decode(Double.self, forKey: .sellerId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +92,7 @@ public extension PlatformClient { } catch {} do { - url = try container.decode(String.self, forKey: .url) + triggerOn = try container.decode(String.self, forKey: .triggerOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -100,7 +100,7 @@ public extension PlatformClient { } catch {} do { - data = try container.decode(ProductDownloadItemsData.self, forKey: .data) + completedOn = try container.decode(String.self, forKey: .completedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -108,7 +108,7 @@ public extension PlatformClient { } catch {} do { - sellerId = try container.decode(Double.self, forKey: .sellerId) + createdBy = try container.decode(VerifiedBy.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -124,7 +124,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode(VerifiedBy.self, forKey: .createdBy) + taskId = try container.decode(String.self, forKey: .taskId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -132,7 +132,7 @@ public extension PlatformClient { } catch {} do { - completedOn = try container.decode(String.self, forKey: .completedOn) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -140,7 +140,7 @@ public extension PlatformClient { } catch {} do { - taskId = try container.decode(String.self, forKey: .taskId) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -148,7 +148,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + data = try container.decode(ProductDownloadItemsData.self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -161,23 +161,23 @@ public extension PlatformClient { try? container.encodeIfPresent(templateTags, forKey: .templateTags) - try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) - - try? container.encodeIfPresent(url, forKey: .url) - - try? container.encodeIfPresent(data, forKey: .data) - try? container.encodeIfPresent(sellerId, forKey: .sellerId) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(triggerOn, forKey: .triggerOn) + + try? container.encodeIfPresent(completedOn, forKey: .completedOn) try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(completedOn, forKey: .completedOn) + try? container.encodeIfPresent(status, forKey: .status) try? container.encodeIfPresent(taskId, forKey: .taskId) try? container.encodeIfPresent(id, forKey: .id) + + try? container.encodeIfPresent(url, forKey: .url) + + try? container.encodeIfPresent(data, forKey: .data) } } } diff --git a/Sources/code/platform/models/ProductDownloadsResponsePlatformModelClass.swift b/Sources/code/platform/models/ProductDownloadsResponsePlatformModelClass.swift index ad5899d551..f3d18b41c9 100644 --- a/Sources/code/platform/models/ProductDownloadsResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductDownloadsResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ProductDownloadsResponse: Codable { - public var items: ProductDownloadsItems? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: ProductDownloadsItems? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: ProductDownloadsItems? = 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(ProductDownloadsItems.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(ProductDownloadsItems.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/ProductFiltersKeyPlatformModelClass.swift b/Sources/code/platform/models/ProductFiltersKeyPlatformModelClass.swift index cc6fb6061e..b96d91dc63 100644 --- a/Sources/code/platform/models/ProductFiltersKeyPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductFiltersKeyPlatformModelClass.swift @@ -8,37 +8,39 @@ public extension PlatformClient { */ class ProductFiltersKey: Codable { - public var logo: String? - public var display: String - public var name: String + public var logo: String? public var kind: String? - public enum CodingKeys: String, CodingKey { - case logo + public var name: String + public enum CodingKeys: String, CodingKey { case display - case name + case logo case kind + + case name } public init(display: String, kind: String? = nil, logo: String? = nil, name: String) { - self.logo = logo - self.display = display - self.name = name + self.logo = logo self.kind = kind + + self.name = name } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + display = try container.decode(String.self, forKey: .display) + do { logo = try container.decode(String.self, forKey: .logo) @@ -47,10 +49,6 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - display = try container.decode(String.self, forKey: .display) - - name = try container.decode(String.self, forKey: .name) - do { kind = try container.decode(String.self, forKey: .kind) @@ -58,18 +56,20 @@ public extension PlatformClient { 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(logo, forKey: .logo) - try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(kind, forKey: .kind) + + try? container.encodeIfPresent(name, forKey: .name) } } } diff --git a/Sources/code/platform/models/ProductFiltersPlatformModelClass.swift b/Sources/code/platform/models/ProductFiltersPlatformModelClass.swift index 3e66402d09..735bbcf43f 100644 --- a/Sources/code/platform/models/ProductFiltersPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductFiltersPlatformModelClass.swift @@ -8,36 +8,36 @@ public extension PlatformClient { */ class ProductFilters: Codable { - public var values: [ProductFiltersValue] - public var key: ProductFiltersKey - public enum CodingKeys: String, CodingKey { - case values + public var values: [ProductFiltersValue] + public enum CodingKeys: String, CodingKey { case key + + case values } public init(key: ProductFiltersKey, values: [ProductFiltersValue]) { - self.values = values - self.key = key + + self.values = values } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - values = try container.decode([ProductFiltersValue].self, forKey: .values) - key = try container.decode(ProductFiltersKey.self, forKey: .key) + + values = try container.decode([ProductFiltersValue].self, forKey: .values) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(values, forKey: .values) - try? container.encodeIfPresent(key, forKey: .key) + + try? container.encodeIfPresent(values, forKey: .values) } } } diff --git a/Sources/code/platform/models/ProductFiltersValuePlatformModelClass.swift b/Sources/code/platform/models/ProductFiltersValuePlatformModelClass.swift index 752142800d..59e0b9ce48 100644 --- a/Sources/code/platform/models/ProductFiltersValuePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductFiltersValuePlatformModelClass.swift @@ -8,97 +8,97 @@ public extension PlatformClient { */ class ProductFiltersValue: Codable { - public var currencySymbol: String? + public var value: String - public var display: String + public var min: Int? - public var displayFormat: String? + public var count: Int? public var currencyCode: String? - public var selectedMin: Int? + public var selectedMax: Int? - public var value: String + public var queryFormat: String? - public var max: Int? + public var selectedMin: Int? - public var min: Int? + public var currencySymbol: String? - public var queryFormat: String? + public var display: String - public var selectedMax: Int? + public var displayFormat: String? - public var isSelected: Bool + public var max: Int? - public var count: Int? + public var isSelected: Bool public enum CodingKeys: String, CodingKey { - case currencySymbol = "currency_symbol" + case value - case display + case min - case displayFormat = "display_format" + case count case currencyCode = "currency_code" - case selectedMin = "selected_min" + case selectedMax = "selected_max" - case value + case queryFormat = "query_format" - case max + case selectedMin = "selected_min" - case min + case currencySymbol = "currency_symbol" - case queryFormat = "query_format" + case display - case selectedMax = "selected_max" + case displayFormat = "display_format" - case isSelected = "is_selected" + case max - case count + case isSelected = "is_selected" } 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.currencySymbol = currencySymbol + self.value = value - self.display = display + self.min = min - self.displayFormat = displayFormat + self.count = count self.currencyCode = currencyCode - self.selectedMin = selectedMin + self.selectedMax = selectedMax - self.value = value + self.queryFormat = queryFormat - self.max = max + self.selectedMin = selectedMin - self.min = min + self.currencySymbol = currencySymbol - self.queryFormat = queryFormat + self.display = display - self.selectedMax = selectedMax + self.displayFormat = displayFormat - self.isSelected = isSelected + self.max = max - self.count = count + self.isSelected = isSelected } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + value = try container.decode(String.self, forKey: .value) + do { - currencySymbol = try container.decode(String.self, forKey: .currencySymbol) + 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 {} - display = try container.decode(String.self, forKey: .display) - do { - displayFormat = try container.decode(String.self, forKey: .displayFormat) + count = try container.decode(Int.self, forKey: .count) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,17 +114,15 @@ public extension PlatformClient { } catch {} do { - selectedMin = try container.decode(Int.self, forKey: .selectedMin) + selectedMax = try container.decode(Int.self, forKey: .selectedMax) } 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) - do { - max = try container.decode(Int.self, forKey: .max) + queryFormat = try container.decode(String.self, forKey: .queryFormat) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -132,7 +130,7 @@ public extension PlatformClient { } catch {} do { - min = try container.decode(Int.self, forKey: .min) + selectedMin = try container.decode(Int.self, forKey: .selectedMin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -140,58 +138,60 @@ public extension PlatformClient { } catch {} do { - queryFormat = try container.decode(String.self, forKey: .queryFormat) + currencySymbol = try container.decode(String.self, forKey: .currencySymbol) } 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) + displayFormat = try container.decode(String.self, forKey: .displayFormat) } 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 { - count = try container.decode(Int.self, forKey: .count) + 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 {} + + isSelected = try container.decode(Bool.self, forKey: .isSelected) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) + try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(display, forKey: .display) + try? container.encodeIfPresent(min, forKey: .min) - try? container.encodeIfPresent(displayFormat, forKey: .displayFormat) + try? container.encodeIfPresent(count, forKey: .count) try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) - try? container.encodeIfPresent(selectedMin, forKey: .selectedMin) + try? container.encodeIfPresent(selectedMax, forKey: .selectedMax) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(queryFormat, forKey: .queryFormat) - try? container.encodeIfPresent(max, forKey: .max) + try? container.encodeIfPresent(selectedMin, forKey: .selectedMin) - try? container.encodeIfPresent(min, forKey: .min) + try? container.encodeIfPresent(currencySymbol, forKey: .currencySymbol) - try? container.encodeIfPresent(queryFormat, forKey: .queryFormat) + try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(selectedMax, forKey: .selectedMax) + try? container.encodeIfPresent(displayFormat, forKey: .displayFormat) - try? container.encodeIfPresent(isSelected, forKey: .isSelected) + try? container.encodeIfPresent(max, forKey: .max) - try? container.encodeIfPresent(count, forKey: .count) + try? container.encodeIfPresent(isSelected, forKey: .isSelected) } } } diff --git a/Sources/code/platform/models/ProductListingDetailPlatformModelClass.swift b/Sources/code/platform/models/ProductListingDetailPlatformModelClass.swift index 9a8d30a348..653f47bddd 100644 --- a/Sources/code/platform/models/ProductListingDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductListingDetailPlatformModelClass.swift @@ -8,171 +8,171 @@ public extension PlatformClient { */ class ProductListingDetail: Codable { - public var brand: ProductBrand? + public var tryouts: [String]? - public var ratingCount: Int? + public var medias: [Media1]? + + public var shortDescription: String? public var similars: [String]? - public var imageNature: String? + public var uid: Int? - public var hasVariant: Bool? + public var name: String? - public var color: String? + public var discount: String? - public var rating: Double? + public var brand: ProductBrand? - public var description: String? + public var itemCode: String? - public var uid: Int? + public var description: String? - public var slug: String + public var imageNature: String? - public var promoMeta: [String: Any]? + public var sellable: Bool? - public var name: String? + public var rating: Double? - public var highlights: [String]? + public var itemType: String? - public var sellable: Bool? + public var groupedAttributes: [ProductDetailGroupedAttribute]? - public var itemType: String? + public var attributes: [String: Any]? - public var medias: [Media1]? + public var price: ProductListingPrice? - public var itemCode: String? + public var highlights: [String]? - public var teaserTag: [String: Any]? + public var productOnlineDate: String? - public var shortDescription: String? + public var ratingCount: Int? - public var tryouts: [String]? + public var teaserTag: [String: Any]? - public var price: ProductListingPrice? + public var color: String? public var type: String? - public var productOnlineDate: String? - - public var discount: String? + public var promoMeta: [String: Any]? - public var groupedAttributes: [ProductDetailGroupedAttribute]? + public var hasVariant: Bool? - public var attributes: [String: Any]? + public var slug: String public enum CodingKeys: String, CodingKey { - case brand + case tryouts - case ratingCount = "rating_count" + case medias + + case shortDescription = "short_description" case similars - case imageNature = "image_nature" + case uid - case hasVariant = "has_variant" + case name - case color + case discount - case rating + case brand - case description + case itemCode = "item_code" - case uid + case description - case slug + case imageNature = "image_nature" - case promoMeta = "promo_meta" + case sellable - case name + case rating - case highlights + case itemType = "item_type" - case sellable + case groupedAttributes = "grouped_attributes" - case itemType = "item_type" + case attributes - case medias + case price - case itemCode = "item_code" + case highlights - case teaserTag = "teaser_tag" + case productOnlineDate = "product_online_date" - case shortDescription = "short_description" + case ratingCount = "rating_count" - case tryouts + case teaserTag = "teaser_tag" - case price + case color case type - case productOnlineDate = "product_online_date" - - case discount + case promoMeta = "promo_meta" - case groupedAttributes = "grouped_attributes" + case hasVariant = "has_variant" - case attributes + case slug } 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.brand = brand + self.tryouts = tryouts - self.ratingCount = ratingCount + self.medias = medias + + self.shortDescription = shortDescription self.similars = similars - self.imageNature = imageNature + self.uid = uid - self.hasVariant = hasVariant + self.name = name - self.color = color + self.discount = discount - self.rating = rating + self.brand = brand - self.description = description + self.itemCode = itemCode - self.uid = uid + self.description = description - self.slug = slug + self.imageNature = imageNature - self.promoMeta = promoMeta + self.sellable = sellable - self.name = name + self.rating = rating - self.highlights = highlights + self.itemType = itemType - self.sellable = sellable + self.groupedAttributes = groupedAttributes - self.itemType = itemType + self.attributes = attributes - self.medias = medias + self.price = price - self.itemCode = itemCode + self.highlights = highlights - self.teaserTag = teaserTag + self.productOnlineDate = productOnlineDate - self.shortDescription = shortDescription + self.ratingCount = ratingCount - self.tryouts = tryouts + self.teaserTag = teaserTag - self.price = price + self.color = color self.type = type - self.productOnlineDate = productOnlineDate - - self.discount = discount + self.promoMeta = promoMeta - self.groupedAttributes = groupedAttributes + self.hasVariant = hasVariant - self.attributes = attributes + self.slug = slug } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - brand = try container.decode(ProductBrand.self, forKey: .brand) + tryouts = try container.decode([String].self, forKey: .tryouts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -180,7 +180,7 @@ public extension PlatformClient { } catch {} do { - ratingCount = try container.decode(Int.self, forKey: .ratingCount) + medias = try container.decode([Media1].self, forKey: .medias) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -188,7 +188,7 @@ public extension PlatformClient { } catch {} do { - similars = try container.decode([String].self, forKey: .similars) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -196,7 +196,7 @@ public extension PlatformClient { } catch {} do { - imageNature = try container.decode(String.self, forKey: .imageNature) + similars = try container.decode([String].self, forKey: .similars) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -204,7 +204,7 @@ public extension PlatformClient { } catch {} do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -212,7 +212,7 @@ public extension PlatformClient { } catch {} do { - color = try container.decode(String.self, forKey: .color) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -220,7 +220,7 @@ public extension PlatformClient { } catch {} do { - rating = try container.decode(Double.self, forKey: .rating) + discount = try container.decode(String.self, forKey: .discount) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -228,7 +228,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + brand = try container.decode(ProductBrand.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -236,17 +236,15 @@ 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) print("codingPath:", context.codingPath) } catch {} - slug = try container.decode(String.self, forKey: .slug) - do { - promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -254,7 +252,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + imageNature = try container.decode(String.self, forKey: .imageNature) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -262,7 +260,7 @@ public extension PlatformClient { } catch {} do { - highlights = try container.decode([String].self, forKey: .highlights) + sellable = try container.decode(Bool.self, forKey: .sellable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -270,7 +268,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) @@ -286,7 +284,7 @@ public extension PlatformClient { } catch {} do { - medias = try container.decode([Media1].self, forKey: .medias) + groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -294,7 +292,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) @@ -302,7 +300,7 @@ public extension PlatformClient { } catch {} do { - teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) + price = try container.decode(ProductListingPrice.self, forKey: .price) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -310,7 +308,7 @@ public extension PlatformClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + highlights = try container.decode([String].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -318,7 +316,7 @@ public extension PlatformClient { } catch {} do { - tryouts = try container.decode([String].self, forKey: .tryouts) + productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -326,7 +324,7 @@ public extension PlatformClient { } catch {} 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) @@ -334,7 +332,7 @@ public extension PlatformClient { } catch {} do { - type = try container.decode(String.self, forKey: .type) + teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -342,7 +340,7 @@ public extension PlatformClient { } catch {} do { - productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -350,7 +348,7 @@ public extension PlatformClient { } catch {} do { - discount = try container.decode(String.self, forKey: .discount) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -358,7 +356,7 @@ public extension PlatformClient { } catch {} do { - groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) + promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -366,68 +364,70 @@ public extension PlatformClient { } catch {} do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + hasVariant = try container.decode(Bool.self, forKey: .hasVariant) } 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) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(brand, forKey: .brand) + try? container.encodeIfPresent(tryouts, forKey: .tryouts) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(medias, forKey: .medias) + + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) try? container.encodeIfPresent(similars, forKey: .similars) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(color, forKey: .color) + try? container.encodeIfPresent(discount, forKey: .discount) - try? container.encodeIfPresent(rating, forKey: .rating) + try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(imageNature, forKey: .imageNature) - try? container.encodeIfPresent(promoMeta, forKey: .promoMeta) + try? container.encodeIfPresent(sellable, forKey: .sellable) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(rating, forKey: .rating) - try? container.encodeIfPresent(highlights, forKey: .highlights) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(sellable, forKey: .sellable) + try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(attributes, forKey: .attributes) - try? container.encodeIfPresent(medias, forKey: .medias) + try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(highlights, forKey: .highlights) - try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) + try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(color, forKey: .color) try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) - - try? container.encodeIfPresent(discount, forKey: .discount) + try? container.encodeIfPresent(promoMeta, forKey: .promoMeta) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) - try? container.encodeIfPresent(attributes, forKey: .attributes) + try? container.encodeIfPresent(slug, forKey: .slug) } } } diff --git a/Sources/code/platform/models/ProductListingPricePlatformModelClass.swift b/Sources/code/platform/models/ProductListingPricePlatformModelClass.swift index 30cea59da6..ef245e074d 100644 --- a/Sources/code/platform/models/ProductListingPricePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductListingPricePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ProductListingPrice: Codable { - public var effective: Price1? - public var marked: Price1? - public enum CodingKeys: String, CodingKey { - case effective + public var effective: Price1? + public enum CodingKeys: String, CodingKey { case marked + + case effective } public init(effective: Price1? = nil, marked: Price1? = 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(Price1.self, forKey: .effective) + marked = try container.decode(Price1.self, forKey: .marked) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -36,7 +36,7 @@ public extension PlatformClient { } catch {} do { - marked = try container.decode(Price1.self, forKey: .marked) + effective = try container.decode(Price1.self, forKey: .effective) } 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(effective, forKey: .effective) - try? container.encodeIfPresent(marked, forKey: .marked) + + try? container.encodeIfPresent(effective, forKey: .effective) } } } diff --git a/Sources/code/platform/models/ProductListingResponsePlatformModelClass.swift b/Sources/code/platform/models/ProductListingResponsePlatformModelClass.swift index b5e5efd444..0bd5c30c24 100644 --- a/Sources/code/platform/models/ProductListingResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductListingResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class ProductListingResponse: Codable { - public var items: [Product]? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: [Product]? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: [Product]? = 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([Product].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([Product].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/ProductPlatformModelClass.swift b/Sources/code/platform/models/ProductPlatformModelClass.swift index 9a4fbd9cfc..ffb96a602b 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 brand: Brand? + public var allSizes: [[String: Any]]? - public var media: [Media1]? + public var shortDescription: String? - public var isDependent: Bool? + public var sizes: [[String: Any]]? - public var imageNature: String? + public var uid: Int? + + public var customOrder: [String: Any]? + + public var sizeGuide: String? public var brandUid: Int? - public var images: [Image]? + public var isSet: Bool? - public var currency: String? + public var name: String? - public var color: String? + public var multiSize: Bool? - public var isActive: Bool? + public var media: [Media1]? - public var variants: [String: Any]? + public var brand: Brand? + + public var itemCode: String? + + public var categoryUid: Int? + + public var images: [Image]? public var description: String? - public var customOrder: [String: Any]? + public var imageNature: String? - public var categorySlug: String? + public var itemType: String? + + public var isActive: Bool? + + public var departments: [Int]? + + public var countryOfOrigin: String? + + public var highlights: [String]? public var hsnCode: String? public var id: String? - public var uid: Int? + public var moq: [String: Any]? - public var slug: String? + public var categorySlug: String? - public var categoryUid: Int? + public var templateTag: String? public var customJson: [String: Any]? - public var allSizes: [[String: Any]]? + public var isPhysical: Bool? - public var name: String? + public var isDependent: Bool? - public var highlights: [String]? + public var currency: String? - public var isPhysical: Bool? + public var variants: [String: Any]? - public var itemType: String? + public var color: String? - public var itemCode: String? + public var primaryColor: String? - public var multiSize: Bool? + public var l3Mapping: [String]? - public var sizes: [[String: Any]]? + public var slug: String? - public var moq: [String: Any]? + public var productPublish: ProductPublished? - public var shortDescription: String? + public enum CodingKeys: String, CodingKey { + case allSizes = "all_sizes" - public var countryOfOrigin: String? + case shortDescription = "short_description" - public var departments: [Int]? + case sizes - public var productPublish: ProductPublished? + case uid - public var sizeGuide: String? + case customOrder = "custom_order" - public var isSet: Bool? + case sizeGuide = "size_guide" - public var templateTag: String? + case brandUid = "brand_uid" - public var primaryColor: String? + case isSet = "is_set" - public var l3Mapping: [String]? + case name - public enum CodingKeys: String, CodingKey { - case brand + case multiSize = "multi_size" case media - case isDependent = "is_dependent" + case brand - case imageNature = "image_nature" + case itemCode = "item_code" - case brandUid = "brand_uid" + case categoryUid = "category_uid" case images - case currency + case description - case color + case imageNature = "image_nature" - case isActive = "is_active" + case itemType = "item_type" - case variants + case isActive = "is_active" - case description + case departments - case customOrder = "custom_order" + case countryOfOrigin = "country_of_origin" - case categorySlug = "category_slug" + case highlights case hsnCode = "hsn_code" case id - case uid + case moq - case slug + case categorySlug = "category_slug" - case categoryUid = "category_uid" + case templateTag = "template_tag" case customJson = "_custom_json" - case allSizes = "all_sizes" + case isPhysical = "is_physical" - case name + case isDependent = "is_dependent" - case highlights + case currency - case isPhysical = "is_physical" + case variants - case itemType = "item_type" + case color - case itemCode = "item_code" + case primaryColor = "primary_color" - case multiSize = "multi_size" + case l3Mapping = "l3_mapping" - case sizes + case slug - case moq + case productPublish = "product_publish" + } - case shortDescription = "short_description" + 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.allSizes = allSizes - case countryOfOrigin = "country_of_origin" + self.shortDescription = shortDescription - case departments + self.sizes = sizes - case productPublish = "product_publish" + self.uid = uid - case sizeGuide = "size_guide" + self.customOrder = customOrder - case isSet = "is_set" + self.sizeGuide = sizeGuide - case templateTag = "template_tag" + self.brandUid = brandUid - case primaryColor = "primary_color" + self.isSet = isSet - case l3Mapping = "l3_mapping" - } + self.name = name - 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.brand = brand + self.multiSize = multiSize self.media = media - self.isDependent = isDependent + self.brand = brand - self.imageNature = imageNature + self.itemCode = itemCode - self.brandUid = brandUid + self.categoryUid = categoryUid self.images = images - self.currency = currency + self.description = description - self.color = color + self.imageNature = imageNature - self.isActive = isActive + self.itemType = itemType - self.variants = variants + self.isActive = isActive - self.description = description + self.departments = departments - self.customOrder = customOrder + self.countryOfOrigin = countryOfOrigin - self.categorySlug = categorySlug + self.highlights = highlights self.hsnCode = hsnCode self.id = id - self.uid = uid + self.moq = moq - self.slug = slug + self.categorySlug = categorySlug - self.categoryUid = categoryUid + self.templateTag = templateTag self.customJson = customJson - self.allSizes = allSizes - - self.name = name - - self.highlights = highlights - self.isPhysical = isPhysical - self.itemType = itemType - - self.itemCode = itemCode + self.isDependent = isDependent - self.multiSize = multiSize + self.currency = currency - self.sizes = sizes + self.variants = variants - self.moq = moq + self.color = color - self.shortDescription = shortDescription + self.primaryColor = primaryColor - self.countryOfOrigin = countryOfOrigin + self.l3Mapping = l3Mapping - self.departments = departments + self.slug = slug self.productPublish = productPublish - - self.sizeGuide = sizeGuide - - self.isSet = isSet - - self.templateTag = templateTag - - self.primaryColor = primaryColor - - self.l3Mapping = l3Mapping } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - brand = try container.decode(Brand.self, forKey: .brand) + allSizes = try container.decode([[String: Any]].self, forKey: .allSizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -246,7 +246,7 @@ public extension PlatformClient { } catch {} do { - media = try container.decode([Media1].self, forKey: .media) + shortDescription = try container.decode(String.self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -254,7 +254,7 @@ public extension PlatformClient { } catch {} do { - isDependent = try container.decode(Bool.self, forKey: .isDependent) + sizes = try container.decode([[String: Any]].self, forKey: .sizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -262,7 +262,7 @@ public extension PlatformClient { } catch {} do { - imageNature = try container.decode(String.self, forKey: .imageNature) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -270,7 +270,7 @@ public extension PlatformClient { } catch {} do { - brandUid = try container.decode(Int.self, forKey: .brandUid) + customOrder = try container.decode([String: Any].self, forKey: .customOrder) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -278,7 +278,7 @@ public extension PlatformClient { } catch {} do { - images = try container.decode([Image].self, forKey: .images) + sizeGuide = try container.decode(String.self, forKey: .sizeGuide) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -286,7 +286,7 @@ public extension PlatformClient { } catch {} do { - currency = try container.decode(String.self, forKey: .currency) + brandUid = try container.decode(Int.self, forKey: .brandUid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -294,7 +294,7 @@ public extension PlatformClient { } catch {} do { - color = try container.decode(String.self, forKey: .color) + isSet = try container.decode(Bool.self, forKey: .isSet) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -302,7 +302,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + name = try container.decode(String.self, forKey: .name) } 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) + multiSize = try container.decode(Bool.self, forKey: .multiSize) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -318,7 +318,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + media = try container.decode([Media1].self, forKey: .media) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -326,7 +326,7 @@ public extension PlatformClient { } catch {} do { - customOrder = try container.decode([String: Any].self, forKey: .customOrder) + brand = try container.decode(Brand.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -334,7 +334,7 @@ public extension PlatformClient { } catch {} do { - categorySlug = try container.decode(String.self, forKey: .categorySlug) + itemCode = try container.decode(String.self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -342,7 +342,7 @@ public extension PlatformClient { } catch {} do { - hsnCode = try container.decode(String.self, forKey: .hsnCode) + categoryUid = try container.decode(Int.self, forKey: .categoryUid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -350,7 +350,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + images = try container.decode([Image].self, forKey: .images) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -358,7 +358,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.self, forKey: .uid) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -366,7 +366,7 @@ public extension PlatformClient { } 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) @@ -374,7 +374,7 @@ public extension PlatformClient { } catch {} do { - categoryUid = try container.decode(Int.self, forKey: .categoryUid) + itemType = try container.decode(String.self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -382,7 +382,7 @@ public extension PlatformClient { } catch {} do { - customJson = try container.decode([String: Any].self, forKey: .customJson) + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -390,7 +390,7 @@ public extension PlatformClient { } catch {} do { - allSizes = try container.decode([[String: Any]].self, forKey: .allSizes) + departments = try container.decode([Int].self, forKey: .departments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -398,7 +398,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) @@ -414,7 +414,7 @@ public extension PlatformClient { } catch {} do { - isPhysical = try container.decode(Bool.self, forKey: .isPhysical) + hsnCode = try container.decode(String.self, forKey: .hsnCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -422,7 +422,7 @@ public extension PlatformClient { } catch {} do { - itemType = try container.decode(String.self, forKey: .itemType) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -430,7 +430,7 @@ public extension PlatformClient { } catch {} do { - itemCode = try container.decode(String.self, forKey: .itemCode) + moq = try container.decode([String: Any].self, forKey: .moq) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -438,7 +438,7 @@ public extension PlatformClient { } catch {} do { - multiSize = try container.decode(Bool.self, forKey: .multiSize) + categorySlug = try container.decode(String.self, forKey: .categorySlug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -446,7 +446,7 @@ public extension PlatformClient { } catch {} do { - sizes = try container.decode([[String: Any]].self, forKey: .sizes) + templateTag = try container.decode(String.self, forKey: .templateTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -454,7 +454,7 @@ public extension PlatformClient { } catch {} do { - moq = try container.decode([String: Any].self, forKey: .moq) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -462,7 +462,7 @@ public extension PlatformClient { } catch {} do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + isPhysical = try container.decode(Bool.self, forKey: .isPhysical) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -470,7 +470,7 @@ public extension PlatformClient { } catch {} do { - countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) + isDependent = try container.decode(Bool.self, forKey: .isDependent) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -478,7 +478,7 @@ public extension PlatformClient { } catch {} do { - departments = try container.decode([Int].self, forKey: .departments) + currency = try container.decode(String.self, forKey: .currency) } 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) + variants = try container.decode([String: Any].self, forKey: .variants) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -494,7 +494,7 @@ public extension PlatformClient { } catch {} do { - sizeGuide = try container.decode(String.self, forKey: .sizeGuide) + color = try container.decode(String.self, forKey: .color) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -502,7 +502,7 @@ public extension PlatformClient { } catch {} do { - isSet = try container.decode(Bool.self, forKey: .isSet) + primaryColor = try container.decode(String.self, forKey: .primaryColor) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -510,7 +510,7 @@ public extension PlatformClient { } catch {} do { - templateTag = try container.decode(String.self, forKey: .templateTag) + l3Mapping = try container.decode([String].self, forKey: .l3Mapping) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -518,7 +518,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) @@ -526,7 +526,7 @@ public extension PlatformClient { } catch {} do { - l3Mapping = try container.decode([String].self, forKey: .l3Mapping) + productPublish = try container.decode(ProductPublished.self, forKey: .productPublish) } 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(brand, forKey: .brand) + try? container.encodeIfPresent(allSizes, forKey: .allSizes) - try? container.encodeIfPresent(media, forKey: .media) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(isDependent, forKey: .isDependent) + try? container.encodeIfPresent(sizes, forKey: .sizes) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(brandUid, forKey: .brandUid) + try? container.encodeIfPresent(customOrder, forKey: .customOrder) - try? container.encodeIfPresent(images, forKey: .images) + try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(brandUid, forKey: .brandUid) - try? container.encodeIfPresent(color, forKey: .color) + try? container.encodeIfPresent(isSet, forKey: .isSet) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(variants, forKey: .variants) + try? container.encodeIfPresent(multiSize, forKey: .multiSize) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(media, forKey: .media) - try? container.encodeIfPresent(customOrder, forKey: .customOrder) + try? container.encodeIfPresent(brand, forKey: .brand) - try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) + try? container.encodeIfPresent(categoryUid, forKey: .categoryUid) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(images, forKey: .images) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(imageNature, forKey: .imageNature) - try? container.encodeIfPresent(categoryUid, forKey: .categoryUid) + try? container.encodeIfPresent(itemType, forKey: .itemType) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(allSizes, forKey: .allSizes) + try? container.encodeIfPresent(departments, forKey: .departments) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) try? container.encodeIfPresent(highlights, forKey: .highlights) - try? container.encodeIfPresent(isPhysical, forKey: .isPhysical) - - try? container.encodeIfPresent(itemType, forKey: .itemType) - - try? container.encodeIfPresent(itemCode, forKey: .itemCode) - - try? container.encodeIfPresent(multiSize, forKey: .multiSize) + try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) - try? container.encodeIfPresent(sizes, forKey: .sizes) + try? container.encodeIfPresent(id, forKey: .id) try? container.encodeIfPresent(moq, forKey: .moq) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) - try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) + try? container.encodeIfPresent(templateTag, forKey: .templateTag) - try? container.encodeIfPresent(departments, forKey: .departments) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(productPublish, forKey: .productPublish) + try? container.encodeIfPresent(isPhysical, forKey: .isPhysical) - try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) + try? container.encodeIfPresent(isDependent, forKey: .isDependent) - try? container.encodeIfPresent(isSet, forKey: .isSet) + try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encodeIfPresent(templateTag, forKey: .templateTag) + try? container.encodeIfPresent(variants, forKey: .variants) + + try? container.encodeIfPresent(color, forKey: .color) try? container.encodeIfPresent(primaryColor, forKey: .primaryColor) try? container.encodeIfPresent(l3Mapping, forKey: .l3Mapping) + + try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(productPublish, forKey: .productPublish) } } } 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/ProductSortOnPlatformModelClass.swift b/Sources/code/platform/models/ProductSortOnPlatformModelClass.swift index 07121c43aa..7f92454888 100644 --- a/Sources/code/platform/models/ProductSortOnPlatformModelClass.swift +++ b/Sources/code/platform/models/ProductSortOnPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class ProductSortOn: Codable { - public var isSelected: Bool? + public var value: String? public var name: String? - public var value: String? + public var isSelected: Bool? public enum CodingKeys: String, CodingKey { - case isSelected = "is_selected" + case value case name - case value + case isSelected = "is_selected" } public init(isSelected: Bool? = nil, name: String? = nil, value: String? = nil) { - self.isSelected = isSelected + self.value = value self.name = name - self.value = value + self.isSelected = isSelected } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - isSelected = try container.decode(Bool.self, forKey: .isSelected) + value = try container.decode(String.self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - value = try container.decode(String.self, forKey: .value) + isSelected = try container.decode(Bool.self, forKey: .isSelected) } 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(isSelected, forKey: .isSelected) + try? container.encodeIfPresent(value, forKey: .value) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(isSelected, forKey: .isSelected) } } } diff --git a/Sources/code/platform/models/ProductTemplatePlatformModelClass.swift b/Sources/code/platform/models/ProductTemplatePlatformModelClass.swift index 560e2bb4a4..95ced050cb 100644 --- a/Sources/code/platform/models/ProductTemplatePlatformModelClass.swift +++ b/Sources/code/platform/models/ProductTemplatePlatformModelClass.swift @@ -8,121 +8,119 @@ public extension PlatformClient { */ class ProductTemplate: Codable { - public var modifiedOn: String? + public var attributes: [String]? - public var isPhysical: Bool + public var tag: String? public var name: String? - public var attributes: [String]? - public var departments: [String]? + public var createdBy: [String: Any]? + public var modifiedBy: [String: Any]? - public var tag: String? + public var isArchived: Bool? - public var isActive: Bool? + public var createdOn: String? - public var isArchived: Bool? + public var description: String? public var logo: String? - public var createdOn: String? + public var modifiedOn: String? public var isExpirable: Bool - public var createdBy: [String: Any]? + public var isPhysical: Bool - public var description: String? + public var slug: String public var categories: [String]? - public var slug: String + public var isActive: Bool? public enum CodingKeys: String, CodingKey { - case modifiedOn = "modified_on" + case attributes - case isPhysical = "is_physical" + case tag case name - case attributes - case departments + case createdBy = "created_by" + case modifiedBy = "modified_by" - case tag + case isArchived = "is_archived" - case isActive = "is_active" + case createdOn = "created_on" - case isArchived = "is_archived" + case description case logo - case createdOn = "created_on" + case modifiedOn = "modified_on" case isExpirable = "is_expirable" - case createdBy = "created_by" + case isPhysical = "is_physical" - case description + case slug case categories - case slug + case isActive = "is_active" } 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.modifiedOn = modifiedOn + self.attributes = attributes - self.isPhysical = isPhysical + self.tag = tag self.name = name - self.attributes = attributes - self.departments = departments + self.createdBy = createdBy + self.modifiedBy = modifiedBy - self.tag = tag + self.isArchived = isArchived - self.isActive = isActive + self.createdOn = createdOn - self.isArchived = isArchived + self.description = description self.logo = logo - self.createdOn = createdOn + self.modifiedOn = modifiedOn self.isExpirable = isExpirable - self.createdBy = createdBy + self.isPhysical = isPhysical - self.description = description + self.slug = slug self.categories = categories - self.slug = slug + self.isActive = isActive } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + 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 { - name = try container.decode(String.self, forKey: .name) + tag = try container.decode(String.self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +128,7 @@ public extension PlatformClient { } catch {} do { - attributes = try container.decode([String].self, forKey: .attributes) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +144,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +152,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode(String.self, forKey: .tag) + modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,7 +160,7 @@ public extension PlatformClient { } catch {} 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) @@ -170,7 +168,7 @@ public extension PlatformClient { } catch {} do { - isArchived = try container.decode(Bool.self, forKey: .isArchived) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -178,7 +176,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(String.self, forKey: .logo) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,25 +184,29 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + logo = try container.decode(String.self, forKey: .logo) } 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 { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + 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 {} + isExpirable = try container.decode(Bool.self, forKey: .isExpirable) + + isPhysical = try container.decode(Bool.self, forKey: .isPhysical) + + slug = try container.decode(String.self, forKey: .slug) + do { - description = try container.decode(String.self, forKey: .description) + categories = try container.decode([String].self, forKey: .categories) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -212,50 +214,48 @@ public extension PlatformClient { } catch {} do { - categories = try container.decode([String].self, forKey: .categories) + 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 {} - - slug = try container.decode(String.self, forKey: .slug) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encode(attributes, forKey: .attributes) - try? container.encodeIfPresent(isPhysical, forKey: .isPhysical) + try? container.encodeIfPresent(tag, forKey: .tag) try? container.encodeIfPresent(name, forKey: .name) - try? container.encode(attributes, forKey: .attributes) - try? container.encode(departments, forKey: .departments) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(tag, forKey: .tag) + try? container.encodeIfPresent(isArchived, forKey: .isArchived) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(isArchived, forKey: .isArchived) + try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) try? container.encodeIfPresent(isExpirable, forKey: .isExpirable) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(isPhysical, forKey: .isPhysical) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(slug, forKey: .slug) try? container.encode(categories, forKey: .categories) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/PropertiesPlatformModelClass.swift b/Sources/code/platform/models/PropertiesPlatformModelClass.swift index 571d1b88ac..8b3d56de54 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 trader: [String: Any]? - - public var media: [String: Any]? + public var shortDescription: [String: Any]? - public var isDependent: [String: Any]? + public var sizes: [String: Any]? public var returnConfig: [String: Any]? - public var brandUid: [String: Any]? + public var customOrder: [String: Any]? - public var currency: [String: Any]? + public var sizeGuide: [String: Any]? - public var isActive: [String: Any]? + public var brandUid: [String: Any]? - public var command: [String: Any]? + public var productGroupTag: [String: Any]? - public var variants: [String: Any]? + public var name: [String: Any]? - public var description: [String: Any]? + public var multiSize: [String: Any]? - public var customOrder: [String: Any]? + public var media: [String: Any]? - public var categorySlug: [String: Any]? + public var itemCode: [String: Any]? - public var hsnCode: [String: Any]? + public var noOfBoxes: [String: Any]? - public var slug: [String: Any]? + public var description: [String: Any]? public var tags: [String: Any]? - public var name: [String: Any]? - - public var highlights: [String: Any]? + public var itemType: [String: Any]? public var traderType: [String: Any]? - public var itemType: [String: Any]? - - public var itemCode: [String: Any]? + public var isActive: [String: Any]? - public var teaserTag: [String: Any]? + public var countryOfOrigin: [String: Any]? - public var noOfBoxes: [String: Any]? + public var highlights: [String: Any]? - public var multiSize: [String: Any]? + public var hsnCode: [String: Any]? - public var sizes: [String: Any]? + public var trader: [String: Any]? public var moq: [String: Any]? - public var shortDescription: [String: Any]? + public var categorySlug: [String: Any]? - public var countryOfOrigin: [String: Any]? + public var isDependent: [String: Any]? - public var productPublish: [String: Any]? + public var currency: [String: Any]? - public var productGroupTag: [String: Any]? + public var variants: [String: Any]? - public var sizeGuide: [String: Any]? + public var teaserTag: [String: Any]? - public enum CodingKeys: String, CodingKey { - case trader + public var command: [String: Any]? - case media + public var slug: [String: Any]? - case isDependent = "is_dependent" + public var productPublish: [String: Any]? + + public enum CodingKeys: String, CodingKey { + case shortDescription = "short_description" + + case sizes case returnConfig = "return_config" - case brandUid = "brand_uid" + case customOrder = "custom_order" - case currency + case sizeGuide = "size_guide" - case isActive = "is_active" + case brandUid = "brand_uid" - case command + case productGroupTag = "product_group_tag" - case variants + case name - case description + case multiSize = "multi_size" - case customOrder = "custom_order" + case media - case categorySlug = "category_slug" + case itemCode = "item_code" - case hsnCode = "hsn_code" + case noOfBoxes = "no_of_boxes" - case slug + case description case tags - case name - - case highlights + case itemType = "item_type" case traderType = "trader_type" - case itemType = "item_type" - - case itemCode = "item_code" + case isActive = "is_active" - case teaserTag = "teaser_tag" + case countryOfOrigin = "country_of_origin" - case noOfBoxes = "no_of_boxes" + case highlights - case multiSize = "multi_size" + case hsnCode = "hsn_code" - case sizes + case trader case moq - case shortDescription = "short_description" + case categorySlug = "category_slug" - case countryOfOrigin = "country_of_origin" + case isDependent = "is_dependent" - case productPublish = "product_publish" + case currency - case productGroupTag = "product_group_tag" + case variants - case sizeGuide = "size_guide" + case teaserTag = "teaser_tag" + + case command + + case slug + + case productPublish = "product_publish" } 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.trader = trader - - self.media = media + self.shortDescription = shortDescription - self.isDependent = isDependent + self.sizes = sizes self.returnConfig = returnConfig - self.brandUid = brandUid + self.customOrder = customOrder - self.currency = currency + self.sizeGuide = sizeGuide - self.isActive = isActive + self.brandUid = brandUid - self.command = command + self.productGroupTag = productGroupTag - self.variants = variants + self.name = name - self.description = description + self.multiSize = multiSize - self.customOrder = customOrder + self.media = media - self.categorySlug = categorySlug + self.itemCode = itemCode - self.hsnCode = hsnCode + self.noOfBoxes = noOfBoxes - self.slug = slug + self.description = description self.tags = tags - self.name = name - - self.highlights = highlights + self.itemType = itemType self.traderType = traderType - self.itemType = itemType - - self.itemCode = itemCode + self.isActive = isActive - self.teaserTag = teaserTag + self.countryOfOrigin = countryOfOrigin - self.noOfBoxes = noOfBoxes + self.highlights = highlights - self.multiSize = multiSize + self.hsnCode = hsnCode - self.sizes = sizes + self.trader = trader self.moq = moq - self.shortDescription = shortDescription + self.categorySlug = categorySlug - self.countryOfOrigin = countryOfOrigin + self.isDependent = isDependent - self.productPublish = productPublish + self.currency = currency - self.productGroupTag = productGroupTag + self.variants = variants - self.sizeGuide = sizeGuide + self.teaserTag = teaserTag + + self.command = command + + self.slug = slug + + self.productPublish = productPublish } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - trader = try container.decode([String: Any].self, forKey: .trader) + shortDescription = try container.decode([String: Any].self, forKey: .shortDescription) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -204,7 +204,7 @@ public extension PlatformClient { } catch {} do { - media = try container.decode([String: Any].self, forKey: .media) + sizes = try container.decode([String: Any].self, forKey: .sizes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -212,7 +212,7 @@ public extension PlatformClient { } catch {} do { - isDependent = try container.decode([String: Any].self, forKey: .isDependent) + returnConfig = try container.decode([String: Any].self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -220,7 +220,7 @@ public extension PlatformClient { } catch {} do { - returnConfig = try container.decode([String: Any].self, forKey: .returnConfig) + customOrder = try container.decode([String: Any].self, forKey: .customOrder) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -228,7 +228,7 @@ public extension PlatformClient { } catch {} do { - brandUid = try container.decode([String: Any].self, forKey: .brandUid) + sizeGuide = try container.decode([String: Any].self, forKey: .sizeGuide) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -236,7 +236,7 @@ public extension PlatformClient { } catch {} do { - currency = try container.decode([String: Any].self, forKey: .currency) + brandUid = try container.decode([String: Any].self, forKey: .brandUid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -244,7 +244,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode([String: Any].self, forKey: .isActive) + productGroupTag = try container.decode([String: Any].self, forKey: .productGroupTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -252,7 +252,7 @@ public extension PlatformClient { } catch {} do { - command = try container.decode([String: Any].self, forKey: .command) + name = try container.decode([String: Any].self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -260,7 +260,7 @@ public extension PlatformClient { } catch {} do { - variants = try container.decode([String: Any].self, forKey: .variants) + multiSize = try container.decode([String: Any].self, forKey: .multiSize) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -268,7 +268,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode([String: Any].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) @@ -276,7 +276,7 @@ public extension PlatformClient { } catch {} do { - customOrder = try container.decode([String: Any].self, forKey: .customOrder) + itemCode = try container.decode([String: Any].self, forKey: .itemCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -284,7 +284,7 @@ public extension PlatformClient { } catch {} do { - categorySlug = try container.decode([String: Any].self, forKey: .categorySlug) + noOfBoxes = try container.decode([String: Any].self, forKey: .noOfBoxes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -292,7 +292,7 @@ public extension PlatformClient { } catch {} do { - hsnCode = try container.decode([String: Any].self, forKey: .hsnCode) + description = try container.decode([String: Any].self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -300,7 +300,7 @@ public extension PlatformClient { } catch {} do { - slug = try container.decode([String: Any].self, forKey: .slug) + tags = try container.decode([String: Any].self, forKey: .tags) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -308,7 +308,7 @@ public extension PlatformClient { } catch {} do { - tags = try container.decode([String: Any].self, forKey: .tags) + itemType = try container.decode([String: Any].self, forKey: .itemType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -316,7 +316,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode([String: Any].self, forKey: .name) + traderType = try container.decode([String: Any].self, forKey: .traderType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -324,7 +324,7 @@ public extension PlatformClient { } catch {} do { - highlights = try container.decode([String: Any].self, forKey: .highlights) + isActive = try container.decode([String: Any].self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -332,7 +332,7 @@ public extension PlatformClient { } catch {} do { - traderType = try container.decode([String: Any].self, forKey: .traderType) + countryOfOrigin = try container.decode([String: Any].self, forKey: .countryOfOrigin) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -340,7 +340,7 @@ public extension PlatformClient { } catch {} do { - itemType = try container.decode([String: Any].self, forKey: .itemType) + highlights = try container.decode([String: Any].self, forKey: .highlights) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -348,7 +348,7 @@ public extension PlatformClient { } catch {} do { - itemCode = try container.decode([String: Any].self, forKey: .itemCode) + hsnCode = try container.decode([String: Any].self, forKey: .hsnCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -356,7 +356,7 @@ public extension PlatformClient { } catch {} do { - teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) + trader = try container.decode([String: Any].self, forKey: .trader) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -364,7 +364,7 @@ public extension PlatformClient { } catch {} do { - noOfBoxes = try container.decode([String: Any].self, forKey: .noOfBoxes) + moq = try container.decode([String: Any].self, forKey: .moq) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -372,7 +372,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) @@ -380,7 +380,7 @@ public extension PlatformClient { } catch {} do { - sizes = try container.decode([String: Any].self, forKey: .sizes) + isDependent = try container.decode([String: Any].self, forKey: .isDependent) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -388,7 +388,7 @@ public extension PlatformClient { } catch {} do { - moq = try container.decode([String: Any].self, forKey: .moq) + currency = try container.decode([String: Any].self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -396,7 +396,7 @@ public extension PlatformClient { } catch {} do { - shortDescription = try container.decode([String: Any].self, forKey: .shortDescription) + variants = try container.decode([String: Any].self, forKey: .variants) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -404,7 +404,7 @@ public extension PlatformClient { } catch {} do { - countryOfOrigin = try container.decode([String: Any].self, forKey: .countryOfOrigin) + teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -412,7 +412,7 @@ public extension PlatformClient { } catch {} do { - productPublish = try container.decode([String: Any].self, forKey: .productPublish) + command = try container.decode([String: Any].self, forKey: .command) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -420,7 +420,7 @@ public extension PlatformClient { } catch {} do { - productGroupTag = try container.decode([String: Any].self, forKey: .productGroupTag) + slug = try container.decode([String: Any].self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -428,7 +428,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) @@ -439,65 +439,65 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(trader, forKey: .trader) - - try? container.encodeIfPresent(media, forKey: .media) + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) - try? container.encodeIfPresent(isDependent, forKey: .isDependent) + try? container.encodeIfPresent(sizes, forKey: .sizes) try? container.encodeIfPresent(returnConfig, forKey: .returnConfig) - try? container.encodeIfPresent(brandUid, forKey: .brandUid) + try? container.encodeIfPresent(customOrder, forKey: .customOrder) - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(brandUid, forKey: .brandUid) - try? container.encodeIfPresent(command, forKey: .command) + try? container.encodeIfPresent(productGroupTag, forKey: .productGroupTag) - try? container.encodeIfPresent(variants, forKey: .variants) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(multiSize, forKey: .multiSize) - try? container.encodeIfPresent(customOrder, forKey: .customOrder) + try? container.encodeIfPresent(media, forKey: .media) - try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) + try? container.encodeIfPresent(itemCode, forKey: .itemCode) - try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) + try? container.encodeIfPresent(noOfBoxes, forKey: .noOfBoxes) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(tags, forKey: .tags) - try? container.encodeIfPresent(name, forKey: .name) - - try? container.encodeIfPresent(highlights, forKey: .highlights) + try? container.encodeIfPresent(itemType, forKey: .itemType) try? container.encodeIfPresent(traderType, forKey: .traderType) - try? container.encodeIfPresent(itemType, forKey: .itemType) - - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(isActive, forKey: .isActive) - try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) - try? container.encodeIfPresent(noOfBoxes, forKey: .noOfBoxes) + try? container.encodeIfPresent(highlights, forKey: .highlights) - try? container.encodeIfPresent(multiSize, forKey: .multiSize) + try? container.encodeIfPresent(hsnCode, forKey: .hsnCode) - try? container.encodeIfPresent(sizes, forKey: .sizes) + try? container.encodeIfPresent(trader, forKey: .trader) try? container.encodeIfPresent(moq, forKey: .moq) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) - try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) + try? container.encodeIfPresent(isDependent, forKey: .isDependent) - try? container.encodeIfPresent(productPublish, forKey: .productPublish) + try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encodeIfPresent(productGroupTag, forKey: .productGroupTag) + try? container.encodeIfPresent(variants, forKey: .variants) - try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) + try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + + try? container.encodeIfPresent(command, forKey: .command) + + try? container.encodeIfPresent(slug, forKey: .slug) + + try? container.encodeIfPresent(productPublish, forKey: .productPublish) } } } diff --git a/Sources/code/platform/models/RefundAccountResponsePlatformModelClass.swift b/Sources/code/platform/models/RefundAccountResponsePlatformModelClass.swift index 11a2ae36fe..048798ce64 100644 --- a/Sources/code/platform/models/RefundAccountResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/RefundAccountResponsePlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class RefundAccountResponse: Codable { - public var data: [String: Any]? + public var isVerifiedFlag: Bool? public var success: Bool - public var isVerifiedFlag: 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 isVerifiedFlag = "is_verified_flag" - 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.isVerifiedFlag = isVerifiedFlag - self.message = message + + self.data = data } 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) + isVerifiedFlag = try container.decode(Bool.self, forKey: .isVerifiedFlag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,27 +49,27 @@ public extension PlatformClient { success = try container.decode(Bool.self, forKey: .success) + message = try container.decode(String.self, forKey: .message) + 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 {} - - 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(isVerifiedFlag, forKey: .isVerifiedFlag) - 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 18f05c45d6..038956eeed 100644 --- a/Sources/code/platform/models/RootPaymentModePlatformModelClass.swift +++ b/Sources/code/platform/models/RootPaymentModePlatformModelClass.swift @@ -8,55 +8,59 @@ public extension PlatformClient { */ class RootPaymentMode: Codable { - public var list: [PaymentModeList]? + public var displayPriority: Int public var name: String - public var displayName: String + public var list: [PaymentModeList]? - public var displayPriority: Int + public var displayName: String public var aggregatorName: String? - public var anonymousEnable: Bool? - public var addCardEnabled: Bool? + public var anonymousEnable: Bool? + public enum CodingKeys: String, CodingKey { - case list + case displayPriority = "display_priority" case name - case displayName = "display_name" + case list - case displayPriority = "display_priority" + case displayName = "display_name" case aggregatorName = "aggregator_name" - case anonymousEnable = "anonymous_enable" - case addCardEnabled = "add_card_enabled" + + case anonymousEnable = "anonymous_enable" } public init(addCardEnabled: Bool? = nil, aggregatorName: String? = nil, anonymousEnable: Bool? = nil, displayName: String, displayPriority: Int, list: [PaymentModeList]? = nil, name: String) { - self.list = list + self.displayPriority = displayPriority self.name = name - self.displayName = displayName + self.list = list - self.displayPriority = displayPriority + self.displayName = displayName self.aggregatorName = aggregatorName - self.anonymousEnable = anonymousEnable - self.addCardEnabled = addCardEnabled + + self.anonymousEnable = anonymousEnable } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + 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) @@ -65,12 +69,8 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} - name = try container.decode(String.self, forKey: .name) - displayName = try container.decode(String.self, forKey: .displayName) - displayPriority = try container.decode(Int.self, forKey: .displayPriority) - do { aggregatorName = try container.decode(String.self, forKey: .aggregatorName) @@ -80,7 +80,7 @@ public extension PlatformClient { } catch {} 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) @@ -88,7 +88,7 @@ public extension PlatformClient { } catch {} do { - addCardEnabled = try container.decode(Bool.self, forKey: .addCardEnabled) + anonymousEnable = try container.decode(Bool.self, forKey: .anonymousEnable) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -99,19 +99,19 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(list, forKey: .list) + try? container.encodeIfPresent(displayPriority, forKey: .displayPriority) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(list, forKey: .list) - try? container.encodeIfPresent(displayPriority, forKey: .displayPriority) + try? container.encodeIfPresent(displayName, forKey: .displayName) try? container.encode(aggregatorName, forKey: .aggregatorName) - try? container.encode(anonymousEnable, forKey: .anonymousEnable) - try? container.encode(addCardEnabled, forKey: .addCardEnabled) + + try? container.encode(anonymousEnable, forKey: .anonymousEnable) } } } diff --git a/Sources/code/platform/models/SaveSubscriptionSetupIntentResponsePlatformModelClass.swift b/Sources/code/platform/models/SaveSubscriptionSetupIntentResponsePlatformModelClass.swift index 86c3227cd9..fee49c9394 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 data: [String: Any] - public var success: Bool - public enum CodingKeys: String, CodingKey { - case data + public var data: [String: Any] + public enum CodingKeys: String, CodingKey { case success + + case data } public init(data: [String: Any], success: Bool) { - self.data = data - self.success = success + + self.data = data } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - data = try container.decode([String: Any].self, forKey: .data) - success = try container.decode(Bool.self, forKey: .success) + + data = try container.decode([String: Any].self, forKey: .data) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(data, forKey: .data) - try? container.encodeIfPresent(success, forKey: .success) + + try? container.encodeIfPresent(data, forKey: .data) } } } diff --git a/Sources/code/platform/models/SchedulePlatformModelClass.swift b/Sources/code/platform/models/SchedulePlatformModelClass.swift index c8c2da2a07..bca665d0f1 100644 --- a/Sources/code/platform/models/SchedulePlatformModelClass.swift +++ b/Sources/code/platform/models/SchedulePlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class Schedule: Codable { + public var duration: Int? + public var cron: String? public var start: String? public var end: String? - public var duration: Int? - public enum CodingKeys: String, CodingKey { + case duration + case cron case start case end - - case duration } public init(cron: String? = nil, duration: Int? = nil, end: String? = nil, start: String? = nil) { + self.duration = duration + self.cron = cron self.start = start self.end = end - - self.duration = duration } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - cron = try container.decode(String.self, forKey: .cron) + duration = try container.decode(Int.self, forKey: .duration) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} do { - start = try container.decode(String.self, forKey: .start) + cron = try container.decode(String.self, forKey: .cron) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - end = try container.decode(String.self, forKey: .end) + start = try container.decode(String.self, forKey: .start) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -64,7 +64,7 @@ public extension PlatformClient { } catch {} do { - duration = try container.decode(Int.self, forKey: .duration) + end = try container.decode(String.self, forKey: .end) } 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.encode(duration, forKey: .duration) + try? container.encode(cron, forKey: .cron) try? container.encodeIfPresent(start, forKey: .start) try? container.encode(end, forKey: .end) - - try? container.encode(duration, forKey: .duration) } } } diff --git a/Sources/code/platform/models/SecondLevelChildPlatformModelClass.swift b/Sources/code/platform/models/SecondLevelChildPlatformModelClass.swift index e4539d8406..dc4e05d365 100644 --- a/Sources/code/platform/models/SecondLevelChildPlatformModelClass.swift +++ b/Sources/code/platform/models/SecondLevelChildPlatformModelClass.swift @@ -8,49 +8,49 @@ public extension PlatformClient { */ class SecondLevelChild: Codable { - public var customJson: [String: Any]? + public var banners: ImageUrls? public var name: String? - public var banners: ImageUrls? + public var action: Action? public var childs: [ThirdLevelChild]? - public var action: Action? - public var uid: Int? + public var customJson: [String: Any]? + public var slug: String? public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + case banners case name - case banners + case action case childs - case action - case uid + case customJson = "_custom_json" + case slug } 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.banners = banners self.name = name - self.banners = banners + self.action = action self.childs = childs - self.action = action - self.uid = uid + self.customJson = customJson + self.slug = slug } @@ -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) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +74,7 @@ public extension PlatformClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,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) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.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) @@ -117,18 +117,18 @@ 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(banners, forKey: .banners) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(action, forKey: .action) try? container.encodeIfPresent(childs, forKey: .childs) - try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(slug, forKey: .slug) } } 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/SeoDetailPlatformModelClass.swift b/Sources/code/platform/models/SeoDetailPlatformModelClass.swift index f2ea189654..c406030636 100644 --- a/Sources/code/platform/models/SeoDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/SeoDetailPlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class SeoDetail: Codable { - public var description: String? - public var title: String? - public enum CodingKeys: String, CodingKey { - case description + public var description: String? + public enum CodingKeys: String, CodingKey { case title + + case description } public init(description: String? = nil, title: String? = nil) { - self.description = description - self.title = title + + self.description = description } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - description = try container.decode(String.self, forKey: .description) + 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) + description = try container.decode(String.self, forKey: .description) } 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(description, forKey: .description) - try? container.encodeIfPresent(title, forKey: .title) + + try? container.encodeIfPresent(description, forKey: .description) } } } diff --git a/Sources/code/platform/models/Size1PlatformModelClass.swift b/Sources/code/platform/models/Size1PlatformModelClass.swift index 66ebed7caf..cc6b53e7f3 100644 --- a/Sources/code/platform/models/Size1PlatformModelClass.swift +++ b/Sources/code/platform/models/Size1PlatformModelClass.swift @@ -8,123 +8,123 @@ public extension PlatformClient { */ class Size1: Codable { - public var size: String? - - public var priceTransfer: Double? - - public var itemDimensionsUnitOfMeasure: String? - - public var price: Double - - public var currency: String - - public var itemWeight: Double? - - public var identifiers: [[String: Any]]? - - public var itemLength: Double? - public var expirationDate: String? - public var sellerIdentifier: String + public var itemWeightUnitOfMeasure: String? public var quantity: Int - public var itemHeight: Double? + public var currency: String public var isSet: Bool? - public var itemWidth: Double? - - public var itemWeightUnitOfMeasure: String? - - public var storeCode: String + public var itemHeight: Double? public var set: InventorySet? public var priceEffective: Double - public enum CodingKeys: String, CodingKey { - case size + public var itemWidth: Double? - case priceTransfer = "price_transfer" + public var price: Double - case itemDimensionsUnitOfMeasure = "item_dimensions_unit_of_measure" + public var itemLength: Double? - case price + public var itemWeight: Double? - case currency + public var identifiers: [[String: Any]]? - case itemWeight = "item_weight" + public var storeCode: String - case identifiers + public var itemDimensionsUnitOfMeasure: String? - case itemLength = "item_length" + public var priceTransfer: Double? + + public var sellerIdentifier: String + public var size: String? + + public enum CodingKeys: String, CodingKey { case expirationDate = "expiration_date" - case sellerIdentifier = "seller_identifier" + case itemWeightUnitOfMeasure = "item_weight_unit_of_measure" case quantity - case itemHeight = "item_height" + case currency case isSet = "is_set" - case itemWidth = "item_width" - - case itemWeightUnitOfMeasure = "item_weight_unit_of_measure" - - case storeCode = "store_code" + case itemHeight = "item_height" case set case priceEffective = "price_effective" - } - 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.size = size + case itemWidth = "item_width" - self.priceTransfer = priceTransfer + case price - self.itemDimensionsUnitOfMeasure = itemDimensionsUnitOfMeasure + case itemLength = "item_length" - self.price = price + case itemWeight = "item_weight" - self.currency = currency + case identifiers - self.itemWeight = itemWeight + case storeCode = "store_code" - self.identifiers = identifiers + case itemDimensionsUnitOfMeasure = "item_dimensions_unit_of_measure" - self.itemLength = itemLength + case priceTransfer = "price_transfer" + + case sellerIdentifier = "seller_identifier" + case size + } + + 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.expirationDate = expirationDate - self.sellerIdentifier = sellerIdentifier + self.itemWeightUnitOfMeasure = itemWeightUnitOfMeasure self.quantity = quantity - self.itemHeight = itemHeight + self.currency = currency self.isSet = isSet + self.itemHeight = itemHeight + + self.set = set + + self.priceEffective = priceEffective + self.itemWidth = itemWidth - self.itemWeightUnitOfMeasure = itemWeightUnitOfMeasure + self.price = price + + self.itemLength = itemLength + + self.itemWeight = itemWeight + + self.identifiers = identifiers self.storeCode = storeCode - self.set = set + self.itemDimensionsUnitOfMeasure = itemDimensionsUnitOfMeasure - self.priceEffective = priceEffective + self.priceTransfer = priceTransfer + + self.sellerIdentifier = sellerIdentifier + + self.size = size } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - size = try container.decode(String.self, forKey: .size) + expirationDate = try container.decode(String.self, forKey: .expirationDate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -132,27 +132,27 @@ public extension PlatformClient { } catch {} do { - priceTransfer = try container.decode(Double.self, forKey: .priceTransfer) + 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 {} + quantity = try container.decode(Int.self, forKey: .quantity) + + currency = try container.decode(String.self, forKey: .currency) + do { - itemDimensionsUnitOfMeasure = try container.decode(String.self, forKey: .itemDimensionsUnitOfMeasure) + 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 {} - price = try container.decode(Double.self, forKey: .price) - - currency = try container.decode(String.self, forKey: .currency) - do { - itemWeight = try container.decode(Double.self, forKey: .itemWeight) + itemHeight = try container.decode(Double.self, forKey: .itemHeight) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -160,35 +160,35 @@ public extension PlatformClient { } catch {} 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 {} + priceEffective = try container.decode(Double.self, forKey: .priceEffective) + do { - itemLength = try container.decode(Double.self, forKey: .itemLength) + itemWidth = try container.decode(Double.self, forKey: .itemWidth) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) print("codingPath:", context.codingPath) } catch {} + price = try container.decode(Double.self, forKey: .price) + do { - expirationDate = try container.decode(String.self, forKey: .expirationDate) + 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 {} - sellerIdentifier = try container.decode(String.self, forKey: .sellerIdentifier) - - quantity = try container.decode(Int.self, forKey: .quantity) - do { - itemHeight = try container.decode(Double.self, forKey: .itemHeight) + itemWeight = try container.decode(Double.self, forKey: .itemWeight) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -196,15 +196,17 @@ public extension PlatformClient { } catch {} do { - isSet = try container.decode(Bool.self, forKey: .isSet) + 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 {} + storeCode = try container.decode(String.self, forKey: .storeCode) + do { - itemWidth = try container.decode(Double.self, forKey: .itemWidth) + itemDimensionsUnitOfMeasure = try container.decode(String.self, forKey: .itemDimensionsUnitOfMeasure) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -212,64 +214,62 @@ public extension PlatformClient { } catch {} do { - itemWeightUnitOfMeasure = try container.decode(String.self, forKey: .itemWeightUnitOfMeasure) + priceTransfer = try container.decode(Double.self, forKey: .priceTransfer) } 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) + sellerIdentifier = try container.decode(String.self, forKey: .sellerIdentifier) do { - set = try container.decode(InventorySet.self, forKey: .set) + size = try container.decode(String.self, forKey: .size) } 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) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encode(size, forKey: .size) - - try? container.encode(priceTransfer, forKey: .priceTransfer) + try? container.encodeIfPresent(expirationDate, forKey: .expirationDate) - try? container.encode(itemDimensionsUnitOfMeasure, forKey: .itemDimensionsUnitOfMeasure) + try? container.encode(itemWeightUnitOfMeasure, forKey: .itemWeightUnitOfMeasure) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(currency, forKey: .currency) - try? container.encode(itemWeight, forKey: .itemWeight) - - try? container.encode(identifiers, forKey: .identifiers) + try? container.encodeIfPresent(isSet, forKey: .isSet) - try? container.encode(itemLength, forKey: .itemLength) + try? container.encode(itemHeight, forKey: .itemHeight) - try? container.encodeIfPresent(expirationDate, forKey: .expirationDate) + try? container.encodeIfPresent(set, forKey: .set) - try? container.encodeIfPresent(sellerIdentifier, forKey: .sellerIdentifier) + try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encode(itemWidth, forKey: .itemWidth) - try? container.encode(itemHeight, forKey: .itemHeight) + try? container.encodeIfPresent(price, forKey: .price) - try? container.encodeIfPresent(isSet, forKey: .isSet) + try? container.encode(itemLength, forKey: .itemLength) - try? container.encode(itemWidth, forKey: .itemWidth) + try? container.encode(itemWeight, forKey: .itemWeight) - try? container.encode(itemWeightUnitOfMeasure, forKey: .itemWeightUnitOfMeasure) + try? container.encode(identifiers, forKey: .identifiers) try? container.encodeIfPresent(storeCode, forKey: .storeCode) - try? container.encodeIfPresent(set, forKey: .set) + try? container.encode(itemDimensionsUnitOfMeasure, forKey: .itemDimensionsUnitOfMeasure) - try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + try? container.encode(priceTransfer, forKey: .priceTransfer) + + try? container.encodeIfPresent(sellerIdentifier, forKey: .sellerIdentifier) + + try? container.encode(size, forKey: .size) } } } diff --git a/Sources/code/platform/models/SizeGuideResponsePlatformModelClass.swift b/Sources/code/platform/models/SizeGuideResponsePlatformModelClass.swift index a9b2c82c55..31e33dc796 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 active: Bool? - - public var subtitle: String? - - public var id: String? + public var tag: String? public var name: String? + public var active: Bool? + public var companyId: Int? - public var title: String? + public var createdBy: [String: Any]? + + public var guide: [String: Any]? public var modifiedBy: [String: Any]? - public var tag: String? + public var title: String? - public var guide: [String: Any]? + public var id: String? public var createdOn: String? - public var createdBy: [String: Any]? - - public var brandId: Int? + public var subtitle: String? public var modifiedOn: String? - public enum CodingKeys: String, CodingKey { - case active - - case subtitle + public var brandId: Int? - case id + public enum CodingKeys: String, CodingKey { + case tag case name + case active + case companyId = "company_id" - case title + case createdBy = "created_by" + + case guide case modifiedBy = "modified_by" - case tag + case title - case guide + case id case createdOn = "created_on" - case createdBy = "created_by" - - case brandId = "brand_id" + case subtitle case modifiedOn = "modified_on" + + case brandId = "brand_id" } 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.active = active - - self.subtitle = subtitle - - self.id = id + self.tag = tag self.name = name + self.active = active + self.companyId = companyId - self.title = title + self.createdBy = createdBy + + self.guide = guide self.modifiedBy = modifiedBy - self.tag = tag + self.title = title - self.guide = guide + self.id = id self.createdOn = createdOn - self.createdBy = createdBy - - self.brandId = brandId + self.subtitle = subtitle self.modifiedOn = modifiedOn + + self.brandId = brandId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - active = try container.decode(Bool.self, forKey: .active) + 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 { - subtitle = try container.decode(String.self, forKey: .subtitle) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +110,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + active = try container.decode(Bool.self, forKey: .active) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -118,7 +118,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient { } catch {} do { - companyId = try container.decode(Int.self, forKey: .companyId) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +134,7 @@ public extension PlatformClient { } catch {} do { - title = try container.decode(String.self, forKey: .title) + guide = try container.decode([String: Any].self, forKey: .guide) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode(String.self, forKey: .tag) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,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) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - createdBy = try container.decode([String: Any].self, forKey: .createdBy) + subtitle = try container.decode(String.self, forKey: .subtitle) } 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) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + brandId = try container.decode(Int.self, forKey: .brandId) } 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(active, forKey: .active) - - try? container.encodeIfPresent(subtitle, forKey: .subtitle) - - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(tag, forKey: .tag) try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(active, forKey: .active) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(title, forKey: .title) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) + + try? container.encodeIfPresent(guide, forKey: .guide) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(tag, forKey: .tag) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(guide, forKey: .guide) + try? container.encodeIfPresent(id, forKey: .id) try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - try? container.encodeIfPresent(brandId, forKey: .brandId) + try? container.encodeIfPresent(subtitle, forKey: .subtitle) try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + try? container.encodeIfPresent(brandId, forKey: .brandId) } } } diff --git a/Sources/code/platform/models/StoreAssignResponsePlatformModelClass.swift b/Sources/code/platform/models/StoreAssignResponsePlatformModelClass.swift index dbe3804ab9..cf915126b7 100644 --- a/Sources/code/platform/models/StoreAssignResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/StoreAssignResponsePlatformModelClass.swift @@ -8,129 +8,127 @@ public extension PlatformClient { */ class StoreAssignResponse: Codable { - public var size: String - - public var priceMarked: Int? - - public var itemId: Int + public var quantity: Int public var companyId: Int? - public var sCity: String? + public var priceEffective: Int? - public var articleAssignment: ArticleAssignment1 + public var id: String? - public var storeId: Int? + public var articleAssignment: ArticleAssignment1 - public var groupId: String? + public var priceMarked: Int? - public var status: Bool + public var sCity: String? - public var quantity: Int + public var strategyWiseListing: [[String: Any]]? - public var storePincode: Int? + public var status: Bool public var index: Int? - public var id: String? + public var storeId: Int? - public var meta: [String: Any]? + public var groupId: String? - public var strategyWiseListing: [[String: Any]]? + public var storePincode: Int? - public var uid: String? + public var itemId: Int - public var priceEffective: Int? + public var uid: String? - public enum CodingKeys: String, CodingKey { - case size + public var size: String - case priceMarked = "price_marked" + public var meta: [String: Any]? - case itemId = "item_id" + public enum CodingKeys: String, CodingKey { + case quantity case companyId = "company_id" - case sCity = "s_city" + case priceEffective = "price_effective" - case articleAssignment = "article_assignment" + case id = "_id" - case storeId = "store_id" + case articleAssignment = "article_assignment" - case groupId = "group_id" + case priceMarked = "price_marked" - case status + case sCity = "s_city" - case quantity + case strategyWiseListing = "strategy_wise_listing" - case storePincode = "store_pincode" + case status case index - case id = "_id" + case storeId = "store_id" - case meta + case groupId = "group_id" - case strategyWiseListing = "strategy_wise_listing" + case storePincode = "store_pincode" + + case itemId = "item_id" case uid - case priceEffective = "price_effective" + case size + + case meta } 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.size = size - - self.priceMarked = priceMarked - - self.itemId = itemId + self.quantity = quantity self.companyId = companyId - self.sCity = sCity + self.priceEffective = priceEffective - self.articleAssignment = articleAssignment + self.id = id - self.storeId = storeId + self.articleAssignment = articleAssignment - self.groupId = groupId + self.priceMarked = priceMarked - self.status = status + self.sCity = sCity - self.quantity = quantity + self.strategyWiseListing = strategyWiseListing - self.storePincode = storePincode + self.status = status self.index = index - self.id = id + self.storeId = storeId - self.meta = meta + self.groupId = groupId - self.strategyWiseListing = strategyWiseListing + self.storePincode = storePincode + + self.itemId = itemId self.uid = uid - self.priceEffective = priceEffective + self.size = size + + self.meta = meta } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - size = try container.decode(String.self, forKey: .size) + quantity = try container.decode(Int.self, forKey: .quantity) do { - priceMarked = try container.decode(Int.self, forKey: .priceMarked) + 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 {} - itemId = try container.decode(Int.self, forKey: .itemId) - do { - companyId = try container.decode(Int.self, forKey: .companyId) + priceEffective = try container.decode(Int.self, forKey: .priceEffective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -138,7 +136,7 @@ public extension PlatformClient { } catch {} do { - sCity = try container.decode(String.self, forKey: .sCity) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -148,7 +146,7 @@ public extension PlatformClient { articleAssignment = try container.decode(ArticleAssignment1.self, forKey: .articleAssignment) do { - storeId = try container.decode(Int.self, forKey: .storeId) + priceMarked = try container.decode(Int.self, forKey: .priceMarked) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -156,25 +154,23 @@ public extension PlatformClient { } catch {} do { - groupId = try container.decode(String.self, forKey: .groupId) + 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) - - quantity = try container.decode(Int.self, forKey: .quantity) - do { - storePincode = try container.decode(Int.self, forKey: .storePincode) + strategyWiseListing = try container.decode([[String: Any]].self, forKey: .strategyWiseListing) } 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) + do { index = try container.decode(Int.self, forKey: .index) @@ -184,7 +180,7 @@ public extension PlatformClient { } catch {} do { - id = try container.decode(String.self, forKey: .id) + storeId = try container.decode(Int.self, forKey: .storeId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -192,7 +188,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) @@ -200,13 +196,15 @@ 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 {} + itemId = try container.decode(Int.self, forKey: .itemId) + do { uid = try container.decode(String.self, forKey: .uid) @@ -215,8 +213,10 @@ public extension PlatformClient { print("codingPath:", context.codingPath) } catch {} + size = try container.decode(String.self, forKey: .size) + do { - priceEffective = try container.decode(Int.self, forKey: .priceEffective) + meta = try container.decode([String: Any].self, forKey: .meta) } 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(size, forKey: .size) - - try? container.encodeIfPresent(priceMarked, forKey: .priceMarked) - - try? container.encodeIfPresent(itemId, forKey: .itemId) + try? container.encodeIfPresent(quantity, forKey: .quantity) try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(sCity, forKey: .sCity) + try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) - try? container.encodeIfPresent(articleAssignment, forKey: .articleAssignment) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(storeId, forKey: .storeId) + try? container.encodeIfPresent(articleAssignment, forKey: .articleAssignment) - try? container.encodeIfPresent(groupId, forKey: .groupId) + try? container.encodeIfPresent(priceMarked, forKey: .priceMarked) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(sCity, forKey: .sCity) - try? container.encodeIfPresent(quantity, forKey: .quantity) + try? container.encodeIfPresent(strategyWiseListing, forKey: .strategyWiseListing) - try? container.encodeIfPresent(storePincode, forKey: .storePincode) + try? container.encodeIfPresent(status, forKey: .status) try? container.encodeIfPresent(index, forKey: .index) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(storeId, forKey: .storeId) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(groupId, forKey: .groupId) - try? container.encodeIfPresent(strategyWiseListing, forKey: .strategyWiseListing) + try? container.encodeIfPresent(storePincode, forKey: .storePincode) + + try? container.encodeIfPresent(itemId, forKey: .itemId) try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + try? container.encodeIfPresent(size, forKey: .size) + + try? container.encodeIfPresent(meta, forKey: .meta) } } } diff --git a/Sources/code/platform/models/StoreDetailPlatformModelClass.swift b/Sources/code/platform/models/StoreDetailPlatformModelClass.swift index 81c4c9de20..914f360679 100644 --- a/Sources/code/platform/models/StoreDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/StoreDetailPlatformModelClass.swift @@ -10,72 +10,72 @@ public extension PlatformClient { class StoreDetail: Codable { public var name: String? - public var timing: [String: Any]? - public var companyId: Int? - public var displayName: String? - - public var additionalContacts: [[String: Any]]? + public var timing: [String: Any]? public var storeType: String? - public var createdOn: String? + public var documents: [[String: Any]]? public var storeCode: String? - public var documents: [[String: Any]]? + public var createdOn: String? + + public var additionalContacts: [[String: Any]]? public var uid: Int? public var modifiedOn: String? + public var displayName: String? + public enum CodingKeys: String, CodingKey { case name - case timing - case companyId = "company_id" - case displayName = "display_name" - - case additionalContacts = "additional_contacts" + case timing case storeType = "store_type" - case createdOn = "created_on" + case documents case storeCode = "store_code" - case documents + case createdOn = "created_on" + + case additionalContacts = "additional_contacts" case uid case modifiedOn = "modified_on" + + case displayName = "display_name" } 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.name = name - self.timing = timing - self.companyId = companyId - self.displayName = displayName - - self.additionalContacts = additionalContacts + self.timing = timing self.storeType = storeType - self.createdOn = createdOn + self.documents = documents self.storeCode = storeCode - self.documents = documents + self.createdOn = createdOn + + self.additionalContacts = additionalContacts self.uid = uid self.modifiedOn = modifiedOn + + self.displayName = displayName } required public init(from decoder: Decoder) throws { @@ -90,7 +90,7 @@ public extension PlatformClient { } catch {} do { - timing = try container.decode([String: Any].self, forKey: .timing) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} 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) @@ -106,7 +106,7 @@ public extension PlatformClient { } catch {} do { - displayName = try container.decode(String.self, forKey: .displayName) + storeType = try container.decode(String.self, forKey: .storeType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +114,7 @@ public extension PlatformClient { } catch {} do { - additionalContacts = try container.decode([[String: Any]].self, forKey: .additionalContacts) + documents = try container.decode([[String: Any]].self, forKey: .documents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient { } catch {} do { - storeType = try container.decode(String.self, forKey: .storeType) + storeCode = try container.decode(String.self, forKey: .storeCode) } 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) + additionalContacts = try container.decode([[String: Any]].self, forKey: .additionalContacts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient { } catch {} do { - documents = try container.decode([[String: Any]].self, forKey: .documents) + uid = try container.decode(Int.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ 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) @@ -162,7 +162,7 @@ public extension PlatformClient { } catch {} do { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + displayName = try container.decode(String.self, forKey: .displayName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -175,25 +175,25 @@ public extension PlatformClient { try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(timing, forKey: .timing) - try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(displayName, forKey: .displayName) - - try? container.encodeIfPresent(additionalContacts, forKey: .additionalContacts) + try? container.encodeIfPresent(timing, forKey: .timing) try? container.encodeIfPresent(storeType, forKey: .storeType) - try? container.encodeIfPresent(createdOn, forKey: .createdOn) + try? container.encodeIfPresent(documents, forKey: .documents) try? container.encodeIfPresent(storeCode, forKey: .storeCode) - try? container.encodeIfPresent(documents, forKey: .documents) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) + + try? container.encodeIfPresent(additionalContacts, forKey: .additionalContacts) try? container.encodeIfPresent(uid, forKey: .uid) try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + try? container.encodeIfPresent(displayName, forKey: .displayName) } } } diff --git a/Sources/code/platform/models/SubscriptionConfigResponsePlatformModelClass.swift b/Sources/code/platform/models/SubscriptionConfigResponsePlatformModelClass.swift index 26a18dd60b..c1a936b47d 100644 --- a/Sources/code/platform/models/SubscriptionConfigResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/SubscriptionConfigResponsePlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class SubscriptionConfigResponse: Codable { public var success: Bool - public var aggregator: String - public var config: [String: Any] + public var aggregator: String + public enum CodingKeys: String, CodingKey { case success - case aggregator - case config + + case aggregator } public init(aggregator: String, config: [String: Any], success: Bool) { self.success = success - self.aggregator = aggregator - self.config = config + + self.aggregator = aggregator } required public init(from decoder: Decoder) throws { @@ -35,9 +35,9 @@ public extension PlatformClient { success = try container.decode(Bool.self, forKey: .success) - aggregator = try container.decode(String.self, forKey: .aggregator) - config = try container.decode([String: Any].self, forKey: .config) + + aggregator = try container.decode(String.self, forKey: .aggregator) } public func encode(to encoder: Encoder) throws { @@ -45,9 +45,9 @@ public extension PlatformClient { try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(aggregator, forKey: .aggregator) - try? container.encodeIfPresent(config, forKey: .config) + + try? container.encodeIfPresent(aggregator, forKey: .aggregator) } } } diff --git a/Sources/code/platform/models/SubscriptionPaymentMethodResponsePlatformModelClass.swift b/Sources/code/platform/models/SubscriptionPaymentMethodResponsePlatformModelClass.swift index 20d65bd3a2..68aadb9525 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 data: [[String: Any]] - public var success: Bool - public enum CodingKeys: String, CodingKey { - case data + public var data: [[String: Any]] + public enum CodingKeys: String, CodingKey { case success + + case data } public init(data: [[String: Any]], success: Bool) { - self.data = data - self.success = success + + self.data = data } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - data = try container.decode([[String: Any]].self, forKey: .data) - success = try container.decode(Bool.self, forKey: .success) + + data = try container.decode([[String: Any]].self, forKey: .data) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(data, forKey: .data) - try? container.encodeIfPresent(success, forKey: .success) + + try? container.encodeIfPresent(data, forKey: .data) } } } 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 69cec8266e..50ccf3b8ed 100644 --- a/Sources/code/platform/models/TemplateDetailsPlatformModelClass.swift +++ b/Sources/code/platform/models/TemplateDetailsPlatformModelClass.swift @@ -8,95 +8,93 @@ public extension PlatformClient { */ class TemplateDetails: Codable { - public var isPhysical: Bool + public var attributes: [String]? - public var id: String? + public var tag: String? public var name: String? - public var attributes: [String]? - public var departments: [String]? - public var tag: String? + public var isArchived: Bool? - public var isActive: Bool? + public var id: String? - public var isArchived: Bool? + public var description: String? public var logo: String? public var isExpirable: Bool - public var description: String? + public var isPhysical: Bool + + public var slug: String public var categories: [String]? - public var slug: String + public var isActive: Bool? public enum CodingKeys: String, CodingKey { - case isPhysical = "is_physical" + case attributes - case id + case tag case name - case attributes - case departments - case tag + case isArchived = "is_archived" - case isActive = "is_active" + case id - case isArchived = "is_archived" + case description case logo case isExpirable = "is_expirable" - case description + case isPhysical = "is_physical" + + case slug case categories - case slug + case isActive = "is_active" } 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.isPhysical = isPhysical + self.attributes = attributes - self.id = id + self.tag = tag self.name = name - self.attributes = attributes - self.departments = departments - self.tag = tag + self.isArchived = isArchived - self.isActive = isActive + self.id = id - self.isArchived = isArchived + self.description = description self.logo = logo self.isExpirable = isExpirable - self.description = description + self.isPhysical = isPhysical + + self.slug = slug self.categories = categories - self.slug = slug + self.isActive = isActive } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - isPhysical = try container.decode(Bool.self, forKey: .isPhysical) - do { - id = try container.decode(String.self, forKey: .id) + attributes = try container.decode([String].self, forKey: .attributes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +102,7 @@ public extension PlatformClient { } catch {} do { - name = try container.decode(String.self, forKey: .name) + tag = try container.decode(String.self, forKey: .tag) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -112,7 +110,7 @@ public extension PlatformClient { } catch {} do { - attributes = try container.decode([String].self, forKey: .attributes) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +126,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode(String.self, forKey: .tag) + isArchived = try container.decode(Bool.self, forKey: .isArchived) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -136,7 +134,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -144,7 +142,7 @@ public extension PlatformClient { } catch {} do { - isArchived = try container.decode(Bool.self, forKey: .isArchived) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -161,8 +159,12 @@ public extension PlatformClient { isExpirable = try container.decode(Bool.self, forKey: .isExpirable) + isPhysical = try container.decode(Bool.self, forKey: .isPhysical) + + slug = try container.decode(String.self, forKey: .slug) + do { - description = try container.decode(String.self, forKey: .description) + categories = try container.decode([String].self, forKey: .categories) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,44 +172,42 @@ public extension PlatformClient { } catch {} do { - categories = try container.decode([String].self, forKey: .categories) + 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 {} - - slug = try container.decode(String.self, forKey: .slug) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(isPhysical, forKey: .isPhysical) + try? container.encode(attributes, forKey: .attributes) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(tag, forKey: .tag) try? container.encodeIfPresent(name, forKey: .name) - try? container.encode(attributes, forKey: .attributes) - try? container.encode(departments, forKey: .departments) - try? container.encodeIfPresent(tag, forKey: .tag) + try? container.encodeIfPresent(isArchived, forKey: .isArchived) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(isArchived, forKey: .isArchived) + try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(logo, forKey: .logo) try? container.encodeIfPresent(isExpirable, forKey: .isExpirable) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(isPhysical, forKey: .isPhysical) + + try? container.encodeIfPresent(slug, forKey: .slug) try? container.encode(categories, forKey: .categories) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/TemplatesResponsePlatformModelClass.swift b/Sources/code/platform/models/TemplatesResponsePlatformModelClass.swift index 7e9c8c429b..3074f0bc89 100644 --- a/Sources/code/platform/models/TemplatesResponsePlatformModelClass.swift +++ b/Sources/code/platform/models/TemplatesResponsePlatformModelClass.swift @@ -8,27 +8,27 @@ public extension PlatformClient { */ class TemplatesResponse: Codable { - public var items: ProductTemplate? - public var page: Page? - public enum CodingKeys: String, CodingKey { - case items + public var items: ProductTemplate? + public enum CodingKeys: String, CodingKey { case page + + case items } public init(items: ProductTemplate? = 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(ProductTemplate.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(ProductTemplate.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/ThirdLevelChildPlatformModelClass.swift b/Sources/code/platform/models/ThirdLevelChildPlatformModelClass.swift index afb764b3ae..ef1e68778b 100644 --- a/Sources/code/platform/models/ThirdLevelChildPlatformModelClass.swift +++ b/Sources/code/platform/models/ThirdLevelChildPlatformModelClass.swift @@ -8,49 +8,49 @@ public extension PlatformClient { */ class ThirdLevelChild: Codable { - public var customJson: [String: Any]? + public var banners: ImageUrls? public var name: String? - public var banners: ImageUrls? + public var action: Action? public var childs: [[String: Any]]? - public var action: Action? - public var uid: Int? + public var customJson: [String: Any]? + public var slug: String? public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" + case banners case name - case banners + case action case childs - case action - case uid + case customJson = "_custom_json" + case slug } 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.banners = banners self.name = name - self.banners = banners + self.action = action self.childs = childs - self.action = action - self.uid = uid + self.customJson = customJson + self.slug = slug } @@ -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) + banners = try container.decode(ImageUrls.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +74,7 @@ public extension PlatformClient { } catch {} do { - banners = try container.decode(ImageUrls.self, forKey: .banners) + action = try container.decode(Action.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,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) @@ -98,7 +98,7 @@ public extension PlatformClient { } catch {} do { - uid = try container.decode(Int.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) @@ -117,18 +117,18 @@ 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(banners, forKey: .banners) try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(action, forKey: .action) try? container.encodeIfPresent(childs, forKey: .childs) - try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(slug, forKey: .slug) } } diff --git a/Sources/code/platform/models/TraderPlatformModelClass.swift b/Sources/code/platform/models/TraderPlatformModelClass.swift index 9cbf9c9e38..15fdac8d81 100644 --- a/Sources/code/platform/models/TraderPlatformModelClass.swift +++ b/Sources/code/platform/models/TraderPlatformModelClass.swift @@ -8,33 +8,33 @@ public extension PlatformClient { */ class Trader: Codable { - public var address: [String]? - public var type: String? public var name: String? - public enum CodingKeys: String, CodingKey { - case address + public var address: [String]? + public enum CodingKeys: String, CodingKey { case type case name + + case address } public init(address: [String]? = nil, name: String? = nil, type: String? = nil) { - self.address = address - self.type = type self.name = name + + self.address = address } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) 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) @@ -42,7 +42,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) @@ -50,7 +50,7 @@ public extension PlatformClient { } 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) @@ -61,11 +61,11 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(type, forKey: .type) try? container.encodeIfPresent(name, forKey: .name) + + try? container.encodeIfPresent(address, forKey: .address) } } } diff --git a/Sources/code/platform/models/UpdateCollectionPlatformModelClass.swift b/Sources/code/platform/models/UpdateCollectionPlatformModelClass.swift index 0dee9bc8ec..77a6c7f25f 100644 --- a/Sources/code/platform/models/UpdateCollectionPlatformModelClass.swift +++ b/Sources/code/platform/models/UpdateCollectionPlatformModelClass.swift @@ -8,133 +8,133 @@ public extension PlatformClient { */ class UpdateCollection: Codable { - public var badge: CollectionBadge? + public var banners: CollectionBanner? - public var query: [String: Any]? + public var modifiedBy: UserInfo? - public var published: Bool? + public var query: [String: Any]? public var allowSort: Bool? + public var seo: SeoDetail? + + public var name: String? + + public var isVisible: Bool? + public var schedule: Schedule? - public var isActive: Bool? + public var sortOn: String? public var description: String? public var tags: [String]? - public var slug: String? - - public var customJson: [String: Any]? + public var published: Bool? - public var name: String? + public var badge: CollectionBadge? - public var banners: CollectionBanner? + public var meta: [String: Any]? - public var seo: SeoDetail? + public var isActive: Bool? public var allowFacets: Bool? - public var isVisible: Bool? - - public var sortOn: String? - - public var modifiedBy: UserInfo? - public var logo: CollectionImage? - public var meta: [String: Any]? + public var customJson: [String: Any]? public var visibleFacetsKeys: [String]? + public var slug: String? + public var localeLanguage: [String: Any]? public enum CodingKeys: String, CodingKey { - case badge + case banners - case query + case modifiedBy = "modified_by" - case published + case query case allowSort = "allow_sort" + case seo + + case name + + case isVisible = "is_visible" + case schedule = "_schedule" - case isActive = "is_active" + case sortOn = "sort_on" case description case tags - case slug - - case customJson = "_custom_json" + case published - case name + case badge - case banners + case meta - case seo + case isActive = "is_active" case allowFacets = "allow_facets" - case isVisible = "is_visible" - - case sortOn = "sort_on" - - case modifiedBy = "modified_by" - case logo - case meta + case customJson = "_custom_json" case visibleFacetsKeys = "visible_facets_keys" + case slug + case localeLanguage = "_locale_language" } 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.badge = badge + self.banners = banners - self.query = query + self.modifiedBy = modifiedBy - self.published = published + self.query = query self.allowSort = allowSort + self.seo = seo + + self.name = name + + self.isVisible = isVisible + self.schedule = schedule - self.isActive = isActive + self.sortOn = sortOn self.description = description self.tags = tags - self.slug = slug - - self.customJson = customJson + self.published = published - self.name = name + self.badge = badge - self.banners = banners + self.meta = meta - self.seo = seo + self.isActive = isActive self.allowFacets = allowFacets - self.isVisible = isVisible - - self.sortOn = sortOn - - self.modifiedBy = modifiedBy - self.logo = logo - self.meta = meta + self.customJson = customJson self.visibleFacetsKeys = visibleFacetsKeys + self.slug = slug + self.localeLanguage = localeLanguage } @@ -142,7 +142,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - badge = try container.decode(CollectionBadge.self, forKey: .badge) + banners = try container.decode(CollectionBanner.self, forKey: .banners) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +150,7 @@ public extension PlatformClient { } catch {} do { - query = try container.decode([String: Any].self, forKey: .query) + modifiedBy = try container.decode(UserInfo.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 { - published = try container.decode(Bool.self, forKey: .published) + query = try container.decode([String: Any].self, forKey: .query) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +174,7 @@ public extension PlatformClient { } catch {} do { - schedule = try container.decode(Schedule.self, forKey: .schedule) + seo = try container.decode(SeoDetail.self, forKey: .seo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +182,7 @@ public extension PlatformClient { } catch {} do { - isActive = try container.decode(Bool.self, forKey: .isActive) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -190,7 +190,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + isVisible = try container.decode(Bool.self, forKey: .isVisible) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,7 +198,7 @@ public extension PlatformClient { } catch {} do { - tags = try container.decode([String].self, forKey: .tags) + schedule = try container.decode(Schedule.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 { - slug = try container.decode(String.self, forKey: .slug) + sortOn = try container.decode(String.self, forKey: .sortOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -214,7 +214,7 @@ 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) @@ -222,7 +222,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) @@ -230,7 +230,7 @@ public extension PlatformClient { } catch {} do { - banners = try container.decode(CollectionBanner.self, forKey: .banners) + published = try container.decode(Bool.self, forKey: .published) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -238,7 +238,7 @@ public extension PlatformClient { } catch {} do { - seo = try container.decode(SeoDetail.self, forKey: .seo) + badge = try container.decode(CollectionBadge.self, forKey: .badge) } 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) + meta = try container.decode([String: Any].self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -254,7 +254,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) @@ -262,7 +262,7 @@ public extension PlatformClient { } catch {} do { - sortOn = try container.decode(String.self, forKey: .sortOn) + allowFacets = try container.decode(Bool.self, forKey: .allowFacets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -270,7 +270,7 @@ public extension PlatformClient { } catch {} do { - modifiedBy = try container.decode(UserInfo.self, forKey: .modifiedBy) + logo = try container.decode(CollectionImage.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -278,7 +278,7 @@ public extension PlatformClient { } catch {} do { - logo = try container.decode(CollectionImage.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) @@ -286,7 +286,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) @@ -294,7 +294,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) @@ -313,46 +313,46 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(badge, forKey: .badge) + try? container.encodeIfPresent(banners, forKey: .banners) - try? container.encodeIfPresent(query, forKey: .query) + try? container.encode(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(published, forKey: .published) + try? container.encodeIfPresent(query, forKey: .query) try? container.encodeIfPresent(allowSort, forKey: .allowSort) + try? container.encodeIfPresent(seo, forKey: .seo) + + try? container.encodeIfPresent(name, forKey: .name) + + try? container.encodeIfPresent(isVisible, forKey: .isVisible) + try? container.encodeIfPresent(schedule, forKey: .schedule) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(sortOn, forKey: .sortOn) try? container.encodeIfPresent(description, forKey: .description) try? container.encodeIfPresent(tags, forKey: .tags) - try? container.encodeIfPresent(slug, forKey: .slug) - - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(published, forKey: .published) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(badge, forKey: .badge) - try? container.encodeIfPresent(banners, forKey: .banners) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(seo, forKey: .seo) + try? container.encodeIfPresent(isActive, forKey: .isActive) try? container.encodeIfPresent(allowFacets, forKey: .allowFacets) - try? container.encodeIfPresent(isVisible, forKey: .isVisible) - - try? container.encodeIfPresent(sortOn, forKey: .sortOn) - - try? container.encode(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(logo, forKey: .logo) - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(customJson, forKey: .customJson) try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) + try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) } } diff --git a/Sources/code/platform/models/UpdateCompanyPlatformModelClass.swift b/Sources/code/platform/models/UpdateCompanyPlatformModelClass.swift index 9166457afc..7af0d42e14 100644 --- a/Sources/code/platform/models/UpdateCompanyPlatformModelClass.swift +++ b/Sources/code/platform/models/UpdateCompanyPlatformModelClass.swift @@ -8,99 +8,99 @@ public extension PlatformClient { */ class UpdateCompany: Codable { + public var name: String? + + public var businessType: String? + public var rejectReason: String? - public var businessDetails: BusinessDetails? + public var customJson: [String: Any]? - public var addresses: [CreateUpdateAddressSerializer]? + public var taxes: [CompanyTax]? - public var documents: [Document]? + public var contactDetails: ContactDetails? public var companyType: String? - public var name: String? - public var warnings: [String: Any]? - public var customJson: [String: Any]? + public var addresses: [CreateUpdateAddressSerializer]? - public var taxes: [CompanyTax]? + public var businessInfo: String? public var notificationEmails: [String]? - public var businessInfo: String? + public var businessDetails: BusinessDetails? public var franchiseEnabled: Bool? - public var contactDetails: ContactDetails? - - public var businessType: String? + public var documents: [Document]? public enum CodingKeys: String, CodingKey { + case name + + case businessType = "business_type" + case rejectReason = "reject_reason" - case businessDetails = "business_details" + case customJson = "_custom_json" - case addresses + case taxes - case documents + case contactDetails = "contact_details" case companyType = "company_type" - case name - case warnings - case customJson = "_custom_json" + case addresses - case taxes + case businessInfo = "business_info" case notificationEmails = "notification_emails" - case businessInfo = "business_info" + case businessDetails = "business_details" case franchiseEnabled = "franchise_enabled" - case contactDetails = "contact_details" - - case businessType = "business_type" + case documents } 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, taxes: [CompanyTax]? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { + self.name = name + + self.businessType = businessType + self.rejectReason = rejectReason - self.businessDetails = businessDetails + self.customJson = customJson - self.addresses = addresses + self.taxes = taxes - self.documents = documents + self.contactDetails = contactDetails self.companyType = companyType - self.name = name - self.warnings = warnings - self.customJson = customJson + self.addresses = addresses - self.taxes = taxes + self.businessInfo = businessInfo self.notificationEmails = notificationEmails - self.businessInfo = businessInfo + self.businessDetails = businessDetails self.franchiseEnabled = franchiseEnabled - self.contactDetails = contactDetails - - self.businessType = businessType + self.documents = documents } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - rejectReason = try container.decode(String.self, forKey: .rejectReason) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -108,7 +108,7 @@ public extension PlatformClient { } catch {} do { - businessDetails = try container.decode(BusinessDetails.self, forKey: .businessDetails) + businessType = try container.decode(String.self, forKey: .businessType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,7 +116,7 @@ public extension PlatformClient { } catch {} do { - addresses = try container.decode([CreateUpdateAddressSerializer].self, forKey: .addresses) + rejectReason = try container.decode(String.self, forKey: .rejectReason) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -124,7 +124,7 @@ public extension PlatformClient { } catch {} do { - documents = try container.decode([Document].self, forKey: .documents) + customJson = try container.decode([String: Any].self, forKey: .customJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -132,7 +132,7 @@ public extension PlatformClient { } catch {} do { - companyType = try container.decode(String.self, forKey: .companyType) + taxes = try container.decode([CompanyTax].self, forKey: .taxes) } 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) + contactDetails = try container.decode(ContactDetails.self, forKey: .contactDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -148,7 +148,7 @@ public extension PlatformClient { } catch {} do { - warnings = try container.decode([String: Any].self, forKey: .warnings) + companyType = try container.decode(String.self, forKey: .companyType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -156,7 +156,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) @@ -164,7 +164,7 @@ public extension PlatformClient { } catch {} do { - taxes = try container.decode([CompanyTax].self, forKey: .taxes) + addresses = try container.decode([CreateUpdateAddressSerializer].self, forKey: .addresses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -172,7 +172,7 @@ public extension PlatformClient { } catch {} do { - notificationEmails = try container.decode([String].self, forKey: .notificationEmails) + businessInfo = try container.decode(String.self, forKey: .businessInfo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -180,7 +180,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) @@ -188,7 +188,7 @@ public extension PlatformClient { } catch {} do { - franchiseEnabled = try container.decode(Bool.self, forKey: .franchiseEnabled) + businessDetails = try container.decode(BusinessDetails.self, forKey: .businessDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -196,7 +196,7 @@ public extension PlatformClient { } catch {} do { - contactDetails = try container.decode(ContactDetails.self, forKey: .contactDetails) + franchiseEnabled = try container.decode(Bool.self, forKey: .franchiseEnabled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -204,7 +204,7 @@ public extension PlatformClient { } catch {} do { - businessType = try container.decode(String.self, forKey: .businessType) + documents = try container.decode([Document].self, forKey: .documents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -215,33 +215,33 @@ 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.encodeIfPresent(businessType, forKey: .businessType) + try? container.encodeIfPresent(rejectReason, forKey: .rejectReason) - try? container.encodeIfPresent(businessDetails, forKey: .businessDetails) + try? container.encodeIfPresent(customJson, forKey: .customJson) - try? container.encodeIfPresent(addresses, forKey: .addresses) + try? container.encodeIfPresent(taxes, forKey: .taxes) - try? container.encodeIfPresent(documents, forKey: .documents) + try? container.encodeIfPresent(contactDetails, forKey: .contactDetails) try? container.encodeIfPresent(companyType, forKey: .companyType) - try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(warnings, forKey: .warnings) - try? container.encodeIfPresent(customJson, forKey: .customJson) + try? container.encodeIfPresent(addresses, forKey: .addresses) - try? container.encodeIfPresent(taxes, forKey: .taxes) + try? container.encodeIfPresent(businessInfo, forKey: .businessInfo) try? container.encodeIfPresent(notificationEmails, forKey: .notificationEmails) - try? container.encodeIfPresent(businessInfo, forKey: .businessInfo) + try? container.encodeIfPresent(businessDetails, forKey: .businessDetails) try? container.encodeIfPresent(franchiseEnabled, forKey: .franchiseEnabled) - try? container.encodeIfPresent(contactDetails, forKey: .contactDetails) - - try? container.encodeIfPresent(businessType, forKey: .businessType) + try? container.encodeIfPresent(documents, forKey: .documents) } } } diff --git a/Sources/code/platform/models/UpdatePayoutRequestPlatformModelClass.swift b/Sources/code/platform/models/UpdatePayoutRequestPlatformModelClass.swift index 0556c6c9db..4922c7ffdc 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 isActive: Bool + public var isDefault: Bool public var uniqueExternalId: String - public var isDefault: Bool + public var isActive: Bool public enum CodingKeys: String, CodingKey { - case isActive = "is_active" + case isDefault = "is_default" case uniqueExternalId = "unique_external_id" - case isDefault = "is_default" + case isActive = "is_active" } public init(isActive: Bool, isDefault: Bool, uniqueExternalId: String) { - self.isActive = isActive + self.isDefault = isDefault self.uniqueExternalId = uniqueExternalId - self.isDefault = isDefault + self.isActive = isActive } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - isActive = try container.decode(Bool.self, forKey: .isActive) + isDefault = try container.decode(Bool.self, forKey: .isDefault) uniqueExternalId = try container.decode(String.self, forKey: .uniqueExternalId) - isDefault = try container.decode(Bool.self, forKey: .isDefault) + isActive = try container.decode(Bool.self, forKey: .isActive) } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(isActive, forKey: .isActive) + try? container.encodeIfPresent(isDefault, forKey: .isDefault) try? container.encodeIfPresent(uniqueExternalId, forKey: .uniqueExternalId) - try? container.encodeIfPresent(isDefault, forKey: .isDefault) + try? container.encodeIfPresent(isActive, forKey: .isActive) } } } diff --git a/Sources/code/platform/models/UpdatePayoutResponsePlatformModelClass.swift b/Sources/code/platform/models/UpdatePayoutResponsePlatformModelClass.swift index aac83ecd72..2a580a0435 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 var isDefault: Bool - public enum CodingKeys: String, CodingKey { + case isDefault = "is_default" + 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 4252fab0f0..f673efee41 100644 --- a/Sources/code/platform/models/UserCommonPlatformModelClass.swift +++ b/Sources/code/platform/models/UserCommonPlatformModelClass.swift @@ -10,24 +10,24 @@ public extension PlatformClient { class UserCommon: Codable { public var userId: String? - public var username: String? - public var companyId: Int? + public var username: String? + public enum CodingKeys: String, CodingKey { case userId = "user_id" - case username - case companyId = "company_id" + + case username } public init(companyId: Int? = nil, username: String? = nil, userId: String? = nil) { self.userId = userId - self.username = username - self.companyId = companyId + + self.username = username } required public init(from decoder: Decoder) throws { @@ -42,7 +42,7 @@ public extension PlatformClient { } catch {} 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) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - companyId = try container.decode(Int.self, forKey: .companyId) + username = try container.decode(String.self, forKey: .username) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -63,9 +63,9 @@ public extension PlatformClient { try? container.encodeIfPresent(userId, forKey: .userId) - try? container.encodeIfPresent(username, forKey: .username) - try? container.encodeIfPresent(companyId, forKey: .companyId) + + try? container.encodeIfPresent(username, forKey: .username) } } } diff --git a/Sources/code/platform/models/UserDetailPlatformModelClass.swift b/Sources/code/platform/models/UserDetailPlatformModelClass.swift index 0d39860cb5..ad79869485 100644 --- a/Sources/code/platform/models/UserDetailPlatformModelClass.swift +++ b/Sources/code/platform/models/UserDetailPlatformModelClass.swift @@ -8,25 +8,25 @@ public extension PlatformClient { */ class UserDetail: Codable { - public var userId: String? - public var fullName: String? + public var userId: String? + public var username: String? public enum CodingKeys: String, CodingKey { - case userId = "user_id" - case fullName = "full_name" + case userId = "user_id" + case username } public init(fullName: String? = nil, username: String? = nil, userId: String? = nil) { - self.userId = userId - self.fullName = fullName + self.userId = userId + self.username = username } @@ -34,7 +34,7 @@ public extension PlatformClient { let container = try decoder.container(keyedBy: CodingKeys.self) do { - userId = try container.decode(String.self, forKey: .userId) + 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) @@ -61,10 +61,10 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(userId, forKey: .userId) - 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/UserInfo1PlatformModelClass.swift b/Sources/code/platform/models/UserInfo1PlatformModelClass.swift index aa6ded57a7..06316e8300 100644 --- a/Sources/code/platform/models/UserInfo1PlatformModelClass.swift +++ b/Sources/code/platform/models/UserInfo1PlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class UserInfo1: Codable { - public var userId: String? - - public var username: String? - public var email: String? - public var uid: String? + public var userId: String? - public enum CodingKeys: String, CodingKey { - case userId = "user_id" + public var uid: String? - case username + public var username: String? + public enum CodingKeys: String, CodingKey { case email + case userId = "user_id" + case uid + + case username } public init(email: String? = nil, uid: String? = nil, username: String? = nil, userId: String? = nil) { - self.userId = userId - - self.username = username - self.email = email + self.userId = userId + self.uid = uid + + self.username = username } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - userId = try container.decode(String.self, forKey: .userId) + email = try container.decode(String.self, forKey: .email) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} 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) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - email = try container.decode(String.self, forKey: .email) + uid = try container.decode(String.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 { - uid = try container.decode(String.self, forKey: .uid) + username = try container.decode(String.self, forKey: .username) } 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(userId, forKey: .userId) - - try? container.encodeIfPresent(username, forKey: .username) - try? container.encodeIfPresent(email, forKey: .email) + try? container.encodeIfPresent(userId, forKey: .userId) + try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(username, forKey: .username) } } } diff --git a/Sources/code/platform/models/UserInfoPlatformModelClass.swift b/Sources/code/platform/models/UserInfoPlatformModelClass.swift index 299dd49729..ece734ea53 100644 --- a/Sources/code/platform/models/UserInfoPlatformModelClass.swift +++ b/Sources/code/platform/models/UserInfoPlatformModelClass.swift @@ -8,39 +8,39 @@ public extension PlatformClient { */ class UserInfo: Codable { - public var userId: String? - - public var username: String? - public var email: String? - public var uid: String? + public var userId: String? - public enum CodingKeys: String, CodingKey { - case userId = "user_id" + public var uid: String? - case username + public var username: String? + public enum CodingKeys: String, CodingKey { case email + case userId = "user_id" + case uid + + case username } public init(email: String? = nil, uid: String? = nil, username: String? = nil, userId: String? = nil) { - self.userId = userId - - self.username = username - self.email = email + self.userId = userId + self.uid = uid + + self.username = username } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - userId = try container.decode(String.self, forKey: .userId) + email = try container.decode(String.self, forKey: .email) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +48,7 @@ public extension PlatformClient { } catch {} 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) @@ -56,7 +56,7 @@ public extension PlatformClient { } catch {} do { - email = try container.decode(String.self, forKey: .email) + uid = try container.decode(String.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 { - uid = try container.decode(String.self, forKey: .uid) + username = try container.decode(String.self, forKey: .username) } 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(userId, forKey: .userId) - - try? container.encodeIfPresent(username, forKey: .username) - try? container.encodeIfPresent(email, forKey: .email) + try? container.encodeIfPresent(userId, forKey: .userId) + try? container.encodeIfPresent(uid, forKey: .uid) + + try? container.encodeIfPresent(username, forKey: .username) } } } diff --git a/Sources/code/platform/models/UserSerializer1PlatformModelClass.swift b/Sources/code/platform/models/UserSerializer1PlatformModelClass.swift index da09fcb71c..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 contact: String? + public var userId: String? public var username: String? - public var contact: String? - public enum CodingKeys: String, CodingKey { + case contact + case userId = "user_id" case username - - case contact } public init(contact: String? = nil, username: String? = nil, userId: String? = nil) { + self.contact = contact + self.userId = userId self.username = username - - self.contact = contact } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - userId = try container.decode(String.self, forKey: .userId) + 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 { - 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) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - contact = try container.decode(String.self, forKey: .contact) + 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(contact, forKey: .contact) + try? container.encodeIfPresent(userId, forKey: .userId) try? container.encodeIfPresent(username, forKey: .username) - - try? container.encodeIfPresent(contact, forKey: .contact) } } } diff --git a/Sources/code/platform/models/UserSerializer2PlatformModelClass.swift b/Sources/code/platform/models/UserSerializer2PlatformModelClass.swift index b85e080969..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 contact: String? + public var userId: String? public var username: String? - public var contact: String? - public enum CodingKeys: String, CodingKey { + case contact + case userId = "user_id" case username - - case contact } public init(contact: String? = nil, username: String? = nil, userId: String? = nil) { + self.contact = contact + self.userId = userId self.username = username - - self.contact = contact } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - userId = try container.decode(String.self, forKey: .userId) + 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 { - 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) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - contact = try container.decode(String.self, forKey: .contact) + 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(contact, forKey: .contact) + try? container.encodeIfPresent(userId, forKey: .userId) try? container.encodeIfPresent(username, forKey: .username) - - try? container.encodeIfPresent(contact, forKey: .contact) } } } diff --git a/Sources/code/platform/models/UserSerializerPlatformModelClass.swift b/Sources/code/platform/models/UserSerializerPlatformModelClass.swift index 63eedb6a32..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 contact: String? + public var userId: String? public var username: String? - public var contact: String? - public enum CodingKeys: String, CodingKey { + case contact + case userId = "user_id" case username - - case contact } public init(contact: String? = nil, username: String? = nil, userId: String? = nil) { + self.contact = contact + self.userId = userId self.username = username - - self.contact = contact } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - userId = try container.decode(String.self, forKey: .userId) + 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 { - 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) @@ -50,7 +50,7 @@ public extension PlatformClient { } catch {} do { - contact = try container.decode(String.self, forKey: .contact) + 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(contact, forKey: .contact) + try? container.encodeIfPresent(userId, forKey: .userId) try? container.encodeIfPresent(username, forKey: .username) - - try? container.encodeIfPresent(contact, forKey: .contact) } } } diff --git a/Sources/code/platform/models/ValidateSizeGuidePlatformModelClass.swift b/Sources/code/platform/models/ValidateSizeGuidePlatformModelClass.swift index f690bcd1cd..0a9a02d7cc 100644 --- a/Sources/code/platform/models/ValidateSizeGuidePlatformModelClass.swift +++ b/Sources/code/platform/models/ValidateSizeGuidePlatformModelClass.swift @@ -8,111 +8,113 @@ public extension PlatformClient { */ class ValidateSizeGuide: Codable { - public var subtitle: String? + public var tag: String? + + public var name: String public var active: Bool? - public var id: String? + public var companyId: Int? - public var name: String + public var guide: Guide? - public var companyId: Int? + public var createdBy: [String: Any]? - public var title: String + public var image: String? public var modifiedBy: [String: Any]? - public var tag: String? + public var modifiedOn: String? - public var guide: Guide? + public var id: String? public var createdOn: String? - public var createdBy: [String: Any]? - - public var image: String? + public var subtitle: String? public var description: String? - public var brandId: Int? + public var title: String - public var modifiedOn: String? + public var brandId: Int? public enum CodingKeys: String, CodingKey { - case subtitle + case tag + + case name case active - case id + case companyId = "company_id" - case name + case guide - case companyId = "company_id" + case createdBy = "created_by" - case title + case image case modifiedBy = "modified_by" - case tag + case modifiedOn = "modified_on" - case guide + case id case createdOn = "created_on" - case createdBy = "created_by" - - case image + case subtitle case description - case brandId = "brand_id" + case title - case modifiedOn = "modified_on" + case brandId = "brand_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.subtitle = subtitle + self.tag = tag + + self.name = name self.active = active - self.id = id + self.companyId = companyId - self.name = name + self.guide = guide - self.companyId = companyId + self.createdBy = createdBy - self.title = title + self.image = image self.modifiedBy = modifiedBy - self.tag = tag + self.modifiedOn = modifiedOn - self.guide = guide + self.id = id self.createdOn = createdOn - self.createdBy = createdBy - - self.image = image + self.subtitle = subtitle self.description = description - self.brandId = brandId + self.title = title - self.modifiedOn = modifiedOn + self.brandId = brandId } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) do { - subtitle = try container.decode(String.self, forKey: .subtitle) + tag = try container.decode(String.self, forKey: .tag) } 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 { active = try container.decode(Bool.self, forKey: .active) @@ -122,27 +124,23 @@ 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) print("codingPath:", context.codingPath) } catch {} - name = try container.decode(String.self, forKey: .name) - do { - companyId = try container.decode(Int.self, forKey: .companyId) + guide = try container.decode(Guide.self, forKey: .guide) } 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 { - modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) + createdBy = try container.decode([String: Any].self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -150,7 +148,7 @@ public extension PlatformClient { } catch {} do { - tag = try container.decode(String.self, forKey: .tag) + image = try container.decode(String.self, forKey: .image) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +156,7 @@ public extension PlatformClient { } catch {} do { - guide = try container.decode(Guide.self, forKey: .guide) + modifiedBy = try container.decode([String: Any].self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -166,7 +164,7 @@ public extension PlatformClient { } catch {} do { - createdOn = try container.decode(String.self, forKey: .createdOn) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,7 +172,7 @@ public extension PlatformClient { } catch {} 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) @@ -182,7 +180,7 @@ 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) @@ -190,7 +188,7 @@ public extension PlatformClient { } catch {} do { - description = try container.decode(String.self, forKey: .description) + subtitle = try container.decode(String.self, forKey: .subtitle) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,15 +196,17 @@ public extension PlatformClient { } catch {} do { - brandId = try container.decode(Int.self, forKey: .brandId) + 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 { - modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + brandId = try container.decode(Int.self, forKey: .brandId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -217,35 +217,35 @@ public extension PlatformClient { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(subtitle, forKey: .subtitle) + try? container.encodeIfPresent(tag, forKey: .tag) + + try? container.encodeIfPresent(name, forKey: .name) try? container.encodeIfPresent(active, forKey: .active) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(guide, forKey: .guide) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(title, forKey: .title) + try? container.encodeIfPresent(image, forKey: .image) try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) - try? container.encodeIfPresent(tag, forKey: .tag) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(guide, forKey: .guide) + try? container.encodeIfPresent(id, forKey: .id) try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - try? container.encodeIfPresent(image, forKey: .image) + try? container.encodeIfPresent(subtitle, forKey: .subtitle) try? container.encodeIfPresent(description, forKey: .description) - try? container.encodeIfPresent(brandId, forKey: .brandId) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + try? container.encodeIfPresent(brandId, forKey: .brandId) } } } diff --git a/documentation/application/CATALOG.md b/documentation/application/CATALOG.md index a9e91acac3..091a5e2ff4 100644 --- a/documentation/application/CATALOG.md +++ b/documentation/application/CATALOG.md @@ -7919,9 +7919,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | url | String? | yes | | | meta | [Meta](#Meta)? | yes | | | type | String? | yes | | - | url | String? | yes | | --- @@ -7932,9 +7932,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | type | String? | yes | | | params | [String: Any]? | yes | | | query | [String: Any]? | yes | | + | type | String? | yes | | --- @@ -7945,8 +7945,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | type | String? | yes | | | page | [ProductListingActionPage](#ProductListingActionPage)? | yes | | + | type | String? | yes | | --- @@ -7957,61 +7957,61 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | | logo | [Media](#Media)? | yes | | - | uid | Int? | yes | | + | name | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | + | uid | Int? | yes | | --- - #### [Price](#Price) + #### [ProductDetailAttribute](#ProductDetailAttribute) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | currencySymbol | String? | yes | | - | min | Double? | yes | | - | max | Double? | yes | | - | currencyCode | String? | yes | | + | value | String? | yes | | + | key | String? | yes | | + | type | 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 | | --- - #### [ProductDetailAttribute](#ProductDetailAttribute) + #### [Price](#Price) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | key | String? | yes | | - | type | String? | yes | | - | value | String? | yes | | + | max | Double? | yes | | + | min | Double? | yes | | + | currencySymbol | String? | yes | | + | currencyCode | String? | yes | | --- - #### [ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute) + #### [ProductListingPrice](#ProductListingPrice) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | title | String? | yes | | - | details | [[ProductDetailAttribute](#ProductDetailAttribute)]? | yes | | + | effective | [Price](#Price)? | yes | | + | marked | [Price](#Price)? | yes | | --- @@ -8022,8 +8022,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | key | String | no | | | value | String | no | | + | key | String | no | | --- @@ -8035,32 +8035,32 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | categories | [[ProductBrand](#ProductBrand)]? | yes | | - | discount | String? | yes | | - | itemCode | String? | yes | | - | attributes | [String: Any]? | yes | | | color | String? | yes | | - | productOnlineDate | String? | yes | | | description | String? | yes | | + | itemType | String? | yes | | + | ratingCount | Int? | yes | | + | similars | [String]? | yes | | + | medias | [[Media](#Media)]? | yes | | + | action | [ProductListingAction](#ProductListingAction)? | yes | | + | tryouts | [String]? | yes | | + | itemCode | String? | yes | | + | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | | hasVariant | Bool? | yes | | - | highlights | [String]? | yes | | + | attributes | [String: Any]? | yes | | | type | String? | yes | | - | tryouts | [String]? | yes | | + | rating | Double? | yes | | + | highlights | [String]? | yes | | + | discount | String? | yes | | | price | [ProductListingPrice](#ProductListingPrice)? | yes | | - | teaserTag | String? | yes | | - | ratingCount | Int? | yes | | - | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | + | uid | Int? | yes | | + | productOnlineDate | String? | yes | | + | customMeta | [[MetaFields](#MetaFields)]? | yes | | + | slug | String | no | | + | name | String? | yes | | | shortDescription | String? | yes | | | customJson | [String: Any]? | yes | | + | teaserTag | String? | yes | | | imageNature | String? | yes | | - | rating | Double? | yes | | - | slug | String | no | | - | name | String? | yes | | - | customMeta | [[MetaFields](#MetaFields)]? | yes | | - | action | [ProductListingAction](#ProductListingAction)? | yes | | - | itemType | String? | yes | | - | medias | [[Media](#Media)]? | yes | | - | uid | Int? | yes | | - | similars | [String]? | yes | | | brand | [ProductBrand](#ProductBrand)? | yes | | --- @@ -8106,12 +8106,12 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | col2 | [ColumnHeader](#ColumnHeader)? | yes | | | col6 | [ColumnHeader](#ColumnHeader)? | yes | | - | col1 | [ColumnHeader](#ColumnHeader)? | yes | | | col3 | [ColumnHeader](#ColumnHeader)? | yes | | - | col4 | [ColumnHeader](#ColumnHeader)? | yes | | + | col2 | [ColumnHeader](#ColumnHeader)? | yes | | | col5 | [ColumnHeader](#ColumnHeader)? | yes | | + | col1 | [ColumnHeader](#ColumnHeader)? | yes | | + | col4 | [ColumnHeader](#ColumnHeader)? | yes | | --- @@ -8122,12 +8122,12 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | col2 | String? | yes | | | col6 | String? | yes | | - | col1 | String? | yes | | | col3 | String? | yes | | - | col4 | String? | yes | | + | col2 | String? | yes | | | col5 | String? | yes | | + | col1 | String? | yes | | + | col4 | String? | yes | | --- @@ -8138,13 +8138,13 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | headers | [ColumnHeaders](#ColumnHeaders)? | yes | | - | unit | String? | yes | | - | sizeTip | String? | yes | | - | image | String? | yes | | | title | String? | yes | | | description | String? | yes | | + | sizeTip | String? | yes | | + | headers | [ColumnHeaders](#ColumnHeaders)? | yes | | + | image | String? | yes | | | sizes | [[SizeChartValues](#SizeChartValues)]? | yes | | + | unit | String? | yes | | --- @@ -8155,9 +8155,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | isAvailable | Bool? | yes | | - | value | String? | yes | | | quantity | Int? | yes | | + | value | String? | yes | | + | isAvailable | Bool? | yes | | | display | String? | yes | | --- @@ -8170,11 +8170,11 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | stores | [ProductSizeStores](#ProductSizeStores)? | yes | | - | price | [ProductListingPrice](#ProductListingPrice)? | yes | | | sellable | Bool? | yes | | | discount | String? | yes | | | sizeChart | [SizeChart](#SizeChart)? | yes | | | sizes | [[ProductSize](#ProductSize)]? | yes | | + | price | [ProductListingPrice](#ProductListingPrice)? | yes | | --- @@ -8185,10 +8185,10 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | key | String? | yes | | - | display | String? | yes | | | logo | String? | yes | | | description | String? | yes | | + | display | String? | yes | | + | key | String? | yes | | --- @@ -8199,8 +8199,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | title | String? | yes | | | details | [[AttributeDetail](#AttributeDetail)]? | yes | | + | title | 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 | | ---------- | ---- | -------- | ----------- | + | items | [[ProductDetail](#ProductDetail)]? | yes | | | title | String? | yes | | | subtitle | String? | yes | | | attributesMetadata | [[AttributeMetadata](#AttributeMetadata)]? | yes | | - | items | [[ProductDetail](#ProductDetail)]? | yes | | --- @@ -8248,9 +8248,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | items | [[ProductDetail](#ProductDetail)]? | yes | | | title | String? | yes | | | subtitle | String? | yes | | - | items | [[ProductDetail](#ProductDetail)]? | yes | | --- @@ -8272,15 +8272,15 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | + | value | String? | yes | | + | colorName | String? | yes | | | isAvailable | Bool? | yes | | + | slug | String? | yes | | + | name | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | | color | String? | yes | | | medias | [[Media](#Media)]? | yes | | | uid | Int? | yes | | - | colorName | String? | yes | | - | slug | String? | yes | | - | value | String? | yes | | --- @@ -8293,8 +8293,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | ---------- | ---- | -------- | ----------- | | displayType | String? | yes | | | key | String? | yes | | - | header | String? | yes | | | items | [[ProductVariantItemResponse](#ProductVariantItemResponse)]? | yes | | + | header | String? | yes | | --- @@ -8312,52 +8312,52 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [ProductStockPrice](#ProductStockPrice) + #### [CompanyDetail](#CompanyDetail) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | marked | Double? | yes | | - | effective | Double? | yes | | - | currency | String? | yes | | + | name | String? | yes | | + | id | Int? | yes | | --- - #### [CompanyDetail](#CompanyDetail) + #### [StoreDetail](#StoreDetail) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | id | Int? | yes | | + | city | String? | yes | | | name | String? | yes | | + | id | Int? | yes | | + | code | String? | yes | | --- - #### [StoreDetail](#StoreDetail) + #### [Seller](#Seller) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | city | String? | yes | | - | code | String? | yes | | - | id | Int? | yes | | + | count | Int? | yes | | | name | String? | yes | | + | uid | Int? | yes | | --- - #### [Seller](#Seller) + #### [ProductStockPrice](#ProductStockPrice) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | count | Int? | yes | | - | name | String? | yes | | - | uid | Int? | yes | | + | effective | Double? | yes | | + | currency | String? | yes | | + | marked | Double? | yes | | --- @@ -8368,15 +8368,15 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | price | [ProductStockPrice](#ProductStockPrice)? | yes | | - | itemId | Int? | yes | | | company | [CompanyDetail](#CompanyDetail)? | yes | | - | size | String? | yes | | - | uid | String? | yes | | - | identifier | [String: Any]? | yes | | | store | [StoreDetail](#StoreDetail)? | yes | | | quantity | Int? | yes | | + | itemId | Int? | yes | | + | identifier | [String: Any]? | yes | | + | size | String? | yes | | | seller | [Seller](#Seller)? | yes | | + | price | [ProductStockPrice](#ProductStockPrice)? | yes | | + | uid | String? | yes | | --- @@ -8398,13 +8398,13 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | current | Int? | yes | | - | itemTotal | Int? | yes | | - | nextId | String? | yes | | + | type | String | no | | | hasPrevious | Bool? | yes | | + | nextId | String? | yes | | | hasNext | Bool? | yes | | - | type | String | no | | + | current | Int? | yes | | | size | Int? | yes | | + | itemTotal | Int? | yes | | --- @@ -8415,20 +8415,75 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page | [Page](#Page) | no | | | items | [[ProductStockStatusItem](#ProductStockStatusItem)]? | yes | | + | page | [Page](#Page) | no | | --- - #### [ProductSortOn](#ProductSortOn) + #### [ProductVariantListingResponse](#ProductVariantListingResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | items | [[ProductVariantItemResponse](#ProductVariantItemResponse)]? | yes | | + | total | Int? | yes | | + | displayType | String? | yes | | + | key | String? | yes | | + | header | String? | yes | | + +--- + + + + + #### [ProductListingDetail](#ProductListingDetail) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | categories | [[ProductBrand](#ProductBrand)]? | yes | | + | color | String? | yes | | + | description | String? | yes | | + | itemType | String? | yes | | + | ratingCount | Int? | yes | | + | similars | [String]? | yes | | + | medias | [[Media](#Media)]? | yes | | + | action | [ProductListingAction](#ProductListingAction)? | yes | | + | tryouts | [String]? | yes | | + | itemCode | String? | yes | | + | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | + | hasVariant | Bool? | yes | | + | attributes | [String: Any]? | yes | | + | type | String? | yes | | + | rating | Double? | yes | | + | highlights | [String]? | yes | | + | discount | String? | yes | | + | variants | [[ProductVariantListingResponse](#ProductVariantListingResponse)]? | yes | | + | price | [ProductListingPrice](#ProductListingPrice)? | yes | | + | uid | Int? | yes | | + | productOnlineDate | String? | yes | | + | sellable | Bool? | yes | | + | customMeta | [[MetaFields](#MetaFields)]? | yes | | + | slug | String | no | | | name | String? | yes | | + | shortDescription | String? | yes | | + | customJson | [String: Any]? | yes | | + | teaserTag | String? | yes | | + | imageNature | String? | yes | | + | brand | [ProductBrand](#ProductBrand)? | yes | | + +--- + + + + + #### [ProductSortOn](#ProductSortOn) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | | value | String? | yes | | + | name | String? | yes | | | isSelected | Bool? | yes | | --- @@ -8440,10 +8495,10 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | kind | String? | yes | | - | display | String | no | | | logo | String? | yes | | + | kind | String? | yes | | | name | String | no | | + | display | String | no | | --- @@ -8454,18 +8509,18 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | queryFormat | String? | yes | | - | count | Int? | yes | | - | selectedMin | Int? | yes | | - | isSelected | Bool | no | | - | value | String? | yes | | | max | Int? | yes | | - | selectedMax | Int? | yes | | + | value | String? | yes | | | displayFormat | String? | yes | | - | currencySymbol | String? | yes | | + | selectedMin | Int? | yes | | | min | Int? | yes | | + | queryFormat | String? | yes | | | display | String | no | | + | currencySymbol | String? | yes | | | currencyCode | String? | yes | | + | isSelected | Bool | no | | + | count | Int? | yes | | + | selectedMax | Int? | yes | | --- @@ -8484,69 +8539,14 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [ProductVariantListingResponse](#ProductVariantListingResponse) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | header | String? | yes | | - | key | String? | yes | | - | items | [[ProductVariantItemResponse](#ProductVariantItemResponse)]? | yes | | - | displayType | String? | yes | | - | total | Int? | yes | | - ---- - - - - - #### [ProductListingDetail](#ProductListingDetail) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | categories | [[ProductBrand](#ProductBrand)]? | yes | | - | sellable | Bool? | yes | | - | discount | String? | yes | | - | itemCode | String? | yes | | - | attributes | [String: Any]? | yes | | - | color | String? | yes | | - | productOnlineDate | String? | yes | | - | description | String? | yes | | - | hasVariant | Bool? | yes | | - | highlights | [String]? | yes | | - | type | String? | yes | | - | tryouts | [String]? | yes | | - | price | [ProductListingPrice](#ProductListingPrice)? | yes | | - | teaserTag | String? | yes | | - | ratingCount | Int? | yes | | - | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | - | shortDescription | String? | yes | | - | customJson | [String: Any]? | yes | | - | imageNature | String? | yes | | - | rating | Double? | yes | | - | slug | String | no | | - | variants | [[ProductVariantListingResponse](#ProductVariantListingResponse)]? | yes | | - | name | String? | yes | | - | customMeta | [[MetaFields](#MetaFields)]? | yes | | - | action | [ProductListingAction](#ProductListingAction)? | yes | | - | itemType | String? | yes | | - | medias | [[Media](#Media)]? | yes | | - | uid | Int? | yes | | - | similars | [String]? | yes | | - | brand | [ProductBrand](#ProductBrand)? | yes | | - ---- - - - - - #### [ProductListingResponse](#ProductListingResponse) + #### [ProductListingResponse](#ProductListingResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | items | [[ProductListingDetail](#ProductListingDetail)]? | yes | | | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | - | page | [Page](#Page) | no | | | filters | [[ProductFilters](#ProductFilters)]? | yes | | - | items | [[ProductListingDetail](#ProductListingDetail)]? | yes | | + | page | [Page](#Page) | no | | --- @@ -8557,8 +8557,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | portrait | [Media](#Media)? | yes | | | landscape | [Media](#Media)? | yes | | + | portrait | [Media](#Media)? | yes | | --- @@ -8569,14 +8569,14 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | slug | String? | yes | | - | discount | String? | yes | | - | departments | [String]? | yes | | | name | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | + | slug | String? | yes | | + | discount | String? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | | logo | [Media](#Media)? | yes | | + | departments | [String]? | yes | | | uid | Int? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | --- @@ -8587,8 +8587,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page | [Page](#Page) | no | | | items | [[BrandItem](#BrandItem)]? | yes | | + | page | [Page](#Page) | no | | --- @@ -8599,9 +8599,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | logo | [Media](#Media)? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | | name | String? | yes | | - | logo | [Media](#Media)? | yes | | | uid | Int? | yes | | --- @@ -8625,13 +8625,13 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | childs | [[String: Any]]? | yes | | + | slug | String? | yes | | | name | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | + | childs | [[String: Any]]? | yes | | | customJson | [String: Any]? | yes | | | uid | Int? | yes | | - | slug | String? | yes | | --- @@ -8642,13 +8642,13 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | childs | [[ThirdLevelChild](#ThirdLevelChild)]? | yes | | + | slug | String? | yes | | | name | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | + | childs | [[ThirdLevelChild](#ThirdLevelChild)]? | yes | | | customJson | [String: Any]? | yes | | | uid | Int? | yes | | - | slug | String? | yes | | --- @@ -8659,13 +8659,13 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | childs | [[SecondLevelChild](#SecondLevelChild)]? | yes | | + | slug | String? | yes | | | name | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | + | childs | [[SecondLevelChild](#SecondLevelChild)]? | yes | | | customJson | [String: Any]? | yes | | | uid | Int? | yes | | - | slug | String? | yes | | --- @@ -8676,12 +8676,12 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | childs | [[Child](#Child)]? | yes | | + | slug | String? | yes | | | name | String? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | + | childs | [[Child](#Child)]? | yes | | | uid | Int? | yes | | - | slug | String? | yes | | --- @@ -8716,9 +8716,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | logo | [Media](#Media)? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | | name | String? | yes | | - | logo | [Media](#Media)? | yes | | | uid | Int? | yes | | --- @@ -8730,8 +8730,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page | [Page](#Page) | no | | | 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 | | ---------- | ---- | -------- | ----------- | + | slug | String? | yes | | | name | String? | yes | | - | priorityOrder | Int? | yes | | | logo | [Media](#Media)? | yes | | + | priorityOrder | Int? | yes | | | uid | Int? | yes | | - | slug | String? | yes | | --- @@ -8769,10 +8769,10 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | type | String? | yes | | - | display | String? | yes | | | logo | [Media](#Media)? | yes | | | action | [ProductListingAction](#ProductListingAction)? | yes | | + | display | String? | yes | | + | type | String? | yes | | --- @@ -8790,13 +8790,29 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [CollectionListingFilterType](#CollectionListingFilterType) + #### [GetCollectionDetailNest](#GetCollectionDetailNest) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | schedule | [String: Any]? | yes | | + | description | String? | yes | | + | query | [String: Any]? | yes | | + | action | [ProductListingAction](#ProductListingAction)? | yes | | + | allowFacets | Bool? | yes | | + | logo | [Media](#Media)? | yes | | + | isActive | Bool? | yes | | + | type | String? | yes | | + | tag | [String]? | yes | | + | visibleFacetsKeys | [String]? | yes | | + | cron | [String: Any]? | yes | | + | uid | String? | yes | | + | appId | String? | yes | | | name | String? | yes | | - | isSelected | Bool? | yes | | - | display | String? | yes | | + | slug | String? | yes | | + | allowSort | Bool? | yes | | + | meta | [String: Any]? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | badge | [String: Any]? | yes | | --- @@ -8808,49 +8824,33 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | name | String? | yes | | - | isSelected | Bool? | yes | | | display | String? | yes | | + | isSelected | Bool? | yes | | --- - #### [CollectionListingFilter](#CollectionListingFilter) + #### [CollectionListingFilterType](#CollectionListingFilterType) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | type | [[CollectionListingFilterType](#CollectionListingFilterType)]? | yes | | - | tags | [[CollectionListingFilterTag](#CollectionListingFilterTag)]? | yes | | + | name | String? | yes | | + | display | String? | yes | | + | isSelected | Bool? | yes | | --- - #### [GetCollectionDetailNest](#GetCollectionDetailNest) + #### [CollectionListingFilter](#CollectionListingFilter) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | cron | [String: Any]? | yes | | - | allowFacets | Bool? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | - | query | [String: Any]? | yes | | - | appId | String? | yes | | - | description | String? | yes | | - | visibleFacetsKeys | [String]? | yes | | - | type | String? | yes | | - | logo | [Media](#Media)? | yes | | - | isActive | Bool? | yes | | - | tag | [String]? | yes | | - | slug | String? | yes | | - | badge | [String: Any]? | yes | | - | name | String? | yes | | - | allowSort | Bool? | yes | | - | action | [ProductListingAction](#ProductListingAction)? | yes | | - | schedule | [String: Any]? | yes | | - | uid | String? | yes | | - | meta | [String: Any]? | yes | | + | tags | [[CollectionListingFilterTag](#CollectionListingFilterTag)]? | yes | | + | type | [[CollectionListingFilterType](#CollectionListingFilterType)]? | yes | | --- @@ -8861,9 +8861,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page | [Page](#Page) | no | | - | filters | [CollectionListingFilter](#CollectionListingFilter)? | yes | | | items | [[GetCollectionDetailNest](#GetCollectionDetailNest)]? | yes | | + | filters | [CollectionListingFilter](#CollectionListingFilter)? | yes | | + | page | [Page](#Page) | no | | --- @@ -8874,23 +8874,23 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | slug | String? | yes | | - | cron | [String: Any]? | yes | | - | visibleFacetsKeys | [String]? | yes | | - | badge | [String: Any]? | yes | | + | isActive | Bool? | yes | | + | description | String? | yes | | | type | String? | yes | | + | query | [String: Any]? | yes | | + | appId | String? | yes | | | name | String? | yes | | - | isActive | Bool? | yes | | - | allowFacets | Bool? | yes | | + | slug | String? | yes | | | tag | [String]? | yes | | | allowSort | Bool? | yes | | + | allowFacets | Bool? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | visibleFacetsKeys | [String]? | yes | | | meta | [String: Any]? | yes | | - | schedule | [String: Any]? | yes | | + | badge | [String: Any]? | yes | | | logo | [Media](#Media)? | yes | | - | query | [String: Any]? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | - | appId | String? | yes | | - | description | String? | yes | | + | cron | [String: Any]? | yes | | + | schedule | [String: Any]? | yes | | --- @@ -8901,8 +8901,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page | [Page](#Page) | no | | | items | [[ProductListingDetail](#ProductListingDetail)] | no | | + | page | [Page](#Page) | no | | --- @@ -8913,8 +8913,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | id | String | no | | | message | String | no | | + | id | String | no | | --- @@ -8937,8 +8937,8 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | collections | [Int]? | yes | | - | brands | [Int]? | yes | | | products | [Int]? | yes | | + | brands | [Int]? | yes | | --- @@ -8972,16 +8972,16 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | city | String? | yes | | | address | String? | yes | | - | uid | Int? | yes | | - | state | String? | yes | | | pincode | Int? | yes | | - | latLong | [LatLong](#LatLong)? | yes | | - | country | String? | yes | | | storeCode | String? | yes | | | storeEmail | String? | yes | | + | latLong | [LatLong](#LatLong)? | yes | | + | name | String? | yes | | + | country | String? | yes | | + | city | String? | yes | | + | state | String? | yes | | + | uid | Int? | yes | | --- @@ -8992,23 +8992,27 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page | [Page](#Page) | no | | | items | [[Store](#Store)] | no | | + | page | [Page](#Page) | no | | --- - #### [StoreDepartments](#StoreDepartments) + #### [StoreAddressSerializer](#StoreAddressSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | priorityOrder | Int? | yes | | - | logo | String? | yes | | - | uid | Int? | yes | | - | slug | String? | yes | | + | address2 | String? | yes | | + | pincode | Int? | yes | | + | country | String? | yes | | + | latitude | Double? | yes | | + | longitude | Double? | yes | | + | city | String? | yes | | + | address1 | String? | yes | | + | landmark | String? | yes | | + | state | String? | yes | | --- @@ -9027,46 +9031,42 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [StoreManagerSerializer](#StoreManagerSerializer) + #### [CompanyStore](#CompanyStore) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | businessType | String? | yes | | + | companyType | String? | yes | | | name | String? | yes | | - | email | String? | yes | | - | mobileNo | [SellerPhoneNumber](#SellerPhoneNumber)? | yes | | + | uid | Int? | yes | | --- - #### [CompanyStore](#CompanyStore) + #### [StoreManagerSerializer](#StoreManagerSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | name | String? | yes | | - | businessType | String? | yes | | - | companyType | String? | yes | | - | uid | Int? | yes | | + | mobileNo | [SellerPhoneNumber](#SellerPhoneNumber)? | yes | | + | email | String? | yes | | --- - #### [StoreAddressSerializer](#StoreAddressSerializer) + #### [StoreDepartments](#StoreDepartments) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | state | String? | yes | | - | latitude | Double? | yes | | - | longitude | Double? | yes | | - | address1 | String? | yes | | - | city | String? | yes | | - | address2 | String? | yes | | - | pincode | Int? | yes | | - | country | String? | yes | | - | landmark | String? | yes | | + | slug | String? | yes | | + | name | String? | yes | | + | logo | String? | yes | | + | priorityOrder | Int? | yes | | + | uid | Int? | yes | | --- @@ -9077,12 +9077,12 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | address | [StoreAddressSerializer](#StoreAddressSerializer)? | yes | | | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | + | company | [CompanyStore](#CompanyStore)? | yes | | | manager | [StoreManagerSerializer](#StoreManagerSerializer)? | yes | | - | departments | [[StoreDepartments](#StoreDepartments)]? | yes | | | name | String? | yes | | - | company | [CompanyStore](#CompanyStore)? | yes | | - | address | [StoreAddressSerializer](#StoreAddressSerializer)? | yes | | + | departments | [[StoreDepartments](#StoreDepartments)]? | yes | | | uid | Int? | yes | | --- @@ -9094,9 +9094,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page | [Page](#Page)? | yes | | - | filters | [[StoreDepartments](#StoreDepartments)]? | yes | | | items | [[AppStore](#AppStore)]? | 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 | | ---------- | ---- | -------- | ----------- | - | minute | Int? | yes | | | hour | Int? | yes | | + | minute | Int? | yes | | --- @@ -9119,10 +9119,10 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | closing | [Time](#Time)? | yes | | | opening | [Time](#Time)? | yes | | | weekday | String? | yes | | | open | Bool? | yes | | + | closing | [Time](#Time)? | yes | | --- @@ -9133,14 +9133,14 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | address | [StoreAddressSerializer](#StoreAddressSerializer)? | yes | | | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | + | company | [CompanyStore](#CompanyStore)? | yes | | | manager | [StoreManagerSerializer](#StoreManagerSerializer)? | yes | | - | departments | [[StoreDepartments](#StoreDepartments)]? | yes | | - | timing | [[StoreTiming](#StoreTiming)]? | yes | | | name | String? | yes | | - | company | [CompanyStore](#CompanyStore)? | yes | | - | address | [StoreAddressSerializer](#StoreAddressSerializer)? | yes | | + | timing | [[StoreTiming](#StoreTiming)]? | yes | | | customJson | [String: Any]? | yes | | + | departments | [[StoreDepartments](#StoreDepartments)]? | yes | | | uid | Int? | yes | | --- @@ -9148,30 +9148,44 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or + #### [Size](#Size) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | quantity | Int? | yes | | + | value | String? | yes | | + | isAvailable | Bool? | yes | | + | display | String? | yes | | + +--- + + + + #### [ProductDetails](#ProductDetails) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | brandUid | Int? | yes | | + | description | String? | yes | | + | ratingCount | Int? | yes | | | countryOfOrigin | String? | yes | | | itemCode | String? | yes | | - | attributes | [String: Any]? | yes | | - | hsnCode | Int? | yes | | - | description | String? | yes | | - | hasVariant | Bool? | yes | | + | groupedAttributes | [String: Any]? | yes | | + | images | [[String: Any]]? | yes | | | media | [[String: Any]]? | yes | | + | identifier | [String: Any]? | yes | | + | hasVariant | Bool? | yes | | + | attributes | [String: Any]? | yes | | | templateTag | String? | yes | | + | rating | Double? | yes | | | isSet | Bool? | yes | | + | hsnCode | Int? | yes | | | outOfStock | Bool? | yes | | - | brandUid | Int? | yes | | - | ratingCount | Int? | yes | | - | groupedAttributes | [String: Any]? | yes | | + | name | String? | yes | | + | slug | String? | yes | | | shortDescription | String? | yes | | - | images | [[String: Any]]? | yes | | | imageNature | String? | yes | | - | identifier | [String: Any]? | yes | | - | slug | String? | yes | | - | rating | Double? | yes | | - | name | String? | yes | | --- @@ -9182,25 +9196,11 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | maxEffective | Double? | yes | | | minMarked | Double? | yes | | | minEffective | Double? | yes | | | maxMarked | Double? | yes | | | currency | String? | yes | | - ---- - - - - - #### [Size](#Size) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | display | String? | yes | | - | isAvailable | Bool? | yes | | - | value | String? | yes | | - | quantity | Int? | yes | | + | maxEffective | Double? | yes | | --- @@ -9211,15 +9211,15 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | productDetails | [ProductDetails](#ProductDetails)? | yes | | - | price | [Price1](#Price1)? | yes | | - | productUid | Int? | yes | | | maxQuantity | Int? | yes | | - | minQuantity | Int? | yes | | | autoAddToCart | Bool? | yes | | + | minQuantity | Int? | yes | | + | productUid | Int? | yes | | | autoSelect | Bool? | yes | | - | allowRemove | Bool? | yes | | | sizes | [[Size](#Size)]? | yes | | + | productDetails | [ProductDetails](#ProductDetails)? | yes | | + | allowRemove | Bool? | yes | | + | price | [Price1](#Price1)? | yes | | --- @@ -9230,16 +9230,16 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sameStoreAssignment | Bool? | yes | | - | choice | String? | yes | | | companyId | Int? | yes | | | name | String? | yes | | - | meta | [String: Any]? | yes | | + | slug | String? | yes | | | products | [[Products](#Products)]? | yes | | + | meta | [String: Any]? | yes | | + | choice | String? | yes | | | pageVisibility | [String]? | yes | | - | active | Bool? | yes | | | logo | String? | yes | | - | slug | String? | yes | | + | active | Bool? | yes | | + | sameStoreAssignment | Bool? | yes | | --- @@ -9257,85 +9257,87 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [ArticleAssignmentV2](#ArticleAssignmentV2) + #### [ProductSetDistributionSizeV2](#ProductSetDistributionSizeV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | strategy | String? | yes | | - | level | String? | yes | | + | pieces | Int? | yes | | + | size | String? | yes | | --- - #### [ProductStockPriceV2](#ProductStockPriceV2) + #### [ProductSetDistributionV2](#ProductSetDistributionV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | marked | Double? | yes | | - | effective | Double? | yes | | - | currency | String? | yes | | + | sizes | [[ProductSetDistributionSizeV2](#ProductSetDistributionSizeV2)]? | yes | | --- - #### [ProductSetDistributionSizeV2](#ProductSetDistributionSizeV2) + #### [ProductSetV2](#ProductSetV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | pieces | Int? | yes | | - | size | String? | yes | | + | quantity | Int? | yes | | + | sizeDistribution | [ProductSetDistributionV2](#ProductSetDistributionV2)? | yes | | --- - #### [ProductSetDistributionV2](#ProductSetDistributionV2) + #### [ArticleAssignmentV2](#ArticleAssignmentV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sizes | [[ProductSetDistributionSizeV2](#ProductSetDistributionSizeV2)]? | yes | | + | level | String? | yes | | + | strategy | String? | yes | | --- - #### [ProductSetV2](#ProductSetV2) + #### [ProductStockPriceV2](#ProductStockPriceV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sizeDistribution | [ProductSetDistributionV2](#ProductSetDistributionV2)? | yes | | - | quantity | Int? | yes | | + | effective | Double? | yes | | + | currency | String? | yes | | + | marked | Double? | yes | | --- - #### [DetailsSchemaV2](#DetailsSchemaV2) + #### [StoreV2](#StoreV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | key | String? | yes | | - | type | String? | yes | | - | value | String? | yes | | + | count | Int? | yes | | + | name | String? | yes | | + | uid | Int? | yes | | --- - #### [SellerGroupAttributes](#SellerGroupAttributes) + #### [StrategyWiseListingSchemaV2](#StrategyWiseListingSchemaV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | title | String? | yes | | - | details | [[DetailsSchemaV2](#DetailsSchemaV2)]? | yes | | + | distance | Int? | yes | | + | quantity | Int? | yes | | + | pincode | Int? | yes | | + | tat | Int? | yes | | --- @@ -9346,42 +9348,41 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | time | Int? | yes | | | returnable | Bool? | yes | | | unit | String? | yes | | + | time | Int? | yes | | --- - #### [StrategyWiseListingSchemaV2](#StrategyWiseListingSchemaV2) + #### [DetailsSchemaV2](#DetailsSchemaV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | pincode | Int? | yes | | - | tat | Int? | yes | | - | quantity | Int? | yes | | - | distance | Int? | yes | | + | value | String? | yes | | + | key | String? | yes | | + | type | String? | yes | | --- - #### [MarketPlaceSttributesSchemaV2](#MarketPlaceSttributesSchemaV2) + #### [SellerGroupAttributes](#SellerGroupAttributes) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | title | String? | yes | | | details | [[DetailsSchemaV2](#DetailsSchemaV2)]? | yes | | + | title | String? | yes | | --- - #### [StoreV2](#StoreV2) + #### [SellerV2](#SellerV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | @@ -9394,13 +9395,12 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or - #### [SellerV2](#SellerV2) + #### [MarketPlaceSttributesSchemaV2](#MarketPlaceSttributesSchemaV2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | count | Int? | yes | | - | name | String? | yes | | - | uid | Int? | yes | | + | details | [[DetailsSchemaV2](#DetailsSchemaV2)]? | yes | | + | title | String? | yes | | --- @@ -9411,24 +9411,24 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | specialBadge | String? | yes | | + | pincode | Int? | yes | | + | itemType | String? | yes | | + | longLat | [Double]? | yes | | + | set | [ProductSetV2](#ProductSetV2)? | yes | | | articleAssignment | [ArticleAssignmentV2](#ArticleAssignmentV2)? | yes | | | pricePerPiece | [ProductStockPriceV2](#ProductStockPriceV2)? | yes | | - | price | [ProductStockPriceV2](#ProductStockPriceV2)? | yes | | - | sellerCount | Int? | yes | | - | set | [ProductSetV2](#ProductSetV2)? | yes | | + | store | [StoreV2](#StoreV2)? | yes | | + | strategyWiseListing | [[StrategyWiseListingSchemaV2](#StrategyWiseListingSchemaV2)]? | yes | | | discount | String? | yes | | - | groupedAttributes | [[SellerGroupAttributes](#SellerGroupAttributes)]? | yes | | + | quantity | Int? | yes | | | returnConfig | [ReturnConfigSchemaV2](#ReturnConfigSchemaV2)? | yes | | + | groupedAttributes | [[SellerGroupAttributes](#SellerGroupAttributes)]? | yes | | + | seller | [SellerV2](#SellerV2)? | yes | | | articleId | String? | yes | | - | longLat | [Double]? | yes | | - | strategyWiseListing | [[StrategyWiseListingSchemaV2](#StrategyWiseListingSchemaV2)]? | yes | | - | itemType | String? | yes | | + | sellerCount | Int? | yes | | + | price | [ProductStockPriceV2](#ProductStockPriceV2)? | yes | | | marketplaceAttributes | [[MarketPlaceSttributesSchemaV2](#MarketPlaceSttributesSchemaV2)]? | yes | | - | store | [StoreV2](#StoreV2)? | yes | | - | pincode | Int? | yes | | - | specialBadge | String? | yes | | - | quantity | Int? | yes | | - | seller | [SellerV2](#SellerV2)? | yes | | --- @@ -9452,9 +9452,9 @@ Success. Returns a ProductSizeSellerV2 object. Check the example shown below or | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | items | [[ProductSizePriceResponseV2](#ProductSizePriceResponseV2)]? | yes | | | sortOn | [[ProductSizeSellerFilterSchemaV2](#ProductSizeSellerFilterSchemaV2)]? | yes | | | page | [Page](#Page) | no | | - | items | [[ProductSizePriceResponseV2](#ProductSizePriceResponseV2)]? | yes | | --- diff --git a/documentation/application/CONTENT.md b/documentation/application/CONTENT.md index e2f9c40b28..f2ca3159ad 100644 --- a/documentation/application/CONTENT.md +++ b/documentation/application/CONTENT.md @@ -3251,7 +3251,7 @@ Success. Returns a list of pages along with their details. Check the example sho | collection | collection | Symbolic link for Collection: /collection/:slug | | collections | collections | Symbolic link for Collections: /collections/ | | contactUs | contact-us | Symbolic link for Contact Us: /contact-us/ | - | externalLink | external | Symbolic link for External Link: /external/:url | + | externalLink | external | Symbolic link for External Link: /external/ | | faq | faq | Symbolic link for FAQ: /faq/:category | | freshchat | freshchat | Symbolic link for Chat by Freshchat: /freshchat | | home | home | Symbolic link for Home: / | diff --git a/documentation/application/FILESTORAGE.md b/documentation/application/FILESTORAGE.md index 298957e9e1..3690c838b9 100644 --- a/documentation/application/FILESTORAGE.md +++ b/documentation/application/FILESTORAGE.md @@ -297,13 +297,12 @@ Success | fileName | String | no | | | filePath | String | no | | | contentType | String | no | | - | method | String | no | | | namespace | String | no | | | operation | String | no | | | size | Int | no | | | upload | [Upload](#Upload) | no | | | cdn | [CDN](#CDN) | no | | - | success | String | no | | + | success | Bool | no | | | tags | [String]? | yes | | | createdOn | String | no | | | modifiedOn | String | no | | diff --git a/documentation/application/PAYMENT.md b/documentation/application/PAYMENT.md index d9b9f0da72..4f0ef7e53d 100644 --- a/documentation/application/PAYMENT.md +++ b/documentation/application/PAYMENT.md @@ -332,7 +332,8 @@ Success. Returns a list of cards saved by the user. Check the example shown belo "card_name": "Lorem Ipsum", "expired": false, "card_fingerprint": null, - "card_brand_image": "https://hdn-1.fynd.com/payment/visa.png" + "card_brand_image": "https://hdn-1.fynd.com/payment/visa.png", + "compliant_with_tokenisation_guidelines": true } ] } @@ -2092,16 +2093,16 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | merchantKey | String? | yes | Unique merchant key | - | userId | String? | yes | Registered User id | - | pin | String? | yes | Masked pin | | configType | String | no | Fynd or self payment gateway | + | pin | String? | yes | Masked pin | | sdk | Bool? | yes | SDK | - | verifyApi | String? | yes | Payment gateway verify payment api endpoint | | merchantId | String? | yes | Unique merchant id | + | merchantKey | String? | yes | Unique merchant key | | api | String? | yes | Payment gateway api endpoint | - | key | String | no | Payment gateway api key | + | verifyApi | String? | yes | Payment gateway verify payment api endpoint | | secret | String | no | Masked payment gateway api secret | + | key | String | no | Payment gateway api key | + | userId | String? | yes | Registered User id | --- @@ -2112,16 +2113,16 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | payumoney | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | | razorpay | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | - | rupifi | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | - | env | String | no | Environment i.e Live or Test | - | stripe | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | | ccavenue | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | - | mswipe | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | | simpl | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | - | juspay | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | + | payumoney | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | + | rupifi | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | + | mswipe | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | + | env | String | no | Environment i.e Live or Test | | success | Bool | no | | + | juspay | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | + | stripe | [AggregatorConfigDetail](#AggregatorConfigDetail)? | yes | | --- @@ -2132,8 +2133,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | code | String | no | Error descrption code. | | description | String | no | Error human understandable description. | + | code | String | no | Error descrption code. | --- @@ -2157,9 +2158,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | cardId | String | no | Card token of payment gateway. | + | nickname | String? | yes | | | refresh | Bool? | yes | Refresh cache flag. | | nameOnCard | String? | yes | | - | nickname | String? | yes | | --- @@ -2171,8 +2172,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | data | [String: Any] | no | List of cards of customer. | - | success | Bool | no | Response is successful or not. | | message | String? | yes | Human readable message. | + | success | Bool | no | Response is successful or not. | --- @@ -2183,9 +2184,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aggregator | String | no | Payment gateway name. | | customerId | String? | yes | Payment gateway customer id. | | api | String? | yes | Payment gateway CARD api endpoint | + | aggregator | String | no | Payment gateway name. | --- @@ -2197,8 +2198,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | 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. | + | success | Bool | no | Response is successful or not. | --- @@ -2209,22 +2210,23 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | cardId | String? | yes | card_id | - | cardBrandImage | String? | yes | card_brand_image | - | cardFingerprint | String? | yes | card_fingerprint | + | cardBrand | String? | yes | card_brand | + | expMonth | Int? | yes | exp_month | | aggregatorName | String | no | aggregator_name | - | cardNumber | String? | yes | card_number | + | compliantWithTokenisationGuidelines | Bool? | yes | If card is tokenised or not | + | cardName | String? | yes | card_name | + | cardFingerprint | String? | yes | card_fingerprint | | cardToken | String? | yes | card_token | + | cardReference | String? | yes | card_reference | + | expYear | Int? | yes | exp_year | + | cardNumber | String? | yes | card_number | + | cardId | String? | yes | card_id | | cardType | String? | yes | card_type | | cardIssuer | String? | yes | card_issuer | - | cardIsin | String? | yes | card_isin | - | cardReference | String? | yes | card_reference | - | expMonth | Int? | yes | exp_month | | expired | Bool? | yes | expired | - | expYear | Int? | yes | exp_year | - | cardBrand | String? | yes | card_brand | + | cardBrandImage | String? | yes | card_brand_image | | nickname | String? | yes | nickname | - | cardName | String? | yes | card_name | + | cardIsin | String? | yes | card_isin | --- @@ -2236,8 +2238,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | data | [[Card](#Card)]? | yes | List of cards of customer. | - | success | Bool | no | Response is successful or not. | | message | String | no | Human readable message. | + | success | Bool | no | Response is successful or not. | --- @@ -2259,8 +2261,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool | no | Response is successful or not. | | message | String? | yes | Human readable message. | + | success | Bool | no | Response is successful or not. | --- @@ -2271,11 +2273,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 | + | 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. | - | transactionAmountInPaise | Int | no | Payable amount in paise | --- @@ -2287,8 +2289,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | data | [String: Any] | no | Payment gateway response data | - | success | Bool | no | Response is successful or not | | message | String | no | Error or success message. | + | success | Bool | no | Response is successful or not | --- @@ -2299,11 +2301,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 | | orderId | String | no | Unique order id. | | amount | Int | no | Chargable amount of order. | + | aggregator | String | no | Payment gateway name i.e Simpl, Mswipe | | transactionToken | String? | yes | Transaction token of payment gateway. | - | verified | Bool? | yes | Already Verified flag from payment gateway i.e Mswipe | --- @@ -2314,13 +2316,13 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aggregator | String | no | Payment gateway name i.e Simpl, Mswipe | | orderId | String | no | Unique order id. | + | message | String | no | Human readable message. | + | aggregator | String | no | Payment gateway name i.e Simpl, Mswipe | | cartId | String? | yes | Cart id of customer | - | deliveryAddressId | String? | yes | Delivery adddress id of customer | - | status | String | no | Status of charged payment. | | success | Bool | no | Response is successful or not. | - | message | String | no | Human readable message. | + | status | String | no | Status of charged payment. | + | deliveryAddressId | String? | yes | Delivery adddress id of customer | --- @@ -2331,18 +2333,18 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aggregator | String | no | Payment gateway name | - | orderId | String | no | Payment gateway order id | - | amount | Int | no | Payable amount. | - | method | String | no | Payment method | - | customerId | String | no | Payment gateway customer id. | | contact | String | no | Customer valid mobile number | | merchantOrderId | String | no | Unique fynd order id | - | currency | String | no | Currency code. | | vpa | String? | yes | Customer vpa address | - | email | String | no | Customer valid email | + | orderId | String | no | Payment gateway order id | + | amount | Int | no | Payable amount. | + | aggregator | String | no | Payment gateway name | | timeout | Int? | yes | Payment polling timeout if not recieved response | + | method | String | no | Payment method | | razorpayPaymentId | String? | yes | Payment gateway payment id | + | currency | String | no | Currency code. | + | customerId | String | no | Payment gateway customer id. | + | email | String | no | Customer valid email | --- @@ -2353,22 +2355,22 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aggregator | String | no | Payment gateway name | - | pollingUrl | String | no | Polling url. | - | amount | Int? | yes | Payable amount. | - | method | String | no | Payment method | + | aggregatorOrderId | String? | yes | Payment order id | | virtualId | String? | yes | Payment virtual address. | - | status | String? | yes | Status of payment. | - | customerId | String? | yes | Payment gateway customer id. | - | bqrImage | String? | yes | Bharath qr image url. | - | merchantOrderId | String | no | order id | | currency | String? | yes | Currency code. | - | aggregatorOrderId | String? | yes | Payment order id | | vpa | String? | yes | Customer vpa address | - | success | Bool | no | Response is successful or not. | + | aggregator | String | no | Payment gateway name | + | amount | Int? | yes | Payable amount. | + | upiPollUrl | String? | yes | UPI poll url. | + | pollingUrl | String | no | Polling url. | | timeout | Int? | yes | timeout. | + | bqrImage | String? | yes | Bharath qr image url. | + | success | Bool | no | Response is successful or not. | | razorpayPaymentId | String? | yes | Payment id. | - | upiPollUrl | String? | yes | UPI poll url. | + | merchantOrderId | String | no | order id | + | customerId | String? | yes | Payment gateway customer id. | + | status | String? | yes | Status of payment. | + | method | String | no | Payment method | --- @@ -2379,16 +2381,16 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aggregator | String | no | Payment gateway name | + | contact | String | no | Customer valid mobile number | + | merchantOrderId | String | no | Unique fynd order id | + | vpa | String | no | Customer vpa address | | orderId | String | no | Payment gateway order id | | amount | Int | no | Payable amount. | + | aggregator | String | no | Payment gateway name | | method | String | no | Payment method | - | status | String | no | Status of payment. | - | customerId | String | no | Payment gateway customer id. | - | contact | String | no | Customer valid mobile number | - | merchantOrderId | String | no | Unique fynd order id | | currency | String | no | Currency code. | - | vpa | String | no | Customer vpa address | + | customerId | String | no | Payment gateway customer id. | + | status | String | no | Status of payment. | | email | String | no | Customer valid email | --- @@ -2401,8 +2403,43 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | aggregatorName | String | no | Payment gateway name | - | retry | Bool | no | Response is successful or not. | | status | String | no | Payment status | + | retry | Bool | no | Response is successful or not. | + +--- + + + + + #### [AggregatorRoute](#AggregatorRoute) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | apiLink | String? | yes | api_link | + | data | [String: Any]? | yes | Data | + | paymentFlowData | String? | yes | payment_flow_data | + | paymentFlow | String? | yes | payment_flow | + +--- + + + + + #### [PaymentFlow](#PaymentFlow) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | razorpay | [AggregatorRoute](#AggregatorRoute)? | yes | Razorpay | + | ccavenue | [AggregatorRoute](#AggregatorRoute)? | yes | Ccavenue | + | simpl | [AggregatorRoute](#AggregatorRoute)? | yes | simpl | + | fynd | [AggregatorRoute](#AggregatorRoute)? | yes | Fynd | + | payubiz | [AggregatorRoute](#AggregatorRoute)? | yes | Payubiz | + | rupifi | [AggregatorRoute](#AggregatorRoute)? | yes | Rupifi | + | mswipe | [AggregatorRoute](#AggregatorRoute)? | yes | mswipe | + | upiRazorpay | [AggregatorRoute](#AggregatorRoute)? | yes | UPI_Razorpay | + | bqrRazorpay | [AggregatorRoute](#AggregatorRoute)? | yes | BQR_Razorpay | + | juspay | [AggregatorRoute](#AggregatorRoute)? | yes | Juspay | + | stripe | [AggregatorRoute](#AggregatorRoute)? | yes | Stripe | --- @@ -2425,10 +2462,10 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | displayName | String? | yes | display_name | | packageName | String? | yes | package_name | | code | String? | yes | code | | logos | [PaymentModeLogo](#PaymentModeLogo)? | yes | logos | - | displayName | String? | yes | display_name | --- @@ -2451,35 +2488,36 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | displayName | String? | yes | display name | + | expMonth | Int? | yes | exp_month | + | aggregatorName | String | no | aggregator_name | | merchantCode | String? | yes | merchant code | - | intentApp | [[IntentApp](#IntentApp)]? | yes | intent_app | - | logoUrl | [PaymentModeLogo](#PaymentModeLogo)? | yes | Logo | - | cardType | String? | yes | card_type | - | cardBrandImage | String? | yes | card_brand_image | - | cardBrand | String? | yes | card_brand | | cardName | String? | yes | card_name | - | cardId | String? | yes | card_id | - | name | String? | yes | name | - | intentAppErrorDictList | [[IntentAppErrorList](#IntentAppErrorList)]? | yes | intent_app_error_dict_list | - | cardFingerprint | String? | yes | card_fingerprint | | intentFlow | Bool? | yes | intent_flow | - | cardNumber | String? | yes | card_number | - | fyndVpa | String? | yes | fynd_vpa | - | cardIssuer | String? | yes | card_issuer | | displayPriority | Int? | yes | Dispaly Priority | - | expYear | Int? | yes | exp_year | - | nickname | String? | yes | nickname | - | aggregatorName | String | no | aggregator_name | - | cardToken | String? | yes | card_token | + | cardIsin | String? | yes | card_isin | | intentAppErrorList | [String]? | yes | intent_app_error_list | + | code | String? | yes | code | + | cardFingerprint | String? | yes | card_fingerprint | | cardReference | String? | yes | card_reference | - | expMonth | Int? | yes | exp_month | | expired | Bool? | yes | expired | + | cardType | String? | yes | card_type | | timeout | Int? | yes | timeout | + | displayName | String? | yes | display name | + | intentApp | [[IntentApp](#IntentApp)]? | yes | intent_app | + | nickname | String? | yes | nickname | + | cardBrand | String? | yes | card_brand | + | fyndVpa | String? | yes | fynd_vpa | + | cardToken | String? | yes | card_token | + | cardIssuer | String? | yes | card_issuer | + | cardId | String? | yes | card_id | + | logoUrl | [PaymentModeLogo](#PaymentModeLogo)? | yes | Logo | + | cardBrandImage | String? | yes | card_brand_image | + | intentAppErrorDictList | [[IntentAppErrorList](#IntentAppErrorList)]? | yes | intent_app_error_dict_list | + | compliantWithTokenisationGuidelines | Bool? | yes | If card is tokenised or not | + | name | String? | yes | name | + | expYear | Int? | yes | exp_year | + | cardNumber | String? | yes | card_number | | retryCount | Int? | yes | retry_count | - | code | String? | yes | code | - | cardIsin | String? | yes | card_isin | --- @@ -2490,48 +2528,13 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | aggregatorName | String? | yes | Dispaly Priority | | name | String | no | Payment mode name | | list | [[PaymentModeList](#PaymentModeList)]? | yes | Payment mode | - | displayName | String | no | Payment mode display name | - | aggregatorName | String? | yes | Dispaly Priority | | anonymousEnable | Bool? | yes | Annonymous card flag | - | addCardEnabled | Bool? | yes | Annonymous card flag | + | displayName | String | no | Payment mode display name | | displayPriority | Int | no | Dispaly Priority | - ---- - - - - - #### [AggregatorRoute](#AggregatorRoute) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | paymentFlowData | String? | yes | payment_flow_data | - | paymentFlow | String? | yes | payment_flow | - | data | [String: Any]? | yes | Data | - | apiLink | String? | yes | api_link | - ---- - - - - - #### [PaymentFlow](#PaymentFlow) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | razorpay | [AggregatorRoute](#AggregatorRoute)? | yes | Razorpay | - | rupifi | [AggregatorRoute](#AggregatorRoute)? | yes | Rupifi | - | stripe | [AggregatorRoute](#AggregatorRoute)? | yes | Stripe | - | upiRazorpay | [AggregatorRoute](#AggregatorRoute)? | yes | UPI_Razorpay | - | bqrRazorpay | [AggregatorRoute](#AggregatorRoute)? | yes | BQR_Razorpay | - | ccavenue | [AggregatorRoute](#AggregatorRoute)? | yes | Ccavenue | - | fynd | [AggregatorRoute](#AggregatorRoute)? | yes | Fynd | - | mswipe | [AggregatorRoute](#AggregatorRoute)? | yes | mswipe | - | simpl | [AggregatorRoute](#AggregatorRoute)? | yes | simpl | - | juspay | [AggregatorRoute](#AggregatorRoute)? | yes | Juspay | - | payubiz | [AggregatorRoute](#AggregatorRoute)? | yes | Payubiz | + | addCardEnabled | Bool? | yes | Annonymous card flag | --- @@ -2542,8 +2545,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | paymentOption | [[RootPaymentMode](#RootPaymentMode)] | no | Payment options | | paymentFlows | [PaymentFlow](#PaymentFlow) | no | payment_flows | + | paymentOption | [[RootPaymentMode](#RootPaymentMode)] | no | Payment options | --- @@ -2566,8 +2569,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 +2594,10 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | name | String | no | Beneficiary Name | - | displayName | String? | yes | Beneficiary Display Name | - | id | Int | no | | - | logoLarge | String | no | Beneficiary large Logo | | logoSmall | String | no | Beneficiary small Logo | + | logoLarge | String | no | Beneficiary large Logo | + | id | Int | no | | + | displayName | String? | yes | Beneficiary Display Name | --- @@ -2605,8 +2608,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[TransferItemsDetails](#TransferItemsDetails)]? | yes | Beneficiary Mode Items | | displayName | String | no | Beneficiary Mode Name | + | items | [[TransferItemsDetails](#TransferItemsDetails)]? | yes | Beneficiary Mode Items | --- @@ -2651,25 +2654,25 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | transferMode | String | no | Transfer Mode Of Account | + | subtitle | String | no | SHort Title Of Account | | mobile | Bool? | yes | MObile no of User | + | isActive | Bool | no | Boolean Flag whether Beneficiary set or not | + | id | Int | no | | | displayName | String | no | Display Name Of Account | - | subtitle | String | no | SHort Title Of Account | - | createdOn | String | no | Creation Date of Beneficiary | + | bankName | String | no | Bank Name Of Account | + | accountNo | String | no | Account Number | + | transferMode | String | no | Transfer Mode Of Account | + | ifscCode | String | no | Ifsc Code Of Account | + | accountHolder | String | no | Account Holder Name | + | delightsUserName | String? | yes | User Id Who filled the Beneficiary | | title | String | no | Title Of Account | | email | String | no | EMail of User | - | accountNo | String | no | Account Number | - | beneficiaryId | String | no | Benenficiary Id | - | isActive | Bool | no | Boolean Flag whether Beneficiary set or not | | comment | Bool? | yes | Remarks | - | delightsUserName | String? | yes | User Id Who filled the Beneficiary | + | createdOn | String | no | Creation Date of Beneficiary | | branchName | Bool? | yes | Branch Name Of Account | - | bankName | String | no | Bank Name Of Account | - | address | String | no | Address of User | - | accountHolder | String | no | Account Holder Name | - | ifscCode | String | no | Ifsc Code Of Account | - | id | Int | no | | + | beneficiaryId | String | no | Benenficiary Id | | modifiedOn | String | no | MOdification Date of Beneficiary | + | address | String | no | Address of User | --- @@ -2692,9 +2695,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | description | String | no | Not Found | | code | String | no | Bad Request Data | | success | Bool | no | Response is successful or not | - | description | String | no | Not Found | --- @@ -2705,9 +2708,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool? | yes | Response is successful or not | | branchName | String | no | Branch Name Of Account | | bankName | String | no | Bank Name Of Account | + | success | Bool? | yes | Response is successful or not | --- @@ -2718,9 +2721,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | 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 | - | description | String | no | Error human understandable description. | --- @@ -2731,9 +2734,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | requestId | String | no | Request Id sent in | - | otp | String | no | Otp sent to the given Mobile No | | 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 | --- @@ -2744,8 +2747,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool? | yes | Response is successful or not | | message | String | no | Aggregator Response of beneficicary | + | success | Bool? | yes | Response is successful or not | --- @@ -2756,9 +2759,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | isVerifiedFlag | Bool | no | Vefified flag. | | description | String | no | Wrong OTP Code | | success | String | no | Response is successful or not | - | isVerifiedFlag | Bool | no | Vefified flag. | --- @@ -2771,15 +2774,15 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | ---------- | ---- | -------- | ----------- | | accountNo | String | no | Account NUmber of the Account Holder | | mobile | String | no | Moblie Number of the User | - | branchName | String | no | Branch Name of the Account | - | bankName | String | no | Bank Name of the Account | + | comment | String? | yes | Remarks added by The user | + | vpa | String? | yes | | | wallet | String? | yes | | | ifscCode | String | no | Ifsc Code of the Account | + | branchName | String | no | Branch Name of the Account | + | accountHolder | String | no | Name of the Account Holder | | address | String? | yes | Address of the User | - | vpa | String? | yes | | + | bankName | String | no | Bank Name of the Account | | email | String | no | Email of the Account Holder | - | comment | String? | yes | Remarks added by The user | - | accountHolder | String | no | Name of the Account Holder | --- @@ -2790,13 +2793,13 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | 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 | + | requestId | String? | yes | | | orderId | String | no | Merchant Order Id | + | transferMode | String | no | Transfer Mode of the Beneficiary to be added | | 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 | - | requestId | String? | yes | | - | otp | String? | yes | | --- @@ -2807,10 +2810,10 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [String: Any]? | yes | Refund account data. | - | success | Bool | no | Success or failure flag. | | isVerifiedFlag | Bool? | yes | | + | data | [String: Any]? | yes | Refund account data. | | message | String | no | Response message | + | success | Bool | no | Success or failure flag. | --- @@ -2822,10 +2825,10 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | accountNo | String | no | | - | branchName | String | no | | | ifscCode | String | no | | - | bankName | String | no | | + | branchName | String | no | | | accountHolder | String | no | | + | bankName | String | no | | --- @@ -2860,9 +2863,9 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool? | yes | Response is successful or not | - | requestId | String | no | request id | | isVerifiedFlag | String | no | Boolean Flag whether OTP Validation is already done or not | + | requestId | String | no | request id | + | success | Bool? | yes | Response is successful or not | --- @@ -2873,8 +2876,8 @@ Success. Check the example shown below or refer `SetDefaultBeneficiaryResponse` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | orderId | String | no | Merchant Order Id | | beneficiaryId | String | no | Beneficiary Hash Id of the beneficiary added | + | orderId | String | no | Merchant Order Id | --- diff --git a/documentation/platform/CATALOG.md b/documentation/platform/CATALOG.md index 7d66d2e769..a41b49bc1f 100644 --- a/documentation/platform/CATALOG.md +++ b/documentation/platform/CATALOG.md @@ -6,24 +6,24 @@ ## Catalog Methods Catalog API's allows you to access list of products, prices, seller details, similar features, variants and many more useful features. -* [deleteSearchKeywords](#deletesearchkeywords) -* [getSearchKeywords](#getsearchkeywords) * [updateSearchKeywords](#updatesearchkeywords) +* [getSearchKeywords](#getsearchkeywords) +* [deleteSearchKeywords](#deletesearchkeywords) * [createCustomKeyword](#createcustomkeyword) * [getAllSearchKeyword](#getallsearchkeyword) -* [deleteAutocompleteKeyword](#deleteautocompletekeyword) -* [getAutocompleteKeywordDetail](#getautocompletekeyworddetail) * [updateAutocompleteKeyword](#updateautocompletekeyword) +* [getAutocompleteKeywordDetail](#getautocompletekeyworddetail) +* [deleteAutocompleteKeyword](#deleteautocompletekeyword) * [createCustomAutocompleteRule](#createcustomautocompleterule) * [getAutocompleteConfig](#getautocompleteconfig) * [createProductBundle](#createproductbundle) * [getProductBundle](#getproductbundle) -* [getProductBundleDetail](#getproductbundledetail) * [updateProductBundle](#updateproductbundle) +* [getProductBundleDetail](#getproductbundledetail) * [createSizeGuide](#createsizeguide) * [getSizeGuides](#getsizeguides) -* [getSizeGuide](#getsizeguide) * [updateSizeGuide](#updatesizeguide) +* [getSizeGuide](#getsizeguide) * [updateAppProduct](#updateappproduct) * [getCatalogConfiguration](#getcatalogconfiguration) * [createConfigurationProductListing](#createconfigurationproductlisting) @@ -34,8 +34,8 @@ Catalog API's allows you to access list of products, prices, seller details, sim * [createCollection](#createcollection) * [getAllCollections](#getallcollections) * [getCollectionDetail](#getcollectiondetail) -* [deleteCollection](#deletecollection) * [updateCollection](#updatecollection) +* [deleteCollection](#deletecollection) * [addCollectionItems](#addcollectionitems) * [getCollectionItems](#getcollectionitems) * [getCatalogInsights](#getcataloginsights) @@ -60,19 +60,19 @@ Catalog API's allows you to access list of products, prices, seller details, sim * [listTemplateBrandTypeValues](#listtemplatebrandtypevalues) * [createCategories](#createcategories) * [listCategories](#listcategories) -* [getCategoryData](#getcategorydata) * [updateCategory](#updatecategory) +* [getCategoryData](#getcategorydata) * [createProduct](#createproduct) * [getProducts](#getproducts) -* [deleteProduct](#deleteproduct) -* [getProduct](#getproduct) * [editProduct](#editproduct) +* [getProduct](#getproduct) +* [deleteProduct](#deleteproduct) * [getProductValidation](#getproductvalidation) * [getProductSize](#getproductsize) * [createBulkProductUploadJob](#createbulkproductuploadjob) * [getProductBulkUploadHistory](#getproductbulkuploadhistory) -* [deleteProductBulkJob](#deleteproductbulkjob) * [createProductsInBulk](#createproductsinbulk) +* [deleteProductBulkJob](#deleteproductbulkjob) * [getProductTags](#getproducttags) * [createProductAssetsInBulk](#createproductassetsinbulk) * [getProductAssetsInBulk](#getproductassetsinbulk) @@ -84,15 +84,15 @@ Catalog API's allows you to access list of products, prices, seller details, sim * [deleteInventory](#deleteinventory) * [createBulkInventoryJob](#createbulkinventoryjob) * [getInventoryBulkUploadHistory](#getinventorybulkuploadhistory) -* [deleteBulkInventoryJob](#deletebulkinventoryjob) * [createBulkInventory](#createbulkinventory) +* [deleteBulkInventoryJob](#deletebulkinventoryjob) * [createInventoryExportJob](#createinventoryexportjob) * [getInventoryExport](#getinventoryexport) * [exportInventoryConfig](#exportinventoryconfig) * [createHsnCode](#createhsncode) * [getAllHsnCodes](#getallhsncodes) -* [getHsnCode](#gethsncode) * [updateHsnCode](#updatehsncode) +* [getHsnCode](#gethsncode) * [bulkHsnCode](#bulkhsncode) * [getApplicationBrands](#getapplicationbrands) * [getDepartments](#getdepartments) @@ -108,14 +108,14 @@ Catalog API's allows you to access list of products, prices, seller details, sim ## Methods with example and description -#### 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 } ``` @@ -127,19 +127,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. @@ -148,9 +148,7 @@ Status object. Tells whether the operation was successful. See example below or   Example: ```json -{ - "message": "Words Deleted" -} + ``` @@ -236,14 +234,14 @@ The Collection object. See example below or refer `GetSearchWordsDetailResponseS --- -#### 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" +} ``` @@ -438,14 +438,14 @@ List of custom search keywords. See example below or refer `GetSearchWordsRespon --- -#### 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 } ``` @@ -457,19 +457,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. @@ -478,9 +478,7 @@ Status object. Tells whether the operation was successful. See example below or   Example: ```json -{ - "message": "Words Deleted" -} + ``` @@ -578,14 +576,14 @@ The mapping object. See example below or refer `GetAutocompleteWordsResponseSche --- -#### 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" +} ``` @@ -1065,14 +1065,14 @@ List of bundle configured for a company. See example below or refer `GetProductB --- -#### getProductBundleDetail -Get a particular Product Bundle details +#### updateProductBundle +Update a Product Bundle ```swift -client.catalog.getProductBundleDetail(id: id) { (response, error) in +client.catalog.updateProductBundle(id: id, body: body) { (response, error) in // Use response } ``` @@ -1083,20 +1083,20 @@ client.catalog.getProductBundleDetail(id: id) { (response, error) in | 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 retrieve. | - +| 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 | ProductBundleUpdateRequest | yes | Request body | -Get a particular Bundle details by its `id`. If successful, returns a Product bundle resource in the response body specified in `GetProductBundleResponse` +Update a Product Bundle by its id. On successful request, returns the updated product bundle *Returned Response:* -[GetProductBundleResponse](#GetProductBundleResponse) +[GetProductBundleCreateResponse](#GetProductBundleCreateResponse) -The Collection object. See example below or refer `GetProductBundleResponse` for details +The Collection object. See example below or refer `GetProductBundleCreateResponse` for details. @@ -1107,26 +1107,12 @@ The Collection object. See example below or refer `GetProductBundleResponse` for ```json { "slug": "bag", - "company_id": 1, "logo": "http://g.com/poo.png/", "name": "Bag", "choice": "multi", "products": [ { "product_uid": 7500001, - "product_details": { - "country_of_origin": "India", - "slug": "slug-1", - "item_code": "760B3BFF-4905-44B8-A50E-082829E7107F", - "attributes": { - "brand_name": "brand 2" - }, - "name": "Some Phone", - "images": [ - "https://hdn-1.addsale.com/x0/media/pictures/tagged_items/original/random_code_4/FE6DUR_000000.png" - ], - "uid": 7500001 - }, "max_quantity": 1, "min_quantity": 1, "auto_add_to_cart": false, @@ -1136,9 +1122,22 @@ The Collection object. See example below or refer `GetProductBundleResponse` for ], "meta": {}, "same_store_assignment": true, + "is_active": true, "page_visibility": [ "pdp" - ] + ], + "created_by": { + "username": "917827311650_22960", + "uid": "123" + }, + "company_id": 1, + "created_on": "2021-02-19 16:40:26.310007", + "modified_by": { + "username": "917827311650_22960", + "uid": "123" + }, + "modified_on": "2021-02-19 16:40:26.310027", + "id": "602f9ca2a596ce312f5956f9" } ``` @@ -1154,14 +1153,14 @@ The Collection object. See example below or refer `GetProductBundleResponse` for --- -#### updateProductBundle -Update a Product Bundle +#### getProductBundleDetail +Get a particular Product Bundle details ```swift -client.catalog.updateProductBundle(id: id, body: body) { (response, error) in +client.catalog.getProductBundleDetail(id: id) { (response, error) in // Use response } ``` @@ -1172,20 +1171,20 @@ client.catalog.updateProductBundle(id: id, body: body) { (response, error) in | 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 | ProductBundleUpdateRequest | yes | Request body | +| id | String | yes | A `id` is a unique identifier for a particular detail. Pass the `id` of the keywords which you want to retrieve. | -Update a Product Bundle by its id. On successful request, returns the updated product bundle + +Get a particular Bundle details by its `id`. If successful, returns a Product bundle resource in the response body specified in `GetProductBundleResponse` *Returned Response:* -[GetProductBundleCreateResponse](#GetProductBundleCreateResponse) +[GetProductBundleResponse](#GetProductBundleResponse) -The Collection object. See example below or refer `GetProductBundleCreateResponse` for details. +The Collection object. See example below or refer `GetProductBundleResponse` for details @@ -1196,12 +1195,26 @@ The Collection object. See example below or refer `GetProductBundleCreateRespons ```json { "slug": "bag", + "company_id": 1, "logo": "http://g.com/poo.png/", "name": "Bag", "choice": "multi", "products": [ { "product_uid": 7500001, + "product_details": { + "country_of_origin": "India", + "slug": "slug-1", + "item_code": "760B3BFF-4905-44B8-A50E-082829E7107F", + "attributes": { + "brand_name": "brand 2" + }, + "name": "Some Phone", + "images": [ + "https://hdn-1.addsale.com/x0/media/pictures/tagged_items/original/random_code_4/FE6DUR_000000.png" + ], + "uid": 7500001 + }, "max_quantity": 1, "min_quantity": 1, "auto_add_to_cart": false, @@ -1211,22 +1224,9 @@ The Collection object. See example below or refer `GetProductBundleCreateRespons ], "meta": {}, "same_store_assignment": true, - "is_active": true, "page_visibility": [ "pdp" - ], - "created_by": { - "username": "917827311650_22960", - "uid": "123" - }, - "company_id": 1, - "created_on": "2021-02-19 16:40:26.310007", - "modified_by": { - "username": "917827311650_22960", - "uid": "123" - }, - "modified_on": "2021-02-19 16:40:26.310027", - "id": "602f9ca2a596ce312f5956f9" + ] } ``` @@ -1413,6 +1413,63 @@ Size guide object. See example below or refer `ListSizeGuide` for details +--- + + +#### updateSizeGuide +Edit a size guide. + + + + +```swift +client.catalog.updateSizeGuide(id: id, body: body) { (response, error) in + // Use response +} +``` + + + + + +| Argument | Type | Required | Description | +| -------- | ---- | -------- | ----------- | +| id | String | yes | Mongo id of the size guide to be edited | +| body | ValidateSizeGuide | yes | Request body | + + +This API allows to edit a size guide. + +*Returned Response:* + + + + +[SuccessResponse](#SuccessResponse) + +Returns a success response + + + + +
+  Example: + +```json +{ + "success": true +} +``` +
+ + + + + + + + + --- @@ -1519,14 +1576,14 @@ Brand object. See example below or refer `SizeGuideResponseSchema` for details --- -#### updateSizeGuide -Edit a size guide. +#### updateAppProduct +Update a single custom meta. ```swift -client.catalog.updateSizeGuide(id: id, body: body) { (response, error) in +client.application("").catalog.updateAppProduct(itemId: itemId, body: body) { (response, error) in // Use response } ``` @@ -1537,65 +1594,8 @@ client.catalog.updateSizeGuide(id: id, body: body) { (response, error) in | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | -| id | String | yes | Mongo id of the size guide to be edited | -| body | ValidateSizeGuide | yes | Request body | - - -This API allows to edit a size guide. - -*Returned Response:* - - - - -[SuccessResponse](#SuccessResponse) - -Returns a success response - - - - -
-  Example: - -```json -{ - "success": true -} -``` -
- - - - - - - - - ---- - - -#### updateAppProduct -Update a single custom meta. - - - - -```swift -client.application("").catalog.updateAppProduct(itemId: itemId, body: body) { (response, error) in - // Use response -} -``` - - - - - -| Argument | Type | Required | Description | -| -------- | ---- | -------- | ----------- | -| itemId | String | yes | product id for which the custom_meta is associated. | -| body | ApplicationItemMeta | yes | Request body | +| itemId | String | yes | product id for which the custom_meta is associated. | +| body | ApplicationItemMeta | yes | Request body | This API helps to update data associated to a item custom meta. @@ -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" +} +``` +
+ + + + + + + + + --- @@ -7725,6 +7725,61 @@ Category Meta. See example below or refer `CategoryResponse` for details +--- + + +#### updateCategory +Update product categories + + + + +```swift +client.catalog.updateCategory(uid: uid, body: body) { (response, error) in + // Use response +} +``` + + + + + +| Argument | Type | Required | Description | +| -------- | ---- | -------- | ----------- | +| uid | String | yes | Category unique id | +| body | CategoryRequestBody | yes | Request body | + + +Update a product category using this apu + +*Returned Response:* + + + + +[CategoryUpdateResponse](#CategoryUpdateResponse) + +Category Meta. See example below or refer `CategoryUpdateResponse` for details + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + --- @@ -7821,14 +7876,14 @@ Get Data for one category. See example below or refer `CategoryResponse` for det --- -#### updateCategory -Update product categories +#### createProduct +Create a product. ```swift -client.catalog.updateCategory(uid: uid, body: body) { (response, error) in +client.catalog.createProduct(body: body) { (response, error) in // Use response } ``` @@ -7838,21 +7893,20 @@ client.catalog.updateCategory(uid: uid, body: body) { (response, error) in | Argument | Type | Required | Description | -| -------- | ---- | -------- | ----------- | -| uid | String | yes | Category unique id | -| body | CategoryRequestBody | yes | Request body | +| -------- | ---- | -------- | ----------- | +| body | ProductCreateUpdate | yes | Request body | -Update a product category using this apu +This API allows to create product. *Returned Response:* -[CategoryUpdateResponse](#CategoryUpdateResponse) +[SuccessResponse](#SuccessResponse) -Category Meta. See example below or refer `CategoryUpdateResponse` for details +Returns a success response @@ -7861,7 +7915,9 @@ Category Meta. See example below or refer `CategoryUpdateResponse` for details   Example: ```json - +{ + "success": true +} ``` @@ -7876,70 +7932,14 @@ Category Meta. See example below or refer `CategoryUpdateResponse` for details --- -#### createProduct -Create a product. +#### getProducts +Get product list ```swift -client.catalog.createProduct(body: body) { (response, error) in - // Use response -} -``` - - - - - -| Argument | Type | Required | Description | -| -------- | ---- | -------- | ----------- | -| body | ProductCreateUpdate | yes | Request body | - - -This API allows to create product. - -*Returned Response:* - - - - -[SuccessResponse](#SuccessResponse) - -Returns a success response - - - - -
-  Example: - -```json -{ - "success": true -} -``` -
- - - - - - - - - ---- - - -#### getProducts -Get product list - - - - -```swift -client.catalog.getProducts(brandIds: brandIds, categoryIds: categoryIds, itemIds: itemIds, departmentIds: departmentIds, itemCode: itemCode, q: q, tags: tags, pageNo: pageNo, pageSize: pageSize) { (response, error) in +client.catalog.getProducts(brandIds: brandIds, categoryIds: categoryIds, itemIds: itemIds, departmentIds: departmentIds, itemCode: itemCode, q: q, tags: tags, pageNo: pageNo, pageSize: pageSize) { (response, error) in // Use response } ``` @@ -8161,14 +8161,14 @@ Product Meta. See example below for details --- -#### 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 } ``` @@ -8180,10 +8180,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 @@ Product object. See example below or refer `product.utils.format_product_respons --- -#### 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 @@ List of bulk product upload jobs. See `BulkRequestGetSchema` for details --- -#### 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 @@ List of bulk Inventory upload jobs. See `BulkInventoryGetSchema` for details --- -#### 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:* @@ -11203,14 +11203,14 @@ List of all HSN Codes. See example below or refer `HsnCodesListingResponseSchema --- -#### getHsnCode -Fetch Hsn Code. +#### updateHsnCode +Update Hsn Code. ```swift -client.catalog.getHsnCode(id: id) { (response, error) in +client.catalog.updateHsnCode(id: id, body: body) { (response, error) in // Use response } ``` @@ -11222,10 +11222,10 @@ client.catalog.getHsnCode(id: id) { (response, error) in | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | | id | String | yes | Unique id | +| body | HsnUpsert | yes | Request body | - -Fetch Hsn Code. +Update Hsn Code. *Returned Response:* @@ -11234,7 +11234,7 @@ Fetch Hsn Code. [HsnCode](#HsnCode) -See example below details +See example below for details @@ -11280,14 +11280,14 @@ See example below details --- -#### updateHsnCode -Update Hsn Code. +#### getHsnCode +Fetch Hsn Code. ```swift -client.catalog.updateHsnCode(id: id, body: body) { (response, error) in +client.catalog.getHsnCode(id: id) { (response, error) in // Use response } ``` @@ -11299,10 +11299,10 @@ client.catalog.updateHsnCode(id: id, body: body) { (response, error) in | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | | id | String | yes | Unique id | -| body | HsnUpsert | yes | Request body | -Update Hsn Code. + +Fetch Hsn Code. *Returned Response:* @@ -11311,7 +11311,7 @@ Update Hsn Code. [HsnCode](#HsnCode) -See example below for details +See example below details @@ -13063,25 +13063,27 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [DeleteResponse](#DeleteResponse) + #### [SearchKeywordResult](#SearchKeywordResult) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | message | String? | yes | | + | sortOn | String | no | | + | query | [String: Any] | no | | --- - #### [ErrorResponse](#ErrorResponse) + #### [CreateSearchKeyword](#CreateSearchKeyword) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | meta | [String: Any]? | yes | | - | message | String? | yes | | - | status | Int? | yes | | - | code | String? | yes | | + | appId | String? | yes | | + | result | [SearchKeywordResult](#SearchKeywordResult) | no | | + | words | [String]? | yes | | + | customJson | [String: Any]? | yes | | + | isActive | Bool? | yes | | --- @@ -13092,117 +13094,90 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | words | [String]? | yes | | - | customJson | [String: Any]? | yes | | | appId | String? | yes | | | result | [String: Any]? | yes | | + | words | [String]? | yes | | | uid | String? | yes | | + | customJson | [String: Any]? | yes | | --- - #### [Page](#Page) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | size | Int? | yes | | - | hasNext | Bool? | yes | | - | itemTotal | Int? | yes | | - | type | String | no | | - | nextId | String? | yes | | - | current | Int? | yes | | - | hasPrevious | Bool? | yes | | - ---- - - - - - #### [GetSearchWordsDetailResponse](#GetSearchWordsDetailResponse) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | items | [GetSearchWordsData](#GetSearchWordsData)? | yes | | - | page | [Page](#Page)? | yes | | - ---- - - - - - #### [SearchKeywordResult](#SearchKeywordResult) + #### [ErrorResponse](#ErrorResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sortOn | String | no | | - | query | [String: Any] | no | | + | meta | [String: Any]? | yes | | + | message | String? | yes | | + | code | String? | yes | | + | status | Int? | yes | | --- - #### [CreateSearchKeyword](#CreateSearchKeyword) + #### [Page](#Page) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | words | [String]? | yes | | - | customJson | [String: Any]? | yes | | - | appId | String? | yes | | - | isActive | Bool? | yes | | - | result | [SearchKeywordResult](#SearchKeywordResult) | no | | + | current | Int? | yes | | + | type | String | no | | + | size | Int? | yes | | + | nextId | String? | yes | | + | itemTotal | Int? | yes | | + | hasNext | Bool? | yes | | + | hasPrevious | Bool? | yes | | --- - #### [GetSearchWordsResponse](#GetSearchWordsResponse) + #### [GetSearchWordsDetailResponse](#GetSearchWordsDetailResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[GetSearchWordsData](#GetSearchWordsData)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [GetSearchWordsData](#GetSearchWordsData)? | yes | | --- - #### [GetAutocompleteWordsData](#GetAutocompleteWordsData) + #### [DeleteResponse](#DeleteResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | words | [String]? | yes | | - | customJson | [String: Any]? | yes | | - | appId | String? | yes | | - | results | [[String: Any]]? | yes | | - | uid | String? | yes | | + | message | String? | yes | | --- - #### [GetAutocompleteWordsResponse](#GetAutocompleteWordsResponse) + #### [GetSearchWordsResponse](#GetSearchWordsResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[GetAutocompleteWordsData](#GetAutocompleteWordsData)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[GetSearchWordsData](#GetSearchWordsData)]? | yes | | --- - #### [Media](#Media) + #### [AutocompletePageAction](#AutocompletePageAction) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | params | [String: Any]? | yes | | | type | String? | yes | | + | query | [String: Any]? | yes | | | url | String? | yes | | --- @@ -13210,26 +13185,24 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [AutocompletePageAction](#AutocompletePageAction) + #### [AutocompleteAction](#AutocompleteAction) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | page | [AutocompletePageAction](#AutocompletePageAction)? | yes | | | type | String? | yes | | - | query | [String: Any]? | yes | | - | url | String? | yes | | - | params | [String: Any]? | yes | | --- - #### [AutocompleteAction](#AutocompleteAction) + #### [Media](#Media) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | type | String? | yes | | - | page | [AutocompletePageAction](#AutocompletePageAction)? | yes | | + | url | String? | yes | | --- @@ -13242,8 +13215,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | ---------- | ---- | -------- | ----------- | | display | String? | yes | | | customJson | [String: Any]? | yes | | - | logo | [Media](#Media)? | yes | | | action | [AutocompleteAction](#AutocompleteAction)? | yes | | + | logo | [Media](#Media)? | yes | | --- @@ -13254,10 +13227,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | words | [String]? | yes | | - | customJson | [String: Any]? | yes | | | appId | String? | yes | | | results | [[AutocompleteResult](#AutocompleteResult)]? | yes | | + | words | [String]? | yes | | + | customJson | [String: Any]? | yes | | | isActive | Bool? | yes | | --- @@ -13265,12 +13238,39 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [CreateAutocompleteWordsResponse](#CreateAutocompleteWordsResponse) + #### [GetAutocompleteWordsData](#GetAutocompleteWordsData) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | appId | String? | yes | | - | customJson | [String: Any]? | yes | | + | results | [[String: Any]]? | yes | | + | words | [String]? | yes | | + | uid | String? | yes | | + | customJson | [String: Any]? | yes | | + +--- + + + + + #### [GetAutocompleteWordsResponse](#GetAutocompleteWordsResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | page | [Page](#Page)? | yes | | + | items | [[GetAutocompleteWordsData](#GetAutocompleteWordsData)]? | yes | | + +--- + + + + + #### [CreateAutocompleteWordsResponse](#CreateAutocompleteWordsResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | appId | String? | yes | | + | customJson | [String: Any]? | yes | | | results | [[String: Any]]? | yes | | | words | [String]? | yes | | @@ -13283,12 +13283,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | autoSelect | Bool? | yes | | - | autoAddToCart | Bool? | yes | | | maxQuantity | Int | no | | - | minQuantity | Int | no | | - | allowRemove | Bool? | yes | | | productUid | Int | no | | + | allowRemove | Bool? | yes | | + | autoAddToCart | Bool? | yes | | + | minQuantity | Int | no | | + | autoSelect | Bool? | yes | | --- @@ -13299,19 +13299,19 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | modifiedOn | String? | yes | | + | sameStoreAssignment | Bool? | yes | | | name | String | no | | | choice | String | no | | - | sameStoreAssignment | Bool? | yes | | - | pageVisibility | [String]? | yes | | + | products | [[ProductBundleItem](#ProductBundleItem)] | no | | + | createdBy | [String: Any]? | yes | | | modifiedBy | [String: Any]? | yes | | - | logo | String? | yes | | | isActive | Bool | no | | | createdOn | String? | yes | | - | createdBy | [String: Any]? | yes | | - | products | [[ProductBundleItem](#ProductBundleItem)] | no | | - | meta | [String: Any]? | yes | | + | pageVisibility | [String]? | yes | | + | logo | String? | yes | | + | modifiedOn | String? | yes | | | slug | String | no | | + | meta | [String: Any]? | yes | | --- @@ -13322,21 +13322,21 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | modifiedOn | String? | yes | | + | sameStoreAssignment | Bool? | yes | | | name | String | no | | | choice | String | no | | - | sameStoreAssignment | Bool? | yes | | + | products | [[ProductBundleItem](#ProductBundleItem)] | no | | + | createdBy | [String: Any]? | yes | | | companyId | Int? | yes | | - | pageVisibility | [String]? | yes | | | modifiedBy | [String: Any]? | yes | | - | logo | String? | yes | | + | id | String? | yes | | | isActive | Bool | no | | | createdOn | String? | yes | | - | createdBy | [String: Any]? | yes | | - | products | [[ProductBundleItem](#ProductBundleItem)] | no | | - | meta | [String: Any]? | yes | | - | id | String? | yes | | + | pageVisibility | [String]? | yes | | + | logo | String? | yes | | + | modifiedOn | String? | yes | | | slug | String | no | | + | meta | [String: Any]? | yes | | --- @@ -13347,23 +13347,29 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[GetProductBundleCreateResponse](#GetProductBundleCreateResponse)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[GetProductBundleCreateResponse](#GetProductBundleCreateResponse)]? | yes | | --- - #### [Price](#Price) + #### [ProductBundleUpdateRequest](#ProductBundleUpdateRequest) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | minEffective | Double? | yes | | - | maxEffective | Double? | yes | | - | currency | String? | yes | | - | maxMarked | Double? | yes | | - | minMarked | Double? | yes | | + | sameStoreAssignment | Bool? | yes | | + | name | String | no | | + | choice | String | no | | + | products | [[ProductBundleItem](#ProductBundleItem)] | no | | + | modifiedBy | [String: Any]? | yes | | + | isActive | Bool | no | | + | pageVisibility | [String]? | yes | | + | logo | String? | yes | | + | modifiedOn | String? | yes | | + | slug | String | no | | + | meta | [String: Any]? | yes | | --- @@ -13374,16 +13380,16 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | images | [String]? | yes | | - | price | [String: Any]? | yes | | + | attributes | [String: Any]? | yes | | + | quantity | Int? | yes | | | name | String? | yes | | | identifier | [String: Any]? | yes | | - | itemCode | String? | yes | | - | quantity | Int? | yes | | + | price | [String: Any]? | yes | | + | shortDescription | String? | yes | | | countryOfOrigin | String? | yes | | + | images | [String]? | yes | | + | itemCode | String? | yes | | | sizes | [String]? | yes | | - | attributes | [String: Any]? | yes | | - | shortDescription | String? | yes | | | uid | Int? | yes | | | slug | String? | yes | | @@ -13392,6 +13398,21 @@ Company profile object. See example below or refer `LocationListSerializer` for + #### [Price](#Price) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | currency | String? | yes | | + | minMarked | Double? | yes | | + | maxEffective | Double? | yes | | + | minEffective | Double? | yes | | + | maxMarked | Double? | yes | | + +--- + + + + #### [Size](#Size) | Properties | Type | Nullable | Description | @@ -13410,14 +13431,14 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | price | [Price](#Price)? | yes | | - | autoAddToCart | Bool? | yes | | - | autoSelect | Bool? | yes | | | productDetails | [LimitedProductData](#LimitedProductData)? | yes | | | maxQuantity | Int? | yes | | - | minQuantity | Int? | yes | | + | price | [Price](#Price)? | yes | | | allowRemove | Bool? | yes | | | sizes | [[Size](#Size)]? | yes | | + | autoAddToCart | Bool? | yes | | + | autoSelect | Bool? | yes | | + | minQuantity | Int? | yes | | | productUid | Int? | yes | | --- @@ -13429,37 +13450,16 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | sameStoreAssignment | Bool? | yes | | | name | String? | yes | | - | choice | String? | yes | | | companyId | Int? | yes | | - | sameStoreAssignment | Bool? | yes | | - | pageVisibility | [String]? | yes | | - | logo | String? | yes | | - | isActive | Bool? | yes | | | products | [[GetProducts](#GetProducts)]? | yes | | - | meta | [String: Any]? | yes | | - | slug | String? | yes | | - ---- - - - - - #### [ProductBundleUpdateRequest](#ProductBundleUpdateRequest) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | modifiedOn | String? | yes | | - | name | String | no | | - | choice | String | no | | - | sameStoreAssignment | Bool? | yes | | + | choice | String? | yes | | + | isActive | Bool? | yes | | | pageVisibility | [String]? | yes | | - | modifiedBy | [String: Any]? | yes | | | logo | String? | yes | | - | isActive | Bool | no | | - | products | [[ProductBundleItem](#ProductBundleItem)] | no | | + | slug | String? | yes | | | meta | [String: Any]? | yes | | - | slug | String | no | | --- @@ -13470,9 +13470,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | values | [[String: Any]]? | yes | | - | unit | String? | yes | | | headers | [String: Any]? | yes | | + | unit | String? | yes | | + | values | [[String: Any]]? | yes | | --- @@ -13494,21 +13494,21 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | subtitle | String? | yes | | - | active | Bool? | yes | | - | id | String? | yes | | + | tag | String? | yes | | | name | String | no | | + | active | Bool? | yes | | | companyId | Int? | yes | | - | title | String | no | | - | modifiedBy | [String: Any]? | yes | | - | tag | String? | yes | | | guide | [Guide](#Guide)? | yes | | - | createdOn | String? | yes | | | createdBy | [String: Any]? | yes | | | image | String? | yes | | + | modifiedBy | [String: Any]? | yes | | + | modifiedOn | String? | yes | | + | id | String? | yes | | + | createdOn | String? | yes | | + | subtitle | String? | yes | | | description | String? | yes | | + | title | String | no | | | brandId | Int? | yes | | - | modifiedOn | String? | yes | | --- @@ -13530,8 +13530,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[String: Any]]? | yes | | | page | [String: Any]? | yes | | + | items | [[String: Any]]? | yes | | --- @@ -13542,19 +13542,19 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | active | Bool? | yes | | - | subtitle | String? | yes | | - | id | String? | yes | | + | tag | String? | yes | | | name | String? | yes | | + | active | Bool? | yes | | | companyId | Int? | yes | | - | title | String? | yes | | - | modifiedBy | [String: Any]? | yes | | - | tag | String? | yes | | + | createdBy | [String: Any]? | yes | | | guide | [String: Any]? | yes | | + | modifiedBy | [String: Any]? | yes | | + | title | String? | yes | | + | id | String? | yes | | | createdOn | String? | yes | | - | createdBy | [String: Any]? | yes | | - | brandId | Int? | yes | | + | subtitle | String? | yes | | | modifiedOn | String? | yes | | + | brandId | Int? | yes | | --- @@ -13565,8 +13565,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | key | String | no | | | value | String | no | | + | key | String | no | | --- @@ -13588,58 +13588,58 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | variant | [String: Any]? | yes | | | detail | [String: Any]? | yes | | - | similar | [String: Any]? | yes | | | compare | [String: Any]? | yes | | + | variant | [String: Any]? | yes | | + | similar | [String: Any]? | yes | | --- - #### [MetaDataListingFilterMetaResponse](#MetaDataListingFilterMetaResponse) + #### [MetaDataListingSortMetaResponse](#MetaDataListingSortMetaResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | units | [[String: Any]]? | yes | | | display | String? | yes | | | key | String? | yes | | - | filterTypes | [String]? | yes | | --- - #### [MetaDataListingFilterResponse](#MetaDataListingFilterResponse) + #### [MetaDataListingSortResponse](#MetaDataListingSortResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [[MetaDataListingFilterMetaResponse](#MetaDataListingFilterMetaResponse)]? | yes | | + | data | [[MetaDataListingSortMetaResponse](#MetaDataListingSortMetaResponse)]? | yes | | --- - #### [MetaDataListingSortMetaResponse](#MetaDataListingSortMetaResponse) + #### [MetaDataListingFilterMetaResponse](#MetaDataListingFilterMetaResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | display | String? | yes | | | key | String? | yes | | + | filterTypes | [String]? | yes | | + | units | [[String: Any]]? | yes | | --- - #### [MetaDataListingSortResponse](#MetaDataListingSortResponse) + #### [MetaDataListingFilterResponse](#MetaDataListingFilterResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [[MetaDataListingSortMetaResponse](#MetaDataListingSortMetaResponse)]? | yes | | + | data | [[MetaDataListingFilterMetaResponse](#MetaDataListingFilterMetaResponse)]? | yes | | --- @@ -13650,8 +13650,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | filter | [MetaDataListingFilterResponse](#MetaDataListingFilterResponse) | no | | | sort | [MetaDataListingSortResponse](#MetaDataListingSortResponse) | no | | + | filter | [MetaDataListingFilterResponse](#MetaDataListingFilterResponse) | no | | --- @@ -13686,13 +13686,13 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | size | [ProductSize](#ProductSize) | no | | | name | String | no | | + | priority | Int | no | | + | key | String | no | | + | displayType | String | no | | | logo | String? | yes | | + | size | [ProductSize](#ProductSize) | no | | | isActive | Bool | no | | - | displayType | String | no | | - | key | String | no | | - | priority | Int | no | | --- @@ -13714,13 +13714,13 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | size | [ProductSize](#ProductSize)? | yes | | + | priority | Int | no | | + | key | String | no | | | subtitle | String? | yes | | - | title | String? | yes | | | logo | String? | yes | | + | title | String? | yes | | | isActive | Bool | no | | - | key | String | no | | - | priority | Int | no | | + | size | [ProductSize](#ProductSize)? | yes | | --- @@ -13750,84 +13750,84 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [ConfigurationBucketPoints](#ConfigurationBucketPoints) + #### [ConfigurationListingSortConfig](#ConfigurationListingSortConfig) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | display | String? | yes | | - | end | Double? | yes | | - | start | Double? | yes | | + | name | String? | yes | | + | priority | Int | no | | + | key | String | no | | + | logo | String? | yes | | + | isActive | Bool | no | | --- - #### [ConfigurationListingFilterValue](#ConfigurationListingFilterValue) + #### [ConfigurationListingSort](#ConfigurationListingSort) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | value | String? | yes | | - | condition | String? | yes | | - | bucketPoints | [[ConfigurationBucketPoints](#ConfigurationBucketPoints)]? | yes | | - | sort | String? | yes | | - | map | [String: Any]? | yes | | + | config | [[ConfigurationListingSortConfig](#ConfigurationListingSortConfig)]? | yes | | + | defaultKey | String | no | | --- - #### [ConfigurationListingFilterConfig](#ConfigurationListingFilterConfig) + #### [ConfigurationBucketPoints](#ConfigurationBucketPoints) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | - | type | String | no | | - | logo | String? | yes | | - | isActive | Bool | no | | - | key | String | no | | - | priority | Int | no | | - | valueConfig | [ConfigurationListingFilterValue](#ConfigurationListingFilterValue)? | yes | | + | display | String? | yes | | + | start | Double? | yes | | + | end | Double? | yes | | --- - #### [ConfigurationListingFilter](#ConfigurationListingFilter) + #### [ConfigurationListingFilterValue](#ConfigurationListingFilterValue) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | attributeConfig | [[ConfigurationListingFilterConfig](#ConfigurationListingFilterConfig)]? | yes | | - | allowSingle | Bool | no | | + | value | String? | yes | | + | condition | String? | yes | | + | map | [String: Any]? | yes | | + | sort | String? | yes | | + | bucketPoints | [[ConfigurationBucketPoints](#ConfigurationBucketPoints)]? | yes | | --- - #### [ConfigurationListingSortConfig](#ConfigurationListingSortConfig) + #### [ConfigurationListingFilterConfig](#ConfigurationListingFilterConfig) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | name | String? | yes | | + | valueConfig | [ConfigurationListingFilterValue](#ConfigurationListingFilterValue)? | yes | | + | priority | Int | no | | + | key | String | no | | + | type | String | no | | | logo | String? | yes | | | isActive | Bool | no | | - | key | String | no | | - | priority | Int | no | | --- - #### [ConfigurationListingSort](#ConfigurationListingSort) + #### [ConfigurationListingFilter](#ConfigurationListingFilter) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | defaultKey | String | no | | - | config | [[ConfigurationListingSortConfig](#ConfigurationListingSortConfig)]? | yes | | + | attributeConfig | [[ConfigurationListingFilterConfig](#ConfigurationListingFilterConfig)]? | yes | | + | allowSingle | Bool | no | | --- @@ -13838,8 +13838,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | filter | [ConfigurationListingFilter](#ConfigurationListingFilter) | no | | | sort | [ConfigurationListingSort](#ConfigurationListingSort) | no | | + | filter | [ConfigurationListingFilter](#ConfigurationListingFilter) | no | | --- @@ -13850,11 +13850,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | configId | String? | yes | | | appId | String | no | | - | configType | String | no | | | product | [ConfigurationProduct](#ConfigurationProduct)? | yes | | + | configId | String? | yes | | | listing | [ConfigurationListing](#ConfigurationListing)? | yes | | + | configType | String | no | | --- @@ -13865,12 +13865,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | configId | String? | yes | | | appId | String | no | | - | configType | String | no | | | product | [ConfigurationProduct](#ConfigurationProduct)? | yes | | - | listing | [ConfigurationListing](#ConfigurationListing)? | yes | | | id | String? | yes | | + | configId | String? | yes | | + | listing | [ConfigurationListing](#ConfigurationListing)? | yes | | + | configType | String | no | | --- @@ -13893,8 +13893,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | filter | [String: Any]? | yes | | | sort | [String: Any]? | yes | | + | filter | [String: Any]? | yes | | --- @@ -13905,12 +13905,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | configId | String? | yes | | | appId | String | no | | - | configType | String | no | | | product | [GetCatalogConfigurationDetailsProduct](#GetCatalogConfigurationDetailsProduct)? | yes | | - | listing | [GetCatalogConfigurationDetailsSchemaListing](#GetCatalogConfigurationDetailsSchemaListing)? | yes | | | id | String? | yes | | + | configId | String? | yes | | + | listing | [GetCatalogConfigurationDetailsSchemaListing](#GetCatalogConfigurationDetailsSchemaListing)? | yes | | + | configType | String | no | | --- @@ -13929,13 +13929,14 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [ProductSortOn](#ProductSortOn) + #### [ProductFiltersKey](#ProductFiltersKey) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | isSelected | Bool? | yes | | - | name | String? | yes | | - | value | String? | yes | | + | display | String | no | | + | logo | String? | yes | | + | kind | String? | yes | | + | name | String | no | | --- @@ -13946,44 +13947,43 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | value | String | no | | + | min | Int? | yes | | + | count | Int? | yes | | + | currencyCode | String? | yes | | + | selectedMax | Int? | yes | | + | queryFormat | String? | yes | | + | selectedMin | Int? | yes | | | currencySymbol | String? | yes | | | display | String | no | | | displayFormat | String? | yes | | - | currencyCode | String? | yes | | - | selectedMin | Int? | yes | | - | value | String | no | | | max | Int? | yes | | - | min | Int? | yes | | - | queryFormat | String? | yes | | - | selectedMax | Int? | yes | | | isSelected | Bool | no | | - | count | Int? | yes | | --- - #### [ProductFiltersKey](#ProductFiltersKey) + #### [ProductFilters](#ProductFilters) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | logo | String? | yes | | - | display | String | no | | - | name | String | no | | - | kind | String? | yes | | + | key | [ProductFiltersKey](#ProductFiltersKey) | no | | + | values | [[ProductFiltersValue](#ProductFiltersValue)] | no | | --- - #### [ProductFilters](#ProductFilters) + #### [ProductSortOn](#ProductSortOn) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | values | [[ProductFiltersValue](#ProductFiltersValue)] | no | | - | key | [ProductFiltersKey](#ProductFiltersKey) | no | | + | value | String? | yes | | + | name | String? | yes | | + | isSelected | Bool? | yes | | --- @@ -13994,34 +13994,32 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | | filters | [[ProductFilters](#ProductFilters)]? | yes | | + | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | --- - #### [CollectionBadge](#CollectionBadge) + #### [CollectionImage](#CollectionImage) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | text | String? | yes | | - | color | String? | yes | | + | aspectRatio | String | no | | + | url | String | no | | --- - #### [Schedule](#Schedule) + #### [CollectionBanner](#CollectionBanner) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | cron | String? | yes | | - | start | String? | yes | | - | end | String? | yes | | - | duration | Int? | yes | | + | portrait | [CollectionImage](#CollectionImage) | no | | + | landscape | [CollectionImage](#CollectionImage) | no | | --- @@ -14032,46 +14030,48 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | userId | String? | yes | | - | username | String? | yes | | | email | String? | yes | | + | userId | String? | yes | | | uid | String? | yes | | + | username | String? | yes | | --- - #### [CollectionImage](#CollectionImage) + #### [SeoDetail](#SeoDetail) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | url | String | no | | - | aspectRatio | String | no | | + | title | String? | yes | | + | description | String? | yes | | --- - #### [CollectionBanner](#CollectionBanner) + #### [Schedule](#Schedule) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | portrait | [CollectionImage](#CollectionImage) | no | | - | landscape | [CollectionImage](#CollectionImage) | no | | + | duration | Int? | yes | | + | cron | String? | yes | | + | start | String? | yes | | + | end | String? | yes | | --- - #### [SeoDetail](#SeoDetail) + #### [CollectionBadge](#CollectionBadge) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | description | String? | yes | | - | title | String? | yes | | + | text | String? | yes | | + | color | String? | yes | | --- @@ -14082,29 +14082,29 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | badge | [CollectionBadge](#CollectionBadge)? | yes | | - | appId | String | no | | + | banners | [CollectionBanner](#CollectionBanner) | no | | + | modifiedBy | [UserInfo](#UserInfo)? | yes | | | query | [String: Any]? | yes | | - | published | Bool? | yes | | | allowSort | Bool? | yes | | + | seo | [SeoDetail](#SeoDetail)? | yes | | + | name | String | no | | + | isVisible | Bool? | yes | | | schedule | [Schedule](#Schedule)? | yes | | - | isActive | Bool? | yes | | - | createdBy | [UserInfo](#UserInfo)? | yes | | + | sortOn | String? | yes | | | description | String? | yes | | | tags | [String]? | yes | | - | slug | String | no | | - | customJson | [String: Any]? | yes | | - | name | String | no | | - | banners | [CollectionBanner](#CollectionBanner) | no | | - | seo | [SeoDetail](#SeoDetail)? | yes | | + | published | Bool? | yes | | + | badge | [CollectionBadge](#CollectionBadge)? | yes | | + | isActive | Bool? | yes | | + | meta | [String: Any]? | yes | | | allowFacets | Bool? | yes | | - | isVisible | Bool? | yes | | - | sortOn | String? | yes | | - | type | String | no | | - | modifiedBy | [UserInfo](#UserInfo)? | yes | | | logo | [CollectionImage](#CollectionImage) | no | | - | meta | [String: Any]? | yes | | + | customJson | [String: Any]? | yes | | + | appId | String | no | | + | createdBy | [UserInfo](#UserInfo)? | yes | | + | type | String | no | | | visibleFacetsKeys | [String]? | yes | | + | slug | String | no | | | localeLanguage | [String: Any]? | yes | | --- @@ -14116,8 +14116,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | url | String? | yes | | | aspectRatio | String? | yes | | + | url | String? | yes | | --- @@ -14140,23 +14140,23 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | appId | String? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | | allowFacets | Bool? | yes | | | meta | [String: Any]? | yes | | + | tag | [String]? | yes | | | name | String? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | + | cron | [String: Any]? | yes | | | schedule | [String: Any]? | yes | | - | appId | String? | yes | | - | badge | [String: Any]? | yes | | | type | String? | yes | | + | description | String? | yes | | | query | [String: Any]? | yes | | - | isActive | Bool? | yes | | | logo | [BannerImage](#BannerImage)? | yes | | - | tag | [String]? | yes | | | allowSort | Bool? | yes | | - | cron | [String: Any]? | yes | | - | description | String? | yes | | | visibleFacetsKeys | [String]? | yes | | | slug | String? | yes | | + | badge | [String: Any]? | yes | | + | isActive | Bool? | yes | | --- @@ -14167,9 +14167,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | isSelected | Bool? | yes | | - | name | String? | yes | | | display | String? | yes | | + | name | String? | yes | | + | isSelected | Bool? | yes | | --- @@ -14180,9 +14180,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | isSelected | Bool? | yes | | - | name | String? | yes | | | display | String? | yes | | + | name | String? | yes | | + | isSelected | Bool? | yes | | --- @@ -14201,37 +14201,37 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [Media1](#Media1) + #### [ActionPage](#ActionPage) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | meta | [String: Any]? | yes | | | type | String? | yes | | - | url | String | no | | + | query | [String: Any]? | yes | | --- - #### [ActionPage](#ActionPage) + #### [Action](#Action) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | page | [ActionPage](#ActionPage)? | yes | | | type | String? | yes | | - | query | [String: Any]? | yes | | --- - #### [Action](#Action) + #### [Media1](#Media1) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | type | String? | yes | | - | page | [ActionPage](#ActionPage)? | yes | | + | meta | [String: Any]? | yes | | + | url | String | no | | --- @@ -14242,25 +14242,25 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | badge | [String: Any]? | yes | | - | appId | String? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | tag | [String]? | yes | | | query | [String: Any]? | yes | | | allowSort | Bool? | yes | | - | cron | [String: Any]? | yes | | - | schedule | [String: Any]? | yes | | - | isActive | Bool? | yes | | - | description | String? | yes | | | uid | String? | yes | | - | slug | String? | yes | | | name | String? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | - | allowFacets | Bool? | yes | | - | type | String? | yes | | - | logo | [Media1](#Media1)? | yes | | - | tag | [String]? | yes | | | action | [Action](#Action)? | yes | | + | schedule | [String: Any]? | yes | | + | description | String? | yes | | + | badge | [String: Any]? | yes | | | meta | [String: Any]? | yes | | + | isActive | Bool? | yes | | + | allowFacets | Bool? | yes | | + | cron | [String: Any]? | yes | | + | logo | [Media1](#Media1)? | yes | | + | appId | String? | yes | | + | type | String? | yes | | | visibleFacetsKeys | [String]? | yes | | + | slug | String? | yes | | --- @@ -14271,9 +14271,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | page | [Page](#Page)? | yes | | | filters | [CollectionListingFilter](#CollectionListingFilter)? | yes | | | items | [[GetCollectionDetailNest](#GetCollectionDetailNest)]? | yes | | - | page | [Page](#Page)? | yes | | --- @@ -14284,23 +14284,23 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | appId | String? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | | allowFacets | Bool? | yes | | | meta | [String: Any]? | yes | | + | tag | [String]? | yes | | | name | String? | yes | | - | banners | [ImageUrls](#ImageUrls)? | yes | | + | cron | [String: Any]? | yes | | | schedule | [String: Any]? | yes | | - | appId | String? | yes | | - | badge | [String: Any]? | yes | | | type | String? | yes | | + | description | String? | yes | | | query | [String: Any]? | yes | | - | isActive | Bool? | yes | | | logo | [Media1](#Media1)? | yes | | - | tag | [String]? | yes | | | allowSort | Bool? | yes | | - | cron | [String: Any]? | yes | | - | description | String? | yes | | | visibleFacetsKeys | [String]? | yes | | | slug | String? | yes | | + | badge | [String: Any]? | yes | | + | isActive | Bool? | yes | | --- @@ -14311,26 +14311,26 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | badge | [CollectionBadge](#CollectionBadge)? | yes | | + | banners | [CollectionBanner](#CollectionBanner)? | yes | | + | modifiedBy | [UserInfo](#UserInfo)? | yes | | | query | [String: Any]? | yes | | - | published | Bool? | yes | | | allowSort | Bool? | yes | | + | seo | [SeoDetail](#SeoDetail)? | yes | | + | name | String? | yes | | + | isVisible | Bool? | yes | | | schedule | [Schedule](#Schedule)? | yes | | - | isActive | Bool? | yes | | + | sortOn | String? | yes | | | description | String? | yes | | | tags | [String]? | yes | | - | slug | String? | yes | | - | customJson | [String: Any]? | yes | | - | name | String? | yes | | - | banners | [CollectionBanner](#CollectionBanner)? | yes | | - | seo | [SeoDetail](#SeoDetail)? | yes | | + | published | Bool? | yes | | + | badge | [CollectionBadge](#CollectionBadge)? | yes | | + | meta | [String: Any]? | yes | | + | isActive | Bool? | yes | | | allowFacets | Bool? | yes | | - | isVisible | Bool? | yes | | - | sortOn | String? | yes | | - | modifiedBy | [UserInfo](#UserInfo)? | yes | | | logo | [CollectionImage](#CollectionImage)? | yes | | - | meta | [String: Any]? | yes | | + | customJson | [String: Any]? | yes | | | visibleFacetsKeys | [String]? | yes | | + | slug | String? | yes | | | localeLanguage | [String: Any]? | yes | | --- @@ -14366,60 +14366,60 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | logo | [Media1](#Media1)? | yes | | + | uid | Int? | yes | | | action | [Action](#Action)? | yes | | | name | String? | yes | | - | uid | Int? | yes | | --- - #### [Price1](#Price1) + #### [ProductDetailAttribute](#ProductDetailAttribute) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | currencySymbol | String? | yes | | - | max | Double? | yes | | - | min | Double? | yes | | - | currencyCode | String? | yes | | + | value | String? | yes | | + | key | String? | yes | | + | type | String? | yes | | --- - #### [ProductListingPrice](#ProductListingPrice) + #### [ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | effective | [Price1](#Price1)? | yes | | - | marked | [Price1](#Price1)? | yes | | + | title | String? | yes | | + | details | [[ProductDetailAttribute](#ProductDetailAttribute)]? | yes | | --- - #### [ProductDetailAttribute](#ProductDetailAttribute) + #### [Price1](#Price1) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | type | String? | yes | | - | key | String? | yes | | - | value | String? | yes | | + | max | Double? | yes | | + | min | Double? | yes | | + | currencySymbol | String? | yes | | + | currencyCode | String? | yes | | --- - #### [ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute) + #### [ProductListingPrice](#ProductListingPrice) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | title | String? | yes | | - | details | [[ProductDetailAttribute](#ProductDetailAttribute)]? | yes | | + | marked | [Price1](#Price1)? | yes | | + | effective | [Price1](#Price1)? | yes | | --- @@ -14430,32 +14430,32 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brand | [ProductBrand](#ProductBrand)? | yes | | - | ratingCount | Int? | yes | | + | tryouts | [String]? | yes | | + | medias | [[Media1](#Media1)]? | yes | | + | shortDescription | String? | yes | | | similars | [String]? | yes | | - | imageNature | String? | yes | | - | hasVariant | Bool? | yes | | - | color | String? | yes | | - | rating | Double? | yes | | - | description | String? | yes | | | uid | Int? | yes | | - | slug | String | no | | - | promoMeta | [String: Any]? | yes | | | name | String? | yes | | - | highlights | [String]? | yes | | + | discount | String? | yes | | + | brand | [ProductBrand](#ProductBrand)? | yes | | + | itemCode | String? | yes | | + | description | String? | yes | | + | imageNature | String? | yes | | | sellable | Bool? | yes | | + | rating | Double? | yes | | | itemType | String? | yes | | - | medias | [[Media1](#Media1)]? | yes | | - | itemCode | String? | yes | | - | teaserTag | [String: Any]? | yes | | - | shortDescription | String? | yes | | - | tryouts | [String]? | yes | | - | price | [ProductListingPrice](#ProductListingPrice)? | yes | | - | type | String? | yes | | - | productOnlineDate | String? | yes | | - | discount | String? | yes | | | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | | attributes | [String: Any]? | yes | | + | price | [ProductListingPrice](#ProductListingPrice)? | yes | | + | highlights | [String]? | yes | | + | productOnlineDate | String? | yes | | + | ratingCount | Int? | yes | | + | teaserTag | [String: Any]? | yes | | + | color | String? | yes | | + | type | String? | yes | | + | promoMeta | [String: Any]? | yes | | + | hasVariant | Bool? | yes | | + | slug | String | no | | --- @@ -14466,10 +14466,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | + | page | [Page](#Page)? | yes | | | filters | [[ProductFilters](#ProductFilters)]? | yes | | | items | [[ProductListingDetail](#ProductListingDetail)]? | yes | | - | page | [Page](#Page)? | yes | | + | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | --- @@ -14493,11 +14493,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | totalArticles | Int? | yes | | | name | String? | yes | | | articleFreshness | Int? | yes | | | totalSizes | Int? | yes | | | availableSizes | Int? | yes | | + | totalArticles | Int? | yes | | | availableArticles | Int? | yes | | --- @@ -14521,8 +14521,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | articles | Int? | yes | | | products | Int? | yes | | + | articles | Int? | yes | | --- @@ -14533,8 +14533,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brandDistribution | [CatalogInsightBrand](#CatalogInsightBrand)? | yes | | | data | [CrossSellingData](#CrossSellingData)? | yes | | + | brandDistribution | [CatalogInsightBrand](#CatalogInsightBrand)? | yes | | --- @@ -14547,8 +14547,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | ---------- | ---- | -------- | ----------- | | brandIds | [Int]? | yes | | | storeIds | [Int]? | yes | | - | optLevel | String | no | | | enabled | Bool? | yes | | + | optLevel | String | no | | --- @@ -14559,15 +14559,15 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | optLevel | String | no | | + | brandIds | [Int] | no | | | companyId | Int | no | | + | optLevel | String | no | | + | createdBy | [String: Any]? | yes | | | modifiedBy | [String: Any]? | yes | | - | platform | String | no | | - | brandIds | [Int] | no | | + | storeIds | [Int] | no | | | createdOn | Int | no | | - | createdBy | [String: Any]? | yes | | + | platform | String | no | | | enabled | Bool | no | | - | storeIds | [Int] | no | | | modifiedOn | Int | no | | --- @@ -14579,8 +14579,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[CompanyOptIn](#CompanyOptIn)] | no | | | page | [Page](#Page) | no | | + | items | [[CompanyOptIn](#CompanyOptIn)] | no | | --- @@ -14591,8 +14591,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | companyType | String? | yes | | | businessType | String? | yes | | + | companyType | String? | yes | | | name | String? | yes | | | uid | Int? | yes | | @@ -14605,10 +14605,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brandName | String? | yes | | | brandId | Int? | yes | | - | totalArticle | Int? | yes | | + | brandName | String? | yes | | | companyId | Int? | yes | | + | totalArticle | Int? | yes | | --- @@ -14619,8 +14619,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[CompanyBrandDetail](#CompanyBrandDetail)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[CompanyBrandDetail](#CompanyBrandDetail)]? | yes | | --- @@ -14631,9 +14631,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | store | Int? | yes | | | company | String? | yes | | | brand | Int? | yes | | - | store | Int? | yes | | --- @@ -14645,16 +14645,16 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | name | String? | yes | | - | timing | [String: Any]? | yes | | | companyId | Int? | yes | | - | displayName | String? | yes | | - | additionalContacts | [[String: Any]]? | yes | | + | timing | [String: Any]? | yes | | | storeType | String? | yes | | - | createdOn | String? | yes | | - | storeCode | String? | yes | | | documents | [[String: Any]]? | yes | | + | storeCode | String? | yes | | + | createdOn | String? | yes | | + | additionalContacts | [[String: Any]]? | yes | | | uid | Int? | yes | | | modifiedOn | String? | yes | | + | displayName | String? | yes | | --- @@ -14665,83 +14665,83 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[StoreDetail](#StoreDetail)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[StoreDetail](#StoreDetail)]? | yes | | --- - #### [AttributeMasterFilter](#AttributeMasterFilter) + #### [AttributeSchemaRange](#AttributeSchemaRange) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | dependsOn | [String]? | yes | | - | indexing | Bool | no | | - | priority | Int? | yes | | + | max | Int? | yes | | + | min | Int? | yes | | --- - #### [AttributeSchemaRange](#AttributeSchemaRange) + #### [AttributeMaster](#AttributeMaster) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | max | Int? | yes | | - | min | Int? | yes | | + | mandatory | Bool? | yes | | + | allowedValues | [String]? | yes | | + | range | [AttributeSchemaRange](#AttributeSchemaRange)? | yes | | + | type | String | no | | + | format | String? | yes | | + | multi | Bool? | yes | | --- - #### [AttributeMaster](#AttributeMaster) + #### [AttributeMasterDetails](#AttributeMasterDetails) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | mandatory | Bool? | yes | | - | format | String? | yes | | - | allowedValues | [String]? | yes | | - | type | String | no | | - | multi | Bool? | yes | | - | range | [AttributeSchemaRange](#AttributeSchemaRange)? | yes | | + | displayType | String | no | | --- - #### [AttributeMasterMandatoryDetails](#AttributeMasterMandatoryDetails) + #### [AttributeMasterFilter](#AttributeMasterFilter) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | l3Keys | [String]? | yes | | + | priority | Int? | yes | | + | indexing | Bool | no | | + | dependsOn | [String]? | yes | | --- - #### [AttributeMasterMeta](#AttributeMasterMeta) + #### [AttributeMasterMandatoryDetails](#AttributeMasterMandatoryDetails) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | enriched | Bool? | yes | | - | mandatoryDetails | [AttributeMasterMandatoryDetails](#AttributeMasterMandatoryDetails) | no | | + | l3Keys | [String]? | yes | | --- - #### [AttributeMasterDetails](#AttributeMasterDetails) + #### [AttributeMasterMeta](#AttributeMasterMeta) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | displayType | String | no | | + | enriched | Bool? | yes | | + | mandatoryDetails | [AttributeMasterMandatoryDetails](#AttributeMasterMandatoryDetails) | no | | --- @@ -14752,18 +14752,18 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | enabledForEndConsumer | Bool? | yes | | - | isNested | Bool? | yes | | - | filters | [AttributeMasterFilter](#AttributeMasterFilter)? | yes | | + | schema | [AttributeMaster](#AttributeMaster)? | yes | | | name | String? | yes | | | departments | [String]? | yes | | - | logo | String? | yes | | - | schema | [AttributeMaster](#AttributeMaster)? | yes | | - | meta | [AttributeMasterMeta](#AttributeMasterMeta)? | yes | | - | description | String? | yes | | + | enabledForEndConsumer | Bool? | yes | | | id | String? | yes | | + | description | String? | yes | | + | isNested | Bool? | yes | | | details | [AttributeMasterDetails](#AttributeMasterDetails)? | yes | | + | logo | String? | yes | | + | filters | [AttributeMasterFilter](#AttributeMasterFilter)? | yes | | | slug | String? | yes | | + | meta | [AttributeMasterMeta](#AttributeMasterMeta)? | yes | | --- @@ -14774,8 +14774,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[String: Any]]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[String: Any]]? | yes | | --- @@ -14786,11 +14786,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | status | Int? | yes | | | errors | [String: Any]? | yes | | | message | String? | yes | | - | status | Int? | yes | | - | meta | [String: Any]? | yes | | | code | String? | yes | | + | meta | [String: Any]? | yes | | --- @@ -14801,9 +14801,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | contact | String? | yes | | | userId | String? | yes | | | username | String? | yes | | - | contact | String? | yes | | --- @@ -14814,21 +14814,21 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | search | String? | yes | | - | modifiedOn | String? | yes | | + | itemType | String? | yes | | | name | String? | yes | | - | pageSize | Int? | yes | | | pageNo | Int? | yes | | - | itemType | String? | yes | | + | createdBy | [UserSerializer](#UserSerializer)? | yes | | | modifiedBy | [UserSerializer](#UserSerializer)? | yes | | - | isActive | Bool? | yes | | - | logo | String? | yes | | | createdOn | String? | yes | | - | createdBy | [UserSerializer](#UserSerializer)? | yes | | + | search | String? | yes | | | priorityOrder | Int? | yes | | - | synonyms | [String]? | yes | | + | logo | String? | yes | | | uid | Int? | yes | | + | modifiedOn | String? | yes | | | slug | String? | yes | | + | synonyms | [String]? | yes | | + | isActive | Bool? | yes | | + | pageSize | Int? | yes | | --- @@ -14839,8 +14839,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[GetDepartment](#GetDepartment)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[GetDepartment](#GetDepartment)]? | yes | | --- @@ -14851,11 +14851,11 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | status | Int? | yes | | | errors | [String: Any]? | yes | | | message | String? | yes | | - | status | Int? | yes | | - | meta | [String: Any]? | yes | | | code | String? | yes | | + | meta | [String: Any]? | yes | | --- @@ -14866,22 +14866,22 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | modifiedOn | String? | yes | | - | isPhysical | Bool | no | | - | name | String? | yes | | | attributes | [String]? | yes | | + | tag | String? | yes | | + | name | String? | yes | | | departments | [String]? | yes | | + | createdBy | [String: Any]? | yes | | | modifiedBy | [String: Any]? | yes | | - | tag | String? | yes | | - | isActive | Bool? | yes | | | isArchived | Bool? | yes | | - | logo | String? | yes | | | createdOn | String? | yes | | - | isExpirable | Bool | no | | - | createdBy | [String: Any]? | yes | | | description | String? | yes | | - | categories | [String]? | yes | | + | logo | String? | yes | | + | modifiedOn | String? | yes | | + | isExpirable | Bool | no | | + | isPhysical | Bool | no | | | slug | String | no | | + | categories | [String]? | yes | | + | isActive | Bool? | yes | | --- @@ -14892,8 +14892,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [ProductTemplate](#ProductTemplate)? | yes | | | page | [Page](#Page)? | yes | | + | items | [ProductTemplate](#ProductTemplate)? | yes | | --- @@ -14904,19 +14904,19 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | isPhysical | Bool | no | | - | id | String? | yes | | - | name | String? | yes | | | attributes | [String]? | yes | | - | departments | [String]? | yes | | | tag | String? | yes | | - | isActive | Bool? | yes | | + | name | String? | yes | | + | departments | [String]? | yes | | | isArchived | Bool? | yes | | + | id | String? | yes | | + | description | String? | yes | | | logo | String? | yes | | | isExpirable | Bool | no | | - | description | String? | yes | | - | categories | [String]? | yes | | + | isPhysical | Bool | no | | | slug | String | no | | + | categories | [String]? | yes | | + | isActive | Bool? | yes | | --- @@ -14927,36 +14927,36 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | trader | [String: Any]? | yes | | - | media | [String: Any]? | yes | | - | isDependent | [String: Any]? | yes | | + | shortDescription | [String: Any]? | yes | | + | sizes | [String: Any]? | yes | | | returnConfig | [String: Any]? | yes | | - | brandUid | [String: Any]? | yes | | - | currency | [String: Any]? | yes | | - | isActive | [String: Any]? | yes | | - | command | [String: Any]? | yes | | - | variants | [String: Any]? | yes | | - | description | [String: Any]? | yes | | | customOrder | [String: Any]? | yes | | - | categorySlug | [String: Any]? | yes | | - | hsnCode | [String: Any]? | yes | | - | slug | [String: Any]? | yes | | - | tags | [String: Any]? | yes | | + | sizeGuide | [String: Any]? | yes | | + | brandUid | [String: Any]? | yes | | + | productGroupTag | [String: Any]? | yes | | | name | [String: Any]? | yes | | - | highlights | [String: Any]? | yes | | - | traderType | [String: Any]? | yes | | - | itemType | [String: Any]? | yes | | + | multiSize | [String: Any]? | yes | | + | media | [String: Any]? | yes | | | itemCode | [String: Any]? | yes | | - | teaserTag | [String: Any]? | yes | | | noOfBoxes | [String: Any]? | yes | | - | multiSize | [String: Any]? | yes | | - | sizes | [String: Any]? | yes | | - | moq | [String: Any]? | yes | | - | shortDescription | [String: Any]? | yes | | + | description | [String: Any]? | yes | | + | tags | [String: Any]? | yes | | + | itemType | [String: Any]? | yes | | + | traderType | [String: Any]? | yes | | + | isActive | [String: Any]? | yes | | | countryOfOrigin | [String: Any]? | yes | | + | highlights | [String: Any]? | yes | | + | hsnCode | [String: Any]? | yes | | + | trader | [String: Any]? | yes | | + | moq | [String: Any]? | yes | | + | categorySlug | [String: Any]? | yes | | + | isDependent | [String: Any]? | yes | | + | currency | [String: Any]? | yes | | + | variants | [String: Any]? | yes | | + | teaserTag | [String: Any]? | yes | | + | command | [String: Any]? | yes | | + | slug | [String: Any]? | yes | | | productPublish | [String: Any]? | yes | | - | productGroupTag | [String: Any]? | yes | | - | sizeGuide | [String: Any]? | yes | | --- @@ -14967,12 +14967,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | properties | [Properties](#Properties)? | yes | | + | definitions | [String: Any]? | yes | | | type | String? | yes | | + | description | String? | yes | | | title | String? | yes | | | required | [String]? | yes | | - | definitions | [String: Any]? | yes | | - | description | String? | yes | | + | properties | [Properties](#Properties)? | 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 | | --- @@ -15039,25 +15039,25 @@ Company profile object. See example below or refer `LocationListSerializer` for - #### [ProductDownloadItemsData](#ProductDownloadItemsData) + #### [VerifiedBy](#VerifiedBy) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | type | String? | yes | | - | brand | [String]? | yes | | - | templates | [String]? | yes | | + | userId | String? | yes | | + | username | String? | yes | | --- - #### [VerifiedBy](#VerifiedBy) + #### [ProductDownloadItemsData](#ProductDownloadItemsData) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | userId | String? | yes | | - | username | String? | yes | | + | templates | [String]? | yes | | + | type | String? | yes | | + | brand | [String]? | yes | | --- @@ -15069,15 +15069,15 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | templateTags | [String: Any]? | yes | | - | triggerOn | String? | yes | | - | url | String? | yes | | - | data | [ProductDownloadItemsData](#ProductDownloadItemsData)? | yes | | | sellerId | Double? | yes | | - | status | String? | yes | | - | createdBy | [VerifiedBy](#VerifiedBy)? | yes | | + | triggerOn | String? | yes | | | completedOn | String? | yes | | + | createdBy | [VerifiedBy](#VerifiedBy)? | yes | | + | status | String? | yes | | | taskId | String? | yes | | | id | String? | yes | | + | url | String? | yes | | + | data | [ProductDownloadItemsData](#ProductDownloadItemsData)? | yes | | --- @@ -15088,8 +15088,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [ProductDownloadsItems](#ProductDownloadsItems)? | yes | | | page | [Page](#Page)? | yes | | + | items | [ProductDownloadsItems](#ProductDownloadsItems)? | yes | | --- @@ -15100,34 +15100,34 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | multivalue | Bool? | yes | | | data | [[String: Any]]? | yes | | + | multivalue | Bool? | yes | | --- - #### [Hierarchy](#Hierarchy) + #### [Media2](#Media2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | l2 | Int | no | | - | department | Int | no | | - | l1 | Int | no | | + | portrait | String | no | | + | landscape | String | no | | + | logo | String | no | | --- - #### [Media2](#Media2) + #### [Hierarchy](#Hierarchy) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | logo | String | no | | - | portrait | String | no | | - | landscape | String | no | | + | l1 | Int | no | | + | department | Int | no | | + | l2 | Int | no | | --- @@ -15138,8 +15138,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String | no | | | catalogId | Int? | yes | | + | name | String | no | | --- @@ -15150,8 +15150,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | google | [CategoryMappingValues](#CategoryMappingValues)? | yes | | | ajio | [CategoryMappingValues](#CategoryMappingValues)? | yes | | + | google | [CategoryMappingValues](#CategoryMappingValues)? | yes | | | facebook | [CategoryMappingValues](#CategoryMappingValues)? | yes | | --- @@ -15163,17 +15163,17 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | priority | Int? | yes | | - | level | Int | no | | - | name | String | no | | | tryouts | [String]? | yes | | + | name | String | no | | | departments | [Int] | no | | - | isActive | Bool | no | | - | hierarchy | [[Hierarchy](#Hierarchy)]? | yes | | | media | [Media2](#Media2)? | yes | | | synonyms | [String]? | yes | | - | marketplaces | [CategoryMapping](#CategoryMapping)? | yes | | + | priority | Int? | yes | | + | hierarchy | [[Hierarchy](#Hierarchy)]? | yes | | | slug | String? | yes | | + | marketplaces | [CategoryMapping](#CategoryMapping)? | yes | | + | level | Int | no | | + | isActive | Bool | no | | --- @@ -15196,23 +15196,23 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | priority | Int? | yes | | - | modifiedOn | String? | yes | | - | level | Int | no | | - | name | String | no | | | tryouts | [String]? | yes | | + | name | String | no | | | departments | [Int] | no | | - | modifiedBy | [String: Any]? | yes | | - | isActive | Bool | no | | - | hierarchy | [[Hierarchy](#Hierarchy)]? | yes | | - | createdOn | String? | yes | | - | createdBy | [String: Any]? | yes | | | media | [Media2](#Media2)? | yes | | + | createdBy | [String: Any]? | yes | | + | modifiedBy | [String: Any]? | yes | | | id | String? | yes | | | synonyms | [String]? | yes | | - | marketplaces | [CategoryMapping](#CategoryMapping)? | yes | | + | createdOn | String? | yes | | + | priority | Int? | yes | | + | hierarchy | [[Hierarchy](#Hierarchy)]? | yes | | | uid | Int? | yes | | + | modifiedOn | String? | yes | | | slug | String? | yes | | + | marketplaces | [CategoryMapping](#CategoryMapping)? | yes | | + | level | Int | no | | + | isActive | Bool | no | | --- @@ -15223,44 +15223,44 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[Category](#Category)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[Category](#Category)]? | yes | | --- - #### [SingleCategoryResponse](#SingleCategoryResponse) + #### [CategoryUpdateResponse](#CategoryUpdateResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [Category](#Category)? | yes | | + | message | String? | yes | | + | success | Bool? | yes | | --- - #### [CategoryUpdateResponse](#CategoryUpdateResponse) + #### [SingleCategoryResponse](#SingleCategoryResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | message | String? | yes | | - | success | Bool? | yes | | + | data | [Category](#Category)? | yes | | --- - #### [Trader](#Trader) + #### [TaxIdentifier](#TaxIdentifier) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | address | [String]? | yes | | - | type | String? | yes | | - | name | String? | yes | | + | hsnCodeId | String? | yes | | + | hsnCode | String? | yes | | + | reportingHsn | String? | yes | | --- @@ -15284,21 +15284,22 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | isCustomOrder | Bool? | yes | | | manufacturingTime | Int? | yes | | | manufacturingTimeUnit | String? | yes | | + | isCustomOrder | Bool? | yes | | --- - #### [TeaserTag](#TeaserTag) + #### [Trader](#Trader) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | url | String? | yes | | - | tag | String? | yes | | + | type | String? | yes | | + | name | String? | yes | | + | address | [String]? | yes | | --- @@ -15310,21 +15311,20 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | minimum | Int? | yes | | - | maximum | Int? | yes | | | isSet | Bool? | yes | | + | maximum | Int? | yes | | --- - #### [TaxIdentifier](#TaxIdentifier) + #### [TeaserTag](#TeaserTag) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | hsnCodeId | String? | yes | | - | hsnCode | String? | yes | | - | reportingHsn | String? | yes | | + | tag | String? | yes | | + | url | String? | yes | | --- @@ -15335,8 +15335,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | productOnlineDate | String? | yes | | | isSet | Bool? | yes | | + | productOnlineDate | String? | yes | | --- @@ -15347,44 +15347,44 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | trader | [[Trader](#Trader)] | no | | - | requester | String? | yes | | + | companyId | Int | no | | + | shortDescription | String? | yes | | + | taxIdentifier | [TaxIdentifier](#TaxIdentifier) | no | | | changeRequestId | String? | yes | | - | media | [[Media1](#Media1)]? | yes | | - | isDependent | Bool? | yes | | + | uid | Int? | yes | | + | requester | String? | yes | | | returnConfig | [ReturnConfig](#ReturnConfig) | no | | - | isImageLessProduct | Bool? | yes | | + | customOrder | [CustomOrder](#CustomOrder)? | yes | | + | sizeGuide | String? | yes | | | brandUid | Int | no | | - | currency | String | no | | + | productGroupTag | [String]? | yes | | + | isSet | Bool? | yes | | + | name | String | no | | + | multiSize | Bool? | yes | | | bulkJobId | String? | yes | | - | isActive | Bool? | yes | | - | variants | [String: Any]? | yes | | + | media | [[Media1](#Media1)]? | yes | | + | action | String? | yes | | + | itemCode | String | no | | + | noOfBoxes | Int? | yes | | | description | String? | yes | | - | customOrder | [CustomOrder](#CustomOrder)? | yes | | - | categorySlug | String | no | | - | uid | Int? | yes | | - | slug | String | no | | | tags | [String]? | yes | | - | customJson | [String: Any]? | yes | | - | name | String | no | | - | highlights | [String]? | yes | | | itemType | String | no | | - | itemCode | String | no | | - | teaserTag | [TeaserTag](#TeaserTag)? | yes | | - | noOfBoxes | Int? | yes | | - | multiSize | Bool? | yes | | - | moq | [OrderQuantity](#OrderQuantity)? | yes | | - | shortDescription | String? | yes | | - | taxIdentifier | [TaxIdentifier](#TaxIdentifier) | no | | - | countryOfOrigin | String | no | | - | companyId | Int | no | | - | productPublish | [ProductPublish](#ProductPublish)? | yes | | + | isActive | Bool? | yes | | | departments | [Int] | no | | - | productGroupTag | [String]? | yes | | - | action | String? | yes | | - | sizeGuide | String? | yes | | - | isSet | Bool? | yes | | + | highlights | [String]? | yes | | + | countryOfOrigin | String | no | | + | trader | [[Trader](#Trader)] | no | | + | moq | [OrderQuantity](#OrderQuantity)? | yes | | + | categorySlug | String | no | | | templateTag | String | no | | + | customJson | [String: Any]? | yes | | + | isDependent | Bool? | yes | | + | variants | [String: Any]? | yes | | + | currency | String | no | | + | teaserTag | [TeaserTag](#TeaserTag)? | yes | | + | isImageLessProduct | Bool? | yes | | + | slug | String | no | | + | productPublish | [ProductPublish](#ProductPublish)? | yes | | --- @@ -15395,10 +15395,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | aspectRatioF | Int? | yes | | | secureUrl | String? | yes | | - | url | String? | yes | | | aspectRatio | String? | yes | | - | aspectRatioF | Int? | yes | | + | url | String? | yes | | --- @@ -15410,8 +15410,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | logo | [Logo](#Logo)? | yes | | - | name | String? | yes | | | uid | Int? | yes | | + | name | String? | yes | | --- @@ -15422,10 +15422,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | aspectRatioF | Double? | yes | | | secureUrl | String? | yes | | - | url | String? | yes | | | aspectRatio | String? | yes | | - | aspectRatioF | Double? | yes | | + | url | String? | yes | | --- @@ -15436,8 +15436,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | productOnlineDate | Int? | yes | | | isSet | Bool? | yes | | + | productOnlineDate | Int? | yes | | --- @@ -15448,43 +15448,43 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brand | [Brand](#Brand)? | yes | | - | media | [[Media1](#Media1)]? | yes | | - | isDependent | Bool? | yes | | - | imageNature | String? | yes | | + | allSizes | [[String: Any]]? | yes | | + | shortDescription | String? | yes | | + | sizes | [[String: Any]]? | yes | | + | uid | Int? | yes | | + | customOrder | [String: Any]? | yes | | + | sizeGuide | String? | yes | | | brandUid | Int? | yes | | + | isSet | Bool? | yes | | + | name | String? | yes | | + | multiSize | Bool? | yes | | + | media | [[Media1](#Media1)]? | yes | | + | brand | [Brand](#Brand)? | yes | | + | itemCode | String? | yes | | + | categoryUid | Int? | yes | | | images | [[Image](#Image)]? | yes | | - | currency | String? | yes | | - | color | String? | yes | | - | isActive | Bool? | yes | | - | variants | [String: Any]? | yes | | | description | String? | yes | | - | customOrder | [String: Any]? | yes | | - | categorySlug | String? | yes | | - | hsnCode | String? | yes | | - | id | String? | yes | | - | uid | Int? | yes | | - | slug | String? | yes | | - | categoryUid | Int? | yes | | - | customJson | [String: Any]? | yes | | - | allSizes | [[String: Any]]? | yes | | - | name | String? | yes | | - | highlights | [String]? | yes | | - | isPhysical | Bool? | yes | | + | imageNature | String? | yes | | | itemType | String? | yes | | - | itemCode | String? | yes | | - | multiSize | Bool? | yes | | - | sizes | [[String: Any]]? | yes | | - | moq | [String: Any]? | yes | | - | shortDescription | String? | yes | | - | countryOfOrigin | String? | yes | | + | isActive | Bool? | yes | | | departments | [Int]? | yes | | - | productPublish | [ProductPublished](#ProductPublished)? | yes | | - | sizeGuide | String? | yes | | - | isSet | Bool? | yes | | + | countryOfOrigin | String? | yes | | + | highlights | [String]? | yes | | + | hsnCode | String? | yes | | + | id | String? | yes | | + | moq | [String: Any]? | yes | | + | categorySlug | String? | yes | | | templateTag | String? | yes | | + | customJson | [String: Any]? | yes | | + | isPhysical | Bool? | yes | | + | isDependent | Bool? | yes | | + | currency | String? | yes | | + | variants | [String: Any]? | yes | | + | color | String? | yes | | | primaryColor | String? | yes | | | l3Mapping | [String]? | yes | | + | slug | String? | yes | | + | productPublish | [ProductPublished](#ProductPublished)? | yes | | --- @@ -15495,8 +15495,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[Product](#Product)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[Product](#Product)]? | yes | | --- @@ -15518,10 +15518,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | userId | String? | yes | | - | username | String? | yes | | | email | String? | yes | | + | userId | String? | yes | | | uid | String? | yes | | + | username | String? | yes | | --- @@ -15532,23 +15532,23 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | filePath | String? | yes | | - | failedRecords | [[String: Any]]? | yes | | | total | Int | no | | | companyId | Int | no | | - | trackingUrl | String? | yes | | - | customTemplateTag | String? | yes | | + | createdBy | [UserInfo1](#UserInfo1)? | yes | | + | failed | Int? | yes | | | modifiedBy | [UserInfo1](#UserInfo1)? | yes | | - | isActive | Bool? | yes | | - | templateTag | String? | yes | | + | trackingUrl | String? | yes | | | createdOn | String | no | | - | createdBy | [UserInfo1](#UserInfo1)? | yes | | - | succeed | Int? | yes | | | cancelled | Int? | yes | | - | failed | Int? | yes | | - | cancelledRecords | [[String: Any]]? | yes | | | stage | String? | yes | | + | cancelledRecords | [[String: Any]]? | yes | | + | failedRecords | [[String: Any]]? | yes | | | modifiedOn | String? | yes | | + | succeed | Int? | yes | | + | templateTag | String? | yes | | + | customTemplateTag | String? | yes | | + | isActive | Bool? | yes | | + | filePath | String? | yes | | --- @@ -15559,12 +15559,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | batchId | String | no | | + | createdBy | [UserInfo1](#UserInfo1)? | yes | | | modifiedBy | [UserInfo1](#UserInfo1)? | yes | | - | isActive | Bool? | yes | | | createdOn | String | no | | - | createdBy | [UserInfo1](#UserInfo1)? | yes | | | modifiedOn | String? | yes | | + | batchId | String | no | | + | isActive | Bool? | yes | | --- @@ -15575,8 +15575,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | userId | String? | yes | | | fullName | String? | yes | | + | userId | String? | yes | | | username | String? | yes | | --- @@ -15588,22 +15588,22 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | filePath | String? | yes | | - | failedRecords | [String]? | yes | | + | template | [ProductTemplate](#ProductTemplate)? | yes | | | total | Int? | yes | | + | modifiedOn | String? | yes | | | companyId | Int? | yes | | - | modifiedBy | [UserDetail](#UserDetail)? | yes | | - | isActive | Bool? | yes | | - | template | [ProductTemplate](#ProductTemplate)? | yes | | - | createdOn | String? | yes | | | failed | Int? | yes | | | createdBy | [UserDetail](#UserDetail)? | yes | | - | succeed | Int? | yes | | - | templateTag | String? | yes | | + | modifiedBy | [UserDetail](#UserDetail)? | yes | | + | createdOn | String? | yes | | + | stage | String? | yes | | | cancelled | Int? | yes | | | cancelledRecords | [String]? | yes | | - | stage | String? | yes | | - | modifiedOn | String? | yes | | + | failedRecords | [String]? | yes | | + | templateTag | String? | yes | | + | succeed | Int? | yes | | + | isActive | Bool? | yes | | + | filePath | String? | yes | | --- @@ -15614,8 +15614,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [ProductBulkRequest](#ProductBulkRequest)? | yes | | | page | [Page](#Page)? | yes | | + | items | [ProductBulkRequest](#ProductBulkRequest)? | yes | | --- @@ -15662,9 +15662,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | url | String | no | | - | user | [String: Any] | no | | | companyId | Int? | yes | | + | user | [String: Any] | no | | + | url | String | no | | --- @@ -15676,8 +15676,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | userId | String? | yes | | - | username | String? | yes | | | companyId | Int? | yes | | + | username | String? | yes | | --- @@ -15688,23 +15688,23 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | filePath | String? | yes | | - | failedRecords | [String]? | yes | | | retry | Int? | yes | | | total | Int? | yes | | | companyId | Int? | yes | | - | trackingUrl | String? | yes | | - | modifiedBy | [UserCommon](#UserCommon)? | yes | | - | isActive | Bool? | yes | | - | createdOn | String? | yes | | | createdBy | [UserCommon](#UserCommon)? | yes | | - | succeed | Int? | yes | | | failed | Int? | yes | | - | cancelled | Int? | yes | | - | cancelledRecords | [String]? | yes | | + | modifiedBy | [UserCommon](#UserCommon)? | yes | | + | trackingUrl | String? | yes | | | id | String? | yes | | + | createdOn | String? | yes | | | stage | String? | yes | | + | cancelled | Int? | yes | | + | cancelledRecords | [String]? | yes | | + | failedRecords | [String]? | yes | | | modifiedOn | String? | yes | | + | succeed | Int? | yes | | + | isActive | Bool? | yes | | + | filePath | String? | yes | | --- @@ -15715,8 +15715,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[Items](#Items)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[Items](#Items)]? | yes | | --- @@ -15740,8 +15740,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 | | --- @@ -15753,56 +15753,56 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | brandUid | Int? | yes | | - | itemCode | String? | yes | | | uid | Int? | yes | | + | itemCode | String? | yes | | --- - #### [GTIN](#GTIN) + #### [SetSize](#SetSize) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | gtinValue | String | no | | - | primary | Bool? | yes | | - | gtinType | String | no | | + | size | String | no | | + | pieces | Int | no | | --- - #### [SetSize](#SetSize) + #### [SizeDistribution](#SizeDistribution) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | size | String | no | | - | pieces | Int | no | | + | sizes | [[SetSize](#SetSize)] | no | | --- - #### [SizeDistribution](#SizeDistribution) + #### [InventorySet](#InventorySet) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sizes | [[SetSize](#SetSize)] | no | | + | quantity | Int? | yes | | + | sizeDistribution | [SizeDistribution](#SizeDistribution) | no | | --- - #### [InventorySet](#InventorySet) + #### [GTIN](#GTIN) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sizeDistribution | [SizeDistribution](#SizeDistribution) | no | | - | quantity | Int? | yes | | + | primary | Bool? | yes | | + | gtinType | String | no | | + | gtinValue | String | no | | --- @@ -15813,23 +15813,23 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | size | String | no | | - | priceTransfer | Double? | yes | | - | itemDimensionsUnitOfMeasure | String? | yes | | - | price | Double | no | | - | currency | String | no | | - | itemWeight | Double? | yes | | - | identifiers | [[GTIN](#GTIN)] | no | | - | itemLength | Double? | yes | | | expirationDate | String? | yes | | + | itemWeightUnitOfMeasure | String? | yes | | | quantity | Int | no | | - | itemHeight | Double? | yes | | + | currency | String | no | | | isSet | Bool? | yes | | - | itemWidth | Double? | yes | | - | itemWeightUnitOfMeasure | String? | yes | | - | storeCode | String | no | | + | itemHeight | Double? | yes | | | set | [InventorySet](#InventorySet)? | yes | | | priceEffective | Double | no | | + | itemWidth | Double? | yes | | + | price | Double | no | | + | itemLength | Double? | yes | | + | itemWeight | Double? | yes | | + | identifiers | [[GTIN](#GTIN)] | no | | + | storeCode | String | no | | + | itemDimensionsUnitOfMeasure | String? | yes | | + | priceTransfer | Double? | yes | | + | size | String | no | | --- @@ -15853,19 +15853,19 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | uid | String? | yes | | - | size | String? | yes | | - | priceTransfer | Int? | yes | | + | currency | String? | yes | | + | quantity | Int? | yes | | | sellableQuantity | Int? | yes | | + | priceEffective | Int? | yes | | | price | Int? | yes | | - | itemId | Int? | yes | | - | currency | String? | yes | | - | sellerIdentifier | Int? | yes | | | inventoryUpdatedOn | String? | yes | | - | quantity | Int? | yes | | | identifiers | [String: Any]? | yes | | | store | [String: Any]? | yes | | - | priceEffective | Int? | yes | | + | priceTransfer | Int? | yes | | + | itemId | Int? | yes | | + | sellerIdentifier | Int? | yes | | + | uid | String? | yes | | + | size | String? | yes | | --- @@ -15876,8 +15876,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[InventoryResponse](#InventoryResponse)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[InventoryResponse](#InventoryResponse)]? | yes | | --- @@ -15888,21 +15888,21 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | filePath | String? | yes | | - | failedRecords | [String]? | yes | | | total | Int? | yes | | | companyId | Int? | yes | | - | modifiedBy | [String: Any]? | yes | | - | isActive | Bool? | yes | | - | createdOn | String? | yes | | | createdBy | [String: Any]? | yes | | | failed | Int? | yes | | - | cancelled | Int? | yes | | - | succeed | Int? | yes | | - | cancelledRecords | [String]? | yes | | + | modifiedBy | [String: Any]? | yes | | | id | String? | yes | | + | createdOn | String? | yes | | + | cancelled | Int? | yes | | | stage | String? | yes | | + | cancelledRecords | [String]? | yes | | + | failedRecords | [String]? | yes | | | modifiedOn | String? | yes | | + | succeed | Int? | yes | | + | isActive | Bool? | yes | | + | filePath | String? | yes | | --- @@ -15913,8 +15913,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[BulkInventoryGetItems](#BulkInventoryGetItems)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[BulkInventoryGetItems](#BulkInventoryGetItems)]? | yes | | --- @@ -15925,24 +15925,24 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | size | String? | yes | | - | priceTransfer | Double? | yes | | - | itemDimensionsUnitOfMeasure | String? | yes | | - | price | Double | no | | - | currency | String | no | | - | itemWeight | Double? | yes | | - | identifiers | [[String: Any]]? | yes | | - | itemLength | Double? | yes | | | expirationDate | String? | yes | | - | sellerIdentifier | String | no | | + | itemWeightUnitOfMeasure | String? | yes | | | quantity | Int | no | | - | itemHeight | Double? | yes | | + | currency | String | no | | | isSet | Bool? | yes | | - | itemWidth | Double? | yes | | - | itemWeightUnitOfMeasure | String? | yes | | - | storeCode | String | no | | + | itemHeight | Double? | yes | | | set | [InventorySet](#InventorySet)? | yes | | | priceEffective | Double | no | | + | itemWidth | Double? | yes | | + | price | Double | no | | + | itemLength | Double? | yes | | + | itemWeight | Double? | yes | | + | identifiers | [[String: Any]]? | yes | | + | storeCode | String | no | | + | itemDimensionsUnitOfMeasure | String? | yes | | + | priceTransfer | Double? | yes | | + | sellerIdentifier | String | no | | + | size | String? | yes | | --- @@ -15967,9 +15967,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | store | [Int]? | yes | | | type | String? | yes | | | brand | [Int]? | yes | | - | store | [Int]? | yes | | --- @@ -15980,8 +15980,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | triggerOn | String? | yes | | | sellerId | Int | no | | + | triggerOn | String? | yes | | | status | String? | yes | | | taskId | String | no | | | requestParams | [String: Any]? | yes | | @@ -15995,13 +15995,13 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | triggerOn | String? | yes | | - | url | String? | yes | | | sellerId | Int | no | | - | status | String? | yes | | + | triggerOn | String? | yes | | | completedOn | String? | yes | | + | status | String? | yes | | | taskId | String | no | | | requestParams | [String: Any]? | yes | | + | url | String? | yes | | --- @@ -16024,8 +16024,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | multivalues | Bool? | yes | | | data | [[FilerList](#FilerList)]? | yes | | + | multivalues | Bool? | yes | | --- @@ -16036,16 +16036,16 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | hs2Code | String | no | | - | tax2 | Double? | yes | | | companyId | Int | no | | - | tax1 | Double | no | | - | threshold1 | Double | no | | + | taxOnEsp | Bool? | yes | | | threshold2 | Double? | yes | | | taxOnMrp | Bool | no | | | hsnCode | String | no | | | uid | Int? | yes | | - | taxOnEsp | Bool? | yes | | + | tax1 | Double | no | | + | hs2Code | String | no | | + | threshold1 | Double | no | | + | tax2 | Double? | yes | | --- @@ -16057,16 +16057,16 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | modifiedOn | String? | yes | | - | hs2Code | String? | yes | | - | tax2 | Double? | yes | | | companyId | Int? | yes | | - | tax1 | Double? | yes | | - | threshold1 | Double? | yes | | + | taxOnEsp | Bool? | yes | | | threshold2 | Double? | yes | | | taxOnMrp | Bool? | yes | | - | id | String? | yes | | | hsnCode | String? | yes | | - | taxOnEsp | Bool? | yes | | + | id | String? | yes | | + | tax1 | Double? | yes | | + | hs2Code | String? | yes | | + | threshold1 | Double? | yes | | + | tax2 | Double? | yes | | --- @@ -16088,10 +16088,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | current | String? | yes | | | size | Int? | yes | | - | hasNext | Bool? | yes | | | itemTotal | Int? | yes | | - | current | String? | yes | | + | hasNext | Bool? | yes | | | hasPrevious | Bool? | yes | | --- @@ -16103,8 +16103,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[HsnCodesObject](#HsnCodesObject)]? | yes | | | page | [PageResponse](#PageResponse)? | yes | | + | items | [[HsnCodesObject](#HsnCodesObject)]? | yes | | --- @@ -16137,12 +16137,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | - | departments | [String]? | yes | | - | logo | [Media](#Media)? | yes | | + | name | String? | yes | | | discount | String? | yes | | + | departments | [String]? | yes | | | action | [Action](#Action)? | yes | | + | logo | [Media](#Media)? | yes | | | uid | Int? | yes | | | slug | String? | yes | | @@ -16155,8 +16155,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[BrandItem](#BrandItem)]? | yes | | | page | [Page](#Page) | no | | + | items | [[BrandItem](#BrandItem)]? | yes | | --- @@ -16168,8 +16168,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | name | String? | yes | | - | logo | [Media](#Media)? | yes | | | priorityOrder | Int? | yes | | + | logo | [Media](#Media)? | yes | | | uid | Int? | yes | | | slug | String? | yes | | @@ -16193,8 +16193,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | uid | Int? | yes | | | slug | String? | yes | | + | uid | Int? | yes | | --- @@ -16205,12 +16205,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | - | name | String? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | - | childs | [[String: Any]]? | yes | | + | name | String? | yes | | | action | [Action](#Action)? | yes | | + | childs | [[String: Any]]? | yes | | | uid | Int? | yes | | + | customJson | [String: Any]? | yes | | | slug | String? | yes | | --- @@ -16222,12 +16222,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | - | name | String? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | - | childs | [[ThirdLevelChild](#ThirdLevelChild)]? | yes | | + | name | String? | yes | | | action | [Action](#Action)? | yes | | + | childs | [[ThirdLevelChild](#ThirdLevelChild)]? | yes | | | uid | Int? | yes | | + | customJson | [String: Any]? | yes | | | slug | String? | yes | | --- @@ -16239,12 +16239,12 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customJson | [String: Any]? | yes | | - | name | String? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | - | childs | [[SecondLevelChild](#SecondLevelChild)]? | yes | | + | name | String? | yes | | | action | [Action](#Action)? | yes | | + | childs | [[SecondLevelChild](#SecondLevelChild)]? | yes | | | uid | Int? | yes | | + | customJson | [String: Any]? | yes | | | slug | String? | yes | | --- @@ -16256,10 +16256,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | String? | yes | | | banners | [ImageUrls](#ImageUrls)? | yes | | - | childs | [[Child](#Child)]? | yes | | + | name | String? | yes | | | action | [Action](#Action)? | yes | | + | childs | [[Child](#Child)]? | yes | | | uid | Int? | yes | | | slug | String? | yes | | @@ -16296,10 +16296,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | + | page | [Page](#Page) | no | | | filters | [[ProductFilters](#ProductFilters)]? | yes | | | items | [[ProductListingDetail](#ProductListingDetail)]? | yes | | - | page | [Page](#Page) | no | | + | sortOn | [[ProductSortOn](#ProductSortOn)]? | yes | | --- @@ -16310,29 +16310,29 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brand | [ProductBrand](#ProductBrand)? | yes | | - | ratingCount | Int? | yes | | + | tryouts | [String]? | yes | | + | medias | [[Media1](#Media1)]? | yes | | + | shortDescription | String? | yes | | | similars | [String]? | yes | | - | imageNature | String? | yes | | - | hasVariant | Bool? | yes | | - | color | String? | yes | | - | rating | Double? | yes | | - | description | String? | yes | | | uid | Int? | yes | | - | slug | String | no | | - | promoMeta | [String: Any]? | yes | | | name | String? | yes | | - | highlights | [String]? | yes | | - | itemType | String? | yes | | - | medias | [[Media1](#Media1)]? | yes | | + | brand | [ProductBrand](#ProductBrand)? | yes | | | itemCode | String? | yes | | - | teaserTag | [String: Any]? | yes | | - | shortDescription | String? | yes | | - | tryouts | [String]? | yes | | - | type | String? | yes | | - | productOnlineDate | String? | yes | | + | description | String? | yes | | + | imageNature | String? | yes | | + | rating | Double? | yes | | + | itemType | String? | yes | | | groupedAttributes | [[ProductDetailGroupedAttribute](#ProductDetailGroupedAttribute)]? | yes | | | attributes | [String: Any]? | yes | | + | highlights | [String]? | yes | | + | productOnlineDate | String? | yes | | + | ratingCount | Int? | yes | | + | teaserTag | [String: Any]? | yes | | + | color | String? | yes | | + | type | String? | yes | | + | promoMeta | [String: Any]? | yes | | + | hasVariant | Bool? | yes | | + | slug | String | no | | --- @@ -16355,9 +16355,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | ignoredStores | [Int]? | yes | | | size | String | no | | | itemId | Int | no | | + | ignoredStores | [Int]? | yes | | --- @@ -16368,10 +16368,10 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | quantity | Int? | yes | | | articleAssignment | [ArticleAssignment](#ArticleAssignment)? | yes | | - | query | [ArticleQuery](#ArticleQuery)? | yes | | | groupId | String? | yes | | - | quantity | Int? | yes | | + | query | [ArticleQuery](#ArticleQuery)? | yes | | | meta | [String: Any]? | yes | | --- @@ -16383,13 +16383,13 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | articles | [[AssignStoreArticle](#AssignStoreArticle)] | no | | - | companyId | Int? | yes | | | appId | String | no | | - | channelType | String? | yes | | - | pincode | String | no | | + | companyId | Int? | yes | | | channelIdentifier | String? | yes | | + | articles | [[AssignStoreArticle](#AssignStoreArticle)] | no | | + | channelType | String? | yes | | | storeIds | [Int]? | yes | | + | pincode | String | no | | --- @@ -16412,23 +16412,23 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | size | String | no | | - | priceMarked | Int? | yes | | - | itemId | Int | no | | + | quantity | Int | no | | | companyId | Int? | yes | | - | sCity | String? | yes | | + | priceEffective | Int? | yes | | + | id | String? | yes | | | articleAssignment | [ArticleAssignment1](#ArticleAssignment1) | no | | + | priceMarked | Int? | yes | | + | sCity | String? | yes | | + | strategyWiseListing | [[String: Any]]? | yes | | + | status | Bool | no | | + | index | Int? | yes | | | storeId | Int? | yes | | | groupId | String? | yes | | - | status | Bool | no | | - | quantity | Int | no | | | storePincode | Int? | yes | | - | index | Int? | yes | | - | id | String? | yes | | - | meta | [String: Any]? | yes | | - | strategyWiseListing | [[String: Any]]? | yes | | + | itemId | Int | no | | | uid | String? | yes | | - | priceEffective | Int? | yes | | + | size | String | no | | + | meta | [String: Any]? | yes | | --- @@ -16439,9 +16439,9 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | contact | String? | yes | | | userId | String? | yes | | | username | String? | yes | | - | contact | String? | yes | | --- @@ -16452,17 +16452,17 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | landmark | String? | yes | | - | state | String? | yes | | + | longitude | Double? | yes | | | latitude | Double? | yes | | | address2 | String? | yes | | - | countryCode | String? | yes | | - | pincode | Int? | yes | | - | city | String? | yes | | + | state | String? | yes | | + | landmark | String? | yes | | | address1 | String? | yes | | - | longitude | Double? | yes | | - | country | String? | yes | | | addressType | String? | yes | | + | city | String? | yes | | + | country | String? | yes | | + | pincode | Int? | yes | | + | countryCode | String? | yes | | --- @@ -16474,146 +16474,146 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | name | String? | yes | | - | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | - | verifiedOn | String? | yes | | - | companyType | String? | yes | | - | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | + | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | + | businessType | String? | yes | | | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | - | rejectReason | String? | yes | | + | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | | createdOn | String? | yes | | - | businessType | String? | yes | | - | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | | stage | String? | yes | | + | companyType | String? | yes | | | uid | Int? | yes | | | modifiedOn | String? | yes | | + | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | verifiedOn | String? | yes | | + | rejectReason | String? | yes | | --- - #### [Document](#Document) + #### [SellerPhoneNumber](#SellerPhoneNumber) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | value | String | no | | - | verified | Bool? | yes | | - | type | String | no | | - | legalName | String? | yes | | - | url | String? | yes | | + | number | String | no | | + | countryCode | Int | no | | --- - #### [LocationTimingSerializer](#LocationTimingSerializer) + #### [UserSerializer2](#UserSerializer2) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | minute | Int? | yes | | - | hour | Int? | yes | | + | contact | String? | yes | | + | userId | String? | yes | | + | username | String? | yes | | --- - #### [LocationDayWiseSerializer](#LocationDayWiseSerializer) + #### [InvoiceCredSerializer](#InvoiceCredSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | closing | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | - | weekday | String | no | | - | open | Bool | no | | - | opening | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | + | username | String? | yes | | + | password | String? | yes | | + | enabled | Bool? | yes | | --- - #### [SellerPhoneNumber](#SellerPhoneNumber) + #### [InvoiceDetailsSerializer](#InvoiceDetailsSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | countryCode | Int | no | | - | number | String | no | | + | eInvoice | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | + | eWaybill | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | --- - #### [LocationManagerSerializer](#LocationManagerSerializer) + #### [Document](#Document) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | email | String? | yes | | - | name | String? | yes | | - | mobileNo | [SellerPhoneNumber](#SellerPhoneNumber) | no | | + | value | String | no | | + | legalName | String? | yes | | + | verified | Bool? | yes | | + | type | String | no | | + | url | String? | yes | | --- - #### [UserSerializer2](#UserSerializer2) + #### [ProductReturnConfigSerializer](#ProductReturnConfigSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | userId | String? | yes | | - | username | String? | yes | | - | contact | String? | yes | | + | storeUid | Int? | yes | | + | onSameStore | Bool? | yes | | --- - #### [LocationIntegrationType](#LocationIntegrationType) + #### [LocationTimingSerializer](#LocationTimingSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | order | String? | yes | | - | inventory | String? | yes | | + | minute | Int? | yes | | + | hour | Int? | yes | | --- - #### [ProductReturnConfigSerializer](#ProductReturnConfigSerializer) + #### [LocationDayWiseSerializer](#LocationDayWiseSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | onSameStore | Bool? | yes | | - | storeUid | Int? | yes | | + | closing | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | + | opening | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | + | weekday | String | no | | + | open | Bool | no | | --- - #### [InvoiceCredSerializer](#InvoiceCredSerializer) + #### [LocationIntegrationType](#LocationIntegrationType) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | username | String? | yes | | - | password | String? | yes | | - | enabled | Bool? | yes | | + | order | String? | yes | | + | inventory | String? | yes | | --- - #### [InvoiceDetailsSerializer](#InvoiceDetailsSerializer) + #### [LocationManagerSerializer](#LocationManagerSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | eWaybill | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | - | eInvoice | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | + | email | String? | yes | | + | mobileNo | [SellerPhoneNumber](#SellerPhoneNumber) | no | | + | name | String? | yes | | --- @@ -16625,30 +16625,30 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | company | [GetCompanySerializer](#GetCompanySerializer)? | yes | | - | warnings | [String: Any]? | yes | | - | storeType | String? | yes | | - | documents | [[Document](#Document)]? | yes | | - | timing | [[LocationDayWiseSerializer](#LocationDayWiseSerializer)]? | yes | | - | notificationEmails | [String]? | yes | | - | displayName | String | no | | - | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | - | createdOn | String? | yes | | - | createdBy | [UserSerializer2](#UserSerializer2)? | yes | | - | integrationType | [LocationIntegrationType](#LocationIntegrationType)? | yes | | + | address | [GetAddressSerializer](#GetAddressSerializer) | no | | | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | + | modifiedBy | [UserSerializer2](#UserSerializer2)? | yes | | + | createdOn | String? | yes | | | uid | Int? | yes | | - | customJson | [String: Any]? | yes | | - | name | String | no | | | modifiedOn | String? | yes | | - | productReturnConfig | [ProductReturnConfigSerializer](#ProductReturnConfigSerializer)? | yes | | + | code | String | no | | | gstCredentials | [InvoiceDetailsSerializer](#InvoiceDetailsSerializer)? | yes | | - | verifiedBy | [UserSerializer2](#UserSerializer2)? | yes | | + | name | String | no | | + | documents | [[Document](#Document)]? | yes | | + | stage | String? | yes | | | verifiedOn | String? | yes | | - | modifiedBy | [UserSerializer2](#UserSerializer2)? | yes | | + | verifiedBy | [UserSerializer2](#UserSerializer2)? | yes | | + | customJson | [String: Any]? | yes | | + | productReturnConfig | [ProductReturnConfigSerializer](#ProductReturnConfigSerializer)? | yes | | + | timing | [[LocationDayWiseSerializer](#LocationDayWiseSerializer)]? | yes | | + | createdBy | [UserSerializer2](#UserSerializer2)? | yes | | + | integrationType | [LocationIntegrationType](#LocationIntegrationType)? | yes | | | phoneNumber | String | no | | - | address | [GetAddressSerializer](#GetAddressSerializer) | no | | - | stage | String? | yes | | - | code | String | no | | + | notificationEmails | [String]? | yes | | + | warnings | [String: Any]? | yes | | + | storeType | String? | yes | | + | displayName | String | no | | + | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | --- @@ -16659,8 +16659,8 @@ Company profile object. See example below or refer `LocationListSerializer` for | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[GetLocationSerializer](#GetLocationSerializer)]? | yes | | | page | [Page](#Page)? | yes | | + | items | [[GetLocationSerializer](#GetLocationSerializer)]? | yes | | --- diff --git a/documentation/platform/COMPANYPROFILE.md b/documentation/platform/COMPANYPROFILE.md index b05251c10e..1a636d20fc 100644 --- a/documentation/platform/COMPANYPROFILE.md +++ b/documentation/platform/COMPANYPROFILE.md @@ -6,18 +6,18 @@ ## CompanyProfile Methods Company Profile API's allows you to access list of products, prices, seller details, similar features, variants and many more useful features. -* [updateCompany](#updatecompany) * [cbsOnboardGet](#cbsonboardget) +* [updateCompany](#updatecompany) * [getCompanyMetrics](#getcompanymetrics) -* [getBrand](#getbrand) * [editBrand](#editbrand) +* [getBrand](#getbrand) * [createBrand](#createbrand) * [createCompanyBrandMapping](#createcompanybrandmapping) * [getBrands](#getbrands) * [createLocation](#createlocation) * [getLocations](#getlocations) -* [getLocationDetail](#getlocationdetail) * [updateLocation](#updatelocation) +* [getLocationDetail](#getlocationdetail) * [createLocationBulk](#createlocationbulk) @@ -25,63 +25,6 @@ Company Profile API's allows you to access list of products, prices, seller deta ## Methods with example and description -#### updateCompany -Edit company profile - - - - -```swift -client.companyprofile.updateCompany(body: body) { (response, error) in - // Use response -} -``` - - - - - -| Argument | Type | Required | Description | -| -------- | ---- | -------- | ----------- | -| body | UpdateCompany | yes | Request body | - - -This API allows to edit the company profile of the seller account. - -*Returned Response:* - - - - -[SuccessResponse](#SuccessResponse) - -Returns a success message - - - - -
-  Example: - -```json -{ - "uid": 1, - "success": true -} -``` -
- - - - - - - - - ---- - - #### cbsOnboardGet Get company profile @@ -190,6 +133,63 @@ Company profile object. See example below or refer `GetCompanyProfileSerializerR +--- + + +#### updateCompany +Edit company profile + + + + +```swift +client.companyprofile.updateCompany(body: body) { (response, error) in + // Use response +} +``` + + + + + +| Argument | Type | Required | Description | +| -------- | ---- | -------- | ----------- | +| body | UpdateCompany | yes | Request body | + + +This API allows to edit the company profile of the seller account. + +*Returned Response:* + + + + +[SuccessResponse](#SuccessResponse) + +Returns a success message + + + + +
+  Example: + +```json +{ + "uid": 1, + "success": true +} +``` +
+ + + + + + + + + --- @@ -266,14 +266,14 @@ Metrics response object. See example below or refer `MetricsSerializer` for deta --- -#### 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 } ``` @@ -285,19 +285,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 @@ -307,33 +307,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 } ``` @@ -349,14 +324,14 @@ Brand object. See example below or refer `GetBrandResponseSerializer` for detail --- -#### 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 } ``` @@ -368,19 +343,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 @@ -390,8 +365,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" + ] } ``` @@ -963,14 +963,14 @@ Company profile object. See example below or refer `LocationListSerializer` for --- -#### getLocationDetail -Get details of a specific location. +#### updateLocation +Edit a location asscoiated to a company. ```swift -client.companyprofile.getLocationDetail(locationId: locationId) { (response, error) in +client.companyprofile.updateLocation(locationId: locationId, body: body) { (response, error) in // Use response } ``` @@ -981,20 +981,20 @@ client.companyprofile.getLocationDetail(locationId: locationId) { (response, err | Argument | Type | Required | Description | | -------- | ---- | -------- | ----------- | -| locationId | String | yes | Id of the location which you want to view. | - +| locationId | String | yes | Id of the location which you want to edit. | +| body | LocationSerializer | yes | Request body | -This API helps to get data associated to a specific location. +This API allows to edit a location associated to a company. *Returned Response:* -[GetLocationSerializer](#GetLocationSerializer) +[SuccessResponse](#SuccessResponse) -Brand object. See example below or refer `GetLocationSerializer` for details +Returns a success response @@ -1004,44 +1004,102 @@ Brand object. See example below or refer `GetLocationSerializer` for details ```json { - "verified_on": "2021-02-25T15:22:07.140000+00:00", - "company": { - "business_type": "huf", - "stage": "complete", - "uid": 1, - "addresses": [ - { - "city": "Mumbai Suburban", - "latitude": 19.058461, - "longitude": 72.871395, - "address1": "Chunabhatti Phatak, Maharashtra Nagar, Maharashtra Nagar, ", - "country_code": "IN", - "state": "Maharashtra", - "country": "India", - "pincode": 400070, - "address_type": "office" - }, - { - "city": "Mumbai Suburban", - "latitude": 19.058461, - "longitude": 72.871395, - "address1": "Chunabhatti Phatak, Maharashtra Nagar, Maharashtra Nagar, ", - "country_code": "IN", - "state": "Maharashtra", - "country": "India", - "pincode": 400070, - "address_type": "registered" - } - ], - "modified_by": { - "user_id": "-1", - "username": "silverbolt" - }, - "company_type": "mbo", - "created_by": { - "user_id": "123", - "username": "917827311650_22960" - }, + "uid": 1, + "success": true +} +``` + + + + + + + + + + +--- + + +#### getLocationDetail +Get details of a specific location. + + + + +```swift +client.companyprofile.getLocationDetail(locationId: locationId) { (response, error) in + // Use response +} +``` + + + + + +| Argument | Type | Required | Description | +| -------- | ---- | -------- | ----------- | +| locationId | String | yes | Id of the location which you want to view. | + + + +This API helps to get data associated to a specific location. + +*Returned Response:* + + + + +[GetLocationSerializer](#GetLocationSerializer) + +Brand object. See example below or refer `GetLocationSerializer` for details + + + + +
+  Example: + +```json +{ + "verified_on": "2021-02-25T15:22:07.140000+00:00", + "company": { + "business_type": "huf", + "stage": "complete", + "uid": 1, + "addresses": [ + { + "city": "Mumbai Suburban", + "latitude": 19.058461, + "longitude": 72.871395, + "address1": "Chunabhatti Phatak, Maharashtra Nagar, Maharashtra Nagar, ", + "country_code": "IN", + "state": "Maharashtra", + "country": "India", + "pincode": 400070, + "address_type": "office" + }, + { + "city": "Mumbai Suburban", + "latitude": 19.058461, + "longitude": 72.871395, + "address1": "Chunabhatti Phatak, Maharashtra Nagar, Maharashtra Nagar, ", + "country_code": "IN", + "state": "Maharashtra", + "country": "India", + "pincode": 400070, + "address_type": "registered" + } + ], + "modified_by": { + "user_id": "-1", + "username": "silverbolt" + }, + "company_type": "mbo", + "created_by": { + "user_id": "123", + "username": "917827311650_22960" + }, "name": "Cache Company" }, "address": { @@ -1200,64 +1258,6 @@ 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,43 +1323,37 @@ Returns a success response - #### [Website](#Website) + #### [SellerPhoneNumber](#SellerPhoneNumber) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | url | String? | yes | | + | countryCode | Int | no | | + | number | String | no | | --- - #### [BusinessDetails](#BusinessDetails) + #### [ContactDetails](#ContactDetails) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | website | [Website](#Website)? | yes | | + | phone | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | + | emails | [String]? | yes | | --- - #### [CreateUpdateAddressSerializer](#CreateUpdateAddressSerializer) + #### [UserSerializer](#UserSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | state | String | no | | - | pincode | Int | no | | - | address1 | String | no | | - | address2 | String? | yes | | - | longitude | Double | no | | - | city | String | no | | - | addressType | String | no | | - | latitude | Double | no | | - | countryCode | String? | yes | | - | country | String | no | | - | landmark | String? | yes | | + | contact | String? | yes | | + | username | String? | yes | | + | userId | String? | yes | | --- @@ -1370,10 +1364,10 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | url | String? | yes | | | legalName | String? | yes | | | value | String | no | | | verified | Bool? | yes | | - | url | String? | yes | | | type | String | no | | --- @@ -1381,73 +1375,87 @@ Returns a success response - #### [CompanyTax](#CompanyTax) + #### [BusinessCountryInfo](#BusinessCountryInfo) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | effectiveDate | String | no | | - | rate | Double | no | | - | enable | Bool | no | | + | countryCode | String? | yes | | + | country | String? | yes | | --- - #### [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 | | ---------- | ---- | -------- | ----------- | - | phone | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | - | emails | [String]? | yes | | + | website | [Website](#Website)? | yes | | --- - #### [UpdateCompany](#UpdateCompany) + #### [GetAddressSerializer](#GetAddressSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | rejectReason | String? | yes | | - | businessDetails | [BusinessDetails](#BusinessDetails)? | yes | | - | addresses | [[CreateUpdateAddressSerializer](#CreateUpdateAddressSerializer)]? | yes | | - | documents | [[Document](#Document)]? | yes | | - | companyType | String? | yes | | - | name | String? | yes | | - | warnings | [String: Any]? | yes | | - | customJson | [String: Any]? | yes | | - | taxes | [[CompanyTax](#CompanyTax)]? | yes | | - | notificationEmails | [String]? | yes | | - | businessInfo | String? | yes | | - | franchiseEnabled | Bool? | yes | | - | contactDetails | [ContactDetails](#ContactDetails)? | yes | | - | businessType | String? | yes | | + | countryCode | String? | yes | | + | addressType | String? | yes | | + | address2 | String? | yes | | + | country | String? | yes | | + | address1 | String? | yes | | + | latitude | Double? | yes | | + | state | String? | yes | | + | landmark | String? | yes | | + | pincode | Int? | yes | | + | longitude | Double? | yes | | + | city | String? | yes | | --- - #### [SuccessResponse](#SuccessResponse) + #### [GetCompanyProfileSerializerResponse](#GetCompanyProfileSerializerResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | Bool? | yes | | - | uid | Int? | yes | | + | taxes | [[String: Any]]? | yes | | + | contactDetails | [ContactDetails](#ContactDetails)? | yes | | + | verifiedOn | String? | yes | | + | mode | String? | yes | | + | uid | Int | no | | + | verifiedBy | [UserSerializer](#UserSerializer)? | yes | | + | createdOn | String? | yes | | + | companyType | String | no | | + | warnings | [String: Any]? | yes | | + | modifiedOn | String? | yes | | + | businessInfo | String? | yes | | + | notificationEmails | [String]? | yes | | + | documents | [[Document](#Document)]? | yes | | + | modifiedBy | [UserSerializer](#UserSerializer)? | yes | | + | name | String? | yes | | + | businessCountryInfo | [BusinessCountryInfo](#BusinessCountryInfo)? | yes | | + | createdBy | [UserSerializer](#UserSerializer)? | yes | | + | businessDetails | [BusinessDetails](#BusinessDetails)? | yes | | + | franchiseEnabled | Bool? | yes | | + | businessType | String | no | | + | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | + | stage | String? | yes | | --- @@ -1458,88 +1466,80 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | code | String? | yes | | - | status | Int? | yes | | | meta | [String: Any]? | yes | | | message | String? | yes | | + | code | String? | yes | | + | status | Int? | yes | | --- - #### [BusinessCountryInfo](#BusinessCountryInfo) + #### [CompanyTax](#CompanyTax) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | countryCode | String? | yes | | - | country | String? | yes | | + | effectiveDate | String | no | | + | rate | Double | no | | + | enable | Bool | no | | --- - #### [GetAddressSerializer](#GetAddressSerializer) + #### [CreateUpdateAddressSerializer](#CreateUpdateAddressSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | address1 | String? | yes | | - | pincode | Int? | yes | | - | address2 | String? | yes | | - | state | String? | yes | | - | longitude | Double? | yes | | - | city | String? | yes | | - | addressType | String? | yes | | - | latitude | Double? | yes | | | countryCode | String? | yes | | - | country | String? | yes | | + | addressType | String | no | | + | country | String | no | | + | address2 | String? | yes | | + | address1 | String | no | | + | latitude | Double | no | | + | state | String | no | | | landmark | String? | yes | | + | pincode | Int | no | | + | longitude | Double | no | | + | city | String | no | | --- - #### [UserSerializer](#UserSerializer) + #### [UpdateCompany](#UpdateCompany) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | contact | String? | yes | | - | userId | String? | yes | | - | username | String? | yes | | + | name | String? | yes | | + | businessType | String? | yes | | + | rejectReason | String? | yes | | + | customJson | [String: Any]? | yes | | + | taxes | [[CompanyTax](#CompanyTax)]? | yes | | + | contactDetails | [ContactDetails](#ContactDetails)? | yes | | + | companyType | String? | yes | | + | warnings | [String: Any]? | yes | | + | addresses | [[CreateUpdateAddressSerializer](#CreateUpdateAddressSerializer)]? | yes | | + | businessInfo | String? | yes | | + | notificationEmails | [String]? | yes | | + | businessDetails | [BusinessDetails](#BusinessDetails)? | yes | | + | franchiseEnabled | Bool? | yes | | + | documents | [[Document](#Document)]? | yes | | --- - #### [GetCompanyProfileSerializerResponse](#GetCompanyProfileSerializerResponse) + #### [SuccessResponse](#SuccessResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | businessCountryInfo | [BusinessCountryInfo](#BusinessCountryInfo)? | yes | | - | createdOn | String? | yes | | - | verifiedOn | String? | yes | | - | franchiseEnabled | Bool? | yes | | - | stage | String? | yes | | - | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | - | uid | Int | no | | - | mode | String? | yes | | - | notificationEmails | [String]? | yes | | - | createdBy | [UserSerializer](#UserSerializer)? | yes | | - | businessInfo | String? | yes | | - | name | String? | yes | | - | modifiedOn | String? | yes | | - | businessDetails | [BusinessDetails](#BusinessDetails)? | yes | | - | documents | [[Document](#Document)]? | yes | | - | verifiedBy | [UserSerializer](#UserSerializer)? | yes | | - | companyType | String | no | | - | warnings | [String: Any]? | yes | | - | modifiedBy | [UserSerializer](#UserSerializer)? | yes | | - | taxes | [[String: Any]]? | yes | | - | contactDetails | [ContactDetails](#ContactDetails)? | yes | | - | businessType | String | no | | + | uid | Int? | yes | | + | success | Bool? | yes | | --- @@ -1562,26 +1562,13 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | companyDocuments | [DocumentsObj](#DocumentsObj)? | yes | | + | uid | Int? | yes | | | brand | [DocumentsObj](#DocumentsObj)? | yes | | | stage | String? | yes | | - | uid | Int? | yes | | - | storeDocuments | [DocumentsObj](#DocumentsObj)? | yes | | - | store | [DocumentsObj](#DocumentsObj)? | yes | | | product | [DocumentsObj](#DocumentsObj)? | yes | | - | companyDocuments | [DocumentsObj](#DocumentsObj)? | yes | | - ---- - - - - - #### [UserSerializer1](#UserSerializer1) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | contact | String? | yes | | - | userId | String? | yes | | - | username | String? | yes | | + | store | [DocumentsObj](#DocumentsObj)? | yes | | + | storeDocuments | [DocumentsObj](#DocumentsObj)? | yes | | --- @@ -1600,79 +1587,75 @@ Returns a success response - #### [GetBrandResponseSerializer](#GetBrandResponseSerializer) + #### [CreateUpdateBrandRequestSerializer](#CreateUpdateBrandRequestSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | logo | String | no | | + | name | String | no | | | description | String? | yes | | - | logo | String? | yes | | - | createdOn | String? | yes | | + | companyId | Int? | yes | | + | synonyms | [String]? | yes | | | customJson | [String: Any]? | yes | | - | verifiedOn | String? | yes | | - | stage | String? | yes | | | uid | Int? | yes | | + | brandTier | String? | yes | | | localeLanguage | [String: Any]? | yes | | - | mode | String? | yes | | - | slugKey | String? | yes | | - | synonyms | [String]? | yes | | - | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | - | name | String | no | | | banner | [BrandBannerSerializer](#BrandBannerSerializer)? | yes | | - | modifiedOn | String? | yes | | - | rejectReason | String? | yes | | - | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | - | warnings | [String: Any]? | yes | | - | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | --- - #### [CreateUpdateBrandRequestSerializer](#CreateUpdateBrandRequestSerializer) + #### [UserSerializer1](#UserSerializer1) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | description | String? | yes | | - | logo | String | no | | - | uid | Int? | yes | | - | customJson | [String: Any]? | yes | | - | localeLanguage | [String: Any]? | yes | | - | synonyms | [String]? | yes | | - | brandTier | String? | yes | | - | companyId | Int? | yes | | - | name | String | no | | - | banner | [BrandBannerSerializer](#BrandBannerSerializer)? | yes | | + | contact | String? | yes | | + | username | String? | yes | | + | userId | String? | yes | | --- - #### [CompanyBrandPostRequestSerializer](#CompanyBrandPostRequestSerializer) + #### [GetBrandResponseSerializer](#GetBrandResponseSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brands | [Int] | no | | - | company | Int | no | | + | synonyms | [String]? | yes | | + | customJson | [String: Any]? | yes | | + | verifiedOn | String? | yes | | + | localeLanguage | [String: Any]? | yes | | + | banner | [BrandBannerSerializer](#BrandBannerSerializer)? | yes | | + | logo | String? | yes | | + | mode | String? | yes | | | uid | Int? | yes | | + | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | createdOn | String? | yes | | + | warnings | [String: Any]? | yes | | + | modifiedOn | String? | yes | | + | description | String? | yes | | + | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | name | String | no | | + | rejectReason | String? | yes | | + | slugKey | String? | yes | | + | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | + | stage | String? | yes | | --- - #### [Page](#Page) + #### [CompanyBrandPostRequestSerializer](#CompanyBrandPostRequestSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | hasPrevious | Bool? | yes | | - | size | Int? | yes | | - | nextId | String? | yes | | - | current | Int? | yes | | - | itemTotal | Int? | yes | | - | hasNext | Bool? | yes | | - | type | String | no | | + | company | Int | no | | + | uid | Int? | yes | | + | brands | [Int] | no | | --- @@ -1683,19 +1666,19 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | modifiedOn | String? | yes | | + | modifiedBy | [UserSerializer](#UserSerializer)? | yes | | + | name | String? | yes | | + | businessType | String? | yes | | | rejectReason | String? | yes | | - | stage | String? | yes | | - | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | - | verifiedBy | [UserSerializer](#UserSerializer)? | yes | | | uid | Int? | yes | | + | verifiedBy | [UserSerializer](#UserSerializer)? | yes | | | createdOn | String? | yes | | - | modifiedBy | [UserSerializer](#UserSerializer)? | yes | | - | verifiedOn | String? | yes | | | companyType | String? | yes | | + | verifiedOn | String? | yes | | + | modifiedOn | String? | yes | | + | addresses | [[GetAddressSerializer](#GetAddressSerializer)]? | yes | | + | stage | String? | yes | | | createdBy | [UserSerializer](#UserSerializer)? | yes | | - | name | String? | yes | | - | businessType | String? | yes | | --- @@ -1706,17 +1689,17 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | modifiedOn | String? | yes | | - | brand | [GetBrandResponseSerializer](#GetBrandResponseSerializer)? | yes | | - | stage | String? | yes | | - | company | [GetCompanySerializer](#GetCompanySerializer)? | yes | | + | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | | rejectReason | String? | yes | | - | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | | uid | Int? | yes | | + | brand | [GetBrandResponseSerializer](#GetBrandResponseSerializer)? | yes | | + | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | | createdOn | String? | yes | | - | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | - | verifiedOn | String? | yes | | | warnings | [String: Any]? | yes | | + | verifiedOn | String? | yes | | + | modifiedOn | String? | yes | | + | stage | String? | yes | | + | company | [GetCompanySerializer](#GetCompanySerializer)? | yes | | | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | --- @@ -1724,12 +1707,29 @@ Returns a success response + #### [Page](#Page) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | nextId | String? | yes | | + | hasPrevious | Bool? | yes | | + | size | Int? | yes | | + | current | Int? | yes | | + | type | String | no | | + | hasNext | Bool? | yes | | + | itemTotal | Int? | yes | | + +--- + + + + #### [CompanyBrandListSerializer](#CompanyBrandListSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page | [Page](#Page)? | yes | | | items | [[CompanyBrandSerializer](#CompanyBrandSerializer)]? | yes | | + | page | [Page](#Page)? | yes | | --- @@ -1740,9 +1740,9 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | password | String? | yes | | - | username | String? | yes | | | enabled | Bool? | yes | | + | username | String? | yes | | + | password | String? | yes | | --- @@ -1753,8 +1753,8 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | eWaybill | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | | eInvoice | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | + | eWaybill | [InvoiceCredSerializer](#InvoiceCredSerializer)? | yes | | --- @@ -1765,55 +1765,55 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | onSameStore | Bool? | yes | | | storeUid | Int? | yes | | + | onSameStore | Bool? | yes | | --- - #### [LocationTimingSerializer](#LocationTimingSerializer) + #### [GetAddressSerializer1](#GetAddressSerializer1) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | hour | Int? | yes | | - | minute | Int? | yes | | + | countryCode | String? | yes | | + | addressType | String? | yes | | + | address2 | String? | yes | | + | country | String? | yes | | + | address1 | String? | yes | | + | latitude | Double? | yes | | + | state | String? | yes | | + | landmark | String? | yes | | + | pincode | Int? | yes | | + | longitude | Double? | yes | | + | city | String? | yes | | --- - #### [LocationDayWiseSerializer](#LocationDayWiseSerializer) + #### [LocationTimingSerializer](#LocationTimingSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | open | Bool | no | | - | opening | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | - | closing | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | - | weekday | String | no | | + | hour | Int? | yes | | + | minute | Int? | yes | | --- - #### [GetAddressSerializer1](#GetAddressSerializer1) + #### [LocationDayWiseSerializer](#LocationDayWiseSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | address1 | String? | yes | | - | pincode | Int? | yes | | - | address2 | String? | yes | | - | state | String? | yes | | - | longitude | Double? | yes | | - | city | String? | yes | | - | addressType | String? | yes | | - | latitude | Double? | yes | | - | countryCode | String? | yes | | - | country | String? | yes | | - | landmark | String? | yes | | + | closing | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | + | weekday | String | no | | + | opening | [LocationTimingSerializer](#LocationTimingSerializer)? | yes | | + | open | Bool | no | | --- @@ -1824,9 +1824,9 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | name | String? | yes | | | email | String? | yes | | | mobileNo | [SellerPhoneNumber](#SellerPhoneNumber) | no | | - | name | String? | yes | | --- @@ -1837,23 +1837,23 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | stage | String? | yes | | - | company | Int | no | | - | documents | [[Document](#Document)]? | yes | | + | name | String | no | | | gstCredentials | [InvoiceDetailsSerializer](#InvoiceDetailsSerializer)? | yes | | - | uid | Int? | yes | | - | warnings | [String: Any]? | yes | | + | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | + | displayName | String | no | | | productReturnConfig | [ProductReturnConfigSerializer](#ProductReturnConfigSerializer)? | yes | | + | notificationEmails | [String]? | yes | | | customJson | [String: Any]? | yes | | + | uid | Int? | yes | | + | address | [GetAddressSerializer1](#GetAddressSerializer1) | no | | | code | String | no | | | timing | [[LocationDayWiseSerializer](#LocationDayWiseSerializer)]? | yes | | - | notificationEmails | [String]? | yes | | + | warnings | [String: Any]? | yes | | + | stage | String? | yes | | + | company | Int | no | | | storeType | String? | yes | | - | name | String | no | | - | address | [GetAddressSerializer1](#GetAddressSerializer1) | no | | + | documents | [[Document](#Document)]? | yes | | | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | - | displayName | String | no | | - | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | --- @@ -1864,8 +1864,8 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | inventory | String? | yes | | | order | String? | yes | | + | inventory | String? | yes | | --- @@ -1876,31 +1876,31 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | createdOn | String? | yes | | + | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | | customJson | [String: Any]? | yes | | - | verifiedOn | String? | yes | | - | phoneNumber | String | no | | + | address | [GetAddressSerializer](#GetAddressSerializer) | no | | | code | String | no | | - | displayName | String | no | | - | stage | String? | yes | | + | verifiedOn | String? | yes | | + | company | [GetCompanySerializer](#GetCompanySerializer)? | yes | | | gstCredentials | [InvoiceDetailsSerializer](#InvoiceDetailsSerializer)? | yes | | - | uid | Int? | yes | | | productReturnConfig | [ProductReturnConfigSerializer](#ProductReturnConfigSerializer)? | yes | | - | timing | [[LocationDayWiseSerializer](#LocationDayWiseSerializer)]? | yes | | + | displayName | String | no | | | integrationType | [LocationIntegrationType](#LocationIntegrationType)? | yes | | - | notificationEmails | [String]? | yes | | - | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | - | name | String | no | | - | address | [GetAddressSerializer](#GetAddressSerializer) | no | | - | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | - | modifiedOn | String? | yes | | - | company | [GetCompanySerializer](#GetCompanySerializer)? | yes | | - | documents | [[Document](#Document)]? | yes | | + | phoneNumber | String | no | | + | uid | Int? | yes | | | verifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | createdOn | String? | yes | | | warnings | [String: Any]? | yes | | + | modifiedOn | String? | yes | | + | notificationEmails | [String]? | yes | | + | documents | [[Document](#Document)]? | yes | | + | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | | modifiedBy | [UserSerializer1](#UserSerializer1)? | yes | | + | name | String | no | | + | timing | [[LocationDayWiseSerializer](#LocationDayWiseSerializer)]? | yes | | + | createdBy | [UserSerializer1](#UserSerializer1)? | yes | | + | stage | String? | yes | | | storeType | String? | yes | | - | contactNumbers | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | --- @@ -1911,8 +1911,8 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page | [Page](#Page)? | yes | | | items | [[GetLocationSerializer](#GetLocationSerializer)]? | yes | | + | page | [Page](#Page)? | yes | | --- diff --git a/documentation/platform/CONTENT.md b/documentation/platform/CONTENT.md index ca2e6371fb..0c9c7fabae 100644 --- a/documentation/platform/CONTENT.md +++ b/documentation/platform/CONTENT.md @@ -8676,7 +8676,7 @@ Success. Returns a JSON object of components. Refer `PageSchema` for more detail | collection | collection | Symbolic link for Collection: /collection/:slug | | collections | collections | Symbolic link for Collections: /collections/ | | contactUs | contact-us | Symbolic link for Contact Us: /contact-us/ | - | externalLink | external | Symbolic link for External Link: /external/:url | + | externalLink | external | Symbolic link for External Link: /external/ | | faq | faq | Symbolic link for FAQ: /faq/:category | | freshchat | freshchat | Symbolic link for Chat by Freshchat: /freshchat | | home | home | Symbolic link for Home: / | diff --git a/documentation/platform/FILESTORAGE.md b/documentation/platform/FILESTORAGE.md index 519fdbc97f..cb701c47ec 100644 --- a/documentation/platform/FILESTORAGE.md +++ b/documentation/platform/FILESTORAGE.md @@ -781,13 +781,12 @@ Success | fileName | String | no | | | filePath | String | no | | | contentType | String | no | | - | method | String | no | | | namespace | String | no | | | operation | String | no | | | size | Int | no | | | upload | [Upload](#Upload) | no | | | cdn | [CDN](#CDN) | no | | - | success | String | no | | + | success | Bool | no | | | tags | [String]? | yes | | | createdOn | String | no | | | modifiedOn | String | no | | diff --git a/documentation/platform/PAYMENT.md b/documentation/platform/PAYMENT.md index 816879fc06..83d95a8320 100644 --- a/documentation/platform/PAYMENT.md +++ b/documentation/platform/PAYMENT.md @@ -2618,12 +2618,12 @@ 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. | + | excludedFields | [String] | no | List of all excluded options with their Details. | | aggregators | [[String: Any]]? | yes | List of all speceific Payment options with their Details. | | appId | String | no | Application Id to which Payment config Mapped | + | success | Bool | no | Response is successful or not | | created | Bool | no | Response is created or not | - | excludedFields | [String] | no | List of all excluded options with their Details. | - | displayFields | [String] | no | List of all included options with their Details. | --- @@ -2634,9 +2634,9 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | code | String | no | Error descrption code. | - | success | Bool | no | Response is successful or not | | description | String | no | Error human understandable description. | + | 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 | | ---------- | ---- | -------- | ----------- | - | secret | String | no | Secret Key of the payment aggregator | - | isActive | Bool? | yes | Enable/ Disable Flag | | key | String | no | Api key of the payment aggregator | + | isActive | Bool? | yes | Enable/ Disable Flag | | merchantSalt | String | no | Merchant key of the payment aggregator | | configType | String | no | Config Type of the aggregator | + | secret | String | no | Secret Key of the payment aggregator | --- @@ -2662,9 +2662,9 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | isActive | Bool? | yes | Enable/ Disable Flag | | appId | String | no | Application Id to which Payment config Mapped | | aggregatorName | [PaymentGatewayConfig](#PaymentGatewayConfig)? | yes | | + | isActive | Bool? | yes | Enable/ Disable Flag | --- @@ -2687,8 +2687,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | code | String | no | Error descrption code. | | description | String | no | Error human understandable description. | + | code | String | no | Error descrption code. | --- @@ -2711,8 +2711,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | small | String | no | smalll | | large | String | no | large | + | small | String | no | smalll | --- @@ -2723,10 +2723,10 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | displayName | String? | yes | display_name | + | logos | [PaymentModeLogo](#PaymentModeLogo)? | yes | logos | | code | String? | yes | code | + | displayName | String? | yes | display_name | | packageName | String? | yes | package_name | - | logos | [PaymentModeLogo](#PaymentModeLogo)? | yes | logos | --- @@ -2749,35 +2749,36 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | cardNumber | String? | yes | card_number | - | expMonth | Int? | yes | exp_month | - | cardIssuer | String? | yes | card_issuer | - | displayPriority | Int? | yes | Dispaly Priority | + | cardId | String? | yes | card_id | + | expYear | Int? | yes | exp_year | | cardType | String? | yes | card_type | + | intentFlow | Bool? | yes | intent_flow | + | expMonth | Int? | yes | exp_month | + | displayName | String? | yes | display name | + | cardNumber | String? | yes | card_number | + | logoUrl | [PaymentModeLogo](#PaymentModeLogo)? | yes | Logo | | timeout | Int? | yes | timeout | + | aggregatorName | String | no | aggregator_name | | cardBrandImage | String? | yes | card_brand_image | - | cardReference | String? | yes | card_reference | - | name | String? | yes | name | - | code | String? | yes | code | - | nickname | String? | yes | nickname | - | fyndVpa | String? | yes | fynd_vpa | - | logoUrl | [PaymentModeLogo](#PaymentModeLogo)? | yes | Logo | - | cardIsin | String? | yes | card_isin | - | merchantCode | String? | yes | merchant code | - | intentApp | [[IntentApp](#IntentApp)]? | yes | intent_app | - | cardFingerprint | String? | yes | card_fingerprint | | retryCount | Int? | yes | retry_count | - | intentFlow | Bool? | yes | intent_flow | - | aggregatorName | String | no | aggregator_name | - | intentAppErrorList | [String]? | yes | intent_app_error_list | - | expired | Bool? | yes | expired | - | cardId | String? | yes | card_id | - | expYear | Int? | yes | exp_year | - | displayName | String? | yes | display name | - | intentAppErrorDictList | [[IntentAppErrorList](#IntentAppErrorList)]? | yes | intent_app_error_dict_list | + | intentApp | [[IntentApp](#IntentApp)]? | yes | intent_app | | cardToken | String? | yes | card_token | + | merchantCode | String? | yes | merchant code | + | intentAppErrorDictList | [[IntentAppErrorList](#IntentAppErrorList)]? | yes | intent_app_error_dict_list | + | intentAppErrorList | [String]? | yes | intent_app_error_list | + | displayPriority | Int? | yes | Dispaly Priority | + | cardIssuer | String? | yes | card_issuer | + | cardReference | String? | yes | card_reference | | cardBrand | String? | yes | card_brand | + | cardIsin | String? | yes | card_isin | + | code | String? | yes | code | | cardName | String? | yes | card_name | + | expired | Bool? | yes | expired | + | nickname | String? | yes | nickname | + | name | String? | yes | name | + | cardFingerprint | String? | yes | card_fingerprint | + | fyndVpa | String? | yes | fynd_vpa | + | compliantWithTokenisationGuidelines | Bool? | yes | If card is tokenised or not | --- @@ -2788,13 +2789,13 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | list | [[PaymentModeList](#PaymentModeList)]? | yes | Payment mode | + | displayPriority | Int | no | Dispaly Priority | | name | String | no | Payment mode name | + | list | [[PaymentModeList](#PaymentModeList)]? | yes | Payment mode | | displayName | String | no | Payment mode display name | - | displayPriority | Int | no | Dispaly Priority | | aggregatorName | String? | yes | Dispaly Priority | - | anonymousEnable | Bool? | yes | Annonymous card flag | | addCardEnabled | Bool? | yes | Annonymous card flag | + | anonymousEnable | Bool? | yes | Annonymous card flag | --- @@ -2816,8 +2817,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | paymentOptions | [PaymentOptions](#PaymentOptions) | no | Payment options | | success | Bool | no | Response is successful or not | + | paymentOptions | [PaymentOptions](#PaymentOptions) | no | Payment options | --- @@ -2828,13 +2829,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 | - | transferType | String | no | transafer type | | customers | [String: Any] | no | customers details object | + | isDefault | Bool | no | default or not | + | transferType | String | no | transafer type | | isActive | Bool | no | Enable/DIsable Flag Payout | + | payoutsAggregators | [[String: Any]] | no | payout aggregator object | | uniqueTransferNo | [String: Any] | no | display priority of the payment mode | | moreAttributes | [String: Any] | no | bank details object | - | isDefault | Bool | no | default or not | --- @@ -2845,16 +2846,16 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | bankName | String? | yes | | - | accountHolder | String? | yes | | + | city | String? | yes | | | pincode | Int? | yes | | | branchName | String? | yes | | - | city | String? | yes | | + | accountType | String | no | | | ifscCode | String | no | | | state | String? | yes | | - | country | String? | yes | | - | accountType | String | no | | + | bankName | String? | yes | | | accountNo | String? | yes | | + | accountHolder | String? | yes | | + | country | String? | yes | | --- @@ -2865,12 +2866,12 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | users | [String: Any] | no | payout users object | | transferType | String | no | transafer type | - | aggregator | String | no | Aggregator Name | - | bankDetails | [PayoutBankDetails](#PayoutBankDetails) | no | payout bank details object | | isActive | Bool | no | Enable/Disable Flag Payout | + | users | [String: Any] | no | payout users object | + | aggregator | String | no | Aggregator Name | | uniqueExternalId | String | no | Unique Id of Payout | + | bankDetails | [PayoutBankDetails](#PayoutBankDetails) | no | payout bank details object | --- @@ -2881,16 +2882,16 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | uniqueTransferNo | String | no | unique transfer no | + | payouts | [String: Any] | no | payout object | + | paymentStatus | String | no | status of payment | + | transferType | String | no | transfer type | + | isActive | Bool | no | Enable/DIsable Flag Payout | | users | [String: Any] | no | users details object | - | success | Bool | no | Response is successful or not | | aggregator | String | no | Aggregator Name | - | transferType | String | no | transfer type | + | success | Bool | no | Response is successful or not | | bankDetails | [String: Any] | no | payout bank_details object | - | isActive | Bool | no | Enable/DIsable Flag Payout | - | uniqueTransferNo | String | no | unique transfer no | | created | Bool | no | created flag | - | paymentStatus | String | no | status of payment | - | payouts | [String: Any] | no | payout object | --- @@ -2901,9 +2902,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 +2915,9 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | isActive | Bool | no | Enable/Disable Flag Payout | - | uniqueExternalId | String | no | Unique Id of Payout | | isDefault | Bool | no | Enable/Disable Default Payout | + | uniqueExternalId | String | no | Unique Id of Payout | + | isActive | Bool | no | Enable/Disable Flag Payout | --- @@ -2938,8 +2939,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [[String: Any]] | no | Subscription Payment Method Object | | success | Bool | no | Response is successful or not | + | data | [[String: Any]] | no | Subscription Payment Method Object | --- @@ -2962,8 +2963,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 | - | aggregator | String | no | Aggregator Name | | config | [String: Any] | no | Aggregator Config | + | aggregator | String | no | Aggregator Name | --- @@ -2985,8 +2986,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [String: Any] | no | Subscription Payment Method Object | | success | Bool | no | Response is successful or not | + | data | [String: Any] | no | Subscription Payment Method Object | --- @@ -2997,17 +2998,17 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | bankName | String | no | Bank Name of the Account | - | email | String | no | Email of the Account Holder | - | vpa | String? | yes | | - | accountHolder | String | no | Name of the Account Holder | + | mobile | String | no | Moblie Number of the User | + | wallet | String? | yes | | | branchName | String | no | Branch Name of the Account | | ifscCode | String | no | Ifsc Code of the Account | | address | String? | yes | Address of the User | | comment | String? | yes | Remarks added by The user | - | mobile | String | no | Moblie Number of the User | + | email | String | no | Email of the Account Holder | | accountNo | String | no | Account NUmber of the Account Holder | - | wallet | String? | yes | | + | vpa | String? | yes | | + | bankName | String | no | Bank Name of the Account | + | accountHolder | String | no | Name of the Account Holder | --- @@ -3018,13 +3019,13 @@ 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 | + | delights | Bool | no | True if beneficiary to be added by delights or False if by User | + | requestId | String? | yes | | + | orderId | String | no | Merchant Order Id | | details | [BeneficiaryModeDetails](#BeneficiaryModeDetails) | no | Beneficiary bank details | | transferMode | String | no | Transfer Mode of the Beneficiary to be added | + | shipmentId | String | no | Shipment Id of the respective Merchant Order Id | | otp | String? | yes | | - | delights | Bool | no | True if beneficiary to be added by delights or False if by User | - | orderId | String | no | Merchant Order Id | - | requestId | String? | yes | | --- @@ -3035,10 +3036,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. | - | success | Bool | no | Success or failure flag. | | isVerifiedFlag | Bool? | yes | | + | success | Bool | no | Success or failure flag. | | message | String | no | Response message | + | data | [String: Any]? | yes | Refund account data. | --- @@ -3049,9 +3050,9 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | code | String | no | Bad Request Data | - | success | Bool | no | Response is successful or not | | description | String | no | Not Found | + | success | Bool | no | Response is successful or not | + | code | String | no | Bad Request Data | --- @@ -3062,9 +3063,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 | + | bankName | String | no | Bank Name Of Account | --- @@ -3075,25 +3076,25 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | bankName | String | no | Bank Name Of Account | + | displayName | String | no | Display Name Of Account | | isActive | Bool | no | Boolean Flag whether Beneficiary set or not | - | id | Int | no | | - | address | String | no | Address of User | - | comment | Bool? | yes | Remarks | - | branchName | Bool? | yes | Branch Name Of Account | - | mobile | Bool? | yes | MObile no of User | | delightsUserName | String? | yes | User Id Who filled the Beneficiary | - | subtitle | String | no | SHort Title Of Account | + | createdOn | String | no | Creation Date of Beneficiary | | accountHolder | String | no | Account Holder Name | - | transferMode | String | no | Transfer Mode Of Account | - | ifscCode | String | no | Ifsc Code Of Account | | beneficiaryId | String | no | Benenficiary Id | + | subtitle | String | no | SHort Title Of Account | + | ifscCode | String | no | Ifsc Code Of Account | | modifiedOn | String | no | MOdification Date of Beneficiary | - | title | String | no | Title Of Account | | accountNo | String | no | Account Number | - | createdOn | String | no | Creation Date of Beneficiary | + | mobile | Bool? | yes | MObile no of User | + | branchName | Bool? | yes | Branch Name Of Account | + | comment | Bool? | yes | Remarks | + | transferMode | String | no | Transfer Mode Of Account | + | bankName | String | no | Bank Name Of Account | + | id | Int | no | | | email | String | no | EMail of User | - | displayName | String | no | Display Name Of Account | + | address | String | no | Address of User | + | title | String | no | Title Of Account | --- @@ -3119,8 +3120,8 @@ Success. Returns the status of payment. Check the example shown below or refer ` | paymentGateway | String? | yes | | | currentStatus | String? | yes | | | orderId | String? | yes | | - | extraMeta | [String: Any]? | yes | | | paymentId | String? | yes | | + | extraMeta | [String: Any]? | yes | | --- @@ -3131,9 +3132,9 @@ Success. Returns the status of payment. Check the example shown below or refer ` | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | meta | [MultiTenderPaymentMeta](#MultiTenderPaymentMeta)? | yes | | | name | String? | yes | Payment mode name | | amount | Double | no | Payment amount | - | meta | [MultiTenderPaymentMeta](#MultiTenderPaymentMeta)? | yes | | | mode | String | no | | ---