From 8b9bf2304642910046cc064967800d5d0754e5f3 Mon Sep 17 00:00:00 2001 From: Jigar Dafda Date: Wed, 16 Oct 2024 07:18:13 +0000 Subject: [PATCH] [Auto Generated] 1.4.14 --- CHANGELOG.md | 7647 +++++++++++++++++ FDKClient.podspec | 2 +- .../application/ApplicationAPIClient.swift | 2 +- .../code/application/ApplicationClient.swift | 4 + .../code/application/ApplicationEnums.swift | 2 + .../ApplicationModelsExtenstions.swift | 2 + .../application/ApplicationPageType.swift | 2 + .../Client/CartApplicationClient.swift | 178 +- .../Client/CatalogApplicationClient.swift | 116 +- .../Client/CommonApplicationClient.swift | 4 +- .../ConfigurationApplicationClient.swift | 42 +- .../Client/ContentApplicationClient.swift | 91 +- .../Client/FileStorageApplicationClient.swift | 26 +- .../Client/FinanceApplicationClient.swift | 130 + .../Client/LeadApplicationClient.swift | 4 +- .../Client/LogisticApplicationClient.swift | 165 +- .../Client/OrderApplicationClient.swift | 75 +- .../Client/PaymentApplicationClient.swift | 218 +- .../Client/RewardsApplicationClient.swift | 32 +- .../Client/ThemeApplicationClient.swift | 18 +- .../Client/UserApplicationClient.swift | 22 +- .../Client/WebhookApplicationClient.swift | 10 +- Sources/code/application/FileStorage.swift | 4 +- ...wift => AddCartCreationCartAppModel.swift} | 4 +- ... => AddCartDetailResultCartAppModel.swift} | 10 +- ...el.swift => ApplyCouponCartAppModel.swift} | 4 +- .../ArticlePriceDetailsCartAppModel.swift | 75 + ...wift => BulkPriceResultCartAppModel.swift} | 4 +- .../CartCheckoutCustomMetaCartAppModel.swift | 61 + ...rtCheckoutDetailCreationCartAppModel.swift | 552 ++ ...heckoutDetailV2CreationCartAppModel.swift} | 10 +- ...t => CartCheckoutResultCartAppModel.swift} | 4 +- ...ift => CartDetailResultCartAppModel.swift} | 4 +- ... => CartItemCountResultCartAppModel.swift} | 4 +- ...ift => CartMetaCreationCartAppModel.swift} | 4 +- ...> CartMetaMissingResultCartAppModel.swift} | 4 +- ...swift => CartMetaResultCartAppModel.swift} | 4 +- ... => CartShipmentsResultCartAppModel.swift} | 10 +- .../Cart/CouponValidityCartAppModel.swift | 24 +- ... => DeleteAddressResultCartAppModel.swift} | 4 +- ... DeleteCartDetailResultCartAppModel.swift} | 4 +- .../Cart/FreeGiftItemCartAppModel.swift | 163 + .../FreeGiftItemCreationCartAppModel.swift | 76 + .../Cart/FreeGiftItemsCartAppModel.swift | 68 +- ...t => GetAddressesResultCartAppModel.swift} | 28 +- ...wift => GetCouponResultCartAppModel.swift} | 4 +- ...etShareCartLinkCreationCartAppModel.swift} | 4 +- ... GetShareCartLinkResultCartAppModel.swift} | 4 +- ...=> OperationErrorResultCartAppModel.swift} | 4 +- .../Cart/ProductActionCartAppModel.swift | 24 +- .../Cart/ProductActionPageCartAppModel.swift | 75 + .../ProductActionParamsCartAppModel.swift | 53 + ...> PromotionOffersResultCartAppModel.swift} | 4 +- ...tionPaymentOffersResultCartAppModel.swift} | 4 +- ... => RewardPointCreationCartAppModel.swift} | 4 +- ...ft => SaveAddressResultCartAppModel.swift} | 4 +- ...lectCartAddressCreationCartAppModel.swift} | 4 +- ...ift => SharedCartResultCartAppModel.swift} | 4 +- ...swift => ShipmentResultCartAppModel.swift} | 4 +- ... => UpdateAddressResultCartAppModel.swift} | 4 +- ...t => UpdateCartCreationCartAppModel.swift} | 28 +- ... UpdateCartDetailResultCartAppModel.swift} | 10 +- ...dateCartPaymentCreationCartAppModel.swift} | 4 +- .../Cart/ValidationConfigCartAppModel.swift | 61 + .../Cart/ValidationErrorCartAppModel.swift | 61 + .../Catalog/AppStoreCatalogAppModel.swift | 10 +- ...mpleteResponseSchemaCatalogAppModel.swift} | 4 +- ...DetailResponseSchemaCatalogAppModel.swift} | 4 +- ...istingResponseSchemaCatalogAppModel.swift} | 4 +- ...istingResponseSchemaCatalogAppModel.swift} | 4 +- ...ryMetaResponseSchemaCatalogAppModel.swift} | 4 +- ...DetailResponseSchemaCatalogAppModel.swift} | 4 +- ...rtmentResponseSchemaCatalogAppModel.swift} | 4 +- ... ErrorResponseSchemaCatalogAppModel.swift} | 4 +- ...lowIdsResponseSchemaCatalogAppModel.swift} | 4 +- ...owPostResponseSchemaCatalogAppModel.swift} | 4 +- ...rCountResponseSchemaCatalogAppModel.swift} | 4 +- ...istingResponseSchemaCatalogAppModel.swift} | 4 +- ...istingResponseSchemaCatalogAppModel.swift} | 4 +- ...istingResponseSchemaCatalogAppModel.swift} | 4 +- .../Catalog/IdentifierCatalogAppModel.swift | 141 + ...ompareResponseSchemaCatalogAppModel.swift} | 4 +- .../ProductDetailsCatalogAppModel.swift | 6 +- ...imilarResponseSchemaCatalogAppModel.swift} | 10 +- .../ProductListingDetailCatalogAppModel.swift | 6 +- ...istingResponseSchemaCatalogAppModel.swift} | 4 +- ...roductStockStatusItemCatalogAppModel.swift | 6 +- ...StatusResponseSchemaCatalogAppModel.swift} | 4 +- ...ntItemResponseSchemaCatalogAppModel.swift} | 4 +- ...istingResponseSchemaCatalogAppModel.swift} | 10 +- ...ariantResponseSchemaCatalogAppModel.swift} | 10 +- ...riantsResponseSchemaCatalogAppModel.swift} | 10 +- ...arisonResponseSchemaCatalogAppModel.swift} | 4 +- ...> StoreAddressSchemaCatalogAppModel.swift} | 4 +- .../Models/Catalog/StoreCatalogAppModel.swift | 24 +- .../Catalog/StoreContactCatalogAppModel.swift | 75 + .../Catalog/StoreDetailsCatalogAppModel.swift | 10 +- ...istingResponseSchemaCatalogAppModel.swift} | 4 +- ...> StoreManagerSchemaCatalogAppModel.swift} | 4 +- ...icationResponseSchemaCommonAppModel.swift} | 4 +- ...t => BadRequestSchemaCommonAppModel.swift} | 4 +- ...ResponseSchemaConfigurationAppModel.swift} | 4 +- ...ResponseSchemaConfigurationAppModel.swift} | 4 +- ...ResponseSchemaConfigurationAppModel.swift} | 4 +- ...ResponseSchemaConfigurationAppModel.swift} | 4 +- ...ResponseSchemaConfigurationAppModel.swift} | 4 +- ...ResponseSchemaConfigurationAppModel.swift} | 4 +- ...ResponseSchemaConfigurationAppModel.swift} | 4 +- ...dRequestSchemaConfigurationAppModel.swift} | 4 +- ...ResponseSchemaConfigurationAppModel.swift} | 4 +- ...tRequestSchemaConfigurationAppModel.swift} | 4 +- ...ResponseSchemaConfigurationAppModel.swift} | 4 +- .../UnhandledErrorConfigurationAppModel.swift | 53 - ...ft => BlogGetDetailsContentAppModel.swift} | 4 +- .../CustomFieldSchemaContentAppModel.swift | 56 +- ...ustomObjectByIdSchemaContentAppModel.swift | 4 +- ...stomObjectFieldSchemaContentAppModel.swift | 12 +- ...mObjectListItemSchemaContentAppModel.swift | 185 + .../CustomObjectsSchemaContentAppModel.swift | 75 + ...NavigationGetDetailsContentAppModel.swift} | 4 +- ...ft => PageGetDetailsContentAppModel.swift} | 4 +- ... SlideshowGetDetailsContentAppModel.swift} | 4 +- .../ValidationErrorContentAppModel.swift | 61 + ...leUploadCompleteFileStorageAppModel.swift} | 4 +- ...ft => FileUploadFileStorageAppModel.swift} | 21 +- ... FileUploadStartFileStorageAppModel.swift} | 4 +- ...swift => SignUrlFileStorageAppModel.swift} | 4 +- ...=> SignUrlResultFileStorageAppModel.swift} | 4 +- ...rCreditBalanceReqDataFinanceAppModel.swift | 105 + ...tBalanceRequestSchemaFinanceAppModel.swift | 53 + ...rCreditBalanceResDataFinanceAppModel.swift | 141 + ...BalanceResponseSchemaFinanceAppModel.swift | 75 + .../Models/Finance/ErrorFinanceAppModel.swift | 251 + .../Finance/ErrorMetaFinanceAppModel.swift} | 29 +- .../ErrorMetaItemsFinanceAppModel.swift | 75 + ...LockUnlockRequestDataFinanceAppModel.swift | 136 + ...ckUnlockRequestSchemaFinanceAppModel.swift | 53 + ...ockUnlockResponseDataFinanceAppModel.swift | 75 + ...kUnlockResponseSchemaFinanceAppModel.swift | 75 + ...ift => FormFieldDetailsLeadAppModel.swift} | 4 +- ...SubmitCustomFormDetailsLeadAppModel.swift} | 10 +- ...CountryEntityResultLogisticAppModel.swift} | 14 +- ...> CountryListResultLogisticAppModel.swift} | 10 +- ...> CountryMetaResultLogisticAppModel.swift} | 4 +- ...ourierPartnerPromiseLogisticAppModel.swift | 61 + .../CourierPartnersLogisticAppModel.swift | 119 + ...wift => ErrorResultLogisticAppModel.swift} | 4 +- .../GetLocalityLogisticAppModel.swift | 46 +- .../GetPromiseDetailsLogisticAppModel.swift | 97 + ...t => GetStoreResultLogisticAppModel.swift} | 10 +- ...mPincodeViewDetailsLogisticAppModel.swift} | 4 +- ...omPincodeViewResultLogisticAppModel.swift} | 4 +- .../Logistic/LocalitiesLogisticAppModel.swift | 24 +- .../LocalityParentLogisticAppModel.swift | 46 +- ... => LogisticsResultLogisticAppModel.swift} | 10 +- ...> PincodeDataResultLogisticAppModel.swift} | 22 +- ...t => PincodeDetailsLogisticAppModel.swift} | 14 +- ...deErrorSchemaResultLogisticAppModel.swift} | 4 +- ...> PincodeMetaResultLogisticAppModel.swift} | 4 +- ...incodeParentsResultLogisticAppModel.swift} | 4 +- ...el.swift => PromiseLogisticAppModel.swift} | 4 +- ...eAssignStoreDetailsLogisticAppModel.swift} | 4 +- ...ReAssignStoreResultLogisticAppModel.swift} | 4 +- ...rviceabilityLocationLogisticAppModel.swift | 61 + ...ourierPartnerDetailsLogisticAppModel.swift | 127 + ...CourierPartnerResultLogisticAppModel.swift | 75 + ...pmentCourierPartnersLogisticAppModel.swift | 75 + .../ShipmentDimensionLogisticAppModel.swift | 76 + .../ShipmentsArticlesLogisticAppModel.swift | 141 + ...rtnersServiceabilityLogisticAppModel.swift | 134 + .../Logistic/ShipmentsLogisticAppModel.swift | 229 + .../StandardErrorLogisticAppModel.swift | 46 + ... => StoreItemResultLogisticAppModel.swift} | 4 +- .../StorePromiseLogisticAppModel.swift | 119 + ... TATArticlesDetailsLogisticAppModel.swift} | 10 +- ...> TATArticlesResultLogisticAppModel.swift} | 18 +- ... TATCategoryDetailsLogisticAppModel.swift} | 4 +- ...ATErrorSchemaResultLogisticAppModel.swift} | 4 +- .../TATFormattedResultLogisticAppModel.swift | 75 + ...ationDetailsDetailsLogisticAppModel.swift} | 10 +- ...cationDetailsResultLogisticAppModel.swift} | 10 +- ...=> TATPromiseResultLogisticAppModel.swift} | 14 +- ... TATTimestampResultLogisticAppModel.swift} | 4 +- ...t => TATViewDetailsLogisticAppModel.swift} | 10 +- ...ft => TATViewResultLogisticAppModel.swift} | 14 +- ...idateAddressDetailsLogisticAppModel.swift} | 4 +- .../ValidationErrorLogisticAppModel.swift | 61 + .../Models/Order/BagsOrderAppModel.swift | 24 +- .../ChargeAmountCurrencyOrderAppModel.swift | 61 + .../Order/ChargeAmountOrderAppModel.swift | 61 + ...ChargeDistributionLogicOrderAppModel.swift | 61 + ...hargeDistributionSchemaOrderAppModel.swift | 61 + ...rDetailsResponseSchemaOrderAppModel.swift} | 4 +- ...=> ErrorResponseSchemaOrderAppModel.swift} | 4 +- ... => OrderRequestSchemaOrderAppModel.swift} | 4 +- .../Order/OrderSchemaOrderAppModel.swift | 24 +- .../PriceAdjustmentChargeOrderAppModel.swift | 120 + ...ductsDataUpdatesFiltersOrderAppModel.swift | 24 +- ...CustomerResponseSchemaOrderAppModel.swift} | 4 +- ...onStatusResponseSchemaOrderAppModel.swift} | 10 +- .../ShipmentBagReasonsOrderAppModel.swift | 24 +- .../Models/Order/ShipmentsOrderAppModel.swift | 28 +- ...ShipmentsRequestSchemaOrderAppModel.swift} | 4 +- ...> StatuesRequestSchemaOrderAppModel.swift} | 10 +- ...usesBodyResponseSchemaOrderAppModel.swift} | 4 +- ...entStatusRequestSchemaOrderAppModel.swift} | 10 +- ...erifyOtpResponseSchemaOrderAppModel.swift} | 4 +- ...aymentGatewayDetailsPaymentAppModel.swift} | 4 +- ...eneficiaryDetailsOTPPaymentAppModel.swift} | 4 +- ...ddBeneficiaryDetailsPaymentAppModel.swift} | 4 +- ...pVerificationDetailsPaymentAppModel.swift} | 4 +- ...ryViaOtpVerificationPaymentAppModel.swift} | 4 +- ...regatorsConfigDetailPaymentAppModel.swift} | 4 +- ....swift => AttachCardPaymentAppModel.swift} | 4 +- ...> AttachCardsDetailsPaymentAppModel.swift} | 4 +- ...lOrResendPaymentLinkPaymentAppModel.swift} | 4 +- ...elPaymentLinkDetailsPaymentAppModel.swift} | 4 +- ...etailsFetchedDetailsPaymentAppModel.swift} | 4 +- ...hargeCustomerDetailsPaymentAppModel.swift} | 4 +- ...ft => ChargeCustomerPaymentAppModel.swift} | 4 +- ...> CheckCreditDetailsPaymentAppModel.swift} | 4 +- ...eateOrderUserDetailsPaymentAppModel.swift} | 4 +- ...t => CreateOrderUserPaymentAppModel.swift} | 36 +- ...tePaymentLinkDetailsPaymentAppModel.swift} | 4 +- ...=> CreatePaymentLinkPaymentAppModel.swift} | 50 +- ...CreditSummaryDetailsPaymentAppModel.swift} | 4 +- ...merOnboardingDetailsPaymentAppModel.swift} | 4 +- ...> CustomerOnboardingPaymentAppModel.swift} | 4 +- ....swift => DeleteCardPaymentAppModel.swift} | 4 +- ...> DeleteCardsDetailsPaymentAppModel.swift} | 4 +- ...RefundAccountDetailsPaymentAppModel.swift} | 4 +- ...aylaterBannerDetailsPaymentAppModel.swift} | 4 +- ...wift => ErrorDetailsPaymentAppModel.swift} | 4 +- ...etPaymentLinkDetailsPaymentAppModel.swift} | 4 +- ...HttpErrorCodeDetailsPaymentAppModel.swift} | 4 +- ...t => IfscCodeDetailsPaymentAppModel.swift} | 4 +- ... => ListCardsDetailsPaymentAppModel.swift} | 4 +- ...ciaryDetailsSchemaV2PaymentAppModel.swift} | 4 +- ...eficiaryFetchDetailsPaymentAppModel.swift} | 4 +- ...standingOrderDetailsPaymentAppModel.swift} | 4 +- ... => PaidOrderDetailsPaymentAppModel.swift} | 4 +- ...nitializationDetailsPaymentAppModel.swift} | 4 +- ...aymentInitializationPaymentAppModel.swift} | 4 +- ...mentModeRouteDetailsPaymentAppModel.swift} | 4 +- ... PaymentOrderDetailsPaymentAppModel.swift} | 4 +- ...wift => PaymentOrderPaymentAppModel.swift} | 4 +- ...tStatusUpdateDetailsPaymentAppModel.swift} | 4 +- ... PaymentStatusUpdatePaymentAppModel.swift} | 28 +- ...ngPaymentLinkDetailsPaymentAppModel.swift} | 4 +- ...tToAggregatorDetailsPaymentAppModel.swift} | 4 +- ...RefundAccountDetailsPaymentAppModel.swift} | 4 +- ... RefundOptionDetailsPaymentAppModel.swift} | 4 +- ...ferModeUpdateDetailsPaymentAppModel.swift} | 4 +- ...=> RenderHTMLDetailsPaymentAppModel.swift} | 4 +- ....swift => RenderHTMLPaymentAppModel.swift} | 4 +- ...CancelPaymentDetailsPaymentAppModel.swift} | 4 +- ...esendOrCancelPaymentPaymentAppModel.swift} | 4 +- ...ndPaymentLinkDetailsPaymentAppModel.swift} | 4 +- ... RupifiBannerDetailsPaymentAppModel.swift} | 4 +- ...dRefundOptionDetailsPaymentAppModel.swift} | 4 +- ...ltBeneficiaryDetailsPaymentAppModel.swift} | 4 +- ...etDefaultBeneficiaryPaymentAppModel.swift} | 4 +- ...hipmentRefundDetailsPaymentAppModel.swift} | 4 +- ...ft => ShipmentRefundPaymentAppModel.swift} | 4 +- ...sferModeFetchDetailsPaymentAppModel.swift} | 4 +- ...teRefundTransferModePaymentAppModel.swift} | 4 +- ...idateCustomerDetailsPaymentAppModel.swift} | 4 +- ... => ValidateCustomerPaymentAppModel.swift} | 4 +- ...> ValidateVPADetailsPaymentAppModel.swift} | 4 +- ...swift => ValidateVPAPaymentAppModel.swift} | 4 +- ...lidateAddressDetailsPaymentAppModel.swift} | 4 +- ...idateValidateAddressPaymentAppModel.swift} | 4 +- ... => WalletOtpDetailsPaymentAppModel.swift} | 4 +- ...l.swift => WalletOtpPaymentAppModel.swift} | 4 +- ...talogueOrderCreationRewardsAppModel.swift} | 4 +- ...atalogueOrderDetailsRewardsAppModel.swift} | 4 +- ...OrderDiscountDetailsRewardsAppModel.swift} | 4 +- ...ift => PointsDetailsRewardsAppModel.swift} | 4 +- ...PointsHistoryDetailsRewardsAppModel.swift} | 4 +- ...mReferralCodeDetailsRewardsAppModel.swift} | 4 +- ...> RedeemReferralCodeRewardsAppModel.swift} | 4 +- ...t => ReferralDetailsRewardsAppModel.swift} | 4 +- ...etrieveOrderDiscountRewardsAppModel.swift} | 4 +- ...lablePageSchemaSectionsThemeAppModel.swift | 54 +- ...swift => SectionAssetsThemeAppModel.swift} | 26 +- .../Theme/SectionSourceThemeAppModel.swift | 97 + ...swift => SendOtpSuccessUserAppModel.swift} | 4 +- ...pModel.swift => SendOtpUserAppModel.swift} | 4 +- ...=> UpdateUserAttributesUserAppModel.swift} | 4 +- ...ft => UserExistsDetailsUserAppModel.swift} | 4 +- ...=> ClickEventDetailsWebhookAppModel.swift} | 4 +- .../ClickEventPayloadWebhookAppModel.swift | 75 + .../ClickEventRequestWebhookAppModel.swift | 53 - .../Client/AuditTrailPlatformClient.swift | 169 +- .../Client/BillingPlatformClient.swift | 20 +- .../Client/CatalogPlatformClient.swift | 238 +- .../Client/CommonPlatformClient.swift | 4 +- .../Client/CompanyProfilePlatformClient.swift | 72 +- .../Client/ConfigurationPlatformClient.swift | 109 +- .../Client/ContentPlatformClient.swift | 309 +- .../Client/DiscountPlatformClient.swift | 26 +- .../Client/FileStoragePlatformClient.swift | 67 +- .../Client/FinancePlatformClient.swift | 1476 ---- .../platform/Client/LeadPlatformClient.swift | 4 +- .../platform/Client/OrderPlatformClient.swift | 551 +- .../Client/PaymentPlatformClient.swift | 48 +- .../Client/ServiceabilityPlatformClient.swift | 81 +- .../Client/WebhookPlatformClient.swift | 377 +- ...ecutionResultAnalyticsPlatformModel.swift} | 18 +- .../JobStatusAnalyticsPlatformModel.swift} | 44 +- ...equestSchemaAuditTrailPlatformModel.swift} | 4 +- ...reateLogRespAuditTrailPlatformModel.swift} | 4 +- .../DeviceInfoAuditTrailPlatformModel.swift | 85 - ...EntityTypeObjAuditTrailPlatformModel.swift | 85 - ...TypesResponseAuditTrailPlatformModel.swift | 62 - .../LocationAuditTrailPlatformModel.swift | 62 - .../LogDocsAuditTrailPlatformModel.swift | 269 - .../LogMetaObjAuditTrailPlatformModel.swift | 25 +- ...adRequestSchemaBillingPlatformModel.swift} | 4 +- .../ChargeLineItemBillingPlatformModel.swift | 6 +- ...ResponseSchemasBillingPlatformModel.swift} | 4 +- ...ateSubscriptionBillingPlatformModel.swift} | 4 +- ...bscriptionChargeBillingPlatformModel.swift | 6 +- ...ResourceNotFoundBillingPlatformModel.swift | 10 +- ...bandonedCartResultCartPlatformModel.swift} | 4 +- ...ActivePromosResultCartPlatformModel.swift} | 4 +- ...=> AddCartCreationCartPlatformModel.swift} | 4 +- ...ddCartDetailResultCartPlatformModel.swift} | 10 +- ...ApplyCouponDetailsCartPlatformModel.swift} | 4 +- ...ArticlePriceDetailsCartPlatformModel.swift | 85 + ...tCheckoutCustomMetaCartPlatformModel.swift | 71 + ...artCheckoutDetailsCartPlatformModel.swift} | 4 +- ...CartCheckoutResultCartPlatformModel.swift} | 94 +- ...liveryModesDetailsCartPlatformModel.swift} | 4 +- ...> CartDetailResultCartPlatformModel.swift} | 4 +- ...artItemCountResultCartPlatformModel.swift} | 4 +- ...=> CartMetaDetailsCartPlatformModel.swift} | 4 +- ...MetaMissingDetailsCartPlatformModel.swift} | 4 +- ... CartPaymentUpdateCartPlatformModel.swift} | 4 +- .../Cart/CouponAddCartPlatformModel.swift | 149 +- .../Cart/CouponAuthorCartPlatformModel.swift | 71 +- .../CouponCreateResultCartPlatformModel.swift | 108 + .../CouponDateMetaCartPlatformModel.swift | 71 +- .../CouponScheduleCartPlatformModel.swift | 25 +- .../Cart/CouponUpdateCartPlatformModel.swift | 168 +- .../CouponValidityCartPlatformModel.swift | 25 +- ...t => CouponsResultCartPlatformModel.swift} | 4 +- ...eleteAddressResultCartPlatformModel.swift} | 4 +- ...teCartDetailResultCartPlatformModel.swift} | 4 +- ... DeleteCartDetailsCartPlatformModel.swift} | 4 +- .../Cart/DiscountRuleCartPlatformModel.swift | 25 +- ...reeGiftItemCreationCartPlatformModel.swift | 87 + .../Cart/FreeGiftItemsCartPlatformModel.swift | 71 +- ...=> GetCouponResultCartPlatformModel.swift} | 4 +- ...ceAdjustmentResultCartPlatformModel.swift} | 4 +- ...reCartLinkCreationCartPlatformModel.swift} | 4 +- ...hareCartLinkResultCartPlatformModel.swift} | 4 +- ...=> ItemSizeMappingCartPlatformModel.swift} | 16 +- ...=> MultiCartResultCartPlatformModel.swift} | 4 +- ...iceabilityCreationCartPlatformModel.swift} | 4 +- ...rviceabilityResultCartPlatformModel.swift} | 4 +- ...nApiCheckoutResultCartPlatformModel.swift} | 4 +- ...OpenApiErrorResultCartPlatformModel.swift} | 4 +- ...artDetailsCreationCartPlatformModel.swift} | 4 +- ...iCartDetailsResultCartPlatformModel.swift} | 4 +- ...erationErrorResultCartPlatformModel.swift} | 4 +- ...rideCheckoutResultCartPlatformModel.swift} | 4 +- .../Cart/Ownership1CartPlatformModel.swift | 28 +- .../Cart/OwnershipCartPlatformModel.swift | 15 +- ...formAddCartDetailsCartPlatformModel.swift} | 4 +- ...ckoutDetailCreationCartPlatformModel.swift | 731 ++ ...utDetailV2CreationCartPlatformModel.swift} | 10 +- ...rmCartMetaCreationCartPlatformModel.swift} | 4 +- ...artShipmentsResultCartPlatformModel.swift} | 10 +- ...GetAddressesDetailsCartPlatformModel.swift | 85 + ...mSelectCartAddressCartPlatformModel.swift} | 4 +- ...ormShipmentDetailsCartPlatformModel.swift} | 4 +- ...mUpdateCartDetailsCartPlatformModel.swift} | 50 +- ...ceAdjustmentResultCartPlatformModel.swift} | 4 +- .../Cart/ProductActionCartPlatformModel.swift | 25 +- .../ProductActionPageCartPlatformModel.swift | 85 + ...ProductActionParamsCartPlatformModel.swift | 62 + .../PromotionActionCartPlatformModel.swift | 28 +- .../Cart/PromotionAddCartPlatformModel.swift | 54 +- .../PromotionAddResultCartPlatformModel.swift | 563 ++ .../PromotionAuthorCartPlatformModel.swift | 71 +- .../PromotionDateMetaCartPlatformModel.swift | 71 +- .../PromotionListItemCartPlatformModel.swift | 29 +- ...otionOffersDetailsCartPlatformModel.swift} | 4 +- ...omotionPaymentModesCartPlatformModel.swift | 15 +- ...ymentOffersDetailsCartPlatformModel.swift} | 4 +- .../PromotionScheduleCartPlatformModel.swift | 62 +- .../PromotionUpdateCartPlatformModel.swift | 77 +- ...omotionUpdateResultCartPlatformModel.swift | 586 ++ ...> PromotionsResultCartPlatformModel.swift} | 4 +- .../Cart/Restrictions1CartPlatformModel.swift | 19 +- .../Cart/RestrictionsCartPlatformModel.swift | 6 +- .../RuleDefinitionCartPlatformModel.swift | 54 +- ...SaveAddressDetailsCartPlatformModel.swift} | 4 +- ...> SharedCartResultCartPlatformModel.swift} | 4 +- ...ft => StoreDetailsCartPlatformModel.swift} | 4 +- ...dateAddressDetailsCartPlatformModel.swift} | 4 +- ...UpdateCartCreationCartPlatformModel.swift} | 26 +- ...teCartDetailResultCartPlatformModel.swift} | 10 +- ...rtShipmentCreationCartPlatformModel.swift} | 4 +- ...rCartMappingResultCartPlatformModel.swift} | 4 +- .../ValidationConfigCartPlatformModel.swift | 71 + .../ValidationErrorCartPlatformModel.swift | 71 + .../Cart/VisibilityCartPlatformModel.swift | 28 +- ...leRequestSchemaCatalogPlatformModel.swift} | 8 +- ...goryReturnConfigCatalogPlatformModel.swift | 12 +- ...gResponseSchemaCatalogPlatformModel.swift} | 20 +- ...gResponseSchemaCatalogPlatformModel.swift} | 8 +- ...istingItemSchemaCatalogPlatformModel.swift | 96 +- ...istingItemSchemaCatalogPlatformModel.swift | 12 +- ...gResponseSchemaCatalogPlatformModel.swift} | 8 +- ...gResponseSchemaCatalogPlatformModel.swift} | 20 +- ...onProductsSchemaCatalogPlatformModel.swift | 2578 ++++++ ...eResponseSchemaCatalogPlatformModel.swift} | 8 +- ...uteMasterSchemaCatalogPlatformModel.swift} | 8 +- ...goryReturnConfigCatalogPlatformModel.swift | 68 +- ...gResponseSchemaCatalogPlatformModel.swift} | 28 +- .../BrandItemCatalogPlatformModel.swift | 12 +- ...gResponseSchemaCatalogPlatformModel.swift} | 8 +- ...t => BrandMeta1CatalogPlatformModel.swift} | 8 +- ...tResponseSchemaCatalogPlatformModel.swift} | 8 +- ...nResponseSchemaCatalogPlatformModel.swift} | 8 +- ...ctRequestSchemaCatalogPlatformModel.swift} | 8 +- ...kResponseSchemaCatalogPlatformModel.swift} | 8 +- ...tResponseSchemaCatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- .../CategoryItemsCatalogPlatformModel.swift | 50 +- ...gResponseSchemaCatalogPlatformModel.swift} | 8 +- ...yResponseSchemaCatalogPlatformModel.swift} | 8 +- ...eResponseSchemaCatalogPlatformModel.swift} | 434 +- ...lResponseSchemaCatalogPlatformModel.swift} | 8 +- ...=> CompanyMeta1CatalogPlatformModel.swift} | 8 +- ...rResponseSchemaCatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- ...nResponseSchemaCatalogPlatformModel.swift} | 140 +- ...onRequestSchemaCatalogPlatformModel.swift} | 28 +- ...nResponseSchemaCatalogPlatformModel.swift} | 8 +- ...eAppReturnConfigCatalogPlatformModel.swift | 68 +- ...gResponseSchemaCatalogPlatformModel.swift} | 8 +- .../CustomMetaCatalogPlatformModel.swift | 134 + .../CustomOrderCatalogPlatformModel.swift | 74 +- ...eyRequestSchemaCatalogPlatformModel.swift} | 8 +- ...goryReturnConfigCatalogPlatformModel.swift | 68 +- ...eResponseSchemaCatalogPlatformModel.swift} | 8 +- ...nResponseSchemaCatalogPlatformModel.swift} | 8 +- ...rResponseSchemaCatalogPlatformModel.swift} | 8 +- ...rtmentIdentifierCatalogPlatformModel.swift | 50 +- ...tResponseSchemaCatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- ...ensionResponse1CatalogPlatformModel.swift} | 8 +- ...nResponseSchemaCatalogPlatformModel.swift} | 8 +- ...rResponseSchemaCatalogPlatformModel.swift} | 8 +- .../Catalog/FiltersCatalogPlatformModel.swift | 300 + ...etAddressSchemaCatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- ...gurationMetaDataCatalogPlatformModel.swift | 12 +- ...ectionDetailNestCatalogPlatformModel.swift | 434 +- ...lResponseSchemaCatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 20 +- ...gResponseSchemaCatalogPlatformModel.swift} | 8 +- ...nResponseSchemaCatalogPlatformModel.swift} | 20 +- ...etCompanySchemaCatalogPlatformModel.swift} | 20 +- ...aResponseSchemaCatalogPlatformModel.swift} | 8 +- ...gResponseSchemaCatalogPlatformModel.swift} | 8 +- .../GetDepartmentCatalogPlatformModel.swift | 20 +- .../GetInventoriesCatalogPlatformModel.swift | 100 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- ...tLocationSchemaCatalogPlatformModel.swift} | 60 +- ...eResponseSchemaCatalogPlatformModel.swift} | 8 +- ...gResponseSchemaCatalogPlatformModel.swift} | 20 +- ...eResponseSchemaCatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 20 +- ...sResponseSchemaCatalogPlatformModel.swift} | 20 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- ...nResponseSchemaCatalogPlatformModel.swift} | 28 +- ...lResponseSchemaCatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- ...ResponseSchemaV2CatalogPlatformModel.swift | 12 +- .../HsnUpsertCatalogPlatformModel.swift | 30 +- .../IdentifierCatalogPlatformModel.swift | 300 + ...lkRequestSchemaCatalogPlatformModel.swift} | 8 +- ...teRequestSchemaCatalogPlatformModel.swift} | 8 +- ...tResponseSchemaCatalogPlatformModel.swift} | 20 +- ...rtRequestSchemaCatalogPlatformModel.swift} | 8 +- ...tResponseSchemaCatalogPlatformModel.swift} | 20 +- ...lResponseSchemaCatalogPlatformModel.swift} | 8 +- ...ryRequestSchemaCatalogPlatformModel.swift} | 8 +- ...esponsePaginatedCatalogPlatformModel.swift | 12 +- ...yResponseSchemaCatalogPlatformModel.swift} | 8 +- ...esponsePaginatedCatalogPlatformModel.swift | 12 +- ...rResponseSchemaCatalogPlatformModel.swift} | 60 +- ...kResponseSchemaCatalogPlatformModel.swift} | 8 +- ...eResponseSchemaCatalogPlatformModel.swift} | 8 +- ...nResponseSchemaCatalogPlatformModel.swift} | 8 +- ...voiceCredSchemaCatalogPlatformModel.swift} | 8 +- ...ceDetailsSchemaCatalogPlatformModel.swift} | 28 +- ...onDayWiseSchemaCatalogPlatformModel.swift} | 28 +- ...nIntegrationTypeCatalogPlatformModel.swift | 50 +- ...cationListSchemaCatalogPlatformModel.swift | 162 + ...onListSerializerCatalogPlatformModel.swift | 162 - ...onManagerSchemaCatalogPlatformModel.swift} | 8 +- ...ionTimingSchemaCatalogPlatformModel.swift} | 8 +- ...cturerResponse1CatalogPlatformModel.swift} | 8 +- ...rResponseSchemaCatalogPlatformModel.swift} | 8 +- .../Catalog/MediaCatalogPlatformModel.swift | 96 +- ...aResponseSchemaCatalogPlatformModel.swift} | 8 +- ...rResponseSchemaCatalogPlatformModel.swift} | 20 +- ...gResponseSchemaCatalogPlatformModel.swift} | 28 +- ...aResponseSchemaCatalogPlatformModel.swift} | 8 +- ...tResponseSchemaCatalogPlatformModel.swift} | 20 +- .../ModifiedByCatalogPlatformModel.swift | 162 + ...CategoriesSchemaCatalogPlatformModel.swift | 300 + ...yResponseSchemaCatalogPlatformModel.swift} | 8 +- ...stRequestSchemaCatalogPlatformModel.swift} | 8 +- ...mResponseSchemaCatalogPlatformModel.swift} | 8 +- ...rResponseSchemaCatalogPlatformModel.swift} | 8 +- ...eResponseSchemaCatalogPlatformModel.swift} | 8 +- .../Catalog/Price1CatalogPlatformModel.swift | 12 +- ...sResponseSchemaCatalogPlatformModel.swift} | 20 +- ...sResponseSchemaCatalogPlatformModel.swift} | 20 +- ...tBulkRequestListCatalogPlatformModel.swift | 12 +- ...lkRequestSchemaCatalogPlatformModel.swift} | 8 +- ...leRequestSchemaCatalogPlatformModel.swift} | 8 +- ...teRequestSchemaCatalogPlatformModel.swift} | 8 +- .../Catalog/ProductCatalogPlatformModel.swift | 28 +- ...sResponseSchemaCatalogPlatformModel.swift} | 20 +- ...ductListingPriceCatalogPlatformModel.swift | 50 +- ...gResponseSchemaCatalogPlatformModel.swift} | 8 +- ...onfigBaseSchemaCatalogPlatformModel.swift} | 8 +- ...urnConfigSchemaCatalogPlatformModel.swift} | 8 +- .../ProductSchemaV2CatalogPlatformModel.swift | 28 +- ...aResponseSchemaCatalogPlatformModel.swift} | 8 +- ...eResponseSchemaCatalogPlatformModel.swift} | 20 +- ...wResponseSchemaCatalogPlatformModel.swift} | 8 +- ...eDownloadsExportCatalogPlatformModel.swift | 12 +- ...erRequestSchemaCatalogPlatformModel.swift} | 8 +- ...tResponseSchemaCatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- .../RawProductCatalogPlatformModel.swift | 28 +- ...gResponseSchemaCatalogPlatformModel.swift} | 8 +- ...gResponseSchemaCatalogPlatformModel.swift} | 8 +- ...yResponseSchemaCatalogPlatformModel.swift} | 8 +- ...tResponseSchemaCatalogPlatformModel.swift} | 8 +- ...eResponseSchemaCatalogPlatformModel.swift} | 8 +- ...nResponseSchemaCatalogPlatformModel.swift} | 8 +- ...uccessResponse1CatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- ...sResponseSchemaCatalogPlatformModel.swift} | 8 +- ...nResponseSchemaCatalogPlatformModel.swift} | 8 +- ...wift => Trader2CatalogPlatformModel.swift} | 8 +- ...inRequestSchemaCatalogPlatformModel.swift} | 8 +- ...nResponseSchemaCatalogPlatformModel.swift} | 140 +- ...onRequestSchemaCatalogPlatformModel.swift} | 28 +- ...gurationResponseCatalogPlatformModel.swift | 116 - ...onResponseSchemaCatalogPlatformModel.swift | 116 + ...t => UserSchemaCatalogPlatformModel.swift} | 8 +- ...UserSerializer1CatalogPlatformModel.swift} | 8 +- ...WeightResponse1CatalogPlatformModel.swift} | 8 +- ...tResponseSchemaCatalogPlatformModel.swift} | 8 +- ...onResponseSchemaCommonPlatformModel.swift} | 4 +- ...BadRequestSchemaCommonPlatformModel.swift} | 4 +- ...lesResultCommunicationPlatformModel.swift} | 8 +- ...nePayloadCommunicationPlatformModel.swift} | 8 +- ...ineResultCommunicationPlatformModel.swift} | 8 +- ...tePayloadCommunicationPlatformModel.swift} | 8 +- ...ateResultCommunicationPlatformModel.swift} | 8 +- ...lesResultCommunicationPlatformModel.swift} | 8 +- ...roviderReqCommunicationPlatformModel.swift | 96 +- ...obPayloadCommunicationPlatformModel.swift} | 8 +- ...JobResultCommunicationPlatformModel.swift} | 8 +- ...ssSchemaCompanyProfilePlatformModel.swift} | 4 +- ...erSchemaCompanyProfilePlatformModel.swift} | 4 +- ...onSchemaCompanyProfilePlatformModel.swift} | 10 +- ...stSchemaCompanyProfilePlatformModel.swift} | 10 +- ...stSchemaCompanyProfilePlatformModel.swift} | 4 +- ...ndSchemaCompanyProfilePlatformModel.swift} | 26 +- ...nySchemaCompanyProfilePlatformModel.swift} | 22 +- ...esSchemaCompanyProfilePlatformModel.swift} | 4 +- ...stSchemaCompanyProfilePlatformModel.swift} | 10 +- ...ssSchemaCompanyProfilePlatformModel.swift} | 4 +- ...seSchemaCompanyProfilePlatformModel.swift} | 4 +- ...ssSchemaCompanyProfilePlatformModel.swift} | 4 +- ...seSchemaCompanyProfilePlatformModel.swift} | 22 +- ...seSchemaCompanyProfilePlatformModel.swift} | 26 +- ...nySchemaCompanyProfilePlatformModel.swift} | 22 +- ...onSchemaCompanyProfilePlatformModel.swift} | 50 +- ...teSchemaCompanyProfilePlatformModel.swift} | 4 +- ...maSchemaCompanyProfilePlatformModel.swift} | 10 +- ...edSchemaCompanyProfilePlatformModel.swift} | 4 +- ...lsSchemaCompanyProfilePlatformModel.swift} | 14 +- ...seSchemaCompanyProfilePlatformModel.swift} | 14 +- ...stSchemaCompanyProfilePlatformModel.swift} | 10 +- ...erSchemaCompanyProfilePlatformModel.swift} | 4 +- ...onSchemaCompanyProfilePlatformModel.swift} | 34 +- ...ngSchemaCompanyProfilePlatformModel.swift} | 4 +- ...csSchemaCompanyProfilePlatformModel.swift} | 4 +- ...igSchemaCompanyProfilePlatformModel.swift} | 4 +- ...seSchemaCompanyProfilePlatformModel.swift} | 4 +- ...stSchemaCompanyProfilePlatformModel.swift} | 10 +- ...teCompanyCompanyProfilePlatformModel.swift | 6 +- ...erSchemaCompanyProfilePlatformModel.swift} | 4 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...estSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...tialUpdateConfigurationPlatformModel.swift | 50 +- ...nInventoryConfigurationPlatformModel.swift | 50 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...estSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...estSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...changeItemConfigurationPlatformModel.swift | 326 + ...ResponseV2ConfigurationPlatformModel.swift | 230 + ...estSchemaConfigurationPlatformModel.swift} | 8 +- ...estSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...estSchemaConfigurationPlatformModel.swift} | 32 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...estSchemaConfigurationPlatformModel.swift} | 8 +- ...tificationConfigurationPlatformModel.swift | 116 + ...estSchemaConfigurationPlatformModel.swift} | 8 +- ...estSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...estSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...uggestionsConfigurationPlatformModel.swift | 162 + ...archConfigConfigurationPlatformModel.swift | 162 + ...estSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ...estSchemaConfigurationPlatformModel.swift} | 8 +- ...ationErrorConfigurationPlatformModel.swift | 134 + ...tionErrorsConfigurationPlatformModel.swift | 102 + ...nseSchemaConfigurationPlatformModel.swift} | 8 +- ... BlogGetDetailsContentPlatformModel.swift} | 8 +- ... => BlogPayloadContentPlatformModel.swift} | 8 +- ...omFieldBulkEntryContentPlatformModel.swift | 162 + .../CustomFieldContentPlatformModel.swift | 70 +- ...nDetailResSchemaContentPlatformModel.swift | 166 +- ...ionRequestSchemaContentPlatformModel.swift | 70 +- ...ustomFieldSchemaContentPlatformModel.swift | 186 +- ...mFieldTypeSchemaContentPlatformModel.swift | 96 +- ...eldsDeleteSchemaContentPlatformModel.swift | 162 + ...mObjectBulkEntryContentPlatformModel.swift | 12 +- ...ectBySlugSchemaContentPlatformModel.swift} | 124 +- ...FieldDefinitionsContentPlatformModel.swift | 24 +- ...ionRequestSchemaContentPlatformModel.swift | 50 +- ...itionSlugSchemaContentPlatformModel.swift} | 164 +- ...ateRequestSchemaContentPlatformModel.swift | 50 +- ...lkUploadDetailsContentPlatformModel.swift} | 8 +- ...ustomObjectEntryContentPlatformModel.swift | 8 +- ...EntryFieldSchemaContentPlatformModel.swift | 44 +- ...SchemaWithoutIDContentPlatformModel.swift} | 48 +- ...FieldDefinitionContentPlatformModel.swift} | 84 +- ...DefinitionModelContentPlatformModel.swift} | 16 +- ...ctListItemSchemaContentPlatformModel.swift | 56 +- ...ectRequestSchemaContentPlatformModel.swift | 24 +- ...tSchemaWithoutIdContentPlatformModel.swift | 162 + ...stomObjectSchemaContentPlatformModel.swift | 186 +- ...vigationDetailsContentPlatformModel.swift} | 8 +- .../DurationContentPlatformModel.swift | 300 + ...DefinitionSchemaContentPlatformModel.swift | 258 +- .../Content/HTMLContentPlatformModel.swift | 254 + ...ft => JobSchemaContentPlatformModel.swift} | 154 +- ...gPageGetDetailsContentPlatformModel.swift} | 8 +- ...DetailResSchemaContentPlatformModel.swift} | 204 +- ...fieldTypesSchemaContentPlatformModel.swift | 116 + ...ationGetDetailsContentPlatformModel.swift} | 8 +- ...vigationPayloadContentPlatformModel.swift} | 8 +- ... PageGetDetailsContentPlatformModel.swift} | 8 +- ... => PagePayloadContentPlatformModel.swift} | 8 +- ...ePublishPayloadContentPlatformModel.swift} | 8 +- ...eshowGetDetailsContentPlatformModel.swift} | 8 +- ...lideshowPayloadContentPlatformModel.swift} | 8 +- ...eSuccessDetailsContentPlatformModel.swift} | 8 +- .../ValidationErrorContentPlatformModel.swift | 134 + ...ResponseSchemaDiscountPlatformModel.swift} | 4 +- ...bRequestSchemaDiscountPlatformModel.swift} | 4 +- ...ResponseSchemaDiscountPlatformModel.swift} | 4 +- ...eateTemplateFileStoragePlatformModel.swift | 212 + ...teMapperByIdFileStoragePlatformModel.swift | 162 + ...TemplateDataFileStoragePlatformModel.swift | 12 +- ...FilesResultFileStoragePlatformModel.swift} | 8 +- ...oadCompleteFileStoragePlatformModel.swift} | 8 +- ... FileUploadFileStoragePlatformModel.swift} | 44 +- ...UploadStartFileStoragePlatformModel.swift} | 8 +- ...ceTypesDataFileStoragePlatformModel.swift} | 44 +- ...nvoiceTypesFileStoragePlatformModel.swift} | 20 +- ...apperDetailsFileStoragePlatformModel.swift | 300 + .../ParamsFileStoragePlatformModel.swift | 116 - .../PdfConfigFileStoragePlatformModel.swift | 96 +- ...gurationDataFileStoragePlatformModel.swift | 346 + ...temsDetailsFileStoragePlatformModel.swift} | 8 +- ...TemplateByIdFileStoragePlatformModel.swift | 346 + ...loadDetailsFileStoragePlatformModel.swift} | 104 +- ...eSuccessDataFileStoragePlatformModel.swift | 346 + ...reateSuccessFileStoragePlatformModel.swift | 208 + ...eByIdDetailsFileStoragePlatformModel.swift | 438 + ...yFileAccessFileStoragePlatformModel.swift} | 8 +- ... => SignUrlFileStoragePlatformModel.swift} | 8 +- ...gnUrlResultFileStoragePlatformModel.swift} | 8 +- ...pdatePdfTypeFileStoragePlatformModel.swift | 392 + ...dateTemplateFileStoragePlatformModel.swift | 300 + ...TemplateByIdFileStoragePlatformModel.swift | 162 + ...vePdfPayloadFileStoragePlatformModel.swift | 208 + ...playNameResponseFinancePlatformModel.swift | 85 - .../CnDetailsFinancePlatformModel.swift | 246 - ...ateReportFiltersFinancePlatformModel.swift | 200 - ...CnGenerateReportFinancePlatformModel.swift | 269 - ...nReferenceNumberFinancePlatformModel.swift | 62 - ...CreditNoteConfigFinancePlatformModel.swift | 269 - ...ditNoteConfigReqFinancePlatformModel.swift | 62 - ...teConfigResponseFinancePlatformModel.swift | 85 - ...tificationEventsFinancePlatformModel.swift | 62 - ...reditNoteDetailsFinancePlatformModel.swift | 269 - ...itNoteDetailsReqFinancePlatformModel.swift | 62 - ...eDetailsResponseFinancePlatformModel.swift | 85 - ...eDataPlatformReqFinancePlatformModel.swift | 62 - ...PlatformResponseFinancePlatformModel.swift | 200 - .../DeleteConfigFinancePlatformModel.swift | 108 - .../DeleteConfigReqFinancePlatformModel.swift | 62 - ...teConfigResponseFinancePlatformModel.swift | 85 - ...dCreditDebitNoteFinancePlatformModel.swift | 62 - ...editDebitNoteReqFinancePlatformModel.swift | 62 - ...NoteResponseDataFinancePlatformModel.swift | 85 - ...ebitNoteResponseFinancePlatformModel.swift | 85 - ...ortCustomerCnReqFinancePlatformModel.swift | 62 - ...stomerCnResponseFinancePlatformModel.swift | 108 - ...wnloadReportDataFinancePlatformModel.swift | 131 - .../DownloadReportFinancePlatformModel.swift | 62 - ...wnloadReportListFinancePlatformModel.swift | 108 - .../Finance/ErrorFinancePlatformModel.swift | 269 - ...ortCustomerCnReqFinancePlatformModel.swift | 62 - ...erCnResponseDataFinancePlatformModel.swift | 292 - ...stomerCnResponseFinancePlatformModel.swift | 62 - ...ateReportFiltersFinancePlatformModel.swift | 108 - ...nerateReportJsonFinancePlatformModel.swift | 200 - ...nerateReportMetaFinancePlatformModel.swift | 108 - ...teReportPlatformFinancePlatformModel.swift | 154 - ...enerateReportReqFinancePlatformModel.swift | 62 - .../GetAffiliateFinancePlatformModel.swift | 62 - ...ffiliateResponseFinancePlatformModel.swift | 108 - .../GetCnConfigReqFinancePlatformModel.swift | 62 - ...nfigResponseDataFinancePlatformModel.swift | 223 - ...CnConfigResponseFinancePlatformModel.swift | 85 - ...nfigResponseMetaFinancePlatformModel.swift | 85 - ...merCreditBalanceFinancePlatformModel.swift | 108 - ...CreditBalanceReqFinancePlatformModel.swift | 62 - ...anceResponseDataFinancePlatformModel.swift | 85 - ...tBalanceResponseFinancePlatformModel.swift | 85 - ...GetEngineFiltersFinancePlatformModel.swift | 131 - .../GetEngineReqFinancePlatformModel.swift | 62 - ...GetPdfUrlViewReqFinancePlatformModel.swift | 62 - ...ViewResponseDataFinancePlatformModel.swift | 85 - ...fUrlViewResponseFinancePlatformModel.swift | 85 - .../GetReasonFinancePlatformModel.swift | 62 - ...etReasonResponseFinancePlatformModel.swift | 131 - ...etReportListDataFinancePlatformModel.swift | 85 - ...GetReportListReqFinancePlatformModel.swift | 62 - ...portListResponseFinancePlatformModel.swift | 131 - ...ingFiltersReasonFinancePlatformModel.swift | 131 - ...ersReasonOptionsFinancePlatformModel.swift | 108 - ...gFiltersResponseFinancePlatformModel.swift | 131 - ...yloadDataFiltersFinancePlatformModel.swift | 108 - ...ActivityLogErrorFinancePlatformModel.swift | 62 - ...LogsResponseDataFinancePlatformModel.swift | 177 - ...vityLogsResponseFinancePlatformModel.swift | 62 - ...voiceBillingItemFinancePlatformModel.swift | 85 - ...nvoiceListingReqFinancePlatformModel.swift | 62 - ...eListingResponseFinancePlatformModel.swift | 177 - ...ingResponseItemsFinancePlatformModel.swift | 292 - ...ailsResponseDataFinancePlatformModel.swift | 85 - ...tDetailsResponseFinancePlatformModel.swift | 131 - ...tionsPayloadDataFinancePlatformModel.swift | 62 - ...aymentOptionsReqFinancePlatformModel.swift | 62 - ...ionsResponseDataFinancePlatformModel.swift | 200 - ...eDeductedAmountsFinancePlatformModel.swift | 154 - ...tOptionsResponseFinancePlatformModel.swift | 154 - ...sePayableAmountsFinancePlatformModel.swift | 108 - ...cePdfPayloadDataFinancePlatformModel.swift | 62 - .../InvoicePdfReqFinancePlatformModel.swift | 62 - ...eTypePayloadDataFinancePlatformModel.swift | 62 - .../InvoiceTypeReqFinancePlatformModel.swift | 62 - ...oiceTypeResponseFinancePlatformModel.swift | 108 - ...RefundMethodDataFinancePlatformModel.swift | 108 - ...nRefundMethodReqFinancePlatformModel.swift | 62 - ...thodResponseDataFinancePlatformModel.swift | 62 - ...ndMethodResponseFinancePlatformModel.swift | 85 - ...reditlinePayloadFinancePlatformModel.swift | 62 - ...tlinePlatformReqFinancePlatformModel.swift | 62 - ...PlatformResponseFinancePlatformModel.swift | 85 - ...erFreezeResponseFinancePlatformModel.swift | 108 - ...icePaymentDetailFinancePlatformModel.swift | 108 - ...ntProcessPayloadFinancePlatformModel.swift | 269 - ...aymentProcessReqFinancePlatformModel.swift | 62 - ...tProcessResponseFinancePlatformModel.swift | 154 - ...edemptionDetailsFinancePlatformModel.swift | 246 - .../ReportItemFinancePlatformModel.swift | 200 - ...ockCreditNoteReqFinancePlatformModel.swift | 62 - ...tNoteRequestDataFinancePlatformModel.swift | 131 - ...NoteResponseDataFinancePlatformModel.swift | 85 - ...editNoteResponseFinancePlatformModel.swift | 85 - ...InvoiceDataItemsFinancePlatformModel.swift | 108 - ...neralConfigDetailsLeadPlatformModel.swift} | 8 +- ...ActionDetailSchemaOrderPlatformModel.swift | 212 + ....swift => AddressOrderPlatformModel.swift} | 8 +- ...liateAppConfigMetaOrderPlatformModel.swift | 134 + ...AffiliateAppConfigOrderPlatformModel.swift | 386 + .../AffiliateBagOrderPlatformModel.swift | 820 ++ .../AffiliateConfigOrderPlatformModel.swift | 96 +- ...leAssignmentConfigOrderPlatformModel.swift | 116 + ...ateInventoryConfigOrderPlatformModel.swift | 300 + ...oryLogisticsConfigOrderPlatformModel.swift | 116 + ...ventoryOrderConfigOrderPlatformModel.swift | 116 + ...ntoryPaymentConfigOrderPlatformModel.swift | 162 + ...ventoryStoreConfigOrderPlatformModel.swift | 116 + .../Order/AffiliateOrderPlatformModel.swift | 180 + ...iateStoreIdMappingOrderPlatformModel.swift | 134 + ...tesResponseSchemaOrderPlatformModel.swift} | 8 +- ...entResponseSchemaOrderPlatformModel.swift} | 8 +- ...ntsResponseSchemaOrderPlatformModel.swift} | 40 +- ...ppliedFreeArticlesOrderPlatformModel.swift | 254 + .../AppliedPromosOrderPlatformModel.swift | 50 +- .../ArticleDetailsOrderPlatformModel.swift | 294 + .../Order/ArticleOrderPlatformModel.swift | 24 +- ...serResponseSchemaOrderPlatformModel.swift} | 8 +- .../Order/BagDetailsOrderPlatformModel.swift | 66 +- ...ormResponseSchemaOrderPlatformModel.swift} | 8 +- .../Order/BagUnitOrderPlatformModel.swift | 50 +- ...aseResponseSchemaOrderPlatformModel.swift} | 8 +- .../BillingInfoOrderPlatformModel.swift} | 552 +- ...kActionListingDataOrderPlatformModel.swift | 372 +- ...ateResponseSchemaOrderPlatformModel.swift} | 8 +- ...ledResponseSchemaOrderPlatformModel.swift} | 8 +- ...ingResponseSchemaOrderPlatformModel.swift} | 8 +- ...loadRequestSchemaOrderPlatformModel.swift} | 20 +- ...oadResponseSchemaOrderPlatformModel.swift} | 8 +- ...ionResponseSchemaOrderPlatformModel.swift} | 8 +- ...argeAmountCurrencyOrderPlatformModel.swift | 134 + .../ChargeAmountOrderPlatformModel.swift | 134 + ...eDistributionLogicOrderPlatformModel.swift | 134 + ...DistributionSchemaOrderPlatformModel.swift | 134 + .../Order/ChargeOrderPlatformModel.swift | 12 +- ...eckResponseSchemaOrderPlatformModel.swift} | 8 +- ...CallResponseSchemaOrderPlatformModel.swift | 134 + .../Order/ConditionsOrderPlatformModel.swift | 162 + ...tedResponseSchemaOrderPlatformModel.swift} | 8 +- ...ingResponseSchemaOrderPlatformModel.swift} | 8 +- ...eChannelConfigDataOrderPlatformModel.swift | 116 + ...reateChannelConfigOrderPlatformModel.swift | 346 + ...nfigResponseSchemaOrderPlatformModel.swift | 208 + ...rrorResponseSchemaOrderPlatformModel.swift | 116 + ...ChannelPaymentInfoOrderPlatformModel.swift | 208 + .../CreateOrderAPIOrderPlatformModel.swift | 158 +- .../CreateOrderConfigOrderPlatformModel.swift | 86 +- ...eOrderErrorReponseOrderPlatformModel.swift | 240 +- ...derResponseSchemaOrderPlatformModel.swift} | 8 +- .../CreditBalanceInfoOrderPlatformModel.swift | 208 + .../Order/DataUpdatesOrderPlatformModel.swift | 50 +- .../Order/DimensionOrderPlatformModel.swift | 20 +- .../Order/DocumentOrderPlatformModel.swift | 24 +- ...rorResponseSchemaOrderPlatformModel.swift} | 8 +- ...tryResponseSchemaOrderPlatformModel.swift} | 8 +- ...swift => EntitiesOrderPlatformModel.swift} | 8 +- ...rorResponseSchemaOrderPlatformModel.swift} | 8 +- ...anceRequestPayloadOrderPlatformModel.swift | 166 + ...nceResponsePayloadOrderPlatformModel.swift | 134 + ...ileResponseSchemaOrderPlatformModel.swift} | 8 +- ...ltersRequestSchemaOrderPlatformModel.swift | 322 + ...ersResponseSchemaOrderPlatformModel.swift} | 8 +- .../Order/FlagDataOrderPlatformModel.swift | 50 +- .../FreeGiftItemsOrderPlatformModel.swift | 346 + .../FyndOrderIdListOrderPlatformModel.swift | 142 +- ...rorResponseSchemaOrderPlatformModel.swift} | 8 +- ...eIDResponseSchemaOrderPlatformModel.swift} | 8 +- ...iptResponseSchemaOrderPlatformModel.swift} | 8 +- .../GeoLocationSchemaOrderPlatformModel.swift | 162 - ...onsResponseSchemaOrderPlatformModel.swift} | 8 +- ...ormResponseSchemaOrderPlatformModel.swift} | 8 +- .../Order/HistoryDictOrderPlatformModel.swift | 70 +- .../Order/HistoryMetaOrderPlatformModel.swift | 234 +- ...tedResponseSchemaOrderPlatformModel.swift} | 8 +- ...cheResponseSchemaOrderPlatformModel.swift} | 20 +- ... ItemPriceDetailsOrderPlatformModel.swift} | 72 +- ...ilsResponseSchemaOrderPlatformModel.swift} | 8 +- ...ledResponseSchemaOrderPlatformModel.swift} | 8 +- ...figResponseSchemaOrderPlatformModel.swift} | 8 +- .../LocationDetailsOrderPlatformModel.swift | 166 + ... LockStateMessageOrderPlatformModel.swift} | 32 +- ...ersResponseSchemaOrderPlatformModel.swift} | 8 +- ...estResponseSchemaOrderPlatformModel.swift} | 8 +- ...estShipmentListingOrderPlatformModel.swift | 62 +- .../MarketPlacePdfOrderPlatformModel.swift | 162 + .../Order/OrderBagsOrderPlatformModel.swift | 104 +- .../Order/OrderConfigOrderPlatformModel.swift | 318 + .../Order/OrderDataOrderPlatformModel.swift | 96 +- .../OrderDataUpdatesOrderPlatformModel.swift | 116 + .../OrderDetailsOrderPlatformModel.swift | 50 +- ...ilsResponseSchemaOrderPlatformModel.swift} | 8 +- .../Order/OrderInfoOrderPlatformModel.swift | 620 ++ ...ingResponseSchemaOrderPlatformModel.swift} | 8 +- .../OrderPriorityOrderPlatformModel.swift | 208 + .../Order/OrderStatusOrderPlatformModel.swift | 100 +- .../Order/OrderUserOrderPlatformModel.swift | 450 + ...ringCurrencyPricesOrderPlatformModel.swift | 1082 +++ .../Order/PaymentInfoOrderPlatformModel.swift | 50 +- ...mentMetaDataSchemaOrderPlatformModel.swift | 208 + ...tMetaLogoURLSchemaOrderPlatformModel.swift | 134 + ...aymentMethodSchemaOrderPlatformModel.swift | 404 + .../PaymentMethodsOrderPlatformModel.swift | 208 + ...PlatformOrderItemsOrderPlatformModel.swift | 96 +- .../PlatformShipmentOrderPlatformModel.swift | 212 +- ...onsResponseSchemaOrderPlatformModel.swift} | 8 +- ...ceAdjustmentChargeOrderPlatformModel.swift | 258 + ...ft => PriceMinMaxOrderPlatformModel.swift} | 52 +- ...ProcessAfterConfigOrderPlatformModel.swift | 162 + ...ItemResponseSchemaOrderPlatformModel.swift | 116 + ...> ProcessManifestOrderPlatformModel.swift} | 116 +- ...ifestRequestSchemaOrderPlatformModel.swift | 254 + ...estResponseSchemaOrderPlatformModel.swift} | 283 +- .../ProductSchemaOrderPlatformModel.swift | 134 + ...DataUpdatesFiltersOrderPlatformModel.swift | 50 +- .../QuestionSetItemOrderPlatformModel.swift | 134 + .../Order/RMAPageInfoOrderPlatformModel.swift | 346 + .../Order/ReasonOrderPlatformModel.swift | 196 +- .../RefundInformationOrderPlatformModel.swift | 254 + ...nfigRequestPayloadOrderPlatformModel.swift | 12 +- ...figResponsePayloadOrderPlatformModel.swift | 96 +- .../RefundModeInfoOrderPlatformModel.swift | 50 +- .../ResponseDetailOrderPlatformModel.swift | 58 +- ...ift => RuleActionOrderPlatformModel.swift} | 32 +- .../Order/RuleErrorOrderPlatformModel.swift | 166 + ...rorResponseSchemaOrderPlatformModel.swift} | 8 +- .../Order/RuleItemOrderPlatformModel.swift | 422 + ...eListRequestSchemaOrderPlatformModel.swift | 300 + ...ListResponseSchemaOrderPlatformModel.swift | 254 + .../SendSmsPayloadOrderPlatformModel.swift | 12 +- ...dSmsResponseSchemaOrderPlatformModel.swift | 134 + .../SendUserMobileOTPOrderPlatformModel.swift | 12 +- ...OtpResponseSchemaOrderPlatformModel.swift} | 58 +- ...ShipmentActionInfoOrderPlatformModel.swift | 12 +- ...ShipmentBagReasonsOrderPlatformModel.swift | 50 +- .../ShipmentConfigOrderPlatformModel.swift | 340 + .../ShipmentDataOrderPlatformModel.swift | 102 + .../ShipmentDetailsOrderPlatformModel.swift | 224 +- ...oryResponseSchemaOrderPlatformModel.swift} | 8 +- ...nfoResponseSchemaOrderPlatformModel.swift} | 8 +- ...iewResponseSchemaOrderPlatformModel.swift} | 8 +- .../ShipmentItemOrderPlatformModel.swift | 288 +- .../Order/ShipmentOrderPlatformModel.swift | 212 +- ...onsResponseSchemaOrderPlatformModel.swift} | 8 +- ...entsRequestSchemaOrderPlatformModel.swift} | 8 +- ...ntsResponseSchemaOrderPlatformModel.swift} | 8 +- .../ShippingInfoOrderPlatformModel.swift | 12 +- .../SmsDataPayloadOrderPlatformModel.swift | 28 +- ...tuesRequestSchemaOrderPlatformModel.swift} | 20 +- ...uesResponseSchemaOrderPlatformModel.swift} | 20 +- ...ignResponseSchemaOrderPlatformModel.swift} | 8 +- ...essResponseSchemaOrderPlatformModel.swift} | 8 +- .../SystemMessagesOrderPlatformModel.swift | 212 + .../Models/Order/TagOrderPlatformModel.swift | 162 + ...oadResponseSchemaOrderPlatformModel.swift} | 8 +- ...AddressRequestBodyOrderPlatformModel.swift | 208 + ...onsResponseSchemaOrderPlatformModel.swift} | 8 +- ...ckingErrorResponseOrderPlatformModel.swift | 162 - ...hipmentLockPayloadOrderPlatformModel.swift | 12 +- ...ockResponseSchemaOrderPlatformModel.swift} | 20 +- ...hipmentPaymentModeOrderPlatformModel.swift | 194 + ...tatusRequestSchemaOrderPlatformModel.swift | 12 +- ...StatusResponseBodyOrderPlatformModel.swift | 12 +- ...datedAddressSchemaOrderPlatformModel.swift | 668 ++ ... => UploadConsentOrderPlatformModel.swift} | 8 +- .../Order/UserDataOrderPlatformModel.swift | 162 + .../ValidationErrorOrderPlatformModel.swift | 134 + ...OtpResponseSchemaOrderPlatformModel.swift} | 8 +- ...oxyPathCreationPartnerPlatformModel.swift} | 4 +- ...ProxyPathDeletePartnerPlatformModel.swift} | 4 +- ...ailsOTPCreationPaymentPlatformModel.swift} | 8 +- ...rVersionDetailsPaymentPlatformModel.swift} | 8 +- ...esLimitsDetailsPaymentPlatformModel.swift} | 8 +- ...entLinkCreationPaymentPlatformModel.swift} | 8 +- ...mentLinkDetailsPaymentPlatformModel.swift} | 8 +- ... => CartDetailsPaymentPlatformModel.swift} | 8 +- ...entLinkCreationPaymentPlatformModel.swift} | 104 +- ...mentLinkDetailsPaymentPlatformModel.swift} | 8 +- ...tePayoutDetailsPaymentPlatformModel.swift} | 8 +- ...ntMethodDetailsPaymentPlatformModel.swift} | 8 +- ... EdcAddCreationPaymentPlatformModel.swift} | 8 +- ...odelListDetailsPaymentPlatformModel.swift} | 8 +- ...eviceAddDetailsPaymentPlatformModel.swift} | 8 +- ...dcDeviceDetailsPaymentPlatformModel.swift} | 8 +- ...viceListDetailsPaymentPlatformModel.swift} | 8 +- ...iceStatsDetailsPaymentPlatformModel.swift} | 8 +- ...ceUpdateDetailsPaymentPlatformModel.swift} | 8 +- ...ft => EdcUpdatePaymentPlatformModel.swift} | 8 +- ...=> ErrorDetailsPaymentPlatformModel.swift} | 8 +- ...OauthUrlDetailsPaymentPlatformModel.swift} | 8 +- ...mentCodeDetailsPaymentPlatformModel.swift} | 8 +- ...mentLinkDetailsPaymentPlatformModel.swift} | 8 +- ...CODLimitDetailsPaymentPlatformModel.swift} | 8 +- ...ttpErrorDetailsPaymentPlatformModel.swift} | 8 +- ...IfscCodeDetailsPaymentPlatformModel.swift} | 8 +- ...oardingCreationPaymentPlatformModel.swift} | 8 +- ...BoardingDetailsPaymentPlatformModel.swift} | 8 +- ...entModeCreationPaymentPlatformModel.swift} | 8 +- ...entModeCreationPaymentPlatformModel.swift} | 8 +- ...aryFetchResultsPaymentPlatformModel.swift} | 8 +- ...gregatorControlPaymentPlatformModel.swift} | 8 +- ...rmationCreationPaymentPlatformModel.swift} | 8 +- ...irmationDetailsPaymentPlatformModel.swift} | 8 +- ... PaymentDetailsPaymentPlatformModel.swift} | 8 +- ...yConfigCreationPaymentPlatformModel.swift} | 8 +- ...ayConfigDetailsPaymentPlatformModel.swift} | 8 +- ...izationCreationPaymentPlatformModel.swift} | 8 +- ...lizationDetailsPaymentPlatformModel.swift} | 8 +- ...odeRouteDetailsPaymentPlatformModel.swift} | 8 +- ...ymentObjectListPaymentPlatformModel.swift} | 8 +- ...tOptionsDetailsPaymentPlatformModel.swift} | 8 +- ...ntOrderCreationPaymentPlatformModel.swift} | 8 +- ...entOrderDetailsPaymentPlatformModel.swift} | 8 +- ...SessionCreationPaymentPlatformModel.swift} | 8 +- ...ionFetchDetailsPaymentPlatformModel.swift} | 28 +- ...ssionPutDetailsPaymentPlatformModel.swift} | 8 +- ...HandlerCreationPaymentPlatformModel.swift} | 8 +- ...kHandlerDetailsPaymentPlatformModel.swift} | 8 +- ...mentStatusObjectPaymentPlatformModel.swift | 12 +- ...sUpdateCreationPaymentPlatformModel.swift} | 8 +- ...usUpdateDetailsPaymentPlatformModel.swift} | 8 +- ... PayoutCreationPaymentPlatformModel.swift} | 8 +- ...> PayoutDetailsPaymentPlatformModel.swift} | 8 +- ... PayoutsDetailsPaymentPlatformModel.swift} | 8 +- ...yConfigCreationPaymentPlatformModel.swift} | 8 +- ...mentModeDetailsPaymentPlatformModel.swift} | 8 +- ...mentLinkDetailsPaymentPlatformModel.swift} | 8 +- .../ProductCODDataPaymentPlatformModel.swift | 12 +- ...dAccountDetailsPaymentPlatformModel.swift} | 8 +- ...> RefundDetailsPaymentPlatformModel.swift} | 8 +- ...riorityCreationPaymentPlatformModel.swift} | 8 +- ...PriorityDetailsPaymentPlatformModel.swift} | 8 +- ...SessionCreationPaymentPlatformModel.swift} | 8 +- ...dSessionDetailsPaymentPlatformModel.swift} | 8 +- ...epaymentDetailsPaymentPlatformModel.swift} | 8 +- ...PaymentCreationPaymentPlatformModel.swift} | 8 +- ...lPaymentDetailsPaymentPlatformModel.swift} | 8 +- ...mentLinkDetailsPaymentPlatformModel.swift} | 8 +- ...pIntentCreationPaymentPlatformModel.swift} | 8 +- ...upIntentDetailsPaymentPlatformModel.swift} | 8 +- ...ForUserCreationPaymentPlatformModel.swift} | 8 +- ...ODOptionDetailsPaymentPlatformModel.swift} | 8 +- ...onConfigDetailsPaymentPlatformModel.swift} | 8 +- ...ntMethodDetailsPaymentPlatformModel.swift} | 8 +- ...ePayoutCreationPaymentPlatformModel.swift} | 8 +- ...tePayoutDetailsPaymentPlatformModel.swift} | 8 +- ...ustomerCreationPaymentPlatformModel.swift} | 8 +- ...CustomerDetailsPaymentPlatformModel.swift} | 8 +- ...=> ListGiveawayRewardsPlatformModel.swift} | 4 +- ...etConfigurationRewardsPlatformModel.swift} | 4 +- ...ssResultServiceabilityPlatformModel.swift} | 8 +- ...igResultServiceabilityPlatformModel.swift} | 20 +- ...hipConfigServiceabilityPlatformModel.swift | 12 +- ...igResultServiceabilityPlatformModel.swift} | 20 +- ...bDetailsServiceabilityPlatformModel.swift} | 8 +- ...ItemDataServiceabilityPlatformModel.swift} | 8 +- ...onResultServiceabilityPlatformModel.swift} | 20 +- ...stResultServiceabilityPlatformModel.swift} | 20 +- ...w_ResultServiceabilityPlatformModel.swift} | 8 +- ...erResultServiceabilityPlatformModel.swift} | 8 +- ...ailsBodyServiceabilityPlatformModel.swift} | 8 +- ...ntResultServiceabilityPlatformModel.swift} | 8 +- ...reResultServiceabilityPlatformModel.swift} | 20 +- ...erPromiseServiceabilityPlatformModel.swift | 134 + ...stResultServiceabilityPlatformModel.swift} | 8 +- ...leResultServiceabilityPlatformModel.swift} | 20 +- ...stResultServiceabilityPlatformModel.swift} | 20 +- ...rPartnersServiceabilityPlatformModel.swift | 254 + ...lsSchemaServiceabilityPlatformModel.swift} | 8 +- ...ByResultServiceabilityPlatformModel.swift} | 8 +- ...tsResultServiceabilityPlatformModel.swift} | 8 +- ...ceResultServiceabilityPlatformModel.swift} | 8 +- ..._DetailsServiceabilityPlatformModel.swift} | 8 +- ...w_ResultServiceabilityPlatformModel.swift} | 8 +- ...orResultServiceabilityPlatformModel.swift} | 8 +- ...llResultServiceabilityPlatformModel.swift} | 8 +- ...reResultServiceabilityPlatformModel.swift} | 20 +- ...ewResultServiceabilityPlatformModel.swift} | 8 +- ...piResultServiceabilityPlatformModel.swift} | 8 +- ...ewResultServiceabilityPlatformModel.swift} | 28 +- ...ewResultServiceabilityPlatformModel.swift} | 8 +- ...wDetailsServiceabilityPlatformModel.swift} | 8 +- ...ewResultServiceabilityPlatformModel.swift} | 8 +- ...lsResultServiceabilityPlatformModel.swift} | 28 +- ...peResultServiceabilityPlatformModel.swift} | 8 +- ...emResultServiceabilityPlatformModel.swift} | 116 +- ...ewResultServiceabilityPlatformModel.swift} | 8 +- ...csResultServiceabilityPlatformModel.swift} | 8 +- ...erResultServiceabilityPlatformModel.swift} | 8 +- ...ByResultServiceabilityPlatformModel.swift} | 8 +- ...esResultServiceabilityPlatformModel.swift} | 8 +- ...esResultServiceabilityPlatformModel.swift} | 20 +- ...sArticlesServiceabilityPlatformModel.swift | 12 +- ...nsResultServiceabilityPlatformModel.swift} | 28 +- ...lsSchemaServiceabilityPlatformModel.swift} | 32 +- ...erialListServiceabilityPlatformModel.swift | 12 +- ...alResultServiceabilityPlatformModel.swift} | 8 +- ...lRuleListServiceabilityPlatformModel.swift | 12 +- ...leResultServiceabilityPlatformModel.swift} | 8 +- ...ewResultServiceabilityPlatformModel.swift} | 8 +- ...gDetailsServiceabilityPlatformModel.swift} | 8 +- ...ngResultServiceabilityPlatformModel.swift} | 20 +- ...OPResultServiceabilityPlatformModel.swift} | 20 +- ...yDetailsServiceabilityPlatformModel.swift} | 8 +- ...sultDataServiceabilityPlatformModel.swift} | 20 +- ...ryResultServiceabilityPlatformModel.swift} | 8 +- ...teResultServiceabilityPlatformModel.swift} | 8 +- ...igResultServiceabilityPlatformModel.swift} | 8 +- ...yDetailsServiceabilityPlatformModel.swift} | 8 +- ...tyResultServiceabilityPlatformModel.swift} | 8 +- ...ipResultServiceabilityPlatformModel.swift} | 8 +- ...orResultServiceabilityPlatformModel.swift} | 8 +- ...lityModelServiceabilityPlatformModel.swift | 56 +- ...geResultServiceabilityPlatformModel.swift} | 8 +- ...erDetailsServiceabilityPlatformModel.swift | 272 + ...nerResultServiceabilityPlatformModel.swift | 162 + ...rPartnersServiceabilityPlatformModel.swift | 162 + ...DimensionServiceabilityPlatformModel.swift | 166 + ...sArticlesServiceabilityPlatformModel.swift | 300 + ...ceabilityServiceabilityPlatformModel.swift | 286 + ...ShipmentsServiceabilityPlatformModel.swift | 484 ++ ...dardErrorServiceabilityPlatformModel.swift | 102 + ...ltSchemaServiceabilityPlatformModel.swift} | 8 +- ...ltSchemaServiceabilityPlatformModel.swift} | 8 +- ...ngResultServiceabilityPlatformModel.swift} | 8 +- ...gDetailsServiceabilityPlatformModel.swift} | 8 +- ...tionErrorServiceabilityPlatformModel.swift | 134 + ...gsResultServiceabilityPlatformModel.swift} | 8 +- ...neResultServiceabilityPlatformModel.swift} | 8 +- ...ssResultServiceabilityPlatformModel.swift} | 8 +- ...eDetailsServiceabilityPlatformModel.swift} | 8 +- ...esResultServiceabilityPlatformModel.swift} | 8 +- ... ClickStatsResultSharePlatformModel.swift} | 4 +- .../ShortLinkReqSharePlatformModel.swift | 25 +- .../Share/UrlInfoSharePlatformModel.swift | 25 +- .../shortLinkReqMetaSharePlatformModel.swift | 85 + ...PageSchemaSectionsThemePlatformModel.swift | 16 +- ...ift => DummyThemeThemePlatformModel.swift} | 8 +- .../SectionSourceThemePlatformModel.swift} | 80 +- ...> ThemeUpgradableThemePlatformModel.swift} | 8 +- ...reateUserAttributeUserPlatformModel.swift} | 16 +- ... => SuccessMessageUserPlatformModel.swift} | 4 +- ...eDefinitionDetailsUserPlatformModel.swift} | 4 +- ...t => UserAttributeUserPlatformModel.swift} | 16 +- ...oadcasterConfigWebhookPlatformModel.swift} | 70 +- ...entBridgeConfigWebhookPlatformModel.swift} | 34 +- .../EventBridgeDataWebhookPlatformModel.swift | 126 + ...entConfigResultWebhookPlatformModel.swift} | 4 +- .../EventConfigWebhookPlatformModel.swift | 48 +- .../EventMapBodyWebhookPlatformModel.swift} | 70 +- ...ntProcessRequestWebhookPlatformModel.swift | 163 - .../Webhook/EventsWebhookPlatformModel.swift | 94 +- ...storyAssociationWebhookPlatformModel.swift | 85 - .../HistoryFiltersWebhookPlatformModel.swift | 200 - .../HistoryPayloadWebhookPlatformModel.swift | 101 - ... => KafkaConfigWebhookPlatformModel.swift} | 32 +- ...gWebhookResponseWebhookPlatformModel.swift | 108 - .../PubSubConfigWebhookPlatformModel.swift | 78 + .../QueueEventDataWebhookPlatformModel.swift | 119 + ...rtFilterResponseWebhookPlatformModel.swift | 85 - ...t => RestConfigWebhookPlatformModel.swift} | 50 +- .../RestEventDataWebhookPlatformModel.swift | 103 + ...ft => SqsConfigWebhookPlatformModel.swift} | 32 +- .../SqsEventDataWebhookPlatformModel.swift | 126 + ...criberConfigListWebhookPlatformModel.swift | 6 +- ...figPostRequestV2WebhookPlatformModel.swift | 25 +- ...criberConfigPostWebhookPlatformModel.swift | 25 +- ...berConfigResultWebhookPlatformModel.swift} | 4 +- ...gUpdateRequestV2WebhookPlatformModel.swift | 25 +- ...iberConfigUpdateWebhookPlatformModel.swift | 25 +- ...bscriberDetailsWebhookPlatformModel.swift} | 4 +- ...iberEventMappingWebhookPlatformModel.swift | 12 +- .../TemporalConfigWebhookPlatformModel.swift | 78 + ...mporalEventDataWebhookPlatformModel.swift} | 80 +- ...berConfigResultWebhookPlatformModel.swift} | 30 +- ...ubscriberConfigWebhookPlatformModel.swift} | 16 +- .../WebhookConfigWebhookPlatformModel.swift} | 60 +- Sources/code/platform/PlatformAPIClient.swift | 2 +- Sources/code/platform/PlatformClient.swift | 2010 +++-- Sources/code/platform/PlatformEnums.swift | 174 +- .../platform/PlatformModelsExtenstions.swift | 2 - Sources/code/platform/PlatformPageType.swift | 2 - .../Client/ConfigurationPublicClient.swift | 4 +- .../public/Client/ContentPublicClient.swift | 498 +- .../public/Client/WebhookPublicClient.swift | 20 +- ...ponseSchemaConfigurationPublicModel.swift} | 4 +- ...questSchemaConfigurationPublicModel.swift} | 4 +- ...nalyticsTagsSchemaContentPublicModel.swift | 165 + ...velMenuItemSchemaContentPublicModel.swift} | 104 +- ...tailsPayloadSchemaContentPublicModel.swift | 495 ++ .../BusinessAccountContentPublicModel.swift | 77 + ...velMenuItemSchemaContentPublicModel.swift} | 104 +- ...nfigurationSchemaContentPublicModel.swift} | 38 +- ...stomPageSeoSchemaContentPublicModel.swift} | 38 +- .../CreatedBySchemaContentPublicModel.swift} | 27 +- .../CredentialSchemaContentPublicModel.swift | 94 +- .../CustomItemSchemaContentPublicModel.swift} | 148 +- ...omPageBySlugSchemaContentPublicModel.swift | 341 + .../Content/FeaturesContentPublicModel.swift} | 60 +- ...oterContentSchemaContentPublicModel.swift} | 49 +- .../FooterSchemaContentPublicModel.swift | 297 + ...ePageContentSchemaContentPublicModel.swift | 209 + .../ItemSchemaContentPublicModel.swift} | 28 +- .../MediaSchemaContentPublicModel.swift} | 50 +- .../MenuSchemaContentPublicModel.swift | 165 + .../MenuTypeSchemaContentPublicModel.swift} | 27 +- .../MenusSchemaContentPublicModel.swift | 121 + .../NavItemSchemaContentPublicModel.swift} | 49 +- .../NavbarSchemaContentPublicModel.swift} | 54 +- .../OtherSellerSchemaContentPublicModel.swift | 77 + .../PageSchemaContentPublicModel.swift} | 108 +- ...icingBannerSchemaContentPublicModel.swift} | 101 +- ...HtmlContentSchemaContentPublicModel.swift} | 28 +- ...alesChannelSchemaContentPublicModel.swift} | 38 +- .../SdkReadmeSchemaContentPublicModel.swift} | 21 +- .../SellerSupportContentPublicModel.swift | 77 + .../TagsSchemaContentPublicModel.swift} | 26 +- .../UserSchemaContentPublicModel.swift | 55 + .../VisibleOnSchemaContentPublicModel.swift} | 49 +- .../Content/WhatsNewContentPublicModel.swift} | 27 +- ...t => EventDetailsWebhookPublicModel.swift} | 4 +- ...sformEventPayloadWebhookPublicModel.swift} | 4 +- ...nsformEventResultWebhookPublicModel.swift} | 4 +- ...dateSchemaPayloadWebhookPublicModel.swift} | 4 +- ...idateSchemaResultWebhookPublicModel.swift} | 4 +- Sources/code/public/PublicAPIClient.swift | 2 +- 1246 files changed, 60232 insertions(+), 26240 deletions(-) create mode 100644 Sources/code/application/Client/FinanceApplicationClient.swift rename Sources/code/application/Models/Cart/{AddCartRequestCartAppModel.swift => AddCartCreationCartAppModel.swift} (96%) rename Sources/code/application/Models/Cart/{AddCartDetailResponseCartAppModel.swift => AddCartDetailResultCartAppModel.swift} (90%) rename Sources/code/application/Models/Cart/{ApplyCouponRequestCartAppModel.swift => ApplyCouponCartAppModel.swift} (93%) create mode 100644 Sources/code/application/Models/Cart/ArticlePriceDetailsCartAppModel.swift rename Sources/code/application/Models/Cart/{BulkPriceResponseCartAppModel.swift => BulkPriceResultCartAppModel.swift} (94%) create mode 100644 Sources/code/application/Models/Cart/CartCheckoutCustomMetaCartAppModel.swift create mode 100644 Sources/code/application/Models/Cart/CartCheckoutDetailCreationCartAppModel.swift rename Sources/code/application/Models/Cart/{CartCheckoutDetailV2RequestCartAppModel.swift => CartCheckoutDetailV2CreationCartAppModel.swift} (95%) rename Sources/code/application/Models/Cart/{CartCheckoutResponseCartAppModel.swift => CartCheckoutResultCartAppModel.swift} (98%) rename Sources/code/application/Models/Cart/{CartDetailResponseCartAppModel.swift => CartDetailResultCartAppModel.swift} (99%) rename Sources/code/application/Models/Cart/{CartItemCountResponseCartAppModel.swift => CartItemCountResultCartAppModel.swift} (94%) rename Sources/code/application/Models/Cart/{CartMetaRequestCartAppModel.swift => CartMetaCreationCartAppModel.swift} (98%) rename Sources/code/application/Models/Cart/{CartMetaMissingResponseCartAppModel.swift => CartMetaMissingResultCartAppModel.swift} (93%) rename Sources/code/application/Models/Cart/{CartMetaResponseCartAppModel.swift => CartMetaResultCartAppModel.swift} (96%) rename Sources/code/application/Models/Cart/{CartShipmentsResponseCartAppModel.swift => CartShipmentsResultCartAppModel.swift} (97%) rename Sources/code/application/Models/Cart/{DeleteAddressResponseCartAppModel.swift => DeleteAddressResultCartAppModel.swift} (95%) rename Sources/code/application/Models/Cart/{OperationErrorResponseCartAppModel.swift => DeleteCartDetailResultCartAppModel.swift} (95%) create mode 100644 Sources/code/application/Models/Cart/FreeGiftItemCartAppModel.swift create mode 100644 Sources/code/application/Models/Cart/FreeGiftItemCreationCartAppModel.swift rename Sources/code/application/Models/Cart/{GetAddressesResponseCartAppModel.swift => GetAddressesResultCartAppModel.swift} (68%) rename Sources/code/application/Models/Cart/{GetCouponResponseCartAppModel.swift => GetCouponResultCartAppModel.swift} (96%) rename Sources/code/application/Models/Cart/{GetShareCartLinkRequestCartAppModel.swift => GetShareCartLinkCreationCartAppModel.swift} (95%) rename Sources/code/application/Models/Cart/{GetShareCartLinkResponseCartAppModel.swift => GetShareCartLinkResultCartAppModel.swift} (95%) rename Sources/code/application/Models/Cart/{DeleteCartDetailResponseCartAppModel.swift => OperationErrorResultCartAppModel.swift} (95%) create mode 100644 Sources/code/application/Models/Cart/ProductActionPageCartAppModel.swift create mode 100644 Sources/code/application/Models/Cart/ProductActionParamsCartAppModel.swift rename Sources/code/application/Models/Cart/{PromotionOffersResponseCartAppModel.swift => PromotionOffersResultCartAppModel.swift} (94%) rename Sources/code/application/Models/Cart/{PromotionPaymentOffersResponseCartAppModel.swift => PromotionPaymentOffersResultCartAppModel.swift} (95%) rename Sources/code/application/Models/Cart/{RewardPointRequestCartAppModel.swift => RewardPointCreationCartAppModel.swift} (92%) rename Sources/code/application/Models/Cart/{SaveAddressResponseCartAppModel.swift => SaveAddressResultCartAppModel.swift} (97%) rename Sources/code/application/Models/Cart/{SelectCartAddressRequestCartAppModel.swift => SelectCartAddressCreationCartAppModel.swift} (96%) rename Sources/code/application/Models/Cart/{SharedCartResponseCartAppModel.swift => SharedCartResultCartAppModel.swift} (96%) rename Sources/code/application/Models/Cart/{ShipmentResponseCartAppModel.swift => ShipmentResultCartAppModel.swift} (99%) rename Sources/code/application/Models/Cart/{UpdateAddressResponseCartAppModel.swift => UpdateAddressResultCartAppModel.swift} (97%) rename Sources/code/application/Models/Cart/{UpdateCartRequestCartAppModel.swift => UpdateCartCreationCartAppModel.swift} (63%) rename Sources/code/application/Models/Cart/{UpdateCartDetailResponseCartAppModel.swift => UpdateCartDetailResultCartAppModel.swift} (88%) rename Sources/code/application/Models/Cart/{UpdateCartPaymentRequestCartAppModel.swift => UpdateCartPaymentCreationCartAppModel.swift} (98%) create mode 100644 Sources/code/application/Models/Cart/ValidationConfigCartAppModel.swift create mode 100644 Sources/code/application/Models/Cart/ValidationErrorCartAppModel.swift rename Sources/code/application/Models/Catalog/{AutoCompleteResponseCatalogAppModel.swift => AutoCompleteResponseSchemaCatalogAppModel.swift} (93%) rename Sources/code/application/Models/Catalog/{BrandDetailResponseCatalogAppModel.swift => BrandDetailResponseSchemaCatalogAppModel.swift} (98%) rename Sources/code/application/Models/Catalog/{BrandListingResponseCatalogAppModel.swift => BrandListingResponseSchemaCatalogAppModel.swift} (94%) rename Sources/code/application/Models/Catalog/{CategoryListingResponseCatalogAppModel.swift => CategoryListingResponseSchemaCatalogAppModel.swift} (95%) rename Sources/code/application/Models/Catalog/{CategoryMetaResponseCatalogAppModel.swift => CategoryMetaResponseSchemaCatalogAppModel.swift} (97%) rename Sources/code/application/Models/Catalog/{CollectionDetailResponseCatalogAppModel.swift => CollectionDetailResponseSchemaCatalogAppModel.swift} (99%) rename Sources/code/application/Models/Catalog/{DepartmentResponseCatalogAppModel.swift => DepartmentResponseSchemaCatalogAppModel.swift} (93%) rename Sources/code/application/Models/Catalog/{ErrorResponseCatalogAppModel.swift => ErrorResponseSchemaCatalogAppModel.swift} (94%) rename Sources/code/application/Models/Catalog/{FollowIdsResponseCatalogAppModel.swift => FollowIdsResponseSchemaCatalogAppModel.swift} (93%) rename Sources/code/application/Models/Catalog/{FollowPostResponseCatalogAppModel.swift => FollowPostResponseSchemaCatalogAppModel.swift} (93%) rename Sources/code/application/Models/Catalog/{FollowerCountResponseCatalogAppModel.swift => FollowerCountResponseSchemaCatalogAppModel.swift} (93%) rename Sources/code/application/Models/Catalog/{GetCollectionListingResponseCatalogAppModel.swift => GetCollectionListingResponseSchemaCatalogAppModel.swift} (95%) rename Sources/code/application/Models/Catalog/{GetFollowListingResponseCatalogAppModel.swift => GetFollowListingResponseSchemaCatalogAppModel.swift} (93%) rename Sources/code/application/Models/Catalog/{HomeListingResponseCatalogAppModel.swift => HomeListingResponseSchemaCatalogAppModel.swift} (96%) create mode 100644 Sources/code/application/Models/Catalog/IdentifierCatalogAppModel.swift rename Sources/code/application/Models/Catalog/{ProductCompareResponseCatalogAppModel.swift => ProductCompareResponseSchemaCatalogAppModel.swift} (97%) rename Sources/code/application/Models/Catalog/{ProductFrequentlyComparedSimilarResponseCatalogAppModel.swift => ProductFrequentlyComparedSimilarResponseSchemaCatalogAppModel.swift} (79%) rename Sources/code/application/Models/Catalog/{ProductListingResponseCatalogAppModel.swift => ProductListingResponseSchemaCatalogAppModel.swift} (97%) rename Sources/code/application/Models/Catalog/{ProductStockStatusResponseCatalogAppModel.swift => ProductStockStatusResponseSchemaCatalogAppModel.swift} (92%) rename Sources/code/application/Models/Catalog/{ProductVariantItemResponseCatalogAppModel.swift => ProductVariantItemResponseSchemaCatalogAppModel.swift} (98%) rename Sources/code/application/Models/Catalog/{ProductVariantListingResponseCatalogAppModel.swift => ProductVariantListingResponseSchemaCatalogAppModel.swift} (92%) rename Sources/code/application/Models/Catalog/{ProductVariantResponseCatalogAppModel.swift => ProductVariantResponseSchemaCatalogAppModel.swift} (94%) rename Sources/code/application/Models/Catalog/{ProductVariantsResponseCatalogAppModel.swift => ProductVariantsResponseSchemaCatalogAppModel.swift} (81%) rename Sources/code/application/Models/Catalog/{ProductsComparisonResponseCatalogAppModel.swift => ProductsComparisonResponseSchemaCatalogAppModel.swift} (95%) rename Sources/code/application/Models/Catalog/{StoreAddressSerializerCatalogAppModel.swift => StoreAddressSchemaCatalogAppModel.swift} (98%) create mode 100644 Sources/code/application/Models/Catalog/StoreContactCatalogAppModel.swift rename Sources/code/application/Models/Catalog/{StoreListingResponseCatalogAppModel.swift => StoreListingResponseSchemaCatalogAppModel.swift} (93%) rename Sources/code/application/Models/Catalog/{StoreManagerSerializerCatalogAppModel.swift => StoreManagerSchemaCatalogAppModel.swift} (96%) rename Sources/code/application/Models/Common/{ApplicationResponseCommonAppModel.swift => ApplicationResponseSchemaCommonAppModel.swift} (93%) rename Sources/code/application/Models/Common/{BadRequestCommonAppModel.swift => BadRequestSchemaCommonAppModel.swift} (94%) rename Sources/code/application/Models/Configuration/{AppCurrencyResponseConfigurationAppModel.swift => AppCurrencyResponseSchemaConfigurationAppModel.swift} (98%) rename Sources/code/application/Models/Configuration/{AppFeatureResponseConfigurationAppModel.swift => AppFeatureResponseSchemaConfigurationAppModel.swift} (93%) rename Sources/code/application/Models/Configuration/{AppStaffListResponseConfigurationAppModel.swift => AppStaffListResponseSchemaConfigurationAppModel.swift} (95%) rename Sources/code/application/Models/Configuration/{AppStaffResponseConfigurationAppModel.swift => AppStaffResponseSchemaConfigurationAppModel.swift} (94%) rename Sources/code/application/Models/Configuration/{AppTokenResponseConfigurationAppModel.swift => AppTokenResponseSchemaConfigurationAppModel.swift} (98%) rename Sources/code/application/Models/Configuration/{ApplicationAboutResponseConfigurationAppModel.swift => ApplicationAboutResponseSchemaConfigurationAppModel.swift} (93%) rename Sources/code/application/Models/Configuration/{CurrenciesResponseConfigurationAppModel.swift => CurrenciesResponseSchemaConfigurationAppModel.swift} (93%) rename Sources/code/application/Models/Configuration/{SuccessMessageResponseConfigurationAppModel.swift => InvalidPayloadRequestSchemaConfigurationAppModel.swift} (93%) rename Sources/code/application/Models/Configuration/{LanguageResponseConfigurationAppModel.swift => LanguageResponseSchemaConfigurationAppModel.swift} (94%) rename Sources/code/application/Models/Configuration/{OrderingStoreSelectRequestConfigurationAppModel.swift => OrderingStoreSelectRequestSchemaConfigurationAppModel.swift} (91%) rename Sources/code/application/Models/Configuration/{InvalidPayloadRequestConfigurationAppModel.swift => SuccessMessageResponseSchemaConfigurationAppModel.swift} (93%) delete mode 100644 Sources/code/application/Models/Configuration/UnhandledErrorConfigurationAppModel.swift rename Sources/code/application/Models/Content/{BlogGetResponseContentAppModel.swift => BlogGetDetailsContentAppModel.swift} (97%) create mode 100644 Sources/code/application/Models/Content/CustomObjectListItemSchemaContentAppModel.swift create mode 100644 Sources/code/application/Models/Content/CustomObjectsSchemaContentAppModel.swift rename Sources/code/application/Models/Content/{NavigationGetResponseContentAppModel.swift => NavigationGetDetailsContentAppModel.swift} (95%) rename Sources/code/application/Models/Content/{PageGetResponseContentAppModel.swift => PageGetDetailsContentAppModel.swift} (96%) rename Sources/code/application/Models/Content/{SlideshowGetResponseContentAppModel.swift => SlideshowGetDetailsContentAppModel.swift} (96%) create mode 100644 Sources/code/application/Models/Content/ValidationErrorContentAppModel.swift rename Sources/code/application/Models/FileStorage/{CompleteResponseFileStorageAppModel.swift => FileUploadCompleteFileStorageAppModel.swift} (98%) rename Sources/code/application/Models/FileStorage/{StartResponseFileStorageAppModel.swift => FileUploadFileStorageAppModel.swift} (88%) rename Sources/code/application/Models/FileStorage/{StartRequestFileStorageAppModel.swift => FileUploadStartFileStorageAppModel.swift} (97%) rename Sources/code/application/Models/FileStorage/{SignUrlRequestFileStorageAppModel.swift => SignUrlFileStorageAppModel.swift} (95%) rename Sources/code/application/Models/FileStorage/{SignUrlResponseFileStorageAppModel.swift => SignUrlResultFileStorageAppModel.swift} (93%) create mode 100644 Sources/code/application/Models/Finance/CustomerCreditBalanceReqDataFinanceAppModel.swift create mode 100644 Sources/code/application/Models/Finance/CustomerCreditBalanceRequestSchemaFinanceAppModel.swift create mode 100644 Sources/code/application/Models/Finance/CustomerCreditBalanceResDataFinanceAppModel.swift create mode 100644 Sources/code/application/Models/Finance/CustomerCreditBalanceResponseSchemaFinanceAppModel.swift create mode 100644 Sources/code/application/Models/Finance/ErrorFinanceAppModel.swift rename Sources/code/{platform/Models/Finance/ErrorMetaFinancePlatformModel.swift => application/Models/Finance/ErrorMetaFinanceAppModel.swift} (67%) create mode 100644 Sources/code/application/Models/Finance/ErrorMetaItemsFinanceAppModel.swift create mode 100644 Sources/code/application/Models/Finance/LockUnlockRequestDataFinanceAppModel.swift create mode 100644 Sources/code/application/Models/Finance/LockUnlockRequestSchemaFinanceAppModel.swift create mode 100644 Sources/code/application/Models/Finance/LockUnlockResponseDataFinanceAppModel.swift create mode 100644 Sources/code/application/Models/Finance/LockUnlockResponseSchemaFinanceAppModel.swift rename Sources/code/application/Models/Lead/{FormFieldResponseLeadAppModel.swift => FormFieldDetailsLeadAppModel.swift} (98%) rename Sources/code/application/Models/Lead/{SubmitCustomFormResponseLeadAppModel.swift => SubmitCustomFormDetailsLeadAppModel.swift} (86%) rename Sources/code/application/Models/Logistic/{CountryEntityResponseLogisticAppModel.swift => CountryEntityResultLogisticAppModel.swift} (92%) rename Sources/code/application/Models/Logistic/{CountryListResponseLogisticAppModel.swift => CountryListResultLogisticAppModel.swift} (83%) rename Sources/code/application/Models/Logistic/{CountryMetaResponseLogisticAppModel.swift => CountryMetaResultLogisticAppModel.swift} (96%) create mode 100644 Sources/code/application/Models/Logistic/CourierPartnerPromiseLogisticAppModel.swift create mode 100644 Sources/code/application/Models/Logistic/CourierPartnersLogisticAppModel.swift rename Sources/code/application/Models/Logistic/{ErrorResponseLogisticAppModel.swift => ErrorResultLogisticAppModel.swift} (96%) create mode 100644 Sources/code/application/Models/Logistic/GetPromiseDetailsLogisticAppModel.swift rename Sources/code/application/Models/Logistic/{GetStoreResponseLogisticAppModel.swift => GetStoreResultLogisticAppModel.swift} (85%) rename Sources/code/application/Models/Logistic/{GetZoneFromPincodeViewRequestLogisticAppModel.swift => GetZoneFromPincodeViewDetailsLogisticAppModel.swift} (93%) rename Sources/code/application/Models/Logistic/{GetZoneFromPincodeViewResponseLogisticAppModel.swift => GetZoneFromPincodeViewResultLogisticAppModel.swift} (93%) rename Sources/code/application/Models/Logistic/{LogisticsResponseLogisticAppModel.swift => LogisticsResultLogisticAppModel.swift} (82%) rename Sources/code/application/Models/Logistic/{PincodeDataResponseLogisticAppModel.swift => PincodeDataResultLogisticAppModel.swift} (87%) rename Sources/code/application/Models/Logistic/{PincodeApiResponseLogisticAppModel.swift => PincodeDetailsLogisticAppModel.swift} (78%) rename Sources/code/application/Models/Logistic/{PincodeErrorSchemaResponseLogisticAppModel.swift => PincodeErrorSchemaResultLogisticAppModel.swift} (96%) rename Sources/code/application/Models/Logistic/{PincodeMetaResponseLogisticAppModel.swift => PincodeMetaResultLogisticAppModel.swift} (96%) rename Sources/code/application/Models/Logistic/{PincodeParentsResponseLogisticAppModel.swift => PincodeParentsResultLogisticAppModel.swift} (97%) rename Sources/code/application/Models/Logistic/{TATFormattedResponseLogisticAppModel.swift => PromiseLogisticAppModel.swift} (95%) rename Sources/code/application/Models/Logistic/{ReAssignStoreRequestLogisticAppModel.swift => ReAssignStoreDetailsLogisticAppModel.swift} (97%) rename Sources/code/application/Models/Logistic/{ReAssignStoreResponseLogisticAppModel.swift => ReAssignStoreResultLogisticAppModel.swift} (97%) create mode 100644 Sources/code/application/Models/Logistic/ServiceabilityLocationLogisticAppModel.swift create mode 100644 Sources/code/application/Models/Logistic/ShipmentCourierPartnerDetailsLogisticAppModel.swift create mode 100644 Sources/code/application/Models/Logistic/ShipmentCourierPartnerResultLogisticAppModel.swift create mode 100644 Sources/code/application/Models/Logistic/ShipmentCourierPartnersLogisticAppModel.swift create mode 100644 Sources/code/application/Models/Logistic/ShipmentDimensionLogisticAppModel.swift create mode 100644 Sources/code/application/Models/Logistic/ShipmentsArticlesLogisticAppModel.swift create mode 100644 Sources/code/application/Models/Logistic/ShipmentsCourierPartnersServiceabilityLogisticAppModel.swift create mode 100644 Sources/code/application/Models/Logistic/ShipmentsLogisticAppModel.swift create mode 100644 Sources/code/application/Models/Logistic/StandardErrorLogisticAppModel.swift rename Sources/code/application/Models/Logistic/{StoreItemResponseLogisticAppModel.swift => StoreItemResultLogisticAppModel.swift} (98%) create mode 100644 Sources/code/application/Models/Logistic/StorePromiseLogisticAppModel.swift rename Sources/code/application/Models/Logistic/{TATArticlesRequestLogisticAppModel.swift => TATArticlesDetailsLogisticAppModel.swift} (90%) rename Sources/code/application/Models/Logistic/{TATArticlesResponseLogisticAppModel.swift => TATArticlesResultLogisticAppModel.swift} (87%) rename Sources/code/application/Models/Logistic/{TATCategoryRequestLogisticAppModel.swift => TATCategoryDetailsLogisticAppModel.swift} (96%) rename Sources/code/application/Models/Logistic/{TATErrorSchemaResponseLogisticAppModel.swift => TATErrorSchemaResultLogisticAppModel.swift} (96%) create mode 100644 Sources/code/application/Models/Logistic/TATFormattedResultLogisticAppModel.swift rename Sources/code/application/Models/Logistic/{TATLocationDetailsRequestLogisticAppModel.swift => TATLocationDetailsDetailsLogisticAppModel.swift} (89%) rename Sources/code/application/Models/Logistic/{TATLocationDetailsResponseLogisticAppModel.swift => TATLocationDetailsResultLogisticAppModel.swift} (87%) rename Sources/code/application/Models/Logistic/{TATPromiseResponseLogisticAppModel.swift => TATPromiseResultLogisticAppModel.swift} (83%) rename Sources/code/application/Models/Logistic/{TATTimestampResponseLogisticAppModel.swift => TATTimestampResultLogisticAppModel.swift} (95%) rename Sources/code/application/Models/Logistic/{TATViewRequestLogisticAppModel.swift => TATViewDetailsLogisticAppModel.swift} (95%) rename Sources/code/application/Models/Logistic/{TATViewResponseLogisticAppModel.swift => TATViewResultLogisticAppModel.swift} (93%) rename Sources/code/application/Models/Logistic/{ValidateAddressRequestLogisticAppModel.swift => ValidateAddressDetailsLogisticAppModel.swift} (99%) create mode 100644 Sources/code/application/Models/Logistic/ValidationErrorLogisticAppModel.swift create mode 100644 Sources/code/application/Models/Order/ChargeAmountCurrencyOrderAppModel.swift create mode 100644 Sources/code/application/Models/Order/ChargeAmountOrderAppModel.swift create mode 100644 Sources/code/application/Models/Order/ChargeDistributionLogicOrderAppModel.swift create mode 100644 Sources/code/application/Models/Order/ChargeDistributionSchemaOrderAppModel.swift rename Sources/code/application/Models/Order/{CustomerDetailsResponseOrderAppModel.swift => CustomerDetailsResponseSchemaOrderAppModel.swift} (97%) rename Sources/code/application/Models/Order/{ErrorResponseOrderAppModel.swift => ErrorResponseSchemaOrderAppModel.swift} (98%) rename Sources/code/application/Models/Order/{OrderRequestOrderAppModel.swift => OrderRequestSchemaOrderAppModel.swift} (94%) create mode 100644 Sources/code/application/Models/Order/PriceAdjustmentChargeOrderAppModel.swift rename Sources/code/application/Models/Order/{SendOtpToCustomerResponseOrderAppModel.swift => SendOtpToCustomerResponseSchemaOrderAppModel.swift} (97%) rename Sources/code/application/Models/Order/{ShipmentApplicationStatusResponseOrderAppModel.swift => ShipmentApplicationStatusResponseSchemaOrderAppModel.swift} (80%) rename Sources/code/application/Models/Order/{ShipmentsRequestOrderAppModel.swift => ShipmentsRequestSchemaOrderAppModel.swift} (97%) rename Sources/code/application/Models/Order/{StatuesRequestOrderAppModel.swift => StatuesRequestSchemaOrderAppModel.swift} (91%) rename Sources/code/application/Models/Order/{StatusesBodyResponseOrderAppModel.swift => StatusesBodyResponseSchemaOrderAppModel.swift} (93%) rename Sources/code/application/Models/Order/{UpdateShipmentStatusRequestOrderAppModel.swift => UpdateShipmentStatusRequestSchemaOrderAppModel.swift} (91%) rename Sources/code/application/Models/Order/{VerifyOtpResponseOrderAppModel.swift => VerifyOtpResponseSchemaOrderAppModel.swift} (93%) rename Sources/code/application/Models/Payment/{ActiveCardPaymentGatewayResponsePaymentAppModel.swift => ActiveCardPaymentGatewayDetailsPaymentAppModel.swift} (94%) rename Sources/code/application/Models/Payment/{AddBeneficiaryDetailsOTPRequestPaymentAppModel.swift => AddBeneficiaryDetailsOTPPaymentAppModel.swift} (93%) rename Sources/code/application/Models/Payment/{AddBeneficiaryDetailsRequestPaymentAppModel.swift => AddBeneficiaryDetailsPaymentAppModel.swift} (97%) rename Sources/code/application/Models/Payment/{AddBeneficiaryViaOtpVerificationResponsePaymentAppModel.swift => AddBeneficiaryViaOtpVerificationDetailsPaymentAppModel.swift} (93%) rename Sources/code/application/Models/Payment/{AddBeneficiaryViaOtpVerificationRequestPaymentAppModel.swift => AddBeneficiaryViaOtpVerificationPaymentAppModel.swift} (93%) rename Sources/code/application/Models/Payment/{AggregatorsConfigDetailResponsePaymentAppModel.swift => AggregatorsConfigDetailPaymentAppModel.swift} (98%) rename Sources/code/application/Models/Payment/{AttachCardRequestPaymentAppModel.swift => AttachCardPaymentAppModel.swift} (97%) rename Sources/code/application/Models/Payment/{AttachCardsResponsePaymentAppModel.swift => AttachCardsDetailsPaymentAppModel.swift} (96%) rename Sources/code/application/Models/Payment/{CancelOrResendPaymentLinkRequestPaymentAppModel.swift => CancelOrResendPaymentLinkPaymentAppModel.swift} (90%) rename Sources/code/application/Models/Payment/{CancelPaymentLinkResponsePaymentAppModel.swift => CancelPaymentLinkDetailsPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Payment/{CardDetailsResponsePaymentAppModel.swift => CardDetailsFetchedDetailsPaymentAppModel.swift} (93%) rename Sources/code/application/Models/Payment/{ChargeCustomerResponsePaymentAppModel.swift => ChargeCustomerDetailsPaymentAppModel.swift} (97%) rename Sources/code/application/Models/Payment/{ChargeCustomerRequestPaymentAppModel.swift => ChargeCustomerPaymentAppModel.swift} (97%) rename Sources/code/application/Models/Payment/{CheckCreditResponsePaymentAppModel.swift => CheckCreditDetailsPaymentAppModel.swift} (94%) rename Sources/code/application/Models/Payment/{CreateOrderUserResponsePaymentAppModel.swift => CreateOrderUserDetailsPaymentAppModel.swift} (98%) rename Sources/code/application/Models/Payment/{CreateOrderUserRequestPaymentAppModel.swift => CreateOrderUserPaymentAppModel.swift} (67%) rename Sources/code/application/Models/Payment/{CreatePaymentLinkResponsePaymentAppModel.swift => CreatePaymentLinkDetailsPaymentAppModel.swift} (97%) rename Sources/code/application/Models/Payment/{CreatePaymentLinkRequestPaymentAppModel.swift => CreatePaymentLinkPaymentAppModel.swift} (64%) rename Sources/code/application/Models/Payment/{CustomerCreditSummaryResponsePaymentAppModel.swift => CustomerCreditSummaryDetailsPaymentAppModel.swift} (94%) rename Sources/code/application/Models/Payment/{CustomerOnboardingResponsePaymentAppModel.swift => CustomerOnboardingDetailsPaymentAppModel.swift} (93%) rename Sources/code/application/Models/Payment/{CustomerOnboardingRequestPaymentAppModel.swift => CustomerOnboardingPaymentAppModel.swift} (98%) rename Sources/code/application/Models/Payment/{DeletehCardRequestPaymentAppModel.swift => DeleteCardPaymentAppModel.swift} (92%) rename Sources/code/application/Models/Payment/{DeleteCardsResponsePaymentAppModel.swift => DeleteCardsDetailsPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Payment/{DeleteRefundAccountResponsePaymentAppModel.swift => DeleteRefundAccountDetailsPaymentAppModel.swift} (93%) rename Sources/code/application/Models/Payment/{EpaylaterBannerResponsePaymentAppModel.swift => EpaylaterBannerDetailsPaymentAppModel.swift} (94%) rename Sources/code/application/Models/Payment/{ErrorResponsePaymentAppModel.swift => ErrorDetailsPaymentAppModel.swift} (97%) rename Sources/code/application/Models/Payment/{GetPaymentLinkResponsePaymentAppModel.swift => GetPaymentLinkDetailsPaymentAppModel.swift} (98%) rename Sources/code/application/Models/Payment/{HttpErrorCodeAndResponsePaymentAppModel.swift => HttpErrorCodeDetailsPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Payment/{IfscCodeResponsePaymentAppModel.swift => IfscCodeDetailsPaymentAppModel.swift} (96%) rename Sources/code/application/Models/Payment/{ListCardsResponsePaymentAppModel.swift => ListCardsDetailsPaymentAppModel.swift} (96%) rename Sources/code/application/Models/Payment/{OrderBeneficiaryResponseSchemaV2PaymentAppModel.swift => OrderBeneficiaryDetailsSchemaV2PaymentAppModel.swift} (94%) rename Sources/code/application/Models/Payment/{OrderBeneficiaryResponsePaymentAppModel.swift => OrderBeneficiaryFetchDetailsPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Payment/{PaidOrderDetailsResponsePaymentAppModel.swift => OutstandingOrderDetailsPaymentAppModel.swift} (96%) rename Sources/code/application/Models/Payment/{OutstandingOrderDetailsResponsePaymentAppModel.swift => PaidOrderDetailsPaymentAppModel.swift} (96%) rename Sources/code/application/Models/Payment/{PaymentInitializationResponsePaymentAppModel.swift => PaymentInitializationDetailsPaymentAppModel.swift} (99%) rename Sources/code/application/Models/Payment/{PaymentInitializationRequestPaymentAppModel.swift => PaymentInitializationPaymentAppModel.swift} (98%) rename Sources/code/application/Models/Payment/{PaymentModeRouteResponsePaymentAppModel.swift => PaymentModeRouteDetailsPaymentAppModel.swift} (97%) rename Sources/code/application/Models/Payment/{PaymentOrderResponsePaymentAppModel.swift => PaymentOrderDetailsPaymentAppModel.swift} (98%) rename Sources/code/application/Models/Payment/{PaymentOrderRequestPaymentAppModel.swift => PaymentOrderPaymentAppModel.swift} (97%) rename Sources/code/application/Models/Payment/{PaymentStatusUpdateResponsePaymentAppModel.swift => PaymentStatusUpdateDetailsPaymentAppModel.swift} (97%) rename Sources/code/application/Models/Payment/{PaymentStatusUpdateRequestPaymentAppModel.swift => PaymentStatusUpdatePaymentAppModel.swift} (89%) rename Sources/code/application/Models/Payment/{PollingPaymentLinkResponsePaymentAppModel.swift => PollingPaymentLinkDetailsPaymentAppModel.swift} (98%) rename Sources/code/application/Models/Payment/{RedirectToAggregatorResponsePaymentAppModel.swift => RedirectToAggregatorDetailsPaymentAppModel.swift} (93%) rename Sources/code/application/Models/Payment/{RefundAccountResponsePaymentAppModel.swift => RefundAccountDetailsPaymentAppModel.swift} (97%) rename Sources/code/application/Models/Payment/{RefundOptionResponsePaymentAppModel.swift => RefundOptionDetailsPaymentAppModel.swift} (96%) rename Sources/code/application/Models/Payment/{UpdateRefundTransferModeResponsePaymentAppModel.swift => RefundTransferModeUpdateDetailsPaymentAppModel.swift} (92%) rename Sources/code/application/Models/Payment/{renderHTMLResponsePaymentAppModel.swift => RenderHTMLDetailsPaymentAppModel.swift} (92%) rename Sources/code/application/Models/Payment/{renderHTMLRequestPaymentAppModel.swift => RenderHTMLPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Payment/{ResendOrCancelPaymentResponsePaymentAppModel.swift => ResendOrCancelPaymentDetailsPaymentAppModel.swift} (93%) rename Sources/code/application/Models/Payment/{ResendOrCancelPaymentRequestPaymentAppModel.swift => ResendOrCancelPaymentPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Payment/{ResendPaymentLinkResponsePaymentAppModel.swift => ResendPaymentLinkDetailsPaymentAppModel.swift} (96%) rename Sources/code/application/Models/Payment/{RupifiBannerResponsePaymentAppModel.swift => RupifiBannerDetailsPaymentAppModel.swift} (94%) rename Sources/code/application/Models/Payment/{SelectedRefundOptionResponsePaymentAppModel.swift => SelectedRefundOptionDetailsPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Payment/{SetDefaultBeneficiaryResponsePaymentAppModel.swift => SetDefaultBeneficiaryDetailsPaymentAppModel.swift} (94%) rename Sources/code/application/Models/Payment/{SetDefaultBeneficiaryRequestPaymentAppModel.swift => SetDefaultBeneficiaryPaymentAppModel.swift} (93%) rename Sources/code/application/Models/Payment/{ShipmentRefundResponsePaymentAppModel.swift => ShipmentRefundDetailsPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Payment/{ShipmentRefundRequestPaymentAppModel.swift => ShipmentRefundPaymentAppModel.swift} (96%) rename Sources/code/application/Models/Payment/{TransferModeResponsePaymentAppModel.swift => TransferModeFetchDetailsPaymentAppModel.swift} (91%) rename Sources/code/application/Models/Payment/{UpdateRefundTransferModeRequestPaymentAppModel.swift => UpdateRefundTransferModePaymentAppModel.swift} (93%) rename Sources/code/application/Models/Payment/{ValidateCustomerResponsePaymentAppModel.swift => ValidateCustomerDetailsPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Payment/{ValidateCustomerRequestPaymentAppModel.swift => ValidateCustomerPaymentAppModel.swift} (98%) rename Sources/code/application/Models/Payment/{ValidateVPAResponsePaymentAppModel.swift => ValidateVPADetailsPaymentAppModel.swift} (94%) rename Sources/code/application/Models/Payment/{ValidateVPARequestPaymentAppModel.swift => ValidateVPAPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Payment/{ValidateValidateAddressResponsePaymentAppModel.swift => ValidateValidateAddressDetailsPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Payment/{ValidateValidateAddressRequestPaymentAppModel.swift => ValidateValidateAddressPaymentAppModel.swift} (96%) rename Sources/code/application/Models/Payment/{WalletOtpResponsePaymentAppModel.swift => WalletOtpDetailsPaymentAppModel.swift} (96%) rename Sources/code/application/Models/Payment/{WalletOtpRequestPaymentAppModel.swift => WalletOtpPaymentAppModel.swift} (95%) rename Sources/code/application/Models/Rewards/{CatalogueOrderResponseRewardsAppModel.swift => CatalogueOrderCreationRewardsAppModel.swift} (94%) rename Sources/code/application/Models/Rewards/{CatalogueOrderRequestRewardsAppModel.swift => CatalogueOrderDetailsRewardsAppModel.swift} (94%) rename Sources/code/application/Models/Rewards/{OrderDiscountResponseRewardsAppModel.swift => OrderDiscountDetailsRewardsAppModel.swift} (98%) rename Sources/code/application/Models/Rewards/{PointsResponseRewardsAppModel.swift => PointsDetailsRewardsAppModel.swift} (94%) rename Sources/code/application/Models/Rewards/{PointsHistoryResponseRewardsAppModel.swift => PointsHistoryDetailsRewardsAppModel.swift} (95%) rename Sources/code/application/Models/Rewards/{RedeemReferralCodeResponseRewardsAppModel.swift => RedeemReferralCodeDetailsRewardsAppModel.swift} (97%) rename Sources/code/application/Models/Rewards/{RedeemReferralCodeRequestRewardsAppModel.swift => RedeemReferralCodeRewardsAppModel.swift} (95%) rename Sources/code/application/Models/Rewards/{ReferralDetailsResponseRewardsAppModel.swift => ReferralDetailsRewardsAppModel.swift} (98%) rename Sources/code/application/Models/Rewards/{OrderDiscountRequestRewardsAppModel.swift => RetrieveOrderDiscountRewardsAppModel.swift} (95%) rename Sources/code/application/Models/Theme/{GlobalConfigThemeAppModel.swift => SectionAssetsThemeAppModel.swift} (66%) create mode 100644 Sources/code/application/Models/Theme/SectionSourceThemeAppModel.swift rename Sources/code/application/Models/User/{OtpSuccessUserAppModel.swift => SendOtpSuccessUserAppModel.swift} (98%) rename Sources/code/application/Models/User/{SendOtpResponseUserAppModel.swift => SendOtpUserAppModel.swift} (99%) rename Sources/code/application/Models/User/{UpdateUserAttributesRequestUserAppModel.swift => UpdateUserAttributesUserAppModel.swift} (93%) rename Sources/code/application/Models/User/{UserExistsResponseUserAppModel.swift => UserExistsDetailsUserAppModel.swift} (94%) rename Sources/code/application/Models/Webhook/{ClickEventResponseWebhookAppModel.swift => ClickEventDetailsWebhookAppModel.swift} (97%) create mode 100644 Sources/code/application/Models/Webhook/ClickEventPayloadWebhookAppModel.swift delete mode 100644 Sources/code/application/Models/Webhook/ClickEventRequestWebhookAppModel.swift delete mode 100644 Sources/code/platform/Client/FinancePlatformClient.swift rename Sources/code/platform/Models/{Webhook/EventProcessReportsWebhookPlatformModel.swift => Analytics/JobExecutionResultAnalyticsPlatformModel.swift} (82%) rename Sources/code/platform/Models/{Finance/DownloadReportItemsFinancePlatformModel.swift => Analytics/JobStatusAnalyticsPlatformModel.swift} (74%) rename Sources/code/platform/Models/AuditTrail/{BadRequestAuditTrailPlatformModel.swift => BadRequestSchemaAuditTrailPlatformModel.swift} (94%) rename Sources/code/platform/Models/AuditTrail/{CreateLogResponseAuditTrailPlatformModel.swift => CreateLogRespAuditTrailPlatformModel.swift} (96%) delete mode 100644 Sources/code/platform/Models/AuditTrail/DeviceInfoAuditTrailPlatformModel.swift delete mode 100644 Sources/code/platform/Models/AuditTrail/EntityTypeObjAuditTrailPlatformModel.swift delete mode 100644 Sources/code/platform/Models/AuditTrail/EntityTypesResponseAuditTrailPlatformModel.swift delete mode 100644 Sources/code/platform/Models/AuditTrail/LocationAuditTrailPlatformModel.swift delete mode 100644 Sources/code/platform/Models/AuditTrail/LogDocsAuditTrailPlatformModel.swift rename Sources/code/platform/Models/Billing/{BadRequestBillingPlatformModel.swift => BadRequestSchemaBillingPlatformModel.swift} (94%) rename Sources/code/platform/Models/Billing/{CreateOneTimeChargeResponseBillingPlatformModel.swift => CreateOneTimeChargeResponseSchemasBillingPlatformModel.swift} (95%) rename Sources/code/platform/Models/Billing/{CreateSubscriptionResponseBillingPlatformModel.swift => CreateSubscriptionBillingPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{AbandonedCartResponseCartPlatformModel.swift => AbandonedCartResultCartPlatformModel.swift} (98%) rename Sources/code/platform/Models/Cart/{ActivePromosResponseCartPlatformModel.swift => ActivePromosResultCartPlatformModel.swift} (99%) rename Sources/code/platform/Models/Cart/{AddCartRequestCartPlatformModel.swift => AddCartCreationCartPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{AddCartDetailResponseCartPlatformModel.swift => AddCartDetailResultCartPlatformModel.swift} (90%) rename Sources/code/platform/Models/Cart/{ApplyCouponRequestCartPlatformModel.swift => ApplyCouponDetailsCartPlatformModel.swift} (93%) create mode 100644 Sources/code/platform/Models/Cart/ArticlePriceDetailsCartPlatformModel.swift create mode 100644 Sources/code/platform/Models/Cart/CartCheckoutCustomMetaCartPlatformModel.swift rename Sources/code/platform/Models/Cart/{CartCheckoutResponseCartPlatformModel.swift => CartCheckoutDetailsCartPlatformModel.swift} (98%) rename Sources/code/platform/Models/{Finance/CnGenerateReportItemsFinancePlatformModel.swift => Cart/CartCheckoutResultCartPlatformModel.swift} (64%) rename Sources/code/platform/Models/Cart/{CartDeliveryModesResponseCartPlatformModel.swift => CartDeliveryModesDetailsCartPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{CartDetailResponseCartPlatformModel.swift => CartDetailResultCartPlatformModel.swift} (99%) rename Sources/code/platform/Models/Cart/{CartItemCountResponseCartPlatformModel.swift => CartItemCountResultCartPlatformModel.swift} (94%) rename Sources/code/platform/Models/Cart/{CartMetaResponseCartPlatformModel.swift => CartMetaDetailsCartPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{CartMetaMissingResponseCartPlatformModel.swift => CartMetaMissingDetailsCartPlatformModel.swift} (94%) rename Sources/code/platform/Models/Cart/{UpdateCartPaymentRequestCartPlatformModel.swift => CartPaymentUpdateCartPlatformModel.swift} (98%) create mode 100644 Sources/code/platform/Models/Cart/CouponCreateResultCartPlatformModel.swift rename Sources/code/platform/Models/Cart/{CouponsResponseCartPlatformModel.swift => CouponsResultCartPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{DeleteAddressResponseCartPlatformModel.swift => DeleteAddressResultCartPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{DeleteCartDetailResponseCartPlatformModel.swift => DeleteCartDetailResultCartPlatformModel.swift} (95%) rename Sources/code/platform/Models/Cart/{DeleteCartRequestCartPlatformModel.swift => DeleteCartDetailsCartPlatformModel.swift} (95%) create mode 100644 Sources/code/platform/Models/Cart/FreeGiftItemCreationCartPlatformModel.swift rename Sources/code/platform/Models/Cart/{GetCouponResponseCartPlatformModel.swift => GetCouponResultCartPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{GetPriceAdjustmentResponseCartPlatformModel.swift => GetPriceAdjustmentResultCartPlatformModel.swift} (93%) rename Sources/code/platform/Models/Cart/{GetShareCartLinkRequestCartPlatformModel.swift => GetShareCartLinkCreationCartPlatformModel.swift} (95%) rename Sources/code/platform/Models/Cart/{GetShareCartLinkResponseCartPlatformModel.swift => GetShareCartLinkResultCartPlatformModel.swift} (95%) rename Sources/code/platform/Models/Cart/{PlatformGetAddressesResponseCartPlatformModel.swift => ItemSizeMappingCartPlatformModel.swift} (68%) rename Sources/code/platform/Models/Cart/{MultiCartResponseCartPlatformModel.swift => MultiCartResultCartPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{OpenApiCartServiceabilityRequestCartPlatformModel.swift => OpenApiCartServiceabilityCreationCartPlatformModel.swift} (93%) rename Sources/code/platform/Models/Cart/{OpenApiCartServiceabilityResponseCartPlatformModel.swift => OpenApiCartServiceabilityResultCartPlatformModel.swift} (97%) rename Sources/code/platform/Models/Cart/{OpenApiCheckoutResponseCartPlatformModel.swift => OpenApiCheckoutResultCartPlatformModel.swift} (97%) rename Sources/code/platform/Models/Cart/{OpenApiErrorResponseCartPlatformModel.swift => OpenApiErrorResultCartPlatformModel.swift} (97%) rename Sources/code/platform/Models/Cart/{OpenapiCartDetailsRequestCartPlatformModel.swift => OpenapiCartDetailsCreationCartPlatformModel.swift} (92%) rename Sources/code/platform/Models/Cart/{OpenapiCartDetailsResponseCartPlatformModel.swift => OpenapiCartDetailsResultCartPlatformModel.swift} (97%) rename Sources/code/platform/Models/Cart/{OperationErrorResponseCartPlatformModel.swift => OperationErrorResultCartPlatformModel.swift} (97%) rename Sources/code/platform/Models/Cart/{OverrideCheckoutResponseCartPlatformModel.swift => OverrideCheckoutResultCartPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{PlatformAddCartRequestCartPlatformModel.swift => PlatformAddCartDetailsCartPlatformModel.swift} (97%) create mode 100644 Sources/code/platform/Models/Cart/PlatformCartCheckoutDetailCreationCartPlatformModel.swift rename Sources/code/platform/Models/Cart/{PlatformCartCheckoutDetailV2RequestCartPlatformModel.swift => PlatformCartCheckoutDetailV2CreationCartPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{PlatformCartMetaRequestCartPlatformModel.swift => PlatformCartMetaCreationCartPlatformModel.swift} (98%) rename Sources/code/platform/Models/Cart/{PlatformCartShipmentsResponseCartPlatformModel.swift => PlatformCartShipmentsResultCartPlatformModel.swift} (98%) create mode 100644 Sources/code/platform/Models/Cart/PlatformGetAddressesDetailsCartPlatformModel.swift rename Sources/code/platform/Models/Cart/{PlatformSelectCartAddressRequestCartPlatformModel.swift => PlatformSelectCartAddressCartPlatformModel.swift} (97%) rename Sources/code/platform/Models/Cart/{PlatformShipmentResponseCartPlatformModel.swift => PlatformShipmentDetailsCartPlatformModel.swift} (99%) rename Sources/code/platform/Models/{AuditTrail/ModifierAuditTrailPlatformModel.swift => Cart/PlatformUpdateCartDetailsCartPlatformModel.swift} (60%) rename Sources/code/platform/Models/Cart/{PriceAdjustmentResponseCartPlatformModel.swift => PriceAdjustmentResultCartPlatformModel.swift} (94%) create mode 100644 Sources/code/platform/Models/Cart/ProductActionPageCartPlatformModel.swift create mode 100644 Sources/code/platform/Models/Cart/ProductActionParamsCartPlatformModel.swift create mode 100644 Sources/code/platform/Models/Cart/PromotionAddResultCartPlatformModel.swift rename Sources/code/platform/Models/Cart/{PromotionOffersResponseCartPlatformModel.swift => PromotionOffersDetailsCartPlatformModel.swift} (94%) rename Sources/code/platform/Models/Cart/{PromotionPaymentOffersResponseCartPlatformModel.swift => PromotionPaymentOffersDetailsCartPlatformModel.swift} (95%) create mode 100644 Sources/code/platform/Models/Cart/PromotionUpdateResultCartPlatformModel.swift rename Sources/code/platform/Models/Cart/{PromotionsResponseCartPlatformModel.swift => PromotionsResultCartPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{SaveAddressResponseCartPlatformModel.swift => SaveAddressDetailsCartPlatformModel.swift} (97%) rename Sources/code/platform/Models/Cart/{SharedCartResponseCartPlatformModel.swift => SharedCartResultCartPlatformModel.swift} (96%) rename Sources/code/platform/Models/Cart/{StoreDetailsResponseCartPlatformModel.swift => StoreDetailsCartPlatformModel.swift} (94%) rename Sources/code/platform/Models/Cart/{UpdateAddressResponseCartPlatformModel.swift => UpdateAddressDetailsCartPlatformModel.swift} (97%) rename Sources/code/platform/Models/Cart/{PlatformUpdateCartRequestCartPlatformModel.swift => UpdateCartCreationCartPlatformModel.swift} (79%) rename Sources/code/platform/Models/Cart/{UpdateCartDetailResponseCartPlatformModel.swift => UpdateCartDetailResultCartPlatformModel.swift} (88%) rename Sources/code/platform/Models/Cart/{UpdateCartShipmentRequestCartPlatformModel.swift => UpdateCartShipmentCreationCartPlatformModel.swift} (92%) rename Sources/code/platform/Models/Cart/{UserCartMappingResponseCartPlatformModel.swift => UserCartMappingResultCartPlatformModel.swift} (99%) create mode 100644 Sources/code/platform/Models/Cart/ValidationConfigCartPlatformModel.swift create mode 100644 Sources/code/platform/Models/Cart/ValidationErrorCartPlatformModel.swift rename Sources/code/platform/Models/Catalog/{AllowSingleRequestCatalogPlatformModel.swift => AllowSingleRequestSchemaCatalogPlatformModel.swift} (92%) rename Sources/code/platform/Models/Catalog/{AppCategoryReturnConfigResponseCatalogPlatformModel.swift => AppCategoryReturnConfigResponseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{AppReturnConfigResponseCatalogPlatformModel.swift => AppReturnConfigResponseSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{ApplicationDepartmentListingResponseCatalogPlatformModel.swift => ApplicationDepartmentListingResponseSchemaCatalogPlatformModel.swift} (93%) rename Sources/code/platform/Models/Catalog/{ApplicationProductListingResponseCatalogPlatformModel.swift => ApplicationProductListingResponseSchemaCatalogPlatformModel.swift} (89%) create mode 100644 Sources/code/platform/Models/Catalog/ApplicationProductsSchemaCatalogPlatformModel.swift rename Sources/code/platform/Models/Catalog/{ArticleStoreResponseCatalogPlatformModel.swift => ArticleStoreResponseSchemaCatalogPlatformModel.swift} (97%) rename Sources/code/platform/Models/Catalog/{AttributeMasterSerializerCatalogPlatformModel.swift => AttributeMasterSchemaCatalogPlatformModel.swift} (99%) rename Sources/code/platform/Models/Catalog/{BaseAppCategoryReturnConfigResponseCatalogPlatformModel.swift => BaseAppCategoryReturnConfigResponseSchemaCatalogPlatformModel.swift} (78%) rename Sources/code/platform/Models/Catalog/{BrandListingResponseCatalogPlatformModel.swift => BrandListingResponseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{InventoryBrandMetaCatalogPlatformModel.swift => BrandMeta1CatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{BulkAssetResponseCatalogPlatformModel.swift => BulkAssetResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{SuccessResponseCatalogPlatformModel.swift => BulkHsnResponseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{BulkProductRequestCatalogPlatformModel.swift => BulkProductRequestSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{BulkResponseCatalogPlatformModel.swift => BulkResponseSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{CatalogInsightResponseCatalogPlatformModel.swift => CatalogInsightResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{CategoriesResponseCatalogPlatformModel.swift => CategoriesResponseSchemaCatalogPlatformModel.swift} (97%) rename Sources/code/platform/Models/Catalog/{CategoryListingResponseCatalogPlatformModel.swift => CategoryListingResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{CategoryResponseCatalogPlatformModel.swift => CategoryResponseSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{CollectionCreateResponseCatalogPlatformModel.swift => CollectionCreateResponseSchemaCatalogPlatformModel.swift} (69%) rename Sources/code/platform/Models/Catalog/{CollectionDetailResponseCatalogPlatformModel.swift => CollectionDetailResponseSchemaCatalogPlatformModel.swift} (99%) rename Sources/code/platform/Models/Catalog/{InventoryCompanyMetaCatalogPlatformModel.swift => CompanyMeta1CatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{ConfigSuccessResponseCatalogPlatformModel.swift => ConfigErrorResponseSchemaCatalogPlatformModel.swift} (91%) rename Sources/code/platform/Models/Catalog/{ConfigErrorResponseCatalogPlatformModel.swift => ConfigSuccessResponseSchemaCatalogPlatformModel.swift} (91%) rename Sources/code/platform/Models/Catalog/{CreateAutocompleteWordsResponseCatalogPlatformModel.swift => CreateAutocompleteWordsResponseSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{UpdateMarketplaceOptinResponseCatalogPlatformModel.swift => CreateMarketplaceOptinResponseSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{GetSearchConfigurationResponseCatalogPlatformModel.swift => CreateSearchConfigurationRequestSchemaCatalogPlatformModel.swift} (91%) rename Sources/code/platform/Models/Catalog/{DeleteSearchConfigurationResponseCatalogPlatformModel.swift => CreateSearchConfigurationResponseSchemaCatalogPlatformModel.swift} (91%) rename Sources/code/platform/Models/Catalog/{CrossSellingResponseCatalogPlatformModel.swift => CrossSellingResponseSchemaCatalogPlatformModel.swift} (96%) create mode 100644 Sources/code/platform/Models/Catalog/CustomMetaCatalogPlatformModel.swift rename Sources/code/platform/Models/Catalog/{DefaultKeyRequestCatalogPlatformModel.swift => DefaultKeyRequestSchemaCatalogPlatformModel.swift} (92%) rename Sources/code/platform/Models/Catalog/{DeleteResponseCatalogPlatformModel.swift => DeleteResponseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{CreateSearchConfigurationResponseCatalogPlatformModel.swift => DeleteSearchConfigurationResponseSchemaCatalogPlatformModel.swift} (91%) rename Sources/code/platform/Models/Catalog/{DepartmentErrorResponseCatalogPlatformModel.swift => DepartmentErrorResponseSchemaCatalogPlatformModel.swift} (97%) rename Sources/code/platform/Models/Catalog/{DepartmentResponseCatalogPlatformModel.swift => DepartmentResponseSchemaCatalogPlatformModel.swift} (93%) rename Sources/code/platform/Models/Catalog/{DepartmentsResponseCatalogPlatformModel.swift => DepartmentsResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{InventoryDimensionResponseCatalogPlatformModel.swift => DimensionResponse1CatalogPlatformModel.swift} (97%) rename Sources/code/platform/Models/Catalog/{DimensionResponseCatalogPlatformModel.swift => DimensionResponseSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{ErrorResponseCatalogPlatformModel.swift => ErrorResponseSchemaCatalogPlatformModel.swift} (98%) create mode 100644 Sources/code/platform/Models/Catalog/FiltersCatalogPlatformModel.swift rename Sources/code/platform/Models/Catalog/{GetAddressSerializerCatalogPlatformModel.swift => GetAddressSchemaCatalogPlatformModel.swift} (99%) rename Sources/code/platform/Models/Catalog/{GetAutocompleteWordsResponseCatalogPlatformModel.swift => GetAutocompleteWordsResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{GetCollectionDetailResponseCatalogPlatformModel.swift => GetCollectionDetailResponseSchemaCatalogPlatformModel.swift} (99%) rename Sources/code/platform/Models/Catalog/{GetCollectionItemsResponseCatalogPlatformModel.swift => GetCollectionItemsResponseSchemaCatalogPlatformModel.swift} (88%) rename Sources/code/platform/Models/Catalog/{GetCollectionListingResponseCatalogPlatformModel.swift => GetCollectionListingResponseSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{GetCollectionQueryOptionResponseCatalogPlatformModel.swift => GetCollectionQueryOptionResponseSchemaCatalogPlatformModel.swift} (88%) rename Sources/code/platform/Models/Catalog/{GetCompanySerializerCatalogPlatformModel.swift => GetCompanySchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{GetConfigMetadataResponseCatalogPlatformModel.swift => GetConfigMetadataResponseSchemaCatalogPlatformModel.swift} (97%) rename Sources/code/platform/Models/Catalog/{GetConfigResponseCatalogPlatformModel.swift => GetConfigResponseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{GetInventoriesResponseCatalogPlatformModel.swift => GetInventoriesResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{GetLocationSerializerCatalogPlatformModel.swift => GetLocationSchemaCatalogPlatformModel.swift} (91%) rename Sources/code/platform/Models/Catalog/{GetProductBundleCreateResponseCatalogPlatformModel.swift => GetProductBundleCreateResponseSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{GetProductBundleListingResponseCatalogPlatformModel.swift => GetProductBundleListingResponseSchemaCatalogPlatformModel.swift} (85%) rename Sources/code/platform/Models/Catalog/{GetProductBundleResponseCatalogPlatformModel.swift => GetProductBundleResponseSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{GetQueryFiltersKeysResponseCatalogPlatformModel.swift => GetQueryFiltersKeysResponseSchemaCatalogPlatformModel.swift} (89%) rename Sources/code/platform/Models/Catalog/{GetQueryFiltersResponseCatalogPlatformModel.swift => GetQueryFiltersResponseSchemaCatalogPlatformModel.swift} (89%) rename Sources/code/platform/Models/Catalog/{GetQueryFiltersValuesResponseCatalogPlatformModel.swift => GetQueryFiltersValuesResponseSchemaCatalogPlatformModel.swift} (92%) rename Sources/code/platform/Models/Catalog/{CreateSearchConfigurationRequestCatalogPlatformModel.swift => GetSearchConfigurationResponseSchemaCatalogPlatformModel.swift} (91%) rename Sources/code/platform/Models/Catalog/{GetSearchWordsDetailResponseCatalogPlatformModel.swift => GetSearchWordsDetailResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{GetSearchWordsResponseCatalogPlatformModel.swift => GetSearchWordsResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{HSNCodesResponseCatalogPlatformModel.swift => HSNCodesResponseSchemaCatalogPlatformModel.swift} (96%) create mode 100644 Sources/code/platform/Models/Catalog/IdentifierCatalogPlatformModel.swift rename Sources/code/platform/Models/Catalog/{InventoryBulkRequestCatalogPlatformModel.swift => InventoryBulkRequestSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{InventoryCreateRequestCatalogPlatformModel.swift => InventoryCreateRequestSchemaCatalogPlatformModel.swift} (97%) rename Sources/code/platform/Models/Catalog/{InventoryExportJobListResponseCatalogPlatformModel.swift => InventoryExportJobListResponseSchemaCatalogPlatformModel.swift} (84%) rename Sources/code/platform/Models/Catalog/{InventoryExportRequestCatalogPlatformModel.swift => InventoryExportRequestSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{InventoryExportResponseCatalogPlatformModel.swift => InventoryExportResponseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{InventoryJobDetailResponseCatalogPlatformModel.swift => InventoryJobDetailResponseSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{InventoryRequestCatalogPlatformModel.swift => InventoryRequestSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{InventoryResponseCatalogPlatformModel.swift => InventoryResponseSchemaCatalogPlatformModel.swift} (99%) rename Sources/code/platform/Models/Catalog/{InventorySellerResponseCatalogPlatformModel.swift => InventorySellerResponseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{InventoryStockResponseCatalogPlatformModel.swift => InventoryStockResponseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{InventoryUpdateResponseCatalogPlatformModel.swift => InventoryUpdateResponseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{InventoryValidationResponseCatalogPlatformModel.swift => InventoryValidationResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{InvoiceCredSerializerCatalogPlatformModel.swift => InvoiceCredSchemaCatalogPlatformModel.swift} (97%) rename Sources/code/platform/Models/Catalog/{InvoiceDetailsSerializerCatalogPlatformModel.swift => InvoiceDetailsSchemaCatalogPlatformModel.swift} (83%) rename Sources/code/platform/Models/Catalog/{LocationDayWiseSerializerCatalogPlatformModel.swift => LocationDayWiseSchemaCatalogPlatformModel.swift} (86%) create mode 100644 Sources/code/platform/Models/Catalog/LocationListSchemaCatalogPlatformModel.swift delete mode 100644 Sources/code/platform/Models/Catalog/LocationListSerializerCatalogPlatformModel.swift rename Sources/code/platform/Models/Catalog/{LocationManagerSerializerCatalogPlatformModel.swift => LocationManagerSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{LocationTimingSerializerCatalogPlatformModel.swift => LocationTimingSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{InventoryManufacturerResponseCatalogPlatformModel.swift => ManufacturerResponse1CatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{ManufacturerResponseCatalogPlatformModel.swift => ManufacturerResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{MetaDataListingFilterMetaResponseCatalogPlatformModel.swift => MetaDataListingFilterMetaResponseSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{MetaDataListingSortResponseCatalogPlatformModel.swift => MetaDataListingFilterResponseSchemaCatalogPlatformModel.swift} (79%) rename Sources/code/platform/Models/Catalog/{MetaDataListingResponseCatalogPlatformModel.swift => MetaDataListingResponseSchemaCatalogPlatformModel.swift} (75%) rename Sources/code/platform/Models/Catalog/{MetaDataListingSortMetaResponseCatalogPlatformModel.swift => MetaDataListingSortMetaResponseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{MetaDataListingFilterResponseCatalogPlatformModel.swift => MetaDataListingSortResponseSchemaCatalogPlatformModel.swift} (80%) create mode 100644 Sources/code/platform/Models/Catalog/ModifiedByCatalogPlatformModel.swift create mode 100644 Sources/code/platform/Models/Catalog/MultiCategoriesSchemaCatalogPlatformModel.swift rename Sources/code/platform/Models/Catalog/{NetQuantityResponseCatalogPlatformModel.swift => NetQuantityResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{OptInPostRequestCatalogPlatformModel.swift => OptInPostRequestSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{OwnerAppItemResponseCatalogPlatformModel.swift => OwnerAppItemResponseSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{PTErrorResponseCatalogPlatformModel.swift => PTErrorResponseSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{PageResponseCatalogPlatformModel.swift => PageResponseSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{ProdcutTemplateCategoriesResponseCatalogPlatformModel.swift => ProdcutTemplateCategoriesResponseSchemaCatalogPlatformModel.swift} (86%) rename Sources/code/platform/Models/Catalog/{ProductAttributesResponseCatalogPlatformModel.swift => ProductAttributesResponseSchemaCatalogPlatformModel.swift} (73%) rename Sources/code/platform/Models/Catalog/{ProductBulkRequestCatalogPlatformModel.swift => ProductBulkRequestSchemaCatalogPlatformModel.swift} (99%) rename Sources/code/platform/Models/Catalog/{ProductBundleRequestCatalogPlatformModel.swift => ProductBundleRequestSchemaCatalogPlatformModel.swift} (99%) rename Sources/code/platform/Models/Catalog/{ProductBundleUpdateRequestCatalogPlatformModel.swift => ProductBundleUpdateRequestSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{ProductDownloadsResponseCatalogPlatformModel.swift => ProductDownloadsResponseSchemaCatalogPlatformModel.swift} (86%) rename Sources/code/platform/Models/Catalog/{ProductListingResponseCatalogPlatformModel.swift => ProductListingResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{ProductReturnConfigBaseSerializerCatalogPlatformModel.swift => ProductReturnConfigBaseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{ProductReturnConfigSerializerCatalogPlatformModel.swift => ProductReturnConfigSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{ProductSizeDeleteDataResponseCatalogPlatformModel.swift => ProductSizeDeleteDataResponseSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{ProductSizeDeleteResponseCatalogPlatformModel.swift => ProductSizeDeleteResponseSchemaCatalogPlatformModel.swift} (86%) rename Sources/code/platform/Models/Catalog/{ProductTagsViewResponseCatalogPlatformModel.swift => ProductTagsViewResponseSchemaCatalogPlatformModel.swift} (93%) rename Sources/code/platform/Models/Catalog/{ProductTemplateExportFilterRequestCatalogPlatformModel.swift => ProductTemplateExportFilterRequestSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{ProductTemplateExportResponseCatalogPlatformModel.swift => ProductTemplateExportResponseSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{ProductVariantsResponseCatalogPlatformModel.swift => ProductVariantsResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{RawProductListingResponseCatalogPlatformModel.swift => RawProductListingResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{ReturnConfigResponseCatalogPlatformModel.swift => ReturnConfigResponseSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{SingleCategoryResponseCatalogPlatformModel.swift => SingleCategoryResponseSchemaCatalogPlatformModel.swift} (93%) rename Sources/code/platform/Models/Catalog/{SingleProductResponseCatalogPlatformModel.swift => SingleProductResponseSchemaCatalogPlatformModel.swift} (93%) rename Sources/code/platform/Models/Catalog/{SizeGuideResponseCatalogPlatformModel.swift => SizeGuideResponseSchemaCatalogPlatformModel.swift} (99%) rename Sources/code/platform/Models/Catalog/{StoreAssignResponseCatalogPlatformModel.swift => StoreAssignResponseSchemaCatalogPlatformModel.swift} (99%) rename Sources/code/platform/Models/Catalog/{SuccessResponseObjectCatalogPlatformModel.swift => SuccessResponse1CatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{BulkHsnResponseCatalogPlatformModel.swift => SuccessResponseSchemaCatalogPlatformModel.swift} (94%) rename Sources/code/platform/Models/Catalog/{TemplatesResponseCatalogPlatformModel.swift => TemplatesResponseSchemaCatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{TemplatesValidationResponseCatalogPlatformModel.swift => TemplatesValidationResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Catalog/{TraderResponseCatalogPlatformModel.swift => Trader2CatalogPlatformModel.swift} (97%) rename Sources/code/platform/Models/Catalog/{UpdateMarketplaceOptinRequestCatalogPlatformModel.swift => UpdateMarketplaceOptinRequestSchemaCatalogPlatformModel.swift} (97%) rename Sources/code/platform/Models/Catalog/{CreateMarketplaceOptinResponseCatalogPlatformModel.swift => UpdateMarketplaceOptinResponseSchemaCatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{UpdateSearchConfigurationRequestCatalogPlatformModel.swift => UpdateSearchConfigurationRequestSchemaCatalogPlatformModel.swift} (91%) delete mode 100644 Sources/code/platform/Models/Catalog/UpdateSearchConfigurationResponseCatalogPlatformModel.swift create mode 100644 Sources/code/platform/Models/Catalog/UpdateSearchConfigurationResponseSchemaCatalogPlatformModel.swift rename Sources/code/platform/Models/Catalog/{UserSerializerCatalogPlatformModel.swift => UserSchemaCatalogPlatformModel.swift} (97%) rename Sources/code/platform/Models/Catalog/{RequestUserSerializerCatalogPlatformModel.swift => UserSerializer1CatalogPlatformModel.swift} (98%) rename Sources/code/platform/Models/Catalog/{InventoryWeightResponseCatalogPlatformModel.swift => WeightResponse1CatalogPlatformModel.swift} (96%) rename Sources/code/platform/Models/Catalog/{WeightResponseCatalogPlatformModel.swift => WeightResponseSchemaCatalogPlatformModel.swift} (95%) rename Sources/code/platform/Models/Common/{ApplicationResponseCommonPlatformModel.swift => ApplicationResponseSchemaCommonPlatformModel.swift} (98%) rename Sources/code/platform/Models/Common/{BadRequestCommonPlatformModel.swift => BadRequestSchemaCommonPlatformModel.swift} (94%) rename Sources/code/platform/Models/Communication/{GlobalVariablesPostResponseCommunicationPlatformModel.swift => CreateGlobalVariablesResultCommunicationPlatformModel.swift} (97%) rename Sources/code/platform/Models/Communication/{EngineRequestCommunicationPlatformModel.swift => EnginePayloadCommunicationPlatformModel.swift} (97%) rename Sources/code/platform/Models/Communication/{EngineResponseCommunicationPlatformModel.swift => EngineResultCommunicationPlatformModel.swift} (95%) rename Sources/code/platform/Models/Communication/{EventSubscriptionsBulkUpdateRequestCommunicationPlatformModel.swift => EventSubscriptionsBulkUpdatePayloadCommunicationPlatformModel.swift} (92%) rename Sources/code/platform/Models/Communication/{EventSubscriptionsBulkUpdateResponseCommunicationPlatformModel.swift => EventSubscriptionsBulkUpdateResultCommunicationPlatformModel.swift} (98%) rename Sources/code/platform/Models/Communication/{GlobalVariablesGetResponseCommunicationPlatformModel.swift => GetGlobalVariablesResultCommunicationPlatformModel.swift} (95%) rename Sources/code/platform/Models/Communication/{TriggerJobRequestCommunicationPlatformModel.swift => TriggerJobPayloadCommunicationPlatformModel.swift} (94%) rename Sources/code/platform/Models/Communication/{TriggerJobResponseCommunicationPlatformModel.swift => TriggerJobResultCommunicationPlatformModel.swift} (94%) rename Sources/code/platform/Models/CompanyProfile/{AddressSerializerCompanyProfilePlatformModel.swift => AddressSchemaCompanyProfilePlatformModel.swift} (99%) rename Sources/code/platform/Models/CompanyProfile/{BrandBannerSerializerCompanyProfilePlatformModel.swift => BrandBannerSchemaCompanyProfilePlatformModel.swift} (94%) rename Sources/code/platform/Models/CompanyProfile/{BulkLocationSerializerCompanyProfilePlatformModel.swift => BulkLocationSchemaCompanyProfilePlatformModel.swift} (80%) rename Sources/code/platform/Models/CompanyProfile/{LocationListSerializerCompanyProfilePlatformModel.swift => CompanyBrandListSchemaCompanyProfilePlatformModel.swift} (85%) rename Sources/code/platform/Models/CompanyProfile/{CompanyBrandPostRequestSerializerCompanyProfilePlatformModel.swift => CompanyBrandPostRequestSchemaCompanyProfilePlatformModel.swift} (95%) rename Sources/code/platform/Models/CompanyProfile/{CompanyBrandSerializerCompanyProfilePlatformModel.swift => CompanyBrandSchemaCompanyProfilePlatformModel.swift} (88%) rename Sources/code/platform/Models/CompanyProfile/{CompanySerializerCompanyProfilePlatformModel.swift => CompanySchemaCompanyProfilePlatformModel.swift} (91%) rename Sources/code/platform/Models/CompanyProfile/{CompanyTaxesSerializerCompanyProfilePlatformModel.swift => CompanyTaxesSchemaCompanyProfilePlatformModel.swift} (97%) rename Sources/code/platform/Models/CompanyProfile/{CreateBrandRequestSerializerCompanyProfilePlatformModel.swift => CreateBrandRequestSchemaCompanyProfilePlatformModel.swift} (93%) rename Sources/code/platform/Models/CompanyProfile/{CreateUpdateAddressSerializerCompanyProfilePlatformModel.swift => CreateUpdateAddressSchemaCompanyProfilePlatformModel.swift} (98%) rename Sources/code/platform/Models/CompanyProfile/{ErrorResponseCompanyProfilePlatformModel.swift => ErrorResponseSchemaCompanyProfilePlatformModel.swift} (97%) rename Sources/code/platform/Models/CompanyProfile/{GetAddressSerializerCompanyProfilePlatformModel.swift => GetAddressSchemaCompanyProfilePlatformModel.swift} (99%) rename Sources/code/platform/Models/CompanyProfile/{GetBrandResponseSerializerCompanyProfilePlatformModel.swift => GetBrandResponseSchemaCompanyProfilePlatformModel.swift} (91%) rename Sources/code/platform/Models/CompanyProfile/{GetCompanyProfileSerializerResponseCompanyProfilePlatformModel.swift => GetCompanyProfileSerializerResponseSchemaCompanyProfilePlatformModel.swift} (91%) rename Sources/code/platform/Models/CompanyProfile/{GetCompanySerializerCompanyProfilePlatformModel.swift => GetCompanySchemaCompanyProfilePlatformModel.swift} (90%) rename Sources/code/platform/Models/CompanyProfile/{GetLocationSerializerCompanyProfilePlatformModel.swift => GetLocationSchemaCompanyProfilePlatformModel.swift} (89%) rename Sources/code/platform/Models/CompanyProfile/{HolidayDateSerializerCompanyProfilePlatformModel.swift => HolidayDateSchemaCompanyProfilePlatformModel.swift} (94%) rename Sources/code/platform/Models/CompanyProfile/{HolidaySchemaSerializerCompanyProfilePlatformModel.swift => HolidaySchemaSchemaCompanyProfilePlatformModel.swift} (84%) rename Sources/code/platform/Models/CompanyProfile/{InvoiceCredSerializerCompanyProfilePlatformModel.swift => InvoiceCredSchemaCompanyProfilePlatformModel.swift} (97%) rename Sources/code/platform/Models/CompanyProfile/{InvoiceDetailsSerializerCompanyProfilePlatformModel.swift => InvoiceDetailsSchemaCompanyProfilePlatformModel.swift} (84%) rename Sources/code/platform/Models/CompanyProfile/{LocationDayWiseSerializerCompanyProfilePlatformModel.swift => LocationDayWiseSchemaCompanyProfilePlatformModel.swift} (86%) rename Sources/code/platform/Models/CompanyProfile/{CompanyBrandListSerializerCompanyProfilePlatformModel.swift => LocationListSchemaCompanyProfilePlatformModel.swift} (85%) rename Sources/code/platform/Models/CompanyProfile/{LocationManagerSerializerCompanyProfilePlatformModel.swift => LocationManagerSchemaCompanyProfilePlatformModel.swift} (96%) rename Sources/code/platform/Models/CompanyProfile/{LocationSerializerCompanyProfilePlatformModel.swift => LocationSchemaCompanyProfilePlatformModel.swift} (90%) rename Sources/code/platform/Models/CompanyProfile/{LocationTimingSerializerCompanyProfilePlatformModel.swift => LocationTimingSchemaCompanyProfilePlatformModel.swift} (94%) rename Sources/code/platform/Models/CompanyProfile/{MetricsSerializerCompanyProfilePlatformModel.swift => MetricsSchemaCompanyProfilePlatformModel.swift} (98%) rename Sources/code/platform/Models/CompanyProfile/{ProductReturnConfigSerializerCompanyProfilePlatformModel.swift => ProductReturnConfigSchemaCompanyProfilePlatformModel.swift} (95%) rename Sources/code/platform/Models/CompanyProfile/{ProfileSuccessResponseCompanyProfilePlatformModel.swift => ProfileSuccessResponseSchemaCompanyProfilePlatformModel.swift} (96%) rename Sources/code/platform/Models/CompanyProfile/{UpdateBrandRequestSerializerCompanyProfilePlatformModel.swift => UpdateBrandRequestSchemaCompanyProfilePlatformModel.swift} (92%) rename Sources/code/platform/Models/CompanyProfile/{UserSerializerCompanyProfilePlatformModel.swift => UserSchemaCompanyProfilePlatformModel.swift} (97%) rename Sources/code/platform/Models/Configuration/{AppCurrencyResponseConfigurationPlatformModel.swift => AppCurrencyResponseSchemaConfigurationPlatformModel.swift} (98%) rename Sources/code/platform/Models/Configuration/{AppFeatureResponseConfigurationPlatformModel.swift => AppFeatureRequestSchemaConfigurationPlatformModel.swift} (94%) rename Sources/code/platform/Models/Configuration/{AppFeatureRequestConfigurationPlatformModel.swift => AppFeatureResponseSchemaConfigurationPlatformModel.swift} (93%) rename Sources/code/platform/Models/Configuration/{ApplicationsResponseConfigurationPlatformModel.swift => ApplicationsResponseSchemaConfigurationPlatformModel.swift} (95%) rename Sources/code/platform/Models/Configuration/{BrandsByCompanyResponseConfigurationPlatformModel.swift => BrandsByCompanyResponseSchemaConfigurationPlatformModel.swift} (93%) rename Sources/code/platform/Models/Configuration/{CompaniesResponseConfigurationPlatformModel.swift => CompaniesResponseSchemaConfigurationPlatformModel.swift} (96%) rename Sources/code/platform/Models/Configuration/{CompanyByBrandsRequestConfigurationPlatformModel.swift => CompanyByBrandsRequestSchemaConfigurationPlatformModel.swift} (94%) rename Sources/code/platform/Models/Configuration/{CompanyByBrandsResponseConfigurationPlatformModel.swift => CompanyByBrandsResponseSchemaConfigurationPlatformModel.swift} (95%) rename Sources/code/platform/Models/Configuration/{CreateAppResponseConfigurationPlatformModel.swift => CreateAppResponseSchemaConfigurationPlatformModel.swift} (96%) rename Sources/code/platform/Models/Configuration/{CreateApplicationRequestConfigurationPlatformModel.swift => CreateApplicationRequestSchemaConfigurationPlatformModel.swift} (96%) rename Sources/code/platform/Models/Configuration/{CurrenciesResponseConfigurationPlatformModel.swift => CurrenciesResponseSchemaConfigurationPlatformModel.swift} (93%) create mode 100644 Sources/code/platform/Models/Configuration/CurrencyExchangeItemConfigurationPlatformModel.swift create mode 100644 Sources/code/platform/Models/Configuration/CurrencyExchangeResponseV2ConfigurationPlatformModel.swift rename Sources/code/platform/Models/Configuration/{DomainAddRequestConfigurationPlatformModel.swift => DomainAddRequestSchemaConfigurationPlatformModel.swift} (94%) rename Sources/code/platform/Models/Configuration/{DomainStatusRequestConfigurationPlatformModel.swift => DomainStatusRequestSchemaConfigurationPlatformModel.swift} (93%) rename Sources/code/platform/Models/Configuration/{DomainStatusResponseConfigurationPlatformModel.swift => DomainStatusResponseSchemaConfigurationPlatformModel.swift} (95%) rename Sources/code/platform/Models/Configuration/{DomainSuggestionsRequestConfigurationPlatformModel.swift => DomainSuggestionsRequestSchemaConfigurationPlatformModel.swift} (78%) rename Sources/code/platform/Models/Configuration/{DomainSuggestionsResponseConfigurationPlatformModel.swift => DomainSuggestionsResponseSchemaConfigurationPlatformModel.swift} (93%) rename Sources/code/platform/Models/Configuration/{DomainsResponseConfigurationPlatformModel.swift => DomainsResponseSchemaConfigurationPlatformModel.swift} (94%) rename Sources/code/platform/Models/Configuration/{FilterOrderingStoreRequestConfigurationPlatformModel.swift => FilterOrderingStoreRequestSchemaConfigurationPlatformModel.swift} (96%) create mode 100644 Sources/code/platform/Models/Configuration/FstIdentificationConfigurationPlatformModel.swift rename Sources/code/platform/Models/Configuration/{InvalidPayloadRequestConfigurationPlatformModel.swift => InvalidPayloadRequestSchemaConfigurationPlatformModel.swift} (95%) rename Sources/code/platform/Models/Configuration/{MobileAppConfigRequestConfigurationPlatformModel.swift => MobileAppConfigRequestSchemaConfigurationPlatformModel.swift} (97%) rename Sources/code/platform/Models/Configuration/{OptedApplicationResponseConfigurationPlatformModel.swift => OptedApplicationResponseSchemaConfigurationPlatformModel.swift} (98%) rename Sources/code/platform/Models/Configuration/{OrderingStoreSelectRequestConfigurationPlatformModel.swift => OrderingStoreSelectRequestSchemaConfigurationPlatformModel.swift} (91%) rename Sources/code/platform/Models/Configuration/{OrderingStoresResponseConfigurationPlatformModel.swift => OrderingStoresResponseSchemaConfigurationPlatformModel.swift} (95%) create mode 100644 Sources/code/platform/Models/Configuration/QuerySuggestionsConfigurationPlatformModel.swift create mode 100644 Sources/code/platform/Models/Configuration/SearchConfigConfigurationPlatformModel.swift rename Sources/code/platform/Models/Configuration/{StoreByBrandsRequestConfigurationPlatformModel.swift => StoreByBrandsRequestSchemaConfigurationPlatformModel.swift} (96%) rename Sources/code/platform/Models/Configuration/{StoreByBrandsResponseConfigurationPlatformModel.swift => StoreByBrandsResponseSchemaConfigurationPlatformModel.swift} (95%) rename Sources/code/platform/Models/Configuration/{StoresResponseConfigurationPlatformModel.swift => StoresResponseSchemaConfigurationPlatformModel.swift} (96%) rename Sources/code/platform/Models/Configuration/{SuccessMessageResponseConfigurationPlatformModel.swift => SuccessMessageResponseSchemaConfigurationPlatformModel.swift} (95%) rename Sources/code/platform/Models/Configuration/{TokenResponseConfigurationPlatformModel.swift => TokenResponseSchemaConfigurationPlatformModel.swift} (98%) rename Sources/code/platform/Models/Configuration/{UpdateDomainTypeRequestConfigurationPlatformModel.swift => UpdateDomainTypeRequestSchemaConfigurationPlatformModel.swift} (95%) create mode 100644 Sources/code/platform/Models/Configuration/ValidationErrorConfigurationPlatformModel.swift create mode 100644 Sources/code/platform/Models/Configuration/ValidationErrorsConfigurationPlatformModel.swift rename Sources/code/platform/Models/Configuration/{ValidationFailedResponseConfigurationPlatformModel.swift => ValidationFailedResponseSchemaConfigurationPlatformModel.swift} (93%) rename Sources/code/platform/Models/Content/{BlogGetResponseContentPlatformModel.swift => BlogGetDetailsContentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Content/{BlogRequestContentPlatformModel.swift => BlogPayloadContentPlatformModel.swift} (99%) create mode 100644 Sources/code/platform/Models/Content/CustomFieldBulkEntryContentPlatformModel.swift create mode 100644 Sources/code/platform/Models/Content/CustomFieldsDeleteSchemaContentPlatformModel.swift rename Sources/code/platform/Models/Content/{CustomObjectByIdSchemaContentPlatformModel.swift => CustomObjectBySlugSchemaContentPlatformModel.swift} (69%) rename Sources/code/platform/Models/Content/{CustomObjectDefinitionSchemaContentPlatformModel.swift => CustomObjectDefinitionSlugSchemaContentPlatformModel.swift} (69%) rename Sources/code/platform/Models/Content/{CustomObjectEntryBulkUploadResponseContentPlatformModel.swift => CustomObjectEntryBulkUploadDetailsContentPlatformModel.swift} (95%) rename Sources/code/platform/Models/{Order/AmountSchemaOrderPlatformModel.swift => Content/CustomObjectEntryFieldSchemaWithoutIDContentPlatformModel.swift} (71%) rename Sources/code/platform/Models/Content/{CustomObjectFieldSchemaContentPlatformModel.swift => CustomObjectFieldDefinitionContentPlatformModel.swift} (81%) rename Sources/code/platform/Models/Content/{CustomObjectListItemDefinationSchemaContentPlatformModel.swift => CustomObjectListItemDefinitionModelContentPlatformModel.swift} (92%) create mode 100644 Sources/code/platform/Models/Content/CustomObjectRequestSchemaWithoutIdContentPlatformModel.swift rename Sources/code/platform/Models/Content/{DefaultNavigationResponseContentPlatformModel.swift => DefaultNavigationDetailsContentPlatformModel.swift} (93%) create mode 100644 Sources/code/platform/Models/Content/DurationContentPlatformModel.swift create mode 100644 Sources/code/platform/Models/Content/HTMLContentPlatformModel.swift rename Sources/code/platform/Models/Content/{CustomObjectJobSchemaContentPlatformModel.swift => JobSchemaContentPlatformModel.swift} (89%) rename Sources/code/platform/Models/Content/{LandingPageGetResponseContentPlatformModel.swift => LandingPageGetDetailsContentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Content/{CustomObjectCustomFieldDefinitionResSchemaContentPlatformModel.swift => MetaFieldDefinitionDetailResSchemaContentPlatformModel.swift} (79%) create mode 100644 Sources/code/platform/Models/Content/MetafieldTypesSchemaContentPlatformModel.swift rename Sources/code/platform/Models/Content/{NavigationGetResponseContentPlatformModel.swift => NavigationGetDetailsContentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Content/{NavigationRequestContentPlatformModel.swift => NavigationPayloadContentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Content/{PageGetResponseContentPlatformModel.swift => PageGetDetailsContentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Content/{PageRequestContentPlatformModel.swift => PagePayloadContentPlatformModel.swift} (99%) rename Sources/code/platform/Models/Content/{PagePublishRequestContentPlatformModel.swift => PagePublishPayloadContentPlatformModel.swift} (94%) rename Sources/code/platform/Models/Content/{SlideshowGetResponseContentPlatformModel.swift => SlideshowGetDetailsContentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Content/{SlideshowRequestContentPlatformModel.swift => SlideshowPayloadContentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Content/{TagDeleteSuccessResponseContentPlatformModel.swift => TagDeleteSuccessDetailsContentPlatformModel.swift} (93%) create mode 100644 Sources/code/platform/Models/Content/ValidationErrorContentPlatformModel.swift rename Sources/code/platform/Models/Discount/{CancelJobResponseDiscountPlatformModel.swift => CancelJobResponseSchemaDiscountPlatformModel.swift} (92%) rename Sources/code/platform/Models/Discount/{FileJobRequestDiscountPlatformModel.swift => FileJobRequestSchemaDiscountPlatformModel.swift} (99%) rename Sources/code/platform/Models/Discount/{FileJobResponseDiscountPlatformModel.swift => FileJobResponseSchemaDiscountPlatformModel.swift} (99%) create mode 100644 Sources/code/platform/Models/FileStorage/CreateTemplateFileStoragePlatformModel.swift create mode 100644 Sources/code/platform/Models/FileStorage/DeleteMapperByIdFileStoragePlatformModel.swift rename Sources/code/platform/Models/FileStorage/{FailedResponseFileStoragePlatformModel.swift => FailedBrowseFilesResultFileStoragePlatformModel.swift} (92%) rename Sources/code/platform/Models/FileStorage/{CompleteResponseFileStoragePlatformModel.swift => FileUploadCompleteFileStoragePlatformModel.swift} (99%) rename Sources/code/platform/Models/FileStorage/{StartResponseFileStoragePlatformModel.swift => FileUploadFileStoragePlatformModel.swift} (88%) rename Sources/code/platform/Models/FileStorage/{StartRequestFileStoragePlatformModel.swift => FileUploadStartFileStoragePlatformModel.swift} (97%) rename Sources/code/platform/Models/FileStorage/{InvoiceTypesDataResponseFileStoragePlatformModel.swift => InvoiceTypesDataFileStoragePlatformModel.swift} (87%) rename Sources/code/platform/Models/FileStorage/{InvoiceTypesResponseFileStoragePlatformModel.swift => InvoiceTypesFileStoragePlatformModel.swift} (80%) create mode 100644 Sources/code/platform/Models/FileStorage/MapperDetailsFileStoragePlatformModel.swift delete mode 100644 Sources/code/platform/Models/FileStorage/ParamsFileStoragePlatformModel.swift create mode 100644 Sources/code/platform/Models/FileStorage/PdfConfigurationDataFileStoragePlatformModel.swift rename Sources/code/platform/Models/FileStorage/{DummyTemplateDataItemsFileStoragePlatformModel.swift => PdfDataItemsDetailsFileStoragePlatformModel.swift} (94%) create mode 100644 Sources/code/platform/Models/FileStorage/PdfDefaultTemplateByIdFileStoragePlatformModel.swift rename Sources/code/platform/Models/FileStorage/{DummyTemplateDataPayloadFileStoragePlatformModel.swift => PdfPayloadDetailsFileStoragePlatformModel.swift} (93%) create mode 100644 Sources/code/platform/Models/FileStorage/PdfTemplateCreateSuccessDataFileStoragePlatformModel.swift create mode 100644 Sources/code/platform/Models/FileStorage/PdfTemplateCreateSuccessFileStoragePlatformModel.swift create mode 100644 Sources/code/platform/Models/FileStorage/PdfTypeByIdDetailsFileStoragePlatformModel.swift rename Sources/code/platform/Models/FileStorage/{ProxyResponseFileStoragePlatformModel.swift => ProxyFileAccessFileStoragePlatformModel.swift} (96%) rename Sources/code/platform/Models/FileStorage/{SignUrlRequestFileStoragePlatformModel.swift => SignUrlFileStoragePlatformModel.swift} (95%) rename Sources/code/platform/Models/FileStorage/{SignUrlResponseFileStoragePlatformModel.swift => SignUrlResultFileStoragePlatformModel.swift} (93%) create mode 100644 Sources/code/platform/Models/FileStorage/UpdatePdfTypeFileStoragePlatformModel.swift create mode 100644 Sources/code/platform/Models/FileStorage/UpdateTemplateFileStoragePlatformModel.swift create mode 100644 Sources/code/platform/Models/FileStorage/UpdatedDefaultTemplateByIdFileStoragePlatformModel.swift create mode 100644 Sources/code/platform/Models/FileStorage/savePdfPayloadFileStoragePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/ChannelDisplayNameResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CnDetailsFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CnGenerateReportFiltersFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CnGenerateReportFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CnReferenceNumberFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CreditNoteConfigNotificationEventsFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CreditNoteDetailsFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CreditNoteDetailsReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CreditNoteDetailsResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CreditlineDataPlatformReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/CreditlineDataPlatformResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DeleteConfigFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DeleteConfigReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DeleteConfigResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DownloadCreditDebitNoteFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DownloadCreditDebitNoteReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DownloadCreditDebitNoteResponseDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DownloadCreditDebitNoteResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DownloadReportCustomerCnReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DownloadReportCustomerCnResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DownloadReportDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DownloadReportFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/DownloadReportListFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/ErrorFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GenerateReportCustomerCnReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GenerateReportCustomerCnResponseDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GenerateReportCustomerCnResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GenerateReportFiltersFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GenerateReportJsonFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GenerateReportMetaFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GenerateReportPlatformFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GenerateReportReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetAffiliateFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetAffiliateResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetCnConfigReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetCnConfigResponseDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetCnConfigResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetCnConfigResponseMetaFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetCustomerCreditBalanceFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetCustomerCreditBalanceReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetCustomerCreditBalanceResponseDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetCustomerCreditBalanceResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetEngineFiltersFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetEngineReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetPdfUrlViewReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetPdfUrlViewResponseDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetPdfUrlViewResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetReasonFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetReasonResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetReportListDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetReportListReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetReportListResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetReportingFiltersReasonFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetReportingFiltersReasonOptionsFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/GetReportingFiltersResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InoviceListingPayloadDataFiltersFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoiceActivityLogErrorFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoiceActivityLogsResponseDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoiceActivityLogsResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoiceBillingItemFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoiceListingReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoiceListingResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoiceListingResponseItemsFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoicePaymentDetailsResponseDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoicePaymentDetailsResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoicePaymentOptionsPayloadDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoicePaymentOptionsReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseDeductedAmountsFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponsePayableAmountsFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoicePdfPayloadDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoicePdfReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoiceTypePayloadDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoiceTypeReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/InvoiceTypeResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/IsCnRefundMethodDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/IsCnRefundMethodReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/IsCnRefundMethodResponseDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/IsCnRefundMethodResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/IsCreditlinePayloadFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/IsCreditlinePlatformReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/IsCreditlinePlatformResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/OrederFreezeResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/PaidInvoicePaymentDetailFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/PaymentProcessPayloadFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/PaymentProcessReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/PaymentProcessResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/RedemptionDetailsFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/ReportItemFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/UnlockCreditNoteReqFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/UnlockCreditNoteRequestDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/UnlockCreditNoteResponseDataFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/UnlockCreditNoteResponseFinancePlatformModel.swift delete mode 100644 Sources/code/platform/Models/Finance/UnpaidInvoiceDataItemsFinancePlatformModel.swift rename Sources/code/platform/Models/Lead/{GeneralConfigResponseLeadPlatformModel.swift => GeneralConfigDetailsLeadPlatformModel.swift} (99%) create mode 100644 Sources/code/platform/Models/Order/ActionDetailSchemaOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{PlatformDeliveryAddressOrderPlatformModel.swift => AddressOrderPlatformModel.swift} (99%) create mode 100644 Sources/code/platform/Models/Order/AffiliateAppConfigMetaOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/AffiliateAppConfigOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/AffiliateBagOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/AffiliateInventoryArticleAssignmentConfigOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/AffiliateInventoryConfigOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/AffiliateInventoryLogisticsConfigOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/AffiliateInventoryOrderConfigOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/AffiliateInventoryPaymentConfigOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/AffiliateInventoryStoreConfigOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/AffiliateOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/AffiliateStoreIdMappingOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{AllowedTemplatesResponseOrderPlatformModel.swift => AllowedTemplatesResponseSchemaOrderPlatformModel.swift} (93%) rename Sources/code/platform/Models/Order/{AnnouncementResponseOrderPlatformModel.swift => AnnouncementResponseSchemaOrderPlatformModel.swift} (98%) rename Sources/code/platform/Models/Order/{AnnouncementsResponseOrderPlatformModel.swift => AnnouncementsResponseSchemaOrderPlatformModel.swift} (80%) create mode 100644 Sources/code/platform/Models/Order/AppliedFreeArticlesOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/ArticleDetailsOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{AttachOrderUserResponseOrderPlatformModel.swift => AttachOrderUserResponseSchemaOrderPlatformModel.swift} (95%) rename Sources/code/platform/Models/Order/{BagDetailsPlatformResponseOrderPlatformModel.swift => BagDetailsPlatformResponseSchemaOrderPlatformModel.swift} (95%) rename Sources/code/platform/Models/Order/{BaseResponseOrderPlatformModel.swift => BaseResponseSchemaOrderPlatformModel.swift} (96%) rename Sources/code/platform/Models/{Catalog/ProductListingDetailCatalogPlatformModel.swift => Order/BillingInfoOrderPlatformModel.swift} (58%) rename Sources/code/platform/Models/Order/{BulkActionTemplateResponseOrderPlatformModel.swift => BulkActionTemplateResponseSchemaOrderPlatformModel.swift} (93%) rename Sources/code/platform/Models/Order/{BulkFailedResponseOrderPlatformModel.swift => BulkFailedResponseSchemaOrderPlatformModel.swift} (95%) rename Sources/code/platform/Models/Order/{BulkListingResponseOrderPlatformModel.swift => BulkListingResponseSchemaOrderPlatformModel.swift} (97%) rename Sources/code/platform/Models/Order/{BulkReportsDownloadRequestOrderPlatformModel.swift => BulkReportsDownloadRequestSchemaOrderPlatformModel.swift} (94%) rename Sources/code/platform/Models/Order/{BulkReportsDownloadResponseOrderPlatformModel.swift => BulkReportsDownloadResponseSchemaOrderPlatformModel.swift} (95%) rename Sources/code/platform/Models/Order/{BulkStateTransistionResponseOrderPlatformModel.swift => BulkStateTransistionResponseSchemaOrderPlatformModel.swift} (96%) create mode 100644 Sources/code/platform/Models/Order/ChargeAmountCurrencyOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/ChargeAmountOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/ChargeDistributionLogicOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/ChargeDistributionSchemaOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{CheckResponseOrderPlatformModel.swift => CheckResponseSchemaOrderPlatformModel.swift} (99%) create mode 100644 Sources/code/platform/Models/Order/Click2CallResponseSchemaOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/ConditionsOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{ConfigUpdatedResponseOrderPlatformModel.swift => ConfigUpdatedResponseSchemaOrderPlatformModel.swift} (93%) rename Sources/code/platform/Models/Order/{CourierPartnerTrackingResponseOrderPlatformModel.swift => CourierPartnerTrackingResponseSchemaOrderPlatformModel.swift} (94%) create mode 100644 Sources/code/platform/Models/Order/CreateChannelConfigDataOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/CreateChannelConfigOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/CreateChannelConfigResponseSchemaOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/CreateChannelConifgErrorResponseSchemaOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/CreateChannelPaymentInfoOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{CreateOrderResponseOrderPlatformModel.swift => CreateOrderResponseSchemaOrderPlatformModel.swift} (92%) create mode 100644 Sources/code/platform/Models/Order/CreditBalanceInfoOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{EInvoiceErrorResponseOrderPlatformModel.swift => EInvoiceErrorResponseSchemaOrderPlatformModel.swift} (95%) rename Sources/code/platform/Models/Order/{EInvoiceRetryResponseOrderPlatformModel.swift => EInvoiceRetryResponseSchemaOrderPlatformModel.swift} (92%) rename Sources/code/platform/Models/Order/{LockManagerEntitiesOrderPlatformModel.swift => EntitiesOrderPlatformModel.swift} (98%) rename Sources/code/platform/Models/Order/{ErrorResponseOrderPlatformModel.swift => ErrorResponseSchemaOrderPlatformModel.swift} (98%) create mode 100644 Sources/code/platform/Models/Order/FetchCreditBalanceRequestPayloadOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/FetchCreditBalanceResponsePayloadOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{FileResponseOrderPlatformModel.swift => FileResponseSchemaOrderPlatformModel.swift} (96%) create mode 100644 Sources/code/platform/Models/Order/FiltersRequestSchemaOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{FiltersResponseOrderPlatformModel.swift => FiltersResponseSchemaOrderPlatformModel.swift} (96%) create mode 100644 Sources/code/platform/Models/Order/FreeGiftItemsOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{GenerateInvoiceIDErrorResponseOrderPlatformModel.swift => GenerateInvoiceIDErrorResponseSchemaOrderPlatformModel.swift} (92%) rename Sources/code/platform/Models/Order/{GenerateInvoiceIDResponseOrderPlatformModel.swift => GenerateInvoiceIDResponseSchemaOrderPlatformModel.swift} (93%) rename Sources/code/platform/Models/Order/{GeneratePosOrderReceiptResponseOrderPlatformModel.swift => GeneratePosOrderReceiptResponseSchemaOrderPlatformModel.swift} (98%) delete mode 100644 Sources/code/platform/Models/Order/GeoLocationSchemaOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{GetActionsResponseOrderPlatformModel.swift => GetActionsResponseSchemaOrderPlatformModel.swift} (94%) rename Sources/code/platform/Models/Order/{GetBagsPlatformResponseOrderPlatformModel.swift => GetBagsPlatformResponseSchemaOrderPlatformModel.swift} (95%) rename Sources/code/platform/Models/Order/{InvalidateShipmentCacheNestedResponseOrderPlatformModel.swift => InvalidateShipmentCacheNestedResponseSchemaOrderPlatformModel.swift} (96%) rename Sources/code/platform/Models/Order/{InvalidateShipmentCacheResponseOrderPlatformModel.swift => InvalidateShipmentCacheResponseSchemaOrderPlatformModel.swift} (86%) rename Sources/code/platform/Models/Order/{ExceptionErrorResponseOrderPlatformModel.swift => ItemPriceDetailsOrderPlatformModel.swift} (65%) rename Sources/code/platform/Models/Order/{JobDetailsResponseOrderPlatformModel.swift => JobDetailsResponseSchemaOrderPlatformModel.swift} (98%) rename Sources/code/platform/Models/Order/{JobFailedResponseOrderPlatformModel.swift => JobFailedResponseSchemaOrderPlatformModel.swift} (96%) rename Sources/code/platform/Models/Order/{LaneConfigResponseOrderPlatformModel.swift => LaneConfigResponseSchemaOrderPlatformModel.swift} (94%) create mode 100644 Sources/code/platform/Models/Order/LocationDetailsOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{CommonErrorResponseOrderPlatformModel.swift => LockStateMessageOrderPlatformModel.swift} (81%) rename Sources/code/platform/Models/Order/{ManifestFiltersResponseOrderPlatformModel.swift => ManifestFiltersResponseSchemaOrderPlatformModel.swift} (95%) rename Sources/code/platform/Models/Order/{ManifestResponseOrderPlatformModel.swift => ManifestResponseSchemaOrderPlatformModel.swift} (94%) create mode 100644 Sources/code/platform/Models/Order/MarketPlacePdfOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/OrderConfigOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/OrderDataUpdatesOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{OrderDetailsResponseOrderPlatformModel.swift => OrderDetailsResponseSchemaOrderPlatformModel.swift} (96%) create mode 100644 Sources/code/platform/Models/Order/OrderInfoOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{OrderListingResponseOrderPlatformModel.swift => OrderListingResponseSchemaOrderPlatformModel.swift} (98%) create mode 100644 Sources/code/platform/Models/Order/OrderPriorityOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/OrderUserOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/OrderingCurrencyPricesOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/PaymentMetaDataSchemaOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/PaymentMetaLogoURLSchemaOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/PaymentMethodSchemaOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/PaymentMethodsOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{PlatformShipmentReasonsResponseOrderPlatformModel.swift => PlatformShipmentReasonsResponseSchemaOrderPlatformModel.swift} (94%) create mode 100644 Sources/code/platform/Models/Order/PriceAdjustmentChargeOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{APIFailedResponseOrderPlatformModel.swift => PriceMinMaxOrderPlatformModel.swift} (69%) create mode 100644 Sources/code/platform/Models/Order/ProcessAfterConfigOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/ProcessManifestItemResponseSchemaOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{ProcessManifestRequestOrderPlatformModel.swift => ProcessManifestOrderPlatformModel.swift} (88%) create mode 100644 Sources/code/platform/Models/Order/ProcessManifestRequestSchemaOrderPlatformModel.swift rename Sources/code/platform/Models/{Finance/DownloadReportResponseDataFinancePlatformModel.swift => Order/ProcessManifestResponseSchemaOrderPlatformModel.swift} (59%) create mode 100644 Sources/code/platform/Models/Order/ProductSchemaOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/QuestionSetItemOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/RMAPageInfoOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/RefundInformationOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{RefundModeFormatOrderPlatformModel.swift => RuleActionOrderPlatformModel.swift} (72%) create mode 100644 Sources/code/platform/Models/Order/RuleErrorOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{ManifestErrorResponseOrderPlatformModel.swift => RuleErrorResponseSchemaOrderPlatformModel.swift} (96%) create mode 100644 Sources/code/platform/Models/Order/RuleItemOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/RuleListRequestSchemaOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/RuleListResponseSchemaOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/SendSmsResponseSchemaOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{SendUserMobileOtpResponseOrderPlatformModel.swift => SendUserMobileOtpResponseSchemaOrderPlatformModel.swift} (76%) create mode 100644 Sources/code/platform/Models/Order/ShipmentConfigOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/ShipmentDataOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{ShipmentHistoryResponseOrderPlatformModel.swift => ShipmentHistoryResponseSchemaOrderPlatformModel.swift} (95%) rename Sources/code/platform/Models/Order/{ShipmentInfoResponseOrderPlatformModel.swift => ShipmentInfoResponseSchemaOrderPlatformModel.swift} (96%) rename Sources/code/platform/Models/Order/{ShipmentInternalPlatformViewResponseOrderPlatformModel.swift => ShipmentInternalPlatformViewResponseSchemaOrderPlatformModel.swift} (97%) rename Sources/code/platform/Models/Order/{ShipmentReasonsResponseOrderPlatformModel.swift => ShipmentReasonsResponseSchemaOrderPlatformModel.swift} (95%) rename Sources/code/platform/Models/Order/{ShipmentsRequestOrderPlatformModel.swift => ShipmentsRequestSchemaOrderPlatformModel.swift} (97%) rename Sources/code/platform/Models/Order/{ShipmentsResponseOrderPlatformModel.swift => ShipmentsResponseSchemaOrderPlatformModel.swift} (98%) rename Sources/code/platform/Models/Order/{StatuesRequestOrderPlatformModel.swift => StatuesRequestSchemaOrderPlatformModel.swift} (93%) rename Sources/code/platform/Models/Order/{StatuesResponseOrderPlatformModel.swift => StatuesResponseSchemaOrderPlatformModel.swift} (83%) rename Sources/code/platform/Models/Order/{StoreReassignResponseOrderPlatformModel.swift => StoreReassignResponseSchemaOrderPlatformModel.swift} (95%) rename Sources/code/platform/Models/Order/{SuccessResponseOrderPlatformModel.swift => SuccessResponseSchemaOrderPlatformModel.swift} (96%) create mode 100644 Sources/code/platform/Models/Order/SystemMessagesOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/TagOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{TemplateDownloadResponseOrderPlatformModel.swift => TemplateDownloadResponseSchemaOrderPlatformModel.swift} (95%) create mode 100644 Sources/code/platform/Models/Order/UpdateAddressRequestBodyOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{UpdatePackagingDimensionsResponseOrderPlatformModel.swift => UpdatePackagingDimensionsResponseSchemaOrderPlatformModel.swift} (91%) delete mode 100644 Sources/code/platform/Models/Order/UpdatePackingErrorResponseOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{UpdateShipmentLockResponseOrderPlatformModel.swift => UpdateShipmentLockResponseSchemaOrderPlatformModel.swift} (89%) create mode 100644 Sources/code/platform/Models/Order/UpdateShipmentPaymentModeOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/UpdatedAddressSchemaOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{UploadManifestConsentOrderPlatformModel.swift => UploadConsentOrderPlatformModel.swift} (94%) create mode 100644 Sources/code/platform/Models/Order/UserDataOrderPlatformModel.swift create mode 100644 Sources/code/platform/Models/Order/ValidationErrorOrderPlatformModel.swift rename Sources/code/platform/Models/Order/{VerifyOtpResponseOrderPlatformModel.swift => VerifyOtpResponseSchemaOrderPlatformModel.swift} (97%) rename Sources/code/platform/Models/Partner/{AddProxyResponsePartnerPlatformModel.swift => ExtensionProxyPathCreationPartnerPlatformModel.swift} (98%) rename Sources/code/platform/Models/Partner/{RemoveProxyResponsePartnerPlatformModel.swift => ExtensionProxyPathDeletePartnerPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{AddBeneficiaryDetailsOTPRequestPaymentPlatformModel.swift => AddBeneficiaryDetailsOTPCreationPaymentPlatformModel.swift} (93%) rename Sources/code/platform/Models/Payment/{AggregatorVersionResponsePaymentPlatformModel.swift => AggregatorVersionDetailsPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{CODChargesLimitsResponsePaymentPlatformModel.swift => CODChargesLimitsDetailsPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{CancelOrResendPaymentLinkRequestPaymentPlatformModel.swift => CancelOrResendPaymentLinkCreationPaymentPlatformModel.swift} (91%) rename Sources/code/platform/Models/Payment/{CancelPaymentLinkResponsePaymentPlatformModel.swift => CancelPaymentLinkDetailsPaymentPlatformModel.swift} (95%) rename Sources/code/platform/Models/Payment/{CartDetailsSerializerPaymentPlatformModel.swift => CartDetailsPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{CreatePaymentLinkRequestPaymentPlatformModel.swift => CreatePaymentLinkCreationPaymentPlatformModel.swift} (69%) rename Sources/code/platform/Models/Payment/{CreatePaymentLinkResponsePaymentPlatformModel.swift => CreatePaymentLinkDetailsPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{DeletePayoutResponsePaymentPlatformModel.swift => DeletePayoutDetailsPaymentPlatformModel.swift} (92%) rename Sources/code/platform/Models/Payment/{DeleteSubscriptionPaymentMethodResponsePaymentPlatformModel.swift => DeleteSubscriptionPaymentMethodDetailsPaymentPlatformModel.swift} (89%) rename Sources/code/platform/Models/Payment/{EdcAddRequestPaymentPlatformModel.swift => EdcAddCreationPaymentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Payment/{EdcAggregatorAndModelListResponsePaymentPlatformModel.swift => EdcAggregatorAndModelListDetailsPaymentPlatformModel.swift} (93%) rename Sources/code/platform/Models/Payment/{EdcDeviceAddResponsePaymentPlatformModel.swift => EdcDeviceAddDetailsPaymentPlatformModel.swift} (94%) rename Sources/code/platform/Models/Payment/{EdcDeviceDetailsResponsePaymentPlatformModel.swift => EdcDeviceDetailsPaymentPlatformModel.swift} (94%) rename Sources/code/platform/Models/Payment/{EdcDeviceListResponsePaymentPlatformModel.swift => EdcDeviceListDetailsPaymentPlatformModel.swift} (95%) rename Sources/code/platform/Models/Payment/{EdcDeviceStatsResponsePaymentPlatformModel.swift => EdcDeviceStatsDetailsPaymentPlatformModel.swift} (94%) rename Sources/code/platform/Models/Payment/{EdcDeviceUpdateResponsePaymentPlatformModel.swift => EdcDeviceUpdateDetailsPaymentPlatformModel.swift} (92%) rename Sources/code/platform/Models/Payment/{EdcUpdateRequestPaymentPlatformModel.swift => EdcUpdatePaymentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Payment/{ErrorResponsePaymentPlatformModel.swift => ErrorDetailsPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{GetOauthUrlResponsePaymentPlatformModel.swift => GetOauthUrlDetailsPaymentPlatformModel.swift} (94%) rename Sources/code/platform/Models/Payment/{GetPaymentCodeResponsePaymentPlatformModel.swift => GetPaymentCodeDetailsPaymentPlatformModel.swift} (94%) rename Sources/code/platform/Models/Payment/{GetPaymentLinkResponsePaymentPlatformModel.swift => GetPaymentLinkDetailsPaymentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Payment/{GetUserCODLimitResponsePaymentPlatformModel.swift => GetUserCODLimitDetailsPaymentPlatformModel.swift} (94%) rename Sources/code/platform/Models/Payment/{HttpErrorCodeAndResponsePaymentPlatformModel.swift => HttpErrorDetailsPaymentPlatformModel.swift} (94%) rename Sources/code/platform/Models/Payment/{IfscCodeResponsePaymentPlatformModel.swift => IfscCodeDetailsPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{MerchantOnBoardingRequestPaymentPlatformModel.swift => MerchantOnBoardingCreationPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{MerchantOnBoardingResponsePaymentPlatformModel.swift => MerchantOnBoardingDetailsPaymentPlatformModel.swift} (93%) rename Sources/code/platform/Models/Payment/{MerchantPaymentModeRequestPaymentPlatformModel.swift => MerchantPaymentModeCreationPaymentPlatformModel.swift} (95%) rename Sources/code/platform/Models/Payment/{MerchnatPaymentModeRequestPaymentPlatformModel.swift => MerchnatPaymentModeCreationPaymentPlatformModel.swift} (95%) rename Sources/code/platform/Models/Payment/{OrderBeneficiaryResponsePaymentPlatformModel.swift => OrderBeneficiaryFetchResultsPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{AggregatorControlRequestPaymentPlatformModel.swift => PatchAggregatorControlPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{PaymentConfirmationRequestPaymentPlatformModel.swift => PaymentConfirmationCreationPaymentPlatformModel.swift} (94%) rename Sources/code/platform/Models/Payment/{PaymentConfirmationResponsePaymentPlatformModel.swift => PaymentConfirmationDetailsPaymentPlatformModel.swift} (95%) rename Sources/code/platform/Models/Payment/{PaymentDetailsSerializerPaymentPlatformModel.swift => PaymentDetailsPaymentPlatformModel.swift} (99%) rename Sources/code/platform/Models/Payment/{PaymentGatewayConfigRequestPaymentPlatformModel.swift => PaymentGatewayConfigCreationPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{PaymentGatewayConfigResponsePaymentPlatformModel.swift => PaymentGatewayConfigDetailsPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{PaymentInitializationRequestPaymentPlatformModel.swift => PaymentInitializationCreationPaymentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Payment/{PaymentInitializationResponsePaymentPlatformModel.swift => PaymentInitializationDetailsPaymentPlatformModel.swift} (99%) rename Sources/code/platform/Models/Payment/{PaymentModeRouteResponsePaymentPlatformModel.swift => PaymentModeRouteDetailsPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{PaymentObjectListSerializerPaymentPlatformModel.swift => PaymentObjectListPaymentPlatformModel.swift} (99%) rename Sources/code/platform/Models/Payment/{PaymentOptionsResponsePaymentPlatformModel.swift => PaymentOptionsDetailsPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{PaymentOrderRequestPaymentPlatformModel.swift => PaymentOrderCreationPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{PaymentOrderResponsePaymentPlatformModel.swift => PaymentOrderDetailsPaymentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Payment/{PaymentSessionRequestSerializerPaymentPlatformModel.swift => PaymentSessionCreationPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{PaymentSessionSerializerPaymentPlatformModel.swift => PaymentSessionFetchDetailsPaymentPlatformModel.swift} (88%) rename Sources/code/platform/Models/Payment/{PaymentSessionResponseSerializerPaymentPlatformModel.swift => PaymentSessionPutDetailsPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{PaymentStatusBulkHandlerRequestPaymentPlatformModel.swift => PaymentStatusBulkHandlerCreationPaymentPlatformModel.swift} (91%) rename Sources/code/platform/Models/Payment/{PaymentStatusBulkHandlerResponsePaymentPlatformModel.swift => PaymentStatusBulkHandlerDetailsPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{PaymentStatusUpdateRequestPaymentPlatformModel.swift => PaymentStatusUpdateCreationPaymentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Payment/{PaymentStatusUpdateResponsePaymentPlatformModel.swift => PaymentStatusUpdateDetailsPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{PayoutRequestPaymentPlatformModel.swift => PayoutCreationPaymentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Payment/{PayoutResponsePaymentPlatformModel.swift => PayoutDetailsPaymentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Payment/{PayoutsResponsePaymentPlatformModel.swift => PayoutsDetailsPaymentPlatformModel.swift} (95%) rename Sources/code/platform/Models/Payment/{PlatformPaymentModeCopyConfigRequestPaymentPlatformModel.swift => PlatformPaymentModeCopyConfigCreationPaymentPlatformModel.swift} (92%) rename Sources/code/platform/Models/Payment/{PlatformPaymentModeResponsePaymentPlatformModel.swift => PlatformPaymentModeDetailsPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{PollingPaymentLinkResponsePaymentPlatformModel.swift => PollingPaymentLinkDetailsPaymentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Payment/{RefundAccountResponsePaymentPlatformModel.swift => RefundAccountDetailsPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{RefundDetailsSerializerPaymentPlatformModel.swift => RefundDetailsPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{RefundPriorityRequestSerializerPaymentPlatformModel.swift => RefundPriorityCreationPaymentPlatformModel.swift} (94%) rename Sources/code/platform/Models/Payment/{RefundPriorityResponseSerializerPaymentPlatformModel.swift => RefundPriorityDetailsPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{RefundSessionRequestSerializerPaymentPlatformModel.swift => RefundSessionCreationPaymentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Payment/{RefundSessionResponseSerializerPaymentPlatformModel.swift => RefundSessionDetailsPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{RepaymentResponsePaymentPlatformModel.swift => RepaymentDetailsPaymentPlatformModel.swift} (95%) rename Sources/code/platform/Models/Payment/{ResendOrCancelPaymentRequestPaymentPlatformModel.swift => ResendOrCancelPaymentCreationPaymentPlatformModel.swift} (95%) rename Sources/code/platform/Models/Payment/{ResendOrCancelPaymentResponsePaymentPlatformModel.swift => ResendOrCancelPaymentDetailsPaymentPlatformModel.swift} (93%) rename Sources/code/platform/Models/Payment/{ResendPaymentLinkResponsePaymentPlatformModel.swift => ResendPaymentLinkDetailsPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{SaveSubscriptionSetupIntentRequestPaymentPlatformModel.swift => SaveSubscriptionSetupIntentCreationPaymentPlatformModel.swift} (90%) rename Sources/code/platform/Models/Payment/{SaveSubscriptionSetupIntentResponsePaymentPlatformModel.swift => SaveSubscriptionSetupIntentDetailsPaymentPlatformModel.swift} (92%) rename Sources/code/platform/Models/Payment/{SetCODForUserRequestPaymentPlatformModel.swift => SetCODForUserCreationPaymentPlatformModel.swift} (97%) rename Sources/code/platform/Models/Payment/{SetCODOptionResponsePaymentPlatformModel.swift => SetCODOptionDetailsPaymentPlatformModel.swift} (94%) rename Sources/code/platform/Models/Payment/{SubscriptionConfigResponsePaymentPlatformModel.swift => SubscriptionConfigDetailsPaymentPlatformModel.swift} (95%) rename Sources/code/platform/Models/Payment/{SubscriptionPaymentMethodResponsePaymentPlatformModel.swift => SubscriptionPaymentMethodDetailsPaymentPlatformModel.swift} (93%) rename Sources/code/platform/Models/Payment/{UpdatePayoutRequestPaymentPlatformModel.swift => UpdatePayoutCreationPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Payment/{UpdatePayoutResponsePaymentPlatformModel.swift => UpdatePayoutDetailsPaymentPlatformModel.swift} (95%) rename Sources/code/platform/Models/Payment/{ValidateCustomerRequestPaymentPlatformModel.swift => ValidateCustomerCreationPaymentPlatformModel.swift} (98%) rename Sources/code/platform/Models/Payment/{ValidateCustomerResponsePaymentPlatformModel.swift => ValidateCustomerDetailsPaymentPlatformModel.swift} (96%) rename Sources/code/platform/Models/Rewards/{GiveawayResponseRewardsPlatformModel.swift => ListGiveawayRewardsPlatformModel.swift} (96%) rename Sources/code/platform/Models/Rewards/{ConfigurationRequestRewardsPlatformModel.swift => SetConfigurationRewardsPlatformModel.swift} (96%) rename Sources/code/platform/Models/Serviceability/{AddressResponseServiceabilityPlatformModel.swift => AddressResultServiceabilityPlatformModel.swift} (99%) rename Sources/code/platform/Models/Serviceability/{ApplicationSelfShipConfigResponseServiceabilityPlatformModel.swift => ApplicationSelfShipConfigResultServiceabilityPlatformModel.swift} (90%) rename Sources/code/platform/Models/Serviceability/{ApplicationServiceabilityConfigResponseServiceabilityPlatformModel.swift => ApplicationServiceabilityConfigResultServiceabilityPlatformModel.swift} (89%) rename Sources/code/platform/Models/Serviceability/{BulkRegionJobSerializerServiceabilityPlatformModel.swift => BulkRegionJobDetailsServiceabilityPlatformModel.swift} (96%) rename Sources/code/platform/Models/Serviceability/{BulkRegionResponseItemDataServiceabilityPlatformModel.swift => BulkRegionResultItemDataServiceabilityPlatformModel.swift} (98%) rename Sources/code/platform/Models/Serviceability/{BulkRegionResponseServiceabilityPlatformModel.swift => BulkRegionResultServiceabilityPlatformModel.swift} (80%) rename Sources/code/platform/Models/Serviceability/{CompanyCourierPartnerAccountListResponseServiceabilityPlatformModel.swift => CompanyCourierPartnerAccountListResultServiceabilityPlatformModel.swift} (78%) rename Sources/code/platform/Models/Serviceability/{CompanyStoreView_ResponseServiceabilityPlatformModel.swift => CompanyStoreView_ResultServiceabilityPlatformModel.swift} (95%) rename Sources/code/platform/Models/Serviceability/{ContactNumberResponseServiceabilityPlatformModel.swift => ContactNumberResultServiceabilityPlatformModel.swift} (96%) rename Sources/code/platform/Models/Serviceability/{CourierAccountRequestBodyServiceabilityPlatformModel.swift => CourierAccountDetailsBodyServiceabilityPlatformModel.swift} (97%) rename Sources/code/platform/Models/Serviceability/{CourierAccountResponseServiceabilityPlatformModel.swift => CourierAccountResultServiceabilityPlatformModel.swift} (97%) rename Sources/code/platform/Models/Serviceability/{CourierPartnerAccountFailureResponseServiceabilityPlatformModel.swift => CourierPartnerAccountFailureResultServiceabilityPlatformModel.swift} (80%) create mode 100644 Sources/code/platform/Models/Serviceability/CourierPartnerPromiseServiceabilityPlatformModel.swift rename Sources/code/platform/Models/Serviceability/{CourierPartnerRuleCPListResponseServiceabilityPlatformModel.swift => CourierPartnerRuleCPListResultServiceabilityPlatformModel.swift} (97%) rename Sources/code/platform/Models/Serviceability/{CourierPartnerRuleResponseServiceabilityPlatformModel.swift => CourierPartnerRuleResultServiceabilityPlatformModel.swift} (95%) rename Sources/code/platform/Models/Serviceability/{CourierPartnerRulesListResponseServiceabilityPlatformModel.swift => CourierPartnerRulesListResultServiceabilityPlatformModel.swift} (83%) create mode 100644 Sources/code/platform/Models/Serviceability/CourierPartnersServiceabilityPlatformModel.swift rename Sources/code/platform/Models/Serviceability/{CreateStoreRuleRequestSchemaServiceabilityPlatformModel.swift => CreateStoreRuleDetailsSchemaServiceabilityPlatformModel.swift} (98%) rename Sources/code/platform/Models/Serviceability/{CreatedByResponseServiceabilityPlatformModel.swift => CreatedByResultServiceabilityPlatformModel.swift} (96%) rename Sources/code/platform/Models/Serviceability/{DocumentsResponseServiceabilityPlatformModel.swift => DocumentsResultServiceabilityPlatformModel.swift} (97%) rename Sources/code/platform/Models/Serviceability/{EinvoiceResponseServiceabilityPlatformModel.swift => EinvoiceResultServiceabilityPlatformModel.swift} (94%) rename Sources/code/platform/Models/Serviceability/{EntityRegionView_RequestServiceabilityPlatformModel.swift => EntityRegionView_DetailsServiceabilityPlatformModel.swift} (95%) rename Sources/code/platform/Models/Serviceability/{EntityRegionView_ResponseServiceabilityPlatformModel.swift => EntityRegionView_ResultServiceabilityPlatformModel.swift} (96%) rename Sources/code/platform/Models/Serviceability/{ErrorResponseServiceabilityPlatformModel.swift => ErrorResultServiceabilityPlatformModel.swift} (96%) rename Sources/code/platform/Models/Serviceability/{EwayBillResponseServiceabilityPlatformModel.swift => EwayBillResultServiceabilityPlatformModel.swift} (94%) rename Sources/code/platform/Models/Serviceability/{FailureResponseServiceabilityPlatformModel.swift => FailureResultServiceabilityPlatformModel.swift} (83%) rename Sources/code/platform/Models/Serviceability/{GetSingleZoneDataViewResponseServiceabilityPlatformModel.swift => GetSingleZoneDataViewResultServiceabilityPlatformModel.swift} (91%) rename Sources/code/platform/Models/Serviceability/{GetStoreRulesApiResponseServiceabilityPlatformModel.swift => GetStoreRulesApiResultServiceabilityPlatformModel.swift} (95%) rename Sources/code/platform/Models/Serviceability/{GetStoresViewResponseServiceabilityPlatformModel.swift => GetStoresViewResultServiceabilityPlatformModel.swift} (79%) rename Sources/code/platform/Models/Serviceability/{GetZoneFromApplicationIdViewResponseServiceabilityPlatformModel.swift => GetZoneFromApplicationIdViewResultServiceabilityPlatformModel.swift} (92%) rename Sources/code/platform/Models/Serviceability/{GetZoneFromPincodeViewRequestServiceabilityPlatformModel.swift => GetZoneFromPincodeViewDetailsServiceabilityPlatformModel.swift} (93%) rename Sources/code/platform/Models/Serviceability/{GetZoneFromPincodeViewResponseServiceabilityPlatformModel.swift => GetZoneFromPincodeViewResultServiceabilityPlatformModel.swift} (93%) rename Sources/code/platform/Models/Serviceability/{GstCredentialsResponseServiceabilityPlatformModel.swift => GstCredentialsResultServiceabilityPlatformModel.swift} (79%) rename Sources/code/platform/Models/Serviceability/{IntegrationTypeResponseServiceabilityPlatformModel.swift => IntegrationTypeResultServiceabilityPlatformModel.swift} (96%) rename Sources/code/platform/Models/Serviceability/{ItemResponseServiceabilityPlatformModel.swift => ItemResultServiceabilityPlatformModel.swift} (89%) rename Sources/code/platform/Models/Serviceability/{ListViewResponseServiceabilityPlatformModel.swift => ListViewResultServiceabilityPlatformModel.swift} (95%) rename Sources/code/platform/Models/Serviceability/{LogisticsResponseServiceabilityPlatformModel.swift => LogisticsResultServiceabilityPlatformModel.swift} (96%) rename Sources/code/platform/Models/Serviceability/{ManagerResponseServiceabilityPlatformModel.swift => ManagerResultServiceabilityPlatformModel.swift} (97%) rename Sources/code/platform/Models/Serviceability/{ModifiedByResponseServiceabilityPlatformModel.swift => ModifiedByResultServiceabilityPlatformModel.swift} (96%) rename Sources/code/platform/Models/Serviceability/{OptimalLocationArticlesResponseServiceabilityPlatformModel.swift => OptimalLocationArticlesResultServiceabilityPlatformModel.swift} (98%) rename Sources/code/platform/Models/Serviceability/{OptimalLocationAssignedStoresResponseServiceabilityPlatformModel.swift => OptimalLocationAssignedStoresResultServiceabilityPlatformModel.swift} (81%) rename Sources/code/platform/Models/Serviceability/{OptimalLocationsResponseServiceabilityPlatformModel.swift => OptimalLocationsResultServiceabilityPlatformModel.swift} (85%) rename Sources/code/platform/Models/Serviceability/{OptimlLocationsRequestSchemaServiceabilityPlatformModel.swift => OptimlLocationsDetailsSchemaServiceabilityPlatformModel.swift} (84%) rename Sources/code/platform/Models/Serviceability/{PackageMaterialResponseServiceabilityPlatformModel.swift => PackageMaterialResultServiceabilityPlatformModel.swift} (99%) rename Sources/code/platform/Models/Serviceability/{PackageRuleResponseServiceabilityPlatformModel.swift => PackageRuleResultServiceabilityPlatformModel.swift} (98%) rename Sources/code/platform/Models/Serviceability/{PincodeBulkViewResponseServiceabilityPlatformModel.swift => PincodeBulkViewResultServiceabilityPlatformModel.swift} (94%) rename Sources/code/platform/Models/Serviceability/{PincodeCodStatusListingRequestServiceabilityPlatformModel.swift => PincodeCodStatusListingDetailsServiceabilityPlatformModel.swift} (97%) rename Sources/code/platform/Models/Serviceability/{PincodeCodStatusListingResponseServiceabilityPlatformModel.swift => PincodeCodStatusListingResultServiceabilityPlatformModel.swift} (91%) rename Sources/code/platform/Models/Serviceability/{PincodeMOPresponseServiceabilityPlatformModel.swift => PincodeMOPResultServiceabilityPlatformModel.swift} (94%) rename Sources/code/platform/Models/Serviceability/{PincodeMopUpdateAuditHistoryRequestServiceabilityPlatformModel.swift => PincodeMopUpdateAuditHistoryDetailsServiceabilityPlatformModel.swift} (94%) rename Sources/code/platform/Models/Serviceability/{PincodeMopUpdateAuditHistoryResponseDataServiceabilityPlatformModel.swift => PincodeMopUpdateAuditHistoryResultDataServiceabilityPlatformModel.swift} (85%) rename Sources/code/platform/Models/Serviceability/{PincodeMopUpdateAuditHistoryResponseServiceabilityPlatformModel.swift => PincodeMopUpdateAuditHistoryResultServiceabilityPlatformModel.swift} (98%) rename Sources/code/platform/Models/Serviceability/{PincodeMopUpdateResponseServiceabilityPlatformModel.swift => PincodeMopUpdateResultServiceabilityPlatformModel.swift} (96%) rename Sources/code/platform/Models/Serviceability/{ProductReturnConfigResponseServiceabilityPlatformModel.swift => ProductReturnConfigResultServiceabilityPlatformModel.swift} (93%) rename Sources/code/platform/Models/Serviceability/{RulePriorityRequestServiceabilityPlatformModel.swift => RulePriorityDetailsServiceabilityPlatformModel.swift} (94%) rename Sources/code/platform/Models/Serviceability/{RulePriorityResponseServiceabilityPlatformModel.swift => RulePriorityResultServiceabilityPlatformModel.swift} (94%) rename Sources/code/platform/Models/Serviceability/{SelfShipResponseServiceabilityPlatformModel.swift => SelfShipResultServiceabilityPlatformModel.swift} (95%) rename Sources/code/platform/Models/Serviceability/{ServiceabilityErrorResponseServiceabilityPlatformModel.swift => ServiceabilityErrorResultServiceabilityPlatformModel.swift} (95%) rename Sources/code/platform/Models/Serviceability/{ServiceabilityPageResponseServiceabilityPlatformModel.swift => ServiceabilityPageResultServiceabilityPlatformModel.swift} (97%) create mode 100644 Sources/code/platform/Models/Serviceability/ShipmentCourierPartnerDetailsServiceabilityPlatformModel.swift create mode 100644 Sources/code/platform/Models/Serviceability/ShipmentCourierPartnerResultServiceabilityPlatformModel.swift create mode 100644 Sources/code/platform/Models/Serviceability/ShipmentCourierPartnersServiceabilityPlatformModel.swift create mode 100644 Sources/code/platform/Models/Serviceability/ShipmentDimensionServiceabilityPlatformModel.swift create mode 100644 Sources/code/platform/Models/Serviceability/ShipmentsArticlesServiceabilityPlatformModel.swift create mode 100644 Sources/code/platform/Models/Serviceability/ShipmentsCourierPartnersServiceabilityServiceabilityPlatformModel.swift create mode 100644 Sources/code/platform/Models/Serviceability/ShipmentsServiceabilityPlatformModel.swift create mode 100644 Sources/code/platform/Models/Serviceability/StandardErrorServiceabilityPlatformModel.swift rename Sources/code/platform/Models/Serviceability/{StoreRuleResponseSchemaServiceabilityPlatformModel.swift => StoreRuleResultSchemaServiceabilityPlatformModel.swift} (98%) rename Sources/code/platform/Models/Serviceability/{StoreRuleUpdateResponseSchemaServiceabilityPlatformModel.swift => StoreRuleUpdateResultSchemaServiceabilityPlatformModel.swift} (98%) rename Sources/code/platform/Models/Serviceability/{TimmingResponseServiceabilityPlatformModel.swift => TimmingResultServiceabilityPlatformModel.swift} (98%) rename Sources/code/platform/Models/Serviceability/{UpdateZoneConfigRequestServiceabilityPlatformModel.swift => UpdateZoneConfigDetailsServiceabilityPlatformModel.swift} (94%) create mode 100644 Sources/code/platform/Models/Serviceability/ValidationErrorServiceabilityPlatformModel.swift rename Sources/code/platform/Models/Serviceability/{WarningsResponseServiceabilityPlatformModel.swift => WarningsResultServiceabilityPlatformModel.swift} (95%) rename Sources/code/platform/Models/Serviceability/{ZoneResponseServiceabilityPlatformModel.swift => ZoneResultServiceabilityPlatformModel.swift} (96%) rename Sources/code/platform/Models/Serviceability/{ZoneSuccessResponseServiceabilityPlatformModel.swift => ZoneSuccessResultServiceabilityPlatformModel.swift} (94%) rename Sources/code/platform/Models/Serviceability/{ZoneUpdateRequestServiceabilityPlatformModel.swift => ZoneUpdateDetailsServiceabilityPlatformModel.swift} (95%) rename Sources/code/platform/Models/Serviceability/{getAppRegionZonesResponseServiceabilityPlatformModel.swift => getAppRegionZonesResultServiceabilityPlatformModel.swift} (94%) rename Sources/code/platform/Models/Share/{ClickStatsResponseSharePlatformModel.swift => ClickStatsResultSharePlatformModel.swift} (93%) create mode 100644 Sources/code/platform/Models/Share/shortLinkReqMetaSharePlatformModel.swift rename Sources/code/platform/Models/Theme/{DummyResponseThemePlatformModel.swift => DummyThemeThemePlatformModel.swift} (95%) rename Sources/code/platform/Models/{Catalog/BrandMediaCatalogPlatformModel.swift => Theme/SectionSourceThemePlatformModel.swift} (73%) rename Sources/code/platform/Models/Theme/{ThemeUpgradableResponseThemePlatformModel.swift => ThemeUpgradableThemePlatformModel.swift} (97%) rename Sources/code/platform/Models/User/{CreateUserAttributeRequestUserPlatformModel.swift => CreateUserAttributeUserPlatformModel.swift} (79%) rename Sources/code/platform/Models/User/{SuccessMessageResponseUserPlatformModel.swift => SuccessMessageUserPlatformModel.swift} (94%) rename Sources/code/platform/Models/User/{UserAttributeDefinitionResponseUserPlatformModel.swift => UserAttributeDefinitionDetailsUserPlatformModel.swift} (99%) rename Sources/code/platform/Models/User/{UserAttributeResponseUserPlatformModel.swift => UserAttributeUserPlatformModel.swift} (91%) rename Sources/code/platform/Models/{Finance/InvoiceListingPayloadDataFinancePlatformModel.swift => Webhook/BroadcasterConfigWebhookPlatformModel.swift} (61%) rename Sources/code/platform/Models/{Cart/UpdateCartRequestCartPlatformModel.swift => Webhook/EventBridgeConfigWebhookPlatformModel.swift} (58%) create mode 100644 Sources/code/platform/Models/Webhook/EventBridgeDataWebhookPlatformModel.swift rename Sources/code/platform/Models/Webhook/{EventConfigResponseWebhookPlatformModel.swift => EventConfigResultWebhookPlatformModel.swift} (94%) rename Sources/code/platform/Models/{Finance/GetReportingNestedFiltersFinancePlatformModel.swift => Webhook/EventMapBodyWebhookPlatformModel.swift} (62%) delete mode 100644 Sources/code/platform/Models/Webhook/EventProcessRequestWebhookPlatformModel.swift delete mode 100644 Sources/code/platform/Models/Webhook/HistoryAssociationWebhookPlatformModel.swift delete mode 100644 Sources/code/platform/Models/Webhook/HistoryFiltersWebhookPlatformModel.swift delete mode 100644 Sources/code/platform/Models/Webhook/HistoryPayloadWebhookPlatformModel.swift rename Sources/code/platform/Models/Webhook/{DownloadReportResponseWebhookPlatformModel.swift => KafkaConfigWebhookPlatformModel.swift} (56%) delete mode 100644 Sources/code/platform/Models/Webhook/PingWebhookResponseWebhookPlatformModel.swift create mode 100644 Sources/code/platform/Models/Webhook/PubSubConfigWebhookPlatformModel.swift create mode 100644 Sources/code/platform/Models/Webhook/QueueEventDataWebhookPlatformModel.swift delete mode 100644 Sources/code/platform/Models/Webhook/ReportFilterResponseWebhookPlatformModel.swift rename Sources/code/platform/Models/Webhook/{PingWebhookWebhookPlatformModel.swift => RestConfigWebhookPlatformModel.swift} (68%) create mode 100644 Sources/code/platform/Models/Webhook/RestEventDataWebhookPlatformModel.swift rename Sources/code/platform/Models/Webhook/{CancelResponseWebhookPlatformModel.swift => SqsConfigWebhookPlatformModel.swift} (57%) create mode 100644 Sources/code/platform/Models/Webhook/SqsEventDataWebhookPlatformModel.swift rename Sources/code/platform/Models/Webhook/{SubscriberConfigResponseWebhookPlatformModel.swift => SubscriberConfigResultWebhookPlatformModel.swift} (99%) rename Sources/code/platform/Models/Webhook/{SubscriberResponseWebhookPlatformModel.swift => SubscriberDetailsWebhookPlatformModel.swift} (99%) create mode 100644 Sources/code/platform/Models/Webhook/TemporalConfigWebhookPlatformModel.swift rename Sources/code/platform/Models/Webhook/{EventWebhookPlatformModel.swift => TemporalEventDataWebhookPlatformModel.swift} (60%) rename Sources/code/platform/Models/{AuditTrail/InternalServerErrorAuditTrailPlatformModel.swift => Webhook/UpsertSubscriberConfigResultWebhookPlatformModel.swift} (77%) rename Sources/code/platform/Models/Webhook/{ReportFiltersPayloadWebhookPlatformModel.swift => UpsertSubscriberConfigWebhookPlatformModel.swift} (60%) rename Sources/code/platform/Models/{Finance/CreditlineDataPlatformPayloadFinancePlatformModel.swift => Webhook/WebhookConfigWebhookPlatformModel.swift} (61%) rename Sources/code/public/Models/Configuration/{ApplicationResponseConfigurationPublicModel.swift => ApplicationResponseSchemaConfigurationPublicModel.swift} (93%) rename Sources/code/public/Models/Configuration/{BadRequestConfigurationPublicModel.swift => BadRequestSchemaConfigurationPublicModel.swift} (94%) create mode 100644 Sources/code/public/Models/Content/AnalyticsTagsSchemaContentPublicModel.swift rename Sources/code/{platform/Models/Finance/GetEngineDataFinancePlatformModel.swift => public/Models/Content/ApplicationLevelMenuItemSchemaContentPublicModel.swift} (60%) create mode 100644 Sources/code/public/Models/Content/BasicDetailsPayloadSchemaContentPublicModel.swift create mode 100644 Sources/code/public/Models/Content/BusinessAccountContentPublicModel.swift rename Sources/code/{platform/Models/Finance/CnDownloadReportFinancePlatformModel.swift => public/Models/Content/CompanyLevelMenuItemSchemaContentPublicModel.swift} (60%) rename Sources/code/{platform/Models/Webhook/UrlWebhookPlatformModel.swift => public/Models/Content/ConfigurationSchemaContentPublicModel.swift} (66%) rename Sources/code/{platform/Models/Finance/PaymentDetailFinancePlatformModel.swift => public/Models/Content/CreateCustomPageSeoSchemaContentPublicModel.swift} (64%) rename Sources/code/{platform/Models/Webhook/UploadServiceObjectWebhookPlatformModel.swift => public/Models/Content/CreatedBySchemaContentPublicModel.swift} (68%) rename Sources/code/{platform/Models/Webhook/EventProcessReportObjectWebhookPlatformModel.swift => public/Models/Content/CustomItemSchemaContentPublicModel.swift} (61%) create mode 100644 Sources/code/public/Models/Content/CustomPageBySlugSchemaContentPublicModel.swift rename Sources/code/{platform/Models/Finance/GetReportingFiltersFinancePlatformModel.swift => public/Models/Content/FeaturesContentPublicModel.swift} (69%) rename Sources/code/{platform/Models/Finance/InvoicePdfResponseFinancePlatformModel.swift => public/Models/Content/FooterContentSchemaContentPublicModel.swift} (63%) create mode 100644 Sources/code/public/Models/Content/FooterSchemaContentPublicModel.swift create mode 100644 Sources/code/public/Models/Content/HomePageContentSchemaContentPublicModel.swift rename Sources/code/{platform/Models/Finance/ChannelDisplayNameItemsFinancePlatformModel.swift => public/Models/Content/ItemSchemaContentPublicModel.swift} (77%) rename Sources/code/{platform/Models/AuditTrail/EntityObjAuditTrailPlatformModel.swift => public/Models/Content/MediaSchemaContentPublicModel.swift} (69%) create mode 100644 Sources/code/public/Models/Content/MenuSchemaContentPublicModel.swift rename Sources/code/{platform/Models/Webhook/CdnObjectWebhookPlatformModel.swift => public/Models/Content/MenuTypeSchemaContentPublicModel.swift} (68%) create mode 100644 Sources/code/public/Models/Content/MenusSchemaContentPublicModel.swift rename Sources/code/{platform/Models/Finance/CurrencyFinancePlatformModel.swift => public/Models/Content/NavItemSchemaContentPublicModel.swift} (65%) rename Sources/code/{platform/Models/Finance/GetEngineResponseFinancePlatformModel.swift => public/Models/Content/NavbarSchemaContentPublicModel.swift} (66%) create mode 100644 Sources/code/public/Models/Content/OtherSellerSchemaContentPublicModel.swift rename Sources/code/{platform/Models/Finance/PageFinancePlatformModel.swift => public/Models/Content/PageSchemaContentPublicModel.swift} (64%) rename Sources/code/{platform/Models/Webhook/HistoryItemsWebhookPlatformModel.swift => public/Models/Content/PricingBannerSchemaContentPublicModel.swift} (63%) rename Sources/code/{platform/Models/Finance/InvoiceTypeResponseItemsFinancePlatformModel.swift => public/Models/Content/RawHtmlContentSchemaContentPublicModel.swift} (76%) rename Sources/code/{platform/Models/Finance/ErrorMetaItemsFinancePlatformModel.swift => public/Models/Content/SalesChannelSchemaContentPublicModel.swift} (65%) rename Sources/code/{platform/Models/Finance/GetReasonReqFinancePlatformModel.swift => public/Models/Content/SdkReadmeSchemaContentPublicModel.swift} (77%) create mode 100644 Sources/code/public/Models/Content/SellerSupportContentPublicModel.swift rename Sources/code/{platform/Models/Webhook/HistoryResponseWebhookPlatformModel.swift => public/Models/Content/TagsSchemaContentPublicModel.swift} (77%) create mode 100644 Sources/code/public/Models/Content/UserSchemaContentPublicModel.swift rename Sources/code/{platform/Models/Finance/ReasonItemFinancePlatformModel.swift => public/Models/Content/VisibleOnSchemaContentPublicModel.swift} (64%) rename Sources/code/{platform/Models/AuditTrail/LogSchemaResponseAuditTrailPlatformModel.swift => public/Models/Content/WhatsNewContentPublicModel.swift} (66%) rename Sources/code/public/Models/Webhook/{EventConfigResponseWebhookPublicModel.swift => EventDetailsWebhookPublicModel.swift} (94%) rename Sources/code/public/Models/Webhook/{TransformEventRequestWebhookPublicModel.swift => TransformEventPayloadWebhookPublicModel.swift} (97%) rename Sources/code/public/Models/Webhook/{TransformEventResponseWebhookPublicModel.swift => TransformEventResultWebhookPublicModel.swift} (98%) rename Sources/code/public/Models/Webhook/{ValidateSchemaRequestWebhookPublicModel.swift => ValidateSchemaPayloadWebhookPublicModel.swift} (97%) rename Sources/code/public/Models/Webhook/{ValidateSchemaResponseWebhookPublicModel.swift => ValidateSchemaResultWebhookPublicModel.swift} (96%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8514365636..9720889f50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7650 @@ +# CHANGE LOG (1.4.14) - 1.9.5 + +## Application Client + +- [Added] Finance class in application client + + +### Cart + + + +#### getCart + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### addItems + +- ##### What's New + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### updateCart + +- ##### What's New + - [Added] property freeGiftItems of schema UpdateCartCreation in request body + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### getCoupons + +- ##### What's New + - [Breaking] [Added] Value format date-time to property availableCouponList[].startDate of schema Coupon in response with status code 200 + - [Breaking] [Added] Value format date-time to property availableCouponList[].endDate of schema Coupon in response with status code 200 + + +#### applyCoupon + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 201 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 201 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 201 + + +#### removeCoupon + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### getBulkDiscountOffers + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### applyRewardPoints + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### getAddresses + +- ##### What's New + - [Added] property validationConfig of schema GetAddressesResult in response with status code 200 + + +#### addAddress + +- ##### What's New + - [Added] Response with status 422 + + +#### selectAddress + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 201 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 201 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 201 + + +#### selectPaymentMode + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### validateCouponForPayment + +- ##### What's New + - [Added] property couponValidity.errorEn of schema CouponValidity in response with status code 200 + + +#### getShipments + +- ##### What's New + - [Added] property shipments[].items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property shipments[].items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore to property shipments[].orderType of schema ShipmentResult in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getCartSharedItems + +- ##### What's New + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 404 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 404 + + +#### updateCartWithSharedItems + +- ##### What's New + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### getPromotionOffers + +- ##### What's New + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property availablePromotions[].promotionType of schema PromotionOffer in response with status code 200 + - [Added] property availablePromotions[].freeGiftItems[].size of schema FreeGiftItems in response with status code 200 + - [Added] property availablePromotions[].freeGiftItems[].articlePrice of schema FreeGiftItems in response with status code 200 + - [Added] property availablePromotions[].freeGiftItems[].availableSizes of schema FreeGiftItems in response with status code 200 + + +#### getLadderOffers + +- ##### What's New + - [Added] property availableOffers[].freeGiftItems[].size of schema FreeGiftItems in response with status code 200 + - [Added] property availableOffers[].freeGiftItems[].articlePrice of schema FreeGiftItems in response with status code 200 + - [Added] property availableOffers[].freeGiftItems[].availableSizes of schema FreeGiftItems in response with status code 200 + + +#### getPromotionPaymentOffers + +- ##### What's New + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property promotions[].promotionType of schema PromotionPaymentOffer in response with status code 200 + + +#### checkoutCartV2 + +- ##### What's New + - [Added] property customMeta[] of schema CartCheckoutDetailV2Creation in request body + - [Added] properties customerDetails.email, customerDetails.mobile, customerDetails.name in request body + - [Breaking] [Added] customerDetails.mobile made required in request body + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore to property orderType of schema CartCheckoutDetailV2Creation in request body + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property customerDetails of schema CartCheckoutDetailV2Request in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from object to array of property customMeta of schema CartCheckoutDetailV2Request in request body + + +#### checkoutCart + +- ##### What's New + - [Added] method checkoutCart + + + +### Catalog + + + +#### getProductDetailBySlug + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property itemType of schema ProductDetail in response with status code 200 + + +#### getProductComparisonBySlugs + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema ProductDetail in response with status code 200 + + +#### getSimilarComparisonProductBySlug + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema ProductDetail in response with status code 200 + + +#### getComparedFrequentlyProductBySlug + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property similars.items[].itemType of schema ProductDetail in response with status code 200 + + +#### getProductStockByIds + +- ##### What's New + - [Added] properties items[].identifier.ean, items[].identifier.alu, items[].identifier.upc, items[].identifier.isbn, items[].identifier.skuCode in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Type from object from property items[].identifier of schema ProductStockStatusItem in response with status code 200 + + +#### getProductStockForTimeByIds + +- ##### What's New + - [Added] properties items[].identifier.ean, items[].identifier.alu, items[].identifier.upc, items[].identifier.isbn, items[].identifier.skuCode in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Type from object from property items[].identifier of schema ProductStockStatusItem in response with status code 200 + + +#### getProducts + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema ProductListingDetail in response with status code 200 + + +#### getHomeProducts + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema ProductListingDetail in response with status code 200 + + +#### getCollectionItemsBySlug + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema ProductListingDetail in response with status code 200 + + +#### getFollowedListing + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema ProductListingDetail in response with status code 200 + + +#### getStores + +- ##### What's New + - [Added] property items[].contacts of schema Store in response with status code 200 + + +#### getProductPriceBySlug + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property itemType of schema ProductSizePriceResponseV3 in response with status code 200 + + +#### getProductSellersBySlug + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema ProductSizePriceResponseV3 in response with status code 200 + + +### Common + + + +#### searchApplication + +- ##### What's New + - [Breaking] [Added] Possible values website-and-mobile-apps,store to property application.channelType of schema Application in response with status code 200 + - [Breaking] [Added] Value format date-time to property application.createdAt of schema Application in response with status code 200 + - [Breaking] [Added] Value format date-time to property application.updatedAt of schema Application in response with status code 200 + + +### Communication + + + +#### upsertAppPushtoken + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema PushtokenRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema PushtokenRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property expiredAt of schema PushtokenRes in response with status code 200 + + +### Configuration + + + +#### getApplication + +- ##### What's New + - [Breaking] [Added] Value format date-time to property tokens[].createdAt of schema TokenSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema Application in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema Application in response with status code 200 + + +#### getOwnerInfo + +- ##### What's New + - [Breaking] [Added] Value format date-time to property applicationInfo.tokens[].createdAt of schema TokenSchema in response with status code 200 + - [Breaking] [Added] Possible values home,registered,office to property applicationInfo.companyInfo.addresses[].addressType of schema CompanyAboutAddress in response with status code 200 + - [Breaking] [Added] Value format date-time to property applicationInfo.companyInfo.createdOn of schema CompanyInfo in response with status code 200 + - [Breaking] [Added] Value format date-time to property applicationInfo.createdAt of schema ApplicationInfo in response with status code 200 + + +#### getIntegrationTokens + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema AppTokenResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema AppTokenResponseSchema in response with status code 200 + + +#### getFeatures + +- ##### What's New + - [Breaking] [Added] Value format date-time to property feature.createdAt of schema AppFeature in response with status code 200 + - [Breaking] [Added] Value format date-time to property feature.modifiedAt of schema AppFeature in response with status code 200 + + +#### getContactInfo + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ApplicationInformation in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema ApplicationInformation in response with status code 200 + + +#### getCurrencies + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema Currency in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].modifiedAt of schema Currency in response with status code 200 + + +#### getCurrencyById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Currency in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema Currency in response with status code 200 + + +#### getAppCurrencies + +- ##### What's New + - [Breaking] [Added] Value format date-time to property supportedCurrency[].createdAt of schema Currency in response with status code 200 + - [Breaking] [Added] Value format date-time to property supportedCurrency[].modifiedAt of schema Currency in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema AppCurrencyResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema AppCurrencyResponseSchema in response with status code 200 + + +#### getAppStaffList + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getAppStaffs + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +### Content + + + +#### getAnnouncements + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getBlog + +- ##### What's New + - [Added] query parameter preview (type: boolean) + + - [Breaking] [Added] Value format date-time to property publishDate of schema BlogSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getBlogs + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].publishDate of schema BlogSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + +- ##### What's Changed + - [Changed] Path From /service/application/content/v1.0/blogs/ To /service/application/content/v1.0/blogs + + +#### getDataLoaders + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getFaqs + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getFaqCategories + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getFaqBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getFaqCategoryBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getFaqsByCategorySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getLandingPage + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getLegalInformation + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getNavigations + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + +- ##### What's Changed + - [Changed] Path From /service/application/content/v1.0/navigations/ To /service/application/content/v1.0/navigations + + +#### getSEOConfiguration + +- ##### What's New + - [Breaking] [Added] Value format date-time to property seo.createdAt of schema SeoSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property seo.updatedAt of schema SeoSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getSEOMarkupSchemas + +- ##### What's New + - [Breaking] [Added] Possible values about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status to property items[].pageType of schema SEOSchemaMarkupTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getSlideshows + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + +- ##### What's Changed + - [Changed] Path From /service/application/content/v1.0/slideshow/ To /service/application/content/v1.0/slideshow + + +#### getSlideshow + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getSupportInformation + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Support in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Support in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getTags + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getPage + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getPages + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + +- ##### What's Changed + - [Changed] Path From /service/application/content/v2.0/pages/ To /service/application/content/v2.0/pages + + +#### getCustomObject + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomObject + + + +#### getCustomFields + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomFields + + + +#### getCustomObjectBySlug + +- ##### What's New + - [Added] method getCustomObjectBySlug + + + +#### getCustomFieldsByResourceId + +- ##### What's New + - [Added] method getCustomFieldsByResourceId + + + +### FileStorage + + + +#### startUpload + +- ##### What's Deprecated + - [Breaking] [Deleted] property cdn of schema StartResponse in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] cdn made optional in response with status code 200 + - [Changed] Path From /service/application/assets/v1.0/namespaces/{namespace}/upload/start To /service/application/assets/v2.0/namespaces/{namespace}/upload/start + + +#### completeUpload + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdOn of schema FileUploadComplete in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedOn of schema FileUploadComplete in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property cdn of schema StartResponse in request body + +- ##### What's Changed + - [Breaking] [Changed] cdn made optional in request body + - [Changed] Path From /service/application/assets/v1.0/namespaces/{namespace}/upload/complete To /service/application/assets/v2.0/namespaces/{namespace}/upload/complete + + +### Logistic + + + +#### getAllCountries + +- ##### What's New + - [Added] properties results[].logistics.dp.operations, results[].logistics.dp.fmPriority, results[].logistics.dp.lmPriority, results[].logistics.dp.rvpPriority, results[].logistics.dp.paymentMode, results[].logistics.dp.areaCode, results[].logistics.dp.assignDpFromSb, results[].logistics.dp.internalAccountId, results[].logistics.dp.externalAccountId, results[].logistics.dp.transportMode in response with status code 200 + - [Added] results[].logistics.dp.fm_priority, results[].logistics.dp.lm_priority, results[].logistics.dp.operations, results[].logistics.dp.payment_mode, results[].logistics.dp.rvp_priority made required in response with status code 200 + + +#### getCountries + +- ##### What's New + - [Added] query parameter hierarchy (type: string) + + + +#### getLocalities + +- ##### What's New + - [Added] property items[].localities[].code of schema LocalityParent in response with status code 200 + - [Added] property items[].localities[].customMeta of schema LocalityParent in response with status code 200 + - [Added] property items[].customMeta of schema Localities in response with status code 200 + + +#### getLocality + +- ##### What's New + - [Added] property localities[].code of schema LocalityParent in response with status code 200 + - [Added] property localities[].customMeta of schema LocalityParent in response with status code 200 + - [Added] property code of schema GetLocality in response with status code 200 + - [Added] property customMeta of schema GetLocality in response with status code 200 + + +#### getCourierPartners + +- ##### What's New + - [Added] method getCourierPartners + + + +#### getDeliveryPromise + +- ##### What's New + - [Added] method getDeliveryPromise + + + +### Order + + + +#### getOrders + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].shipments[].invoice.updatedDate of schema Invoice in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bags[].deliveryDate of schema Bags in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items to property items[].shipments[].bags[].appliedPromos[].promotionType of schema AppliedPromos in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bags[].returnableDate of schema Bags in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bags[].currentStatus.updatedAt of schema CurrentStatus in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property items[].shipments[].bags[].currentStatus.journeyType of schema CurrentStatus in response with status code 200 + - [Added] property items[].shipments[].bags[].charges of schema Bags in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property items[].shipments[].orderType of schema Shipments in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].returnableDate of schema Shipments in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].shipmentCreatedAt of schema Shipments in response with status code 200 + - [Breaking] [Added] Possible values home,office,store to property items[].shipments[].deliveryAddress.addressType of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].deliveryAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property items[].shipments[].deliveryAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].deliveryAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values home,office,store to property items[].shipments[].billingAddress.addressType of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].billingAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property items[].shipments[].billingAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].billingAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].deliveryDate of schema Shipments in response with status code 200 + - [Added] property items[].shipments[].charges of schema Shipments in response with status code 200 + - [Added] property items[].charges of schema OrderSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].shipments[].bags[].item.l2Category of schema Item in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].item.l2CategoryId of schema Item in response with status code 200 + + +#### getOrderById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property order.shipments[].invoice.updatedDate of schema Invoice in response with status code 200 + - [Breaking] [Added] Value format date-time to property order.shipments[].bags[].deliveryDate of schema Bags in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items to property order.shipments[].bags[].appliedPromos[].promotionType of schema AppliedPromos in response with status code 200 + - [Breaking] [Added] Value format date-time to property order.shipments[].bags[].returnableDate of schema Bags in response with status code 200 + - [Breaking] [Added] Value format date-time to property order.shipments[].bags[].currentStatus.updatedAt of schema CurrentStatus in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property order.shipments[].bags[].currentStatus.journeyType of schema CurrentStatus in response with status code 200 + - [Added] property order.shipments[].bags[].charges of schema Bags in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property order.shipments[].orderType of schema Shipments in response with status code 200 + - [Breaking] [Added] Value format date-time to property order.shipments[].returnableDate of schema Shipments in response with status code 200 + - [Breaking] [Added] Value format date-time to property order.shipments[].shipmentCreatedAt of schema Shipments in response with status code 200 + - [Breaking] [Added] Possible values home,office,store to property order.shipments[].deliveryAddress.addressType of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property order.shipments[].deliveryAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property order.shipments[].deliveryAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property order.shipments[].deliveryAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values home,office,store to property order.shipments[].billingAddress.addressType of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property order.shipments[].billingAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property order.shipments[].billingAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property order.shipments[].billingAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property order.shipments[].deliveryDate of schema Shipments in response with status code 200 + - [Added] property order.shipments[].charges of schema Shipments in response with status code 200 + - [Added] property order.charges of schema OrderSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property order.shipments[].bags[].item.l2Category of schema Item in response with status code 200 + - [Breaking] [Deleted] property order.shipments[].bags[].item.l2CategoryId of schema Item in response with status code 200 + + +#### getShipmentById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property shipment.invoice.updatedDate of schema Invoice in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipment.bags[].deliveryDate of schema Bags in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items to property shipment.bags[].appliedPromos[].promotionType of schema AppliedPromos in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipment.bags[].returnableDate of schema Bags in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipment.bags[].currentStatus.updatedAt of schema CurrentStatus in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property shipment.bags[].currentStatus.journeyType of schema CurrentStatus in response with status code 200 + - [Added] property shipment.bags[].charges of schema Bags in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property shipment.orderType of schema Shipments in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipment.returnableDate of schema Shipments in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipment.shipmentCreatedAt of schema Shipments in response with status code 200 + - [Breaking] [Added] Possible values home,office,store to property shipment.deliveryAddress.addressType of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipment.deliveryAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property shipment.deliveryAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipment.deliveryAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values home,office,store to property shipment.billingAddress.addressType of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipment.billingAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property shipment.billingAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipment.billingAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipment.deliveryDate of schema Shipments in response with status code 200 + - [Added] property shipment.charges of schema Shipments in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property shipment.bags[].item.l2Category of schema Item in response with status code 200 + - [Breaking] [Deleted] property shipment.bags[].item.l2CategoryId of schema Item in response with status code 200 + + +#### getInvoiceByShipmentId + +- ##### What's New + - [Breaking] [Added] Possible values GET,PUT to property presignedType of schema ResponseGetInvoiceShipment in response with status code 200 + + +#### trackShipment + +- ##### What's New + - [Breaking] [Added] Possible values forward,reverse,rto to property results[].shipmentType of schema Track in response with status code 200 + - [Breaking] [Added] Value format date-time to property results[].lastLocationRecievedAt of schema Track in response with status code 200 + - [Breaking] [Added] Value format date-time to property results[].updatedAt of schema Track in response with status code 200 + + +#### getShipmentBagReasons + +- ##### What's New + - [Added] property ruleId of schema ShipmentBagReasons in response with status code 200 + + +#### getShipmentReasons + +- ##### What's New + - [Breaking] [Added] Possible values bag,order to property reasons[].feedbackType of schema ShipmentReason in response with status code 200 + + +#### updateShipmentStatus + +- ##### What's New + - [Breaking] [Added] Value format int32 to property statuses[].shipments[].dataUpdates.products[].filters[].lineNumber of schema ProductsDataUpdatesFilters in request body + - [Added] property statuses[].shipments[].dataUpdates.products[].filters[].quantity of schema ProductsDataUpdatesFilters in request body + + +#### getPosOrderById + +- ##### What's New + - [Added] method getPosOrderById + + + +### Payment + + + +#### getAggregatorsConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### attachCardToCustomer + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property cardId of schema AttachCardRequest in request body + - [Breaking] [Deleted] Response with status 500 + + +#### getActiveCardAggregator + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getActiveUserCards + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### deleteUserCard + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property cardId of schema DeletehCardRequest in request body + - [Breaking] [Deleted] Response with status 500 + + +#### verifyCustomerForPayment + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### verifyAndChargePayment + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property amount of schema ChargeCustomerRequest in request body + - [Breaking] [Deleted] Response with status 500 + + +#### initialisePayment + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property amount of schema PaymentInitializationRequest in request body + - [Breaking] [Deleted] Response with status 500 + + +#### checkAndUpdatePaymentStatus + +- ##### What's New + - [Breaking] [Added] order_id made required in request body + - [Breaking] [Added] status made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPaymentModeRoutes + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPosPaymentModeRoutes + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getRupifiBannerDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getEpaylaterBannerDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### resendOrCancelPayment + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### renderHTML + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### validateVPA + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### cardDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property data.bankCode of schema CardDetails in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.cardSubType of schema CardDetails in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + + +#### getActiveRefundTransferModes + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### enableOrDisableRefundTransferMode + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getUserBeneficiariesDetail + +- ##### What's New + - [Breaking] [Added] Value format date-time to property beneficiaries[].modifiedOn of schema OrderBeneficiaryDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property beneficiaries[].createdOn of schema OrderBeneficiaryDetails in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### verifyIfscCode + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getOrderBeneficiariesDetail + +- ##### What's New + - [Breaking] [Added] Value format date-time to property beneficiaries[].modifiedOn of schema OrderBeneficiaryDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property beneficiaries[].createdOn of schema OrderBeneficiaryDetails in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### verifyOtpAndAddBeneficiaryForBank + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### addBeneficiaryDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### addRefundBankAccountUsingOTP + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### verifyOtpAndAddBeneficiaryForWallet + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updateDefaultBeneficiary + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPaymentLink + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createPaymentLink + +- ##### What's New + - [Added] property successRedirectionUrl of schema CreatePaymentLink in request body + - [Added] property failureRedirectionUrl of schema CreatePaymentLink in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### resendPaymentLink + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### cancelPaymentLink + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPaymentModeRoutesPaymentLink + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### pollingPaymentLink + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createOrderHandlerPaymentLink + +- ##### What's Deprecated + - [Breaking] [Deleted] property failureCallbackUrl of schema CreateOrderUserRequest in request body + - [Breaking] [Deleted] property successCallbackUrl of schema CreateOrderUserRequest in request body + - [Breaking] [Deleted] Response with status 500 + +- ##### What's Changed + - [Changed] failure_callback_url made optional in request body + - [Changed] success_callback_url made optional in request body + + +#### initialisePaymentPaymentLink + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property amount of schema PaymentInitializationRequest in request body + - [Breaking] [Deleted] Response with status 500 + + +#### checkAndUpdatePaymentStatusPaymentLink + +- ##### What's New + - [Breaking] [Added] order_id made required in request body + - [Breaking] [Added] status made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### customerCreditSummary + +- ##### What's New + - [Breaking] [Added] Value format date-time to property data.dueDate of schema CreditSummary in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### redirectToAggregator + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### checkCredit + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### customerOnboard + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property personalInfo.dob of schema UserPersonalInfoInDetails in request body + - [Breaking] [Deleted] Response with status 500 + + +#### outstandingOrderDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### paidOrderDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createPaymentOrder + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +### Rewards + + + +#### getOfferByName + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Offer in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Offer in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### catalogueOrder + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getUserPointsHistory + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema PointsHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema PointsHistory in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getUserPoints + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getUserReferralDetails + +- ##### What's New + - [Breaking] [Added] Value format date-time to property referral.createdAt of schema Offer in response with status code 200 + - [Breaking] [Added] Value format date-time to property referral.updatedAt of schema Offer in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getOrderDiscount + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### redeemReferralCode + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +### Share + + + +#### createShortLink + +- ##### What's New + - [Breaking] [Added] Value format date-time to property expireAt of schema ShortLinkReq in request body + - [Breaking] [Added] Value format date-time to property expireAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ShortLinkRes in response with status code 200 + +- ##### What's Changed + - [Changed] redirects.expiry, redirects.url made optional in request body + - [Changed] redirects.expiry, redirects.url made optional in response with status code 200 + + +#### getShortLinkByHash + +- ##### What's New + - [Breaking] [Added] Value format date-time to property expireAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ShortLinkRes in response with status code 200 + +- ##### What's Changed + - [Changed] redirects.expiry, redirects.url made optional in response with status code 200 + + +#### getOriginalShortLinkByHash + +- ##### What's New + - [Breaking] [Added] Value format date-time to property expireAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ShortLinkRes in response with status code 200 + +- ##### What's Changed + - [Changed] redirects.expiry, redirects.url made optional in response with status code 200 + + +### Theme + + + +#### getAllPages + +- ##### What's New + - [Added] properties pages[].sections[].source.id, pages[].sections[].source.type, pages[].sections[].source.bundleName in response with status code 200 + - [Added] property pages[].sections[].assets of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to object of property pages[].sections[].source of schema AvailablePageSchemaSections in response with status code 200 + + +#### getPage + +- ##### What's New + - [Added] properties sections[].source.id, sections[].source.type, sections[].source.bundleName in response with status code 200 + - [Added] property sections[].assets of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to object of property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + + +#### getAppliedTheme + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + - [Added] query parameter filters (type: boolean) + + + +#### getThemeForPreview + +- ##### What's New + - [Added] query parameter filters (type: boolean) + + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + + +### User + + + +#### loginWithFacebook + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### loginWithGoogle + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### loginWithGoogleAndroid + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### loginWithGoogleIOS + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### loginWithAppleIOS + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### loginWithOTP + +- ##### What's New + - [Breaking] [Added] Value format ind64 to property resendTimer of schema SendOtp in response with status code 200 + + +#### loginWithEmailAndPassword + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### forgotPassword + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### loginWithToken + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### registerWithForm + +- ##### What's New + - [Breaking] [Added] Value format int64 to property resendTimer of schema RegisterFormSuccess in response with status code 200 + + +#### sendOTPOnMobile + +- ##### What's New + - [Breaking] [Added] Value format int64 to property resendTimer of schema SendOtpSuccess in response with status code 200 + + +#### sendForgotOTPOnMobile + +- ##### What's New + - [Breaking] [Added] Value format int64 to property resendTimer of schema SendOtpSuccess in response with status code 200 + + +#### verifyMobileOTP + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### verifyEmailOTP + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### getLoggedInUser + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### getPlatformConfig + +- ##### What's New + - [Breaking] [Added] Value format date-time to property updatedAt of schema PlatformSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema PlatformSchema in response with status code 200 + + +#### updateProfile + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format int64 to property resendTimer of schema ProfileEditSuccess in response with status code 200 + + +#### addMobileNumber + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### deleteMobileNumber + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### setMobileNumberAsPrimary + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### addEmail + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### deleteEmail + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### setEmailAsPrimary + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +### Webhook + + + +#### saveClickEvent + +- ##### What's New + - [Added] property sentAt of schema ClickEventPayload in request body + + +## Platform Client + +- [Breaking] [Removed] Finance class from platform client + + +### Analytics + + + +#### executeJobForProvidedParametersV2 + +- ##### What's New + - [Added] properties rows, page in response with status code 200 + - [Added] Security in Request + + +#### startDownloadForQueryV2 + +- ##### What's New + - [Added] Security in Request + + +#### checkJobStatusByNameV2 + +- ##### What's New + - [Added] properties status, message, startDate, endDate, fileMetadata in response with status code 200 + - [Added] Security in Request + + +### AuditTrail + + + +#### getAuditLogs + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAuditLogs + + + +#### createAuditLog + +- ##### What's New + - [Added] property logMeta.sessions of schema LogMetaObj in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + +- ##### What's Changed + - [Changed] Path From /service/platform/audit-trail/v1.0/company/{company_id}/logs To /service/platform/webhook/v1.0/company/{company_id}/audit/logs/create + + +#### getAuditLog + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAuditLog + + + +#### getEntityTypes + +- ##### What's Deprecated + - [Breaking] [Deleted] method getEntityTypes + + + +### Billing + + + +#### getChargeDetails + +- ##### What's New + - [Breaking] [Added] Type integer to property code of schema ResourceNotFound in response with status code 404 + - [Breaking] [Added] Type boolean to property success of schema ResourceNotFound in response with status code 404 + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible values from day from property recurring.interval of schema ChargeRecurring in response with status code 200 + - [Breaking] [Deleted] Possible values from week from property recurring.interval of schema ChargeRecurring in response with status code 200 + + +#### getSubscriptionCharge + +- ##### What's New + - [Breaking] [Added] Possible values pending,expired,declined,active,frozen,cancelled,no_renew,success,failed to property status of schema SubscriptionChargeRes in response with status code 200 + - [Breaking] [Added] Possible values extension,theme,subscription to property entityType of schema SubscriptionChargeRes in response with status code 200 + - [Breaking] [Added] Type integer to property code of schema ResourceNotFound in response with status code 404 + - [Breaking] [Added] Type boolean to property success of schema ResourceNotFound in response with status code 404 + - [Added] Security in Request + + +#### cancelSubscriptionCharge + +- ##### What's New + - [Breaking] [Added] Possible values pending,expired,declined,active,frozen,cancelled,no_renew,success,failed to property status of schema SubscriptionChargeRes in response with status code 200 + - [Breaking] [Added] Possible values extension,theme,subscription to property entityType of schema SubscriptionChargeRes in response with status code 200 + - [Breaking] [Added] Type integer to property code of schema ResourceNotFound in response with status code 404 + - [Breaking] [Added] Type boolean to property success of schema ResourceNotFound in response with status code 404 + - [Added] Security in Request + + +#### createOneTimeCharge + +- ##### What's New + - [Breaking] [Added] Possible values pending,expired,declined,active,frozen,cancelled,no_renew,success,failed to property charge.finalCharge.status of schema OneTimeChargeEntity in response with status code 200 + - [Breaking] [Added] Possible values subscription,extension,standalone to property charge.finalCharge.chargeType of schema OneTimeChargeEntity in response with status code 200 + - [Breaking] [Added] Possible values extension,theme to property charge.finalCharge.entityType of schema OneTimeChargeEntity in response with status code 200 + - [Added] Security in Request + + +#### createSubscriptionCharge + +- ##### What's New + - [Breaking] [Added] Possible values pending,expired,declined,active,frozen,cancelled,no_renew,success,failed to property subscription.status of schema EntitySubscription in response with status code 200 + - [Breaking] [Added] Possible values extension,theme to property subscription.entityType of schema EntitySubscription in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from int32 from property trialDays of schema CreateSubscriptionCharge in request body + - [Deleted] Value format from int32 from property lineItems[].trialDays of schema ChargeLineItem in request body + - [Breaking] [Deleted] Possible values from day from property subscription.lineItems[].recurring.interval of schema ChargeRecurring in response with status code 200 + - [Breaking] [Deleted] Possible values from week from property subscription.lineItems[].recurring.interval of schema ChargeRecurring in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from integer to number of property trialDays of schema CreateSubscriptionCharge in request body + - [Breaking] [Changed] Type from integer to number of property lineItems[].trialDays of schema ChargeLineItem in request body + + +### Cart + + + +#### getCoupons + +- ##### What's New + - [Added] query parameter createdBy (type: string) + + - [Added] query parameter reviewedBy (type: string) + + - [Added] query parameter approvedStartTime (type: string) + + - [Added] query parameter approvedEndTime (type: string) + + - [Added] query parameter reviewStartTime (type: string) + + - [Added] query parameter reviewEndTime (type: string) + + - [Added] query parameter status (type: string) + + - [Added] Possible nullable value true to property items[].ownership.payableBy of schema Ownership in response with status code 200 + - [Added] property items[].author.approvedBy of schema CouponAuthor in response with status code 200 + - [Added] property items[].author.rejectedBy of schema CouponAuthor in response with status code 200 + - [Added] property items[].author.reviewedBy of schema CouponAuthor in response with status code 200 + - [Added] properties items[].restrictions.payments.codes, items[].restrictions.payments.iins, items[].restrictions.payments.types, items[].restrictions.payments.networks, items[].restrictions.payments.uses in response with status code 200 + - [Added] property items[].dateMeta.approvedOn of schema CouponDateMeta in response with status code 200 + - [Added] property items[].dateMeta.rejectedOn of schema CouponDateMeta in response with status code 200 + - [Added] property items[].dateMeta.reviewedOn of schema CouponDateMeta in response with status code 200 + - [Added] Possible nullable value true to property items[].schedule.start of schema CouponSchedule in response with status code 200 + - [Added] property items[].schedule.status of schema CouponSchedule in response with status code 200 + - [Added] property items[].couponType of schema CouponAdd in response with status code 200 + - [Added] property items[].couponPrefix of schema CouponAdd in response with status code 200 + - [Added] property items[].couponCounts of schema CouponAdd in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] items[].ownership.payable_by made optional in response with status code 200 + - [Breaking] [Changed] items[].ruleDefinition.applicable_on, items[].ruleDefinition.calculate_on, items[].ruleDefinition.type, items[].ruleDefinition.value_type made optional in response with status code 200 + - [Breaking] [Changed] items[].display_meta made optional in response with status code 200 + - [Breaking] [Changed] items[].identifiers made optional in response with status code 200 + - [Breaking] [Changed] items[].ownership made optional in response with status code 200 + - [Breaking] [Changed] items[].rule made optional in response with status code 200 + - [Breaking] [Changed] items[].rule_definition made optional in response with status code 200 + - [Breaking] [Changed] items[].validity made optional in response with status code 200 + + +#### createCoupon + +- ##### What's New + - [Added] Possible nullable value true to property ownership.payableBy of schema Ownership in request body + - [Added] property author.approvedBy of schema CouponAuthor in request body + - [Added] property author.rejectedBy of schema CouponAuthor in request body + - [Added] property author.reviewedBy of schema CouponAuthor in request body + - [Added] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in request body + - [Added] property dateMeta.approvedOn of schema CouponDateMeta in request body + - [Added] property dateMeta.rejectedOn of schema CouponDateMeta in request body + - [Added] property dateMeta.reviewedOn of schema CouponDateMeta in request body + - [Added] Possible nullable value true to property schedule.start of schema CouponSchedule in request body + - [Added] property schedule.status of schema CouponSchedule in request body + - [Added] property couponType of schema CouponAdd in request body + - [Added] property couponPrefix of schema CouponAdd in request body + - [Added] property couponCounts of schema CouponAdd in request body + - [Added] property id of schema CouponCreateResult in response with status code 201 + +- ##### What's Changed + - [Breaking] [Changed] ownership.payable_by made optional in request body + - [Breaking] [Changed] ruleDefinition.applicable_on, ruleDefinition.calculate_on, ruleDefinition.type, ruleDefinition.value_type made optional in request body + - [Breaking] [Changed] display_meta made optional in request body + - [Breaking] [Changed] identifiers made optional in request body + - [Breaking] [Changed] ownership made optional in request body + - [Breaking] [Changed] rule made optional in request body + - [Breaking] [Changed] rule_definition made optional in request body + - [Breaking] [Changed] validity made optional in request body + + +#### getCouponById + +- ##### What's New + - [Added] Possible nullable value true to property ownership.payableBy of schema Ownership in response with status code 200 + - [Added] property author.approvedBy of schema CouponAuthor in response with status code 200 + - [Added] property author.rejectedBy of schema CouponAuthor in response with status code 200 + - [Added] property author.reviewedBy of schema CouponAuthor in response with status code 200 + - [Added] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in response with status code 200 + - [Added] property dateMeta.approvedOn of schema CouponDateMeta in response with status code 200 + - [Added] property dateMeta.rejectedOn of schema CouponDateMeta in response with status code 200 + - [Added] property dateMeta.reviewedOn of schema CouponDateMeta in response with status code 200 + - [Added] Possible nullable value true to property schedule.start of schema CouponSchedule in response with status code 200 + - [Added] property schedule.status of schema CouponSchedule in response with status code 200 + - [Added] property reason of schema CouponUpdate in response with status code 200 + - [Added] property couponType of schema CouponUpdate in response with status code 200 + - [Added] property couponPrefix of schema CouponUpdate in response with status code 200 + - [Added] property couponCounts of schema CouponUpdate in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] ownership.payable_by made optional in response with status code 200 + - [Breaking] [Changed] ruleDefinition.applicable_on, ruleDefinition.calculate_on, ruleDefinition.type, ruleDefinition.value_type made optional in response with status code 200 + - [Breaking] [Changed] display_meta made optional in response with status code 200 + - [Breaking] [Changed] identifiers made optional in response with status code 200 + - [Breaking] [Changed] ownership made optional in response with status code 200 + - [Breaking] [Changed] rule made optional in response with status code 200 + - [Breaking] [Changed] rule_definition made optional in response with status code 200 + - [Breaking] [Changed] validity made optional in response with status code 200 + + +#### updateCoupon + +- ##### What's New + - [Added] Possible nullable value true to property ownership.payableBy of schema Ownership in request body + - [Added] property author.approvedBy of schema CouponAuthor in request body + - [Added] property author.rejectedBy of schema CouponAuthor in request body + - [Added] property author.reviewedBy of schema CouponAuthor in request body + - [Added] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in request body + - [Added] property dateMeta.approvedOn of schema CouponDateMeta in request body + - [Added] property dateMeta.rejectedOn of schema CouponDateMeta in request body + - [Added] property dateMeta.reviewedOn of schema CouponDateMeta in request body + - [Added] Possible nullable value true to property schedule.start of schema CouponSchedule in request body + - [Added] property schedule.status of schema CouponSchedule in request body + - [Added] property reason of schema CouponUpdate in request body + - [Added] property couponType of schema CouponUpdate in request body + - [Added] property couponPrefix of schema CouponUpdate in request body + - [Added] property couponCounts of schema CouponUpdate in request body + - [Added] property id of schema CouponCreateResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] ownership.payable_by made optional in request body + - [Breaking] [Changed] ruleDefinition.applicable_on, ruleDefinition.calculate_on, ruleDefinition.type, ruleDefinition.value_type made optional in request body + - [Breaking] [Changed] display_meta made optional in request body + - [Breaking] [Changed] identifiers made optional in request body + - [Breaking] [Changed] ownership made optional in request body + - [Breaking] [Changed] rule made optional in request body + - [Breaking] [Changed] rule_definition made optional in request body + - [Breaking] [Changed] validity made optional in request body + + +#### updateCouponPartially + +- ##### What's New + - [Added] Possible nullable value true to property schedule.start of schema CouponSchedule in request body + - [Added] property schedule.status of schema CouponSchedule in request body + + +#### getPromotions + +- ##### What's New + - [Added] query parameter createdBy (type: string) + + - [Added] query parameter reviewedBy (type: string) + + - [Added] query parameter approvedStartTime (type: string) + + - [Added] query parameter approvedEndTime (type: string) + + - [Added] query parameter reviewStartTime (type: string) + + - [Added] query parameter reviewEndTime (type: string) + + - [Added] query parameter status (type: string) + + - [Added] properties items[].restrictions.payments.codes, items[].restrictions.payments.iins, items[].restrictions.payments.types, items[].restrictions.payments.networks, items[].restrictions.payments.uses in response with status code 200 + - [Added] property items[].author.approvedBy of schema PromotionAuthor in response with status code 200 + - [Added] property items[].author.rejectedBy of schema PromotionAuthor in response with status code 200 + - [Added] property items[].author.reviewedBy of schema PromotionAuthor in response with status code 200 + - [Added] Possible nullable value true to property items[].displayMeta.description of schema DisplayMeta1 in response with status code 200 + - [Added] Possible nullable value true to property items[].displayMeta.name of schema DisplayMeta1 in response with status code 200 + - [Added] Possible nullable value true to property items[].displayMeta.offerText of schema DisplayMeta1 in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].offer.maxUsagePerTransaction of schema DiscountOffer in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartQuantity.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartQuantity.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartQuantity.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartQuantity.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartQuantity.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartTotal.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartTotal.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartTotal.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartTotal.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartTotal.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartUniqueItemQuantity.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartUniqueItemQuantity.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartUniqueItemQuantity.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartUniqueItemAmount.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartUniqueItemAmount.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartUniqueItemAmount.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartUniqueItemAmount.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property items[].discountRules[].itemCriteria.cartUniqueItemAmount.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] property items[].discountRules[].meta of schema DiscountRule in response with status code 200 + - [Added] Possible nullable value true to property items[].schedule.end of schema PromotionSchedule in response with status code 200 + - [Added] Possible nullable value true to property items[].schedule.start of schema PromotionSchedule in response with status code 200 + - [Added] property items[].schedule.status of schema PromotionSchedule in response with status code 200 + - [Added] properties items[].buyRules.cartQuantity, items[].buyRules.availableZones, items[].buyRules.itemExcludeCompany, items[].buyRules.itemId, items[].buyRules.itemL1Category, items[].buyRules.cartTotal, items[].buyRules.cartUniqueItemQuantity, items[].buyRules.cartUniqueItemAmount, items[].buyRules.itemExcludeId, items[].buyRules.allItems, items[].buyRules.itemExcludeL1Category, items[].buyRules.itemSize, items[].buyRules.itemStore, items[].buyRules.itemExcludeSku, items[].buyRules.itemDepartment, items[].buyRules.itemExcludeStore, items[].buyRules.itemBrand, items[].buyRules.itemExcludeDepartment, items[].buyRules.itemExcludeCategory, items[].buyRules.itemCategory, items[].buyRules.buyRules, items[].buyRules.itemExcludeBrand, items[].buyRules.itemL2Category, items[].buyRules.itemCompany, items[].buyRules.itemTags, items[].buyRules.itemExcludeL2Category, items[].buyRules.itemSku in response with status code 200 + - [Added] property items[].dateMeta.approvedOn of schema PromotionDateMeta in response with status code 200 + - [Added] property items[].dateMeta.rejectedOn of schema PromotionDateMeta in response with status code 200 + - [Added] property items[].dateMeta.reviewedOn of schema PromotionDateMeta in response with status code 200 + - [Added] property items[].isProcessed of schema PromotionListItem in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] items[].ownership.payable_by, items[].ownership.payable_category made optional in response with status code 200 + - [Breaking] [Changed] items[].restrictions.uses made optional in response with status code 200 + - [Breaking] [Changed] items[].visiblility.coupon_list, items[].visiblility.pdp made optional in response with status code 200 + - [Breaking] [Changed] items[].schedule.end, items[].schedule.published, items[].schedule.start made optional in response with status code 200 + - [Breaking] [Changed] items[].postOrderAction.action_date, items[].postOrderAction.action_type made optional in response with status code 200 + + +#### createPromotion + +- ##### What's New + - [Added] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in request body + - [Added] property author.approvedBy of schema PromotionAuthor in request body + - [Added] property author.rejectedBy of schema PromotionAuthor in request body + - [Added] property author.reviewedBy of schema PromotionAuthor in request body + - [Added] Possible nullable value true to property displayMeta.description of schema DisplayMeta1 in request body + - [Added] Possible nullable value true to property displayMeta.name of schema DisplayMeta1 in request body + - [Added] Possible nullable value true to property displayMeta.offerText of schema DisplayMeta1 in request body + - [Added] Possible nullable value true to property discountRules[].offer.maxUsagePerTransaction of schema DiscountOffer in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.equals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.greaterThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.lessThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.lessThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.greaterThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.equals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.greaterThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.lessThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.lessThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.greaterThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.equals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.lessThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.lessThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.equals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.greaterThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.lessThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.lessThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.greaterThanEquals of schema CompareObject in request body + - [Added] property discountRules[].meta of schema DiscountRule in request body + - [Added] Possible nullable value true to property schedule.end of schema PromotionSchedule in request body + - [Added] Possible nullable value true to property schedule.start of schema PromotionSchedule in request body + - [Added] property schedule.status of schema PromotionSchedule in request body + - [Added] properties buyRules.cartQuantity, buyRules.availableZones, buyRules.itemExcludeCompany, buyRules.itemId, buyRules.itemL1Category, buyRules.cartTotal, buyRules.cartUniqueItemQuantity, buyRules.cartUniqueItemAmount, buyRules.itemExcludeId, buyRules.allItems, buyRules.itemExcludeL1Category, buyRules.itemSize, buyRules.itemStore, buyRules.itemExcludeSku, buyRules.itemDepartment, buyRules.itemExcludeStore, buyRules.itemBrand, buyRules.itemExcludeDepartment, buyRules.itemExcludeCategory, buyRules.itemCategory, buyRules.buyRules, buyRules.itemExcludeBrand, buyRules.itemL2Category, buyRules.itemCompany, buyRules.itemTags, buyRules.itemExcludeL2Category, buyRules.itemSku in request body + - [Added] property dateMeta.approvedOn of schema PromotionDateMeta in request body + - [Added] property dateMeta.rejectedOn of schema PromotionDateMeta in request body + - [Added] property dateMeta.reviewedOn of schema PromotionDateMeta in request body + - [Added] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in response with status code 201 + - [Added] property author.approvedBy of schema PromotionAuthor in response with status code 201 + - [Added] property author.rejectedBy of schema PromotionAuthor in response with status code 201 + - [Added] property author.reviewedBy of schema PromotionAuthor in response with status code 201 + - [Added] Possible nullable value true to property displayMeta.description of schema DisplayMeta1 in response with status code 201 + - [Added] Possible nullable value true to property displayMeta.name of schema DisplayMeta1 in response with status code 201 + - [Added] Possible nullable value true to property displayMeta.offerText of schema DisplayMeta1 in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].offer.maxUsagePerTransaction of schema DiscountOffer in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.equals of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.greaterThan of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.lessThanEquals of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.lessThan of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.greaterThanEquals of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.equals of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.greaterThan of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.lessThanEquals of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.lessThan of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.greaterThanEquals of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.equals of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThan of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.lessThanEquals of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.lessThan of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThanEquals of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.equals of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.greaterThan of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.lessThanEquals of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.lessThan of schema CompareObject in response with status code 201 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.greaterThanEquals of schema CompareObject in response with status code 201 + - [Added] property discountRules[].meta of schema DiscountRule in response with status code 201 + - [Added] Possible nullable value true to property schedule.end of schema PromotionSchedule in response with status code 201 + - [Added] Possible nullable value true to property schedule.start of schema PromotionSchedule in response with status code 201 + - [Added] property schedule.status of schema PromotionSchedule in response with status code 201 + - [Added] properties buyRules.cartQuantity, buyRules.availableZones, buyRules.itemExcludeCompany, buyRules.itemId, buyRules.itemL1Category, buyRules.cartTotal, buyRules.cartUniqueItemQuantity, buyRules.cartUniqueItemAmount, buyRules.itemExcludeId, buyRules.allItems, buyRules.itemExcludeL1Category, buyRules.itemSize, buyRules.itemStore, buyRules.itemExcludeSku, buyRules.itemDepartment, buyRules.itemExcludeStore, buyRules.itemBrand, buyRules.itemExcludeDepartment, buyRules.itemExcludeCategory, buyRules.itemCategory, buyRules.buyRules, buyRules.itemExcludeBrand, buyRules.itemL2Category, buyRules.itemCompany, buyRules.itemTags, buyRules.itemExcludeL2Category, buyRules.itemSku in response with status code 201 + - [Added] property dateMeta.approvedOn of schema PromotionDateMeta in response with status code 201 + - [Added] property dateMeta.rejectedOn of schema PromotionDateMeta in response with status code 201 + - [Added] property dateMeta.reviewedOn of schema PromotionDateMeta in response with status code 201 + - [Added] property isProcessed of schema PromotionAddResult in response with status code 201 + +- ##### What's Changed + - [Breaking] [Changed] ownership.payable_by, ownership.payable_category made optional in request body + - [Breaking] [Changed] restrictions.uses made optional in request body + - [Breaking] [Changed] visiblility.coupon_list, visiblility.pdp made optional in request body + - [Breaking] [Changed] schedule.end, schedule.published, schedule.start made optional in request body + - [Breaking] [Changed] postOrderAction.action_date, postOrderAction.action_type made optional in request body + - [Changed] buy_rules made optional in request body + - [Changed] discount_rules made optional in request body + - [Changed] display_meta made optional in request body + - [Changed] ownership made optional in request body + - [Breaking] [Changed] ownership.payable_by, ownership.payable_category made optional in response with status code 201 + - [Breaking] [Changed] restrictions.uses made optional in response with status code 201 + - [Breaking] [Changed] visiblility.coupon_list, visiblility.pdp made optional in response with status code 201 + - [Breaking] [Changed] schedule.end, schedule.published, schedule.start made optional in response with status code 201 + - [Breaking] [Changed] postOrderAction.action_date, postOrderAction.action_type made optional in response with status code 201 + - [Breaking] [Changed] buy_rules made optional in response with status code 201 + - [Breaking] [Changed] discount_rules made optional in response with status code 201 + - [Breaking] [Changed] display_meta made optional in response with status code 201 + - [Breaking] [Changed] ownership made optional in response with status code 201 + + +#### getPromotionById + +- ##### What's New + - [Added] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in response with status code 200 + - [Added] property author.approvedBy of schema PromotionAuthor in response with status code 200 + - [Added] property author.rejectedBy of schema PromotionAuthor in response with status code 200 + - [Added] property author.reviewedBy of schema PromotionAuthor in response with status code 200 + - [Added] Possible nullable value true to property displayMeta.description of schema DisplayMeta1 in response with status code 200 + - [Added] Possible nullable value true to property displayMeta.name of schema DisplayMeta1 in response with status code 200 + - [Added] Possible nullable value true to property displayMeta.offerText of schema DisplayMeta1 in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].offer.maxUsagePerTransaction of schema DiscountOffer in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] property discountRules[].meta of schema DiscountRule in response with status code 200 + - [Added] Possible nullable value true to property schedule.end of schema PromotionSchedule in response with status code 200 + - [Added] Possible nullable value true to property schedule.start of schema PromotionSchedule in response with status code 200 + - [Added] property schedule.status of schema PromotionSchedule in response with status code 200 + - [Added] properties buyRules.cartQuantity, buyRules.availableZones, buyRules.itemExcludeCompany, buyRules.itemId, buyRules.itemL1Category, buyRules.cartTotal, buyRules.cartUniqueItemQuantity, buyRules.cartUniqueItemAmount, buyRules.itemExcludeId, buyRules.allItems, buyRules.itemExcludeL1Category, buyRules.itemSize, buyRules.itemStore, buyRules.itemExcludeSku, buyRules.itemDepartment, buyRules.itemExcludeStore, buyRules.itemBrand, buyRules.itemExcludeDepartment, buyRules.itemExcludeCategory, buyRules.itemCategory, buyRules.buyRules, buyRules.itemExcludeBrand, buyRules.itemL2Category, buyRules.itemCompany, buyRules.itemTags, buyRules.itemExcludeL2Category, buyRules.itemSku in response with status code 200 + - [Added] property dateMeta.approvedOn of schema PromotionDateMeta in response with status code 200 + - [Added] property dateMeta.rejectedOn of schema PromotionDateMeta in response with status code 200 + - [Added] property dateMeta.reviewedOn of schema PromotionDateMeta in response with status code 200 + - [Added] property reason of schema PromotionUpdateResult in response with status code 200 + - [Added] property isProcessed of schema PromotionUpdateResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] ownership.payable_by, ownership.payable_category made optional in response with status code 200 + - [Breaking] [Changed] restrictions.uses made optional in response with status code 200 + - [Breaking] [Changed] visiblility.coupon_list, visiblility.pdp made optional in response with status code 200 + - [Breaking] [Changed] schedule.end, schedule.published, schedule.start made optional in response with status code 200 + - [Breaking] [Changed] postOrderAction.action_date, postOrderAction.action_type made optional in response with status code 200 + - [Breaking] [Changed] buy_rules made optional in response with status code 200 + - [Breaking] [Changed] discount_rules made optional in response with status code 200 + - [Breaking] [Changed] display_meta made optional in response with status code 200 + - [Breaking] [Changed] ownership made optional in response with status code 200 + + +#### updatePromotion + +- ##### What's New + - [Added] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in request body + - [Added] property author.approvedBy of schema PromotionAuthor in request body + - [Added] property author.rejectedBy of schema PromotionAuthor in request body + - [Added] property author.reviewedBy of schema PromotionAuthor in request body + - [Added] Possible nullable value true to property displayMeta.description of schema DisplayMeta1 in request body + - [Added] Possible nullable value true to property displayMeta.name of schema DisplayMeta1 in request body + - [Added] Possible nullable value true to property displayMeta.offerText of schema DisplayMeta1 in request body + - [Added] Possible nullable value true to property discountRules[].offer.maxUsagePerTransaction of schema DiscountOffer in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.equals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.greaterThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.lessThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.lessThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.greaterThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.equals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.greaterThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.lessThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.lessThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.greaterThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.equals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.lessThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.lessThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.equals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.greaterThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.lessThanEquals of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.lessThan of schema CompareObject in request body + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.greaterThanEquals of schema CompareObject in request body + - [Added] property discountRules[].meta of schema DiscountRule in request body + - [Added] Possible nullable value true to property schedule.end of schema PromotionSchedule in request body + - [Added] Possible nullable value true to property schedule.start of schema PromotionSchedule in request body + - [Added] property schedule.status of schema PromotionSchedule in request body + - [Added] properties buyRules.cartQuantity, buyRules.availableZones, buyRules.itemExcludeCompany, buyRules.itemId, buyRules.itemL1Category, buyRules.cartTotal, buyRules.cartUniqueItemQuantity, buyRules.cartUniqueItemAmount, buyRules.itemExcludeId, buyRules.allItems, buyRules.itemExcludeL1Category, buyRules.itemSize, buyRules.itemStore, buyRules.itemExcludeSku, buyRules.itemDepartment, buyRules.itemExcludeStore, buyRules.itemBrand, buyRules.itemExcludeDepartment, buyRules.itemExcludeCategory, buyRules.itemCategory, buyRules.buyRules, buyRules.itemExcludeBrand, buyRules.itemL2Category, buyRules.itemCompany, buyRules.itemTags, buyRules.itemExcludeL2Category, buyRules.itemSku in request body + - [Added] property dateMeta.approvedOn of schema PromotionDateMeta in request body + - [Added] property dateMeta.rejectedOn of schema PromotionDateMeta in request body + - [Added] property dateMeta.reviewedOn of schema PromotionDateMeta in request body + - [Added] property reason of schema PromotionUpdate in request body + - [Added] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in response with status code 200 + - [Added] property author.approvedBy of schema PromotionAuthor in response with status code 200 + - [Added] property author.rejectedBy of schema PromotionAuthor in response with status code 200 + - [Added] property author.reviewedBy of schema PromotionAuthor in response with status code 200 + - [Added] Possible nullable value true to property displayMeta.description of schema DisplayMeta1 in response with status code 200 + - [Added] Possible nullable value true to property displayMeta.name of schema DisplayMeta1 in response with status code 200 + - [Added] Possible nullable value true to property displayMeta.offerText of schema DisplayMeta1 in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].offer.maxUsagePerTransaction of schema DiscountOffer in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartQuantity.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartTotal.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemQuantity.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.equals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.greaterThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.lessThanEquals of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.lessThan of schema CompareObject in response with status code 200 + - [Added] Possible nullable value true to property discountRules[].itemCriteria.cartUniqueItemAmount.greaterThanEquals of schema CompareObject in response with status code 200 + - [Added] property discountRules[].meta of schema DiscountRule in response with status code 200 + - [Added] Possible nullable value true to property schedule.end of schema PromotionSchedule in response with status code 200 + - [Added] Possible nullable value true to property schedule.start of schema PromotionSchedule in response with status code 200 + - [Added] property schedule.status of schema PromotionSchedule in response with status code 200 + - [Added] properties buyRules.cartQuantity, buyRules.availableZones, buyRules.itemExcludeCompany, buyRules.itemId, buyRules.itemL1Category, buyRules.cartTotal, buyRules.cartUniqueItemQuantity, buyRules.cartUniqueItemAmount, buyRules.itemExcludeId, buyRules.allItems, buyRules.itemExcludeL1Category, buyRules.itemSize, buyRules.itemStore, buyRules.itemExcludeSku, buyRules.itemDepartment, buyRules.itemExcludeStore, buyRules.itemBrand, buyRules.itemExcludeDepartment, buyRules.itemExcludeCategory, buyRules.itemCategory, buyRules.buyRules, buyRules.itemExcludeBrand, buyRules.itemL2Category, buyRules.itemCompany, buyRules.itemTags, buyRules.itemExcludeL2Category, buyRules.itemSku in response with status code 200 + - [Added] property dateMeta.approvedOn of schema PromotionDateMeta in response with status code 200 + - [Added] property dateMeta.rejectedOn of schema PromotionDateMeta in response with status code 200 + - [Added] property dateMeta.reviewedOn of schema PromotionDateMeta in response with status code 200 + - [Added] property reason of schema PromotionUpdateResult in response with status code 200 + - [Added] property isProcessed of schema PromotionUpdateResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] ownership.payable_by, ownership.payable_category made optional in request body + - [Breaking] [Changed] restrictions.uses made optional in request body + - [Breaking] [Changed] visiblility.coupon_list, visiblility.pdp made optional in request body + - [Breaking] [Changed] schedule.end, schedule.published, schedule.start made optional in request body + - [Breaking] [Changed] postOrderAction.action_date, postOrderAction.action_type made optional in request body + - [Changed] buy_rules made optional in request body + - [Changed] discount_rules made optional in request body + - [Changed] display_meta made optional in request body + - [Changed] ownership made optional in request body + - [Breaking] [Changed] ownership.payable_by, ownership.payable_category made optional in response with status code 200 + - [Breaking] [Changed] restrictions.uses made optional in response with status code 200 + - [Breaking] [Changed] visiblility.coupon_list, visiblility.pdp made optional in response with status code 200 + - [Breaking] [Changed] schedule.end, schedule.published, schedule.start made optional in response with status code 200 + - [Breaking] [Changed] postOrderAction.action_date, postOrderAction.action_type made optional in response with status code 200 + - [Breaking] [Changed] buy_rules made optional in response with status code 200 + - [Breaking] [Changed] discount_rules made optional in response with status code 200 + - [Breaking] [Changed] display_meta made optional in response with status code 200 + - [Breaking] [Changed] ownership made optional in response with status code 200 + + +#### updatePromotionPartially + +- ##### What's New + - [Added] Possible nullable value true to property schedule.end of schema PromotionSchedule in request body + - [Added] Possible nullable value true to property schedule.start of schema PromotionSchedule in request body + - [Added] property schedule.status of schema PromotionSchedule in request body + +- ##### What's Changed + - [Breaking] [Changed] schedule.end, schedule.published, schedule.start made optional in request body + + +#### getPromosCouponConfig + +- ##### What's New + - [Breaking] [Added] Value format date-time to property modifiedOn of schema ActivePromosResult in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema ActivePromosResult in response with status code 200 + + +#### getPromotionOffers + +- ##### What's New + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property availablePromotions[].promotionType of schema PromotionOffer in response with status code 200 + - [Added] property availablePromotions[].freeGiftItems[].size of schema FreeGiftItems in response with status code 200 + - [Added] property availablePromotions[].freeGiftItems[].articlePrice of schema FreeGiftItems in response with status code 200 + - [Added] property availablePromotions[].freeGiftItems[].availableSizes of schema FreeGiftItems in response with status code 200 + + +#### getPromotionPaymentOffers + +- ##### What's New + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property promotions[].promotionType of schema PromotionPaymentOffer in response with status code 200 + + +#### updatePriceAdjustment + +- ##### What's New + - [Added] property data[] of schema GetPriceAdjustmentResult in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties data.value, data.message, data.restrictions, data.id, data.collection, data.type, data.meta, data.applyExpiry, data.articleLevelDistribution, data.allowedRefund, data.isAuthenticated, data.articleIds, data.cartId in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from object to array of property data of schema PriceAdjustment in response with status code 200 + - [Breaking] [Changed] data.article_ids, data.article_level_distribution, data.cart_id, data.collection, data.is_authenticated, data.message, data.type, data.value made optional in response with status code 200 + + +#### addPriceAdjustment + +- ##### What's New + - [Added] property data[] of schema GetPriceAdjustmentResult in response with status code 201 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties data.value, data.message, data.restrictions, data.id, data.collection, data.type, data.meta, data.applyExpiry, data.articleLevelDistribution, data.allowedRefund, data.isAuthenticated, data.articleIds, data.cartId in response with status code 201 + +- ##### What's Changed + - [Breaking] [Changed] Type from object to array of property data of schema PriceAdjustment in response with status code 201 + - [Breaking] [Changed] data.article_ids, data.article_level_distribution, data.cart_id, data.collection, data.is_authenticated, data.message, data.type, data.value made optional in response with status code 201 + + +#### fetchAndvalidateCartItems + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### checkCartServiceability + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### getAbandonedCartDetails + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### addItems + +- ##### What's New + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### updateCart + +- ##### What's New + - [Added] property freeGiftItems of schema UpdateCartCreation in request body + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### overrideCart + +- ##### What's New + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property orderType of schema OverrideCheckoutReq in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property paymentIdentifier of schema OverrideCheckoutReq in request body + + +#### getCartSharedItems + +- ##### What's New + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 404 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 404 + + +#### updateCartWithSharedItems + +- ##### What's New + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### getCartList + +- ##### What's New + - [Breaking] [Added] Value format date-time to property data[].createdOn of schema CartList in response with status code 200 + + +#### updateCartUser + +- ##### What's New + - [Breaking] [Added] Value format date-time to property user.modifiedOn of schema UserInfo in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.lastName of schema UserInfo in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserInfo in response with status code 200 + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### getCart + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### platformAddItems + +- ##### What's New + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### platformUpdateCart + +- ##### What's New + - [Added] property freeGiftItems of schema PlatformUpdateCartDetails in request body + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### getAppCoupons + +- ##### What's New + - [Breaking] [Added] Value format date-time to property availableCouponList[].startDate of schema Coupon in response with status code 200 + - [Breaking] [Added] Value format date-time to property availableCouponList[].endDate of schema Coupon in response with status code 200 + + +#### applyCoupon + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 201 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 201 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 201 + + +#### removeCoupon + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### getAddresses + +- ##### What's New + - [Added] property validationConfig of schema PlatformGetAddressesDetails in response with status code 200 + + +#### addAddress + +- ##### What's New + - [Added] Response with status 422 + + +#### selectAddress + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 201 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 201 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 201 + + +#### getShipments + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Added] property shipments[].items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property shipments[].items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property shipments[].orderType of schema PlatformShipmentDetails in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updateShipments + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Added] property shipments[].items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property shipments[].items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property shipments[].orderType of schema PlatformShipmentDetails in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### selectPaymentMode + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### validateCouponForPayment + +- ##### What's New + - [Added] property couponValidity.errorEn of schema CouponValidity in response with status code 200 + + +#### platformCheckoutCartV2 + +- ##### What's New + - [Added] property customMeta[] of schema PlatformCartCheckoutDetailV2Creation in request body + - [Added] properties customerDetails.name, customerDetails.email, customerDetails.mobile in request body + - [Breaking] [Added] customerDetails.mobile made required in request body + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property orderType of schema PlatformCartCheckoutDetailV2Creation in request body + - [Added] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property cart.items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property customerDetails of schema PlatformCartCheckoutDetailV2Request in request body + - [Breaking] [Deleted] Possible nullable value from true from property userId of schema PlatformCartCheckoutDetailV2Request in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from object to array of property customMeta of schema PlatformCartCheckoutDetailV2Request in request body + + +#### selectPaymentModeV2 + +- ##### What's New + - [Added] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property items[].promotionsApplied[].promotionType of schema AppliedPromotion in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount to property appliedPromoDetails[].promotionType of schema AppliedPromotion in response with status code 200 + + +#### deleteCoupon + +- ##### What's New + - [Added] method deleteCoupon + + + +#### deletePromotion + +- ##### What's New + - [Added] method deletePromotion + + + +#### platformCheckoutCart + +- ##### What's New + - [Added] method platformCheckoutCart + + + +### Catalog + + + +#### getApplicationBrandListing + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].active of schema ApplicationBrandListingItemSchema in response with status code 200 + - [Breaking] [Deleted] property items[].modifiedOn of schema ApplicationBrandListingItemSchema in response with status code 200 + + +#### getApplicationBrands + +- ##### What's New + - [Breaking] [Added] Type object to property items[].logo of schema Media2 in response with status code 200 + + +#### getCategories + +- ##### What's Deprecated + - [Breaking] [Deleted] property data[].items[].customJson of schema CategoryItems in response with status code 200 + - [Breaking] [Deleted] property departments[].name of schema DepartmentIdentifier in response with status code 200 + + +#### getAllCollections + +- ##### What's New + - [Breaking] [Added] Possible values image,video,3d_model to property items[].logo.type of schema Media in response with status code 200 + - [Added] property items[].logo.alt of schema Media in response with status code 200 + - [Added] property items[].logo.thumbnail of schema Media in response with status code 200 + - [Added] property items[].cron of schema GetCollectionDetailNest in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[].badge.color, items[].badge.text in response with status code 200 + - [Breaking] [Deleted] property items[].published of schema GetCollectionDetailNest in response with status code 200 + - [Breaking] [Deleted] property items[].tags of schema GetCollectionDetailNest in response with status code 200 + - [Breaking] [Deleted] property items[].seo of schema GetCollectionDetailNest in response with status code 200 + - [Breaking] [Deleted] properties items[].schedule.cron, items[].schedule.duration, items[].schedule.end, items[].schedule.start, items[].schedule.nextSchedule in response with status code 200 + - [Breaking] [Deleted] property items[].id of schema GetCollectionDetailNest in response with status code 200 + - [Breaking] [Deleted] property items[].sortOn of schema GetCollectionDetailNest in response with status code 200 + - [Breaking] [Deleted] property items[].customJson of schema GetCollectionDetailNest in response with status code 200 + - [Breaking] [Deleted] property items[].localeLanguage of schema GetCollectionDetailNest in response with status code 200 + - [Breaking] [Deleted] property items[].isVisible of schema GetCollectionDetailNest in response with status code 200 + + +#### createCollection + +- ##### What's New + - [Added] Possible nullable value true to property createdBy of schema CreateCollection in request body + - [Added] Possible nullable value true to property modifiedBy of schema CreateCollection in request body + - [Added] property cron of schema CollectionCreateResponseSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property published of schema CollectionCreateResponse in response with status code 200 + - [Breaking] [Deleted] property tags of schema CollectionCreateResponse in response with status code 200 + - [Breaking] [Deleted] property action of schema CollectionCreateResponse in response with status code 200 + - [Breaking] [Deleted] property seo of schema CollectionCreateResponse in response with status code 200 + - [Breaking] [Deleted] property id of schema CollectionCreateResponse in response with status code 200 + - [Breaking] [Deleted] properties schedule.cron, schedule.duration, schedule.end, schedule.start, schedule.nextSchedule in response with status code 200 + - [Breaking] [Deleted] property customJson of schema CollectionCreateResponse in response with status code 200 + - [Breaking] [Deleted] property localeLanguage of schema CollectionCreateResponse in response with status code 200 + - [Breaking] [Deleted] property isVisible of schema CollectionCreateResponse in response with status code 200 + + +#### updateCollection + +- ##### What's New + - [Added] Possible nullable value true to property modifiedBy of schema UpdateCollection in request body + - [Added] Possible nullable value true to property modifiedBy of schema UpdateCollection in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties modifiedBy.email, modifiedBy.uid, modifiedBy.username, modifiedBy.userId in request body + - [Breaking] [Deleted] properties modifiedBy.email, modifiedBy.uid, modifiedBy.username, modifiedBy.userId in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from object to string of property modifiedBy of schema UserInfo in request body + - [Breaking] [Changed] Type from object to string of property modifiedBy of schema UserInfo in response with status code 200 + + +#### getCollectionItems + +- ##### What's New + - [Breaking] [Added] Possible values image,video,3d_model to property items[].brand.logo.type of schema Media in response with status code 200 + - [Added] property items[].brand.logo.alt of schema Media in response with status code 200 + - [Added] property items[].brand.logo.thumbnail of schema Media in response with status code 200 + - [Breaking] [Added] Possible values image,video,3d_model to property items[].medias[].type of schema Media in response with status code 200 + - [Added] property items[].medias[].alt of schema Media in response with status code 200 + - [Added] property items[].medias[].thumbnail of schema Media in response with status code 200 + - [Breaking] [Added] Possible values INR,USD,EUR to property items[].price.effective.currencyCode of schema CurrencyCodeEnum in response with status code 200 + - [Breaking] [Added] Possible values INR,USD,EUR to property items[].price.marked.currencyCode of schema CurrencyCodeEnum in response with status code 200 + - [Added] property items[].price.selling of schema ProductListingPrice in response with status code 200 + - [Breaking] [Added] Possible values default,standard to property items[].imageNature of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Added] Possible values composite,digital,packaging,set,standard to property items[].itemType of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].popularity of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].departments of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].tags of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].sizes of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].moq of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].seo of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].variants of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].identifiers of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].brandUid of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].categoryUid of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].verificationStatus of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].channelIdentifier of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].categorySlug of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].sizeGuide of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].l3Categories of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].storeIds of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].companyIds of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].l3CategoryNames of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].productGroupTag of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].multiSize of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].isGift of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].isCod of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].isDependent of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].isAvailable of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].variantMedia of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].variantGroup of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].multiCategories of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].templateTag of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].netQuantity of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].customOrder of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].countryOfOrigin of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].customJson of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].itemId of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].customMeta of schema ApplicationProductsSchema in response with status code 200 + - [Added] property items[].discountPercentage of schema ApplicationProductsSchema in response with status code 200 + - [Added] items[].is_dependent made required in response with status code 200 + - [Added] items[].uid made required in response with status code 200 + - [Added] items[].category_uid made required in response with status code 200 + - [Added] items[].item_code made required in response with status code 200 + - [Added] items[].multi_size made required in response with status code 200 + - [Added] items[].brand_uid made required in response with status code 200 + - [Added] items[].country_of_origin made required in response with status code 200 + - [Added] items[].item_type made required in response with status code 200 + - [Added] items[].departments made required in response with status code 200 + - [Added] items[].slug made required in response with status code 200 + - [Added] items[].image_nature made required in response with status code 200 + - [Added] items[].moq made required in response with status code 200 + - [Added] items[].seo made required in response with status code 200 + - [Added] items[].is_cod made required in response with status code 200 + - [Added] items[].is_gift made required in response with status code 200 + - [Added] items[].is_available made required in response with status code 200 + - [Added] items[].l3_categories made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Type from object from property items[].price of schema ProductListingPrice in response with status code 200 + - [Breaking] [Deleted] property items[].groupedAttributes of schema ProductListingDetail in response with status code 200 + + +#### getCollectionDetail + +- ##### What's New + - [Breaking] [Added] Possible values image,video,3d_model to property logo.type of schema Media in response with status code 200 + - [Added] property logo.alt of schema Media in response with status code 200 + - [Added] property logo.thumbnail of schema Media in response with status code 200 + + +#### getAppLocations + +- ##### What's New + - [Breaking] [Added] Possible values distributor,franchise,mbo,manufacturer-owner to property items[].company.companyType of schema GetCompanySchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].company.createdOn of schema GetCompanySchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].company.modifiedOn of schema GetCompanySchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].company.verifiedOn of schema GetCompanySchema in response with status code 200 + - [Breaking] [Added] Possible values high_street,warehouse,mall to property items[].storeType of schema GetLocationSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].integrationType.order of schema LocationIntegrationType in response with status code 200 + + +#### getAppicationProducts + +- ##### What's Deprecated + - [Deleted] Type from object from property items[].price of schema ProductListingPrice in response with status code 200 + - [Breaking] [Deleted] property items[].groupedAttributes of schema ProductListingDetail in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] operationId from getAppicationProducts to getApplicationProducts + + +#### getDiscountedInventoryBySizeIdentifier + +- ##### What's New + - [Added] properties items[].taxIdentifier.hsnCode, items[].taxIdentifier.hsnCodeId, items[].taxIdentifier.reportingHsn in response with status code 200 + + +#### getProductDetailBySlug + +- ##### What's New + - [Breaking] [Added] Possible values image,video,3d_model to property brand.logo.type of schema Media in response with status code 200 + - [Added] property brand.logo.alt of schema Media in response with status code 200 + - [Added] property brand.logo.thumbnail of schema Media in response with status code 200 + - [Breaking] [Added] Possible values image,video,3d_model to property medias[].type of schema Media in response with status code 200 + - [Added] property medias[].alt of schema Media in response with status code 200 + - [Added] property medias[].thumbnail of schema Media in response with status code 200 + - [Breaking] [Added] Possible values set,standard,composite,digital to property itemType of schema ProductDetail in response with status code 200 + + +#### getAppProducts + +- ##### What's New + - [Breaking] [Added] Possible values image,video,3d_model to property items[].media[].type of schema Media in response with status code 200 + - [Added] property items[].media[].alt of schema Media in response with status code 200 + - [Added] property items[].media[].thumbnail of schema Media in response with status code 200 + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema RawProduct in response with status code 200 + - [Added] properties items[].taxIdentifier.hsnCode, items[].taxIdentifier.hsnCodeId, items[].taxIdentifier.reportingHsn in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].verifiedOn of schema RawProduct in response with status code 200 + + +#### createAppReturnConfiguration + +- ##### What's Deprecated + - [Breaking] [Deleted] property appId of schema CreateUpdateAppReturnConfig in request body + - [Breaking] [Deleted] property companyId of schema CreateUpdateAppReturnConfig in request body + +- ##### What's Changed + - [Changed] app_id made optional in request body + - [Changed] company_id made optional in request body + + +#### updateAppReturnConfiguration + +- ##### What's Deprecated + - [Breaking] [Deleted] property appId of schema CreateUpdateAppReturnConfig in request body + - [Breaking] [Deleted] property companyId of schema CreateUpdateAppReturnConfig in request body + +- ##### What's Changed + - [Changed] app_id made optional in request body + - [Changed] company_id made optional in request body + + +#### deleteAppCategoryReturnConfiguration + +- ##### What's Deprecated + - [Breaking] [Deleted] property appId of schema DeleteAppCategoryReturnConfig in request body + - [Breaking] [Deleted] property companyId of schema DeleteAppCategoryReturnConfig in request body + +- ##### What's Changed + - [Changed] app_id made optional in request body + - [Changed] company_id made optional in request body + + +#### createAppCategoryReturnConfiguration + +- ##### What's Deprecated + - [Breaking] [Deleted] property appId of schema BaseAppCategoryReturnConfig in request body + - [Breaking] [Deleted] property companyId of schema BaseAppCategoryReturnConfig in request body + +- ##### What's Changed + - [Changed] app_id made optional in request body + - [Changed] company_id made optional in request body + + +#### updateAppCategoryReturnConfiguration + +- ##### What's Deprecated + - [Breaking] [Deleted] property appId of schema BaseAppCategoryReturnConfig in request body + - [Breaking] [Deleted] property companyId of schema BaseAppCategoryReturnConfig in request body + +- ##### What's Changed + - [Changed] app_id made optional in request body + - [Changed] company_id made optional in request body + + +#### listDepartmentsData + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema GetDepartment in response with status code 200 + + +#### getDepartmentData + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema GetDepartment in response with status code 200 + + +#### bulkHsnCode + +- ##### What's Changed + - [Changed] data[].hs2_code made optional in request body + + +#### updateHsnCode + +- ##### What's Changed + - [Changed] hs2_code made optional in request body + + +#### getInventories + +- ##### What's New + - [Added] properties items[].identifier.ean, items[].identifier.alu, items[].identifier.upc, items[].identifier.isbn, items[].identifier.skuCode in response with status code 200 + - [Breaking] [Added] Possible values high_street,warehouse,mall to property items[].store.storeType of schema ArticleStoreResponseSchema in response with status code 200 + - [Added] properties items[].taxIdentifier.hsnCode, items[].taxIdentifier.hsnCodeId, items[].taxIdentifier.reportingHsn in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Type from object from property items[].identifier of schema GetInventories in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] items[].returnConfig.returnable, items[].returnConfig.time, items[].returnConfig.unit made optional in response with status code 200 + + +#### getInventoryBulkUploadHistory + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdOn of schema BulkInventoryGetItems in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].modifiedOn of schema BulkInventoryGetItems in response with status code 200 + + +#### createInventoryExportJob + +- ##### What's New + - [Added] properties filters.brands, filters.quantity, filters.stores, filters.fromDate, filters.toDate in response with status code 200 + + +#### getMarketplaceOptinDetail + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdOn of schema CompanyOptIn in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].modifiedOn of schema CompanyOptIn in response with status code 200 + + +#### getCompanyDetail + +- ##### What's New + - [Breaking] [Added] Possible values distributor,franchise,mbo,manufacturer-owner to property companyType of schema OptinCompanyDetail in response with status code 200 + + +#### getStoreDetail + +- ##### What's New + - [Breaking] [Added] Possible values high_street,warehouse,mall to property items[].storeType of schema StoreDetail in response with status code 200 + + +#### getProductAssetsInBulk + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdOn of schema Items in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].modifiedOn of schema Items in response with status code 200 + + +#### getProductBulkUploadHistory + +- ##### What's Deprecated + - [Deleted] Type from array from property items of schema ProductBulkRequestList in response with status code 200 + + +#### getInventoryBySizeIdentifier + +- ##### What's New + - [Added] properties items[].taxIdentifier.hsnCode, items[].taxIdentifier.hsnCodeId, items[].taxIdentifier.reportingHsn in response with status code 200 + + +#### getProductSize + +- ##### What's New + - [Breaking] [Added] Possible values image,video,3d_model to property items[].media[].type of schema Media in response with status code 200 + - [Added] property items[].media[].alt of schema Media in response with status code 200 + - [Added] property items[].media[].thumbnail of schema Media in response with status code 200 + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema Product in response with status code 200 + - [Added] properties items[].taxIdentifier.hsnCode, items[].taxIdentifier.hsnCodeId, items[].taxIdentifier.reportingHsn in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].verifiedOn of schema Product in response with status code 200 + + +#### getInventoryBySize + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].inventoryUpdatedOn of schema InventoryResponseSchema in response with status code 200 + + +#### getVariantsOfProducts + +- ##### What's New + - [Breaking] [Added] Possible values image,video,3d_model to property variants[].media[].type of schema Media in response with status code 200 + - [Added] property variants[].media[].alt of schema Media in response with status code 200 + - [Added] property variants[].media[].thumbnail of schema Media in response with status code 200 + + +#### getSizeGuide + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdOn of schema SizeGuideResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedOn of schema SizeGuideResponseSchema in response with status code 200 + + +#### createInventoryExport + +- ##### What's New + - [Added] properties filters.brands, filters.quantity, filters.stores, filters.fromDate, filters.toDate in response with status code 200 + + +#### getProducts + +- ##### What's New + - [Breaking] [Added] Possible values image,video,3d_model to property items[].media[].type of schema Media in response with status code 200 + - [Added] property items[].media[].alt of schema Media in response with status code 200 + - [Added] property items[].media[].thumbnail of schema Media in response with status code 200 + - [Breaking] [Added] Possible values set,standard,composite,digital to property items[].itemType of schema ProductSchemaV2 in response with status code 200 + - [Added] properties items[].taxIdentifier.hsnCode, items[].taxIdentifier.hsnCodeId, items[].taxIdentifier.reportingHsn in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].verifiedOn of schema ProductSchemaV2 in response with status code 200 + + +#### createProduct + +- ##### What's New + - [Breaking] [Added] Possible values image,video,3d_model to property media[].type of schema Media in request body + - [Added] property media[].alt of schema Media in request body + - [Added] property media[].thumbnail of schema Media in request body + - [Breaking] [Added] customOrder.is_custom_order made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Default value from property customOrder.isCustomOrder of schema CustomOrder in request body + - [Breaking] [Deleted] Default value from property customOrder.manufacturingTime of schema CustomOrder in request body + - [Deleted] minimum validator for customOrder.manufacturingTime in request body + - [Deleted] Possible values from days,hours from property customOrder.manufacturingTimeUnit of schema CustomOrder in request body + + +#### uploadBulkProducts + +- ##### What's New + - [Breaking] [Added] Possible values set,standard,composite,digital to property productType of schema BulkProductJob in request body + + +#### getProduct + +- ##### What's New + - [Breaking] [Added] Possible values image,video,3d_model to property data.media[].type of schema Media in response with status code 200 + - [Added] property data.media[].alt of schema Media in response with status code 200 + - [Added] property data.media[].thumbnail of schema Media in response with status code 200 + - [Breaking] [Added] Possible values set,standard,composite,digital to property data.itemType of schema ProductSchemaV2 in response with status code 200 + - [Added] properties data.taxIdentifier.hsnCode, data.taxIdentifier.hsnCodeId, data.taxIdentifier.reportingHsn in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.verifiedOn of schema ProductSchemaV2 in response with status code 200 + + +#### editProduct + +- ##### What's New + - [Breaking] [Added] Possible values image,video,3d_model to property media[].type of schema Media in request body + - [Added] property media[].alt of schema Media in request body + - [Added] property media[].thumbnail of schema Media in request body + - [Breaking] [Added] customOrder.is_custom_order made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Default value from property customOrder.isCustomOrder of schema CustomOrder in request body + - [Breaking] [Deleted] Default value from property customOrder.manufacturingTime of schema CustomOrder in request body + - [Deleted] minimum validator for customOrder.manufacturingTime in request body + - [Deleted] Possible values from days,hours from property customOrder.manufacturingTimeUnit of schema CustomOrder in request body + + +### Common + + + +#### searchApplication + +- ##### What's New + - [Breaking] [Added] Possible values store,website-and-mobile-apps to property application.channelType of schema Application in response with status code 200 + - [Breaking] [Added] Value format date-time to property application.createdAt of schema Application in response with status code 200 + - [Breaking] [Added] Value format date-time to property application.updatedAt of schema Application in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ApplicationResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ApplicationResponseSchema in response with status code 200 + + +### Communication + + + +#### getAppProviders + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema AppProvider in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema AppProvider in response with status code 200 + + +#### updateAppProviders + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema AppProvider in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema AppProvider in response with status code 200 + + +#### getEmailProviders + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema EmailProvider in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema EmailProvider in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createEmailProvider + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema EmailProvider in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema EmailProvider in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getEmailProviderById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema EmailProvider in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema EmailProvider in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updateEmailProviderById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema EmailProvider in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema EmailProvider in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### deleteEmailProviderById + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getSmsProviders + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createSmsProvider + +- ##### What's New + - [Added] property tenantName1 of schema SmsProviderReq in request body + - [Added] property tenantName2 of schema SmsProviderReq in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getDefaultSmsProviders + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getSmsProviderById + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updateSmsProviderById + +- ##### What's New + - [Added] property tenantName1 of schema SmsProviderReq in request body + - [Added] property tenantName2 of schema SmsProviderReq in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### deleteSmsProviderById + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getCampaigns + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema Campaign in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema Campaign in response with status code 200 + + +#### createCampaign + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Campaign in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Campaign in response with status code 200 + + +#### getCampaignById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Campaign in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Campaign in response with status code 200 + + +#### updateCampaignById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Campaign in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Campaign in response with status code 200 + + +#### getAudiences + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema Audience in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema Audience in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createAudience + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Audience in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Audience in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getAudienceById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Audience in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Audience in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updateAudienceById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Audience in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Audience in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### deleteAudienceById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Audience in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Audience in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getDummyDatasources + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getDummyDatasourcesMeta + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getNSampleRecordsFromCsvByGet + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getNSampleRecordsFromCsv + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getEmailTemplates + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema EmailTemplate in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema EmailTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createEmailTemplate + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema EmailTemplate in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema EmailTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getSystemEmailTemplates + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema SystemEmailTemplate in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema SystemEmailTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getEmailTemplateById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema EmailTemplate in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema EmailTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updateEmailTemplateById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema EmailTemplate in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema EmailTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### deleteEmailTemplateById + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getSubscribedEmailTemplates + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema EmailTemplate in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema EmailTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getSmsTemplates + +- ##### What's New + - [Breaking] [Added] Possible values static,nunjucks,lodash to property items[].message.templateType of schema SmsTemplateMessage in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema SmsTemplate in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema SmsTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createSmsTemplate + +- ##### What's New + - [Breaking] [Added] Possible values static,nunjucks,lodash to property message.templateType of schema SmsTemplateMessage in request body + - [Breaking] [Added] Possible values static,nunjucks,lodash to property message.templateType of schema SmsTemplateMessage in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema SmsTemplate in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema SmsTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getSystemSmsTemplates + +- ##### What's New + - [Breaking] [Added] Possible values static,nunjucks,lodash to property [].message.templateType of schema SmsTemplateMessage in response with status code 200 + - [Breaking] [Added] Value format date-time to property [].createdAt of schema SystemSmsTemplates in response with status code 200 + - [Breaking] [Added] Value format date-time to property [].updatedAt of schema SystemSmsTemplates in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getSmsTemplateById + +- ##### What's New + - [Breaking] [Added] Possible values static,nunjucks,lodash to property message.templateType of schema SmsTemplateMessage in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema SmsTemplate in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema SmsTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updateSmsTemplateById + +- ##### What's New + - [Breaking] [Added] Possible values static,nunjucks,lodash to property message.templateType of schema SmsTemplateMessage in request body + - [Breaking] [Added] Possible values static,nunjucks,lodash to property message.templateType of schema SmsTemplateMessage in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema SmsTemplate in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema SmsTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### deleteSmsTemplateById + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getSubscribedSmsTemplates + +- ##### What's New + - [Breaking] [Added] Possible values static,nunjucks,lodash to property items[].message.templateType of schema SmsTemplateMessage in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema SmsTemplate in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema SmsTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getEventSubscriptions + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema EventSubscription in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema EventSubscription in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createEventSubscriptions + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getEventSubscriptionsById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema EventSubscription in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema EventSubscription in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### editEventSubscriptions + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### deleteEventSubscriptionsById + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createEventSubscriptionsByBulk + +- ##### What's New + - [Breaking] [Added] Value format date-time to property [].createdAt of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + - [Breaking] [Added] Value format date-time to property [].updatedAt of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getGlobalVariables + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### postGlobalVariables + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema CreateGlobalVariablesResult in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getJobs + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema Job in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema Job in response with status code 200 + + +#### createJobs + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema CreateJobsRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema CreateJobsRes in response with status code 200 + + +#### getJobLogs + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema JobLog in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema JobLog in response with status code 200 + + +#### getCommunicationLogs + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].expireAt of schema Log in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema Log in response with status code 200 + + +#### getSystemNotifications + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema SystemNotification in response with status code 200 + + +### CompanyProfile + + + +#### cbsOnboardGet + +- ##### What's New + - [Breaking] [Added] Possible values home,registered,office to property addresses[].addressType of schema GetAddressSchema in response with status code 200 + - [Breaking] [Added] Possible values distributor,franchise,mbo,manufacturer-owner to property companyType of schema GetCompanyProfileSerializerResponseSchema in response with status code 200 + + +#### updateCompany + +- ##### What's New + - [Breaking] [Added] Possible values distributor,franchise,mbo,manufacturer-owner to property companyType of schema UpdateCompany in request body + + +#### getBrands + +- ##### What's New + - [Breaking] [Added] Possible values home,registered,office to property items[].company.addresses[].addressType of schema GetAddressSchema in response with status code 200 + - [Breaking] [Added] Possible values distributor,franchise,mbo,manufacturer-owner to property items[].company.companyType of schema CompanySchema in response with status code 200 + + +#### getLocations + +- ##### What's New + - [Breaking] [Added] Possible values home,registered,office to property items[].company.addresses[].addressType of schema GetAddressSchema in response with status code 200 + - [Breaking] [Added] Possible values distributor,franchise,mbo,manufacturer-owner to property items[].company.companyType of schema GetCompanySchema in response with status code 200 + - [Breaking] [Added] Possible values home,registered,office to property items[].address.addressType of schema GetAddressSchema in response with status code 200 + - [Breaking] [Added] Possible values high_street,warehouse,mall to property items[].storeType of schema GetLocationSchema in response with status code 200 + + +#### createLocation + +- ##### What's New + - [Breaking] [Added] Possible values high_street,warehouse,mall to property storeType of schema LocationSchema in request body + + +#### getLocationDetail + +- ##### What's New + - [Breaking] [Added] Possible values home,registered,office to property company.addresses[].addressType of schema GetAddressSchema in response with status code 200 + - [Breaking] [Added] Possible values distributor,franchise,mbo,manufacturer-owner to property company.companyType of schema GetCompanySchema in response with status code 200 + - [Breaking] [Added] Possible values home,registered,office to property address.addressType of schema GetAddressSchema in response with status code 200 + - [Breaking] [Added] Possible values high_street,warehouse,mall to property storeType of schema GetLocationSchema in response with status code 200 + + +#### updateLocation + +- ##### What's New + - [Breaking] [Added] Possible values high_street,warehouse,mall to property storeType of schema LocationSchema in request body + + +#### createLocationBulk + +- ##### What's New + - [Breaking] [Added] Possible values high_street,warehouse,mall to property data[].storeType of schema LocationSchema in request body + + +### Configuration + + + +#### getBuildConfig + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema MobileAppConfiguration in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema MobileAppConfiguration in response with status code 200 + + +#### updateBuildConfig + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema MobileAppConfiguration in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema MobileAppConfiguration in response with status code 200 + + +#### getPreviousVersions + +- ##### What's New + - [Breaking] [Added] Value format date-time to property versions[].createdAt of schema BuildVersion in response with status code 200 + - [Breaking] [Added] Value format date-time to property versions[].modifiedAt of schema BuildVersion in response with status code 200 + + +#### getAppFeatures + +- ##### What's New + - [Breaking] [Added] Value format date-time to property feature.createdAt of schema AppFeature in response with status code 200 + - [Breaking] [Added] Value format date-time to property feature.modifiedAt of schema AppFeature in response with status code 200 + + +#### updateAppFeatures + +- ##### What's New + - [Breaking] [Added] Value format date-time to property feature.createdAt of schema AppFeature in request body + - [Breaking] [Added] Value format date-time to property feature.modifiedAt of schema AppFeature in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema AppFeature in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema AppFeature in response with status code 200 + + +#### modifyAppFeatures + +- ##### What's New + - [Breaking] [Added] Value format date-time to property feature.createdAt of schema AppFeature in request body + - [Breaking] [Added] Value format date-time to property feature.modifiedAt of schema AppFeature in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema AppFeature in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema AppFeature in response with status code 200 + + +#### getAppContactInfo + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ApplicationInformation in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema ApplicationInformation in response with status code 200 + + +#### updateAppContactInfo + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ApplicationInformation in request body + - [Breaking] [Added] Value format date-time to property modifiedAt of schema ApplicationInformation in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema ApplicationInformation in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema ApplicationInformation in response with status code 200 + + +#### getAppApiTokens + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema TokenResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema TokenResponseSchema in response with status code 200 + + +#### updateAppApiTokens + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema TokenResponseSchema in request body + - [Breaking] [Added] Value format date-time to property modifiedAt of schema TokenResponseSchema in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema TokenResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema TokenResponseSchema in response with status code 200 + + +#### getAppStores + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].modifiedOn of schema AppInventoryStores in response with status code 200 + - [Breaking] [Added] Possible values high_street,warehouse,mall to property items[].storeType of schema AppInventoryStores in response with status code 200 + + +#### getInventoryConfig + +- ##### What's New + - [Breaking] [Added] Type object to property inventory.excludeCategory[] of schema AppInventoryConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ApplicationInventory in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema ApplicationInventory in response with status code 200 + - [Added] property search of schema ApplicationInventory in response with status code 200 + + +#### updateInventoryConfig + +- ##### What's New + - [Breaking] [Added] Type object to property inventory.excludeCategory[] of schema AppInventoryConfig in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema ApplicationInventory in request body + - [Breaking] [Added] Value format date-time to property modifiedAt of schema ApplicationInventory in request body + - [Added] property search of schema ApplicationInventory in request body + - [Breaking] [Added] Type object to property inventory.excludeCategory[] of schema AppInventoryConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ApplicationInventory in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema ApplicationInventory in response with status code 200 + - [Added] property search of schema ApplicationInventory in response with status code 200 + + +#### partiallyUpdateInventoryConfig + +- ##### What's New + - [Added] property search of schema AppInventoryPartialUpdate in request body + - [Breaking] [Added] Type object to property inventory.excludeCategory[] of schema AppInventoryConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ApplicationInventory in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema ApplicationInventory in response with status code 200 + - [Added] property search of schema ApplicationInventory in response with status code 200 + + +#### getAppCurrencyConfig + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema AppSupportedCurrency in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema AppSupportedCurrency in response with status code 200 + + +#### updateAppCurrencyConfig + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema AppSupportedCurrency in request body + - [Breaking] [Added] Value format date-time to property modifiedAt of schema AppSupportedCurrency in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema AppSupportedCurrency in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema AppSupportedCurrency in response with status code 200 + + +#### getAppSupportedCurrency + +- ##### What's New + - [Breaking] [Added] Value format date-time to property supportedCurrency[].createdAt of schema Currency in response with status code 200 + - [Breaking] [Added] Value format date-time to property supportedCurrency[].modifiedAt of schema Currency in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema AppCurrencyResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema AppCurrencyResponseSchema in response with status code 200 + + +#### createApplication + +- ##### What's New + - [Breaking] [Added] Type object to property configuration.inventory.excludeCategory[] of schema AppInventoryConfig in request body + - [Breaking] [Added] Value format date-time to property configuration.createdAt of schema ApplicationInventory in request body + - [Breaking] [Added] Value format date-time to property configuration.modifiedAt of schema ApplicationInventory in request body + - [Added] property configuration.search of schema ApplicationInventory in request body + - [Breaking] [Added] Value format date-time to property app.tokens[].createdAt of schema TokenSchema in response with status code 200 + - [Breaking] [Added] Possible values website-and-mobile-apps,store to property app.channelType of schema Application in response with status code 200 + - [Breaking] [Added] Value format date-time to property app.createdAt of schema Application in response with status code 200 + - [Breaking] [Added] Value format date-time to property app.modifiedAt of schema Application in response with status code 200 + - [Breaking] [Added] Type object to property configuration.inventory.excludeCategory[] of schema AppInventoryConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property configuration.createdAt of schema ApplicationInventory in response with status code 200 + - [Breaking] [Added] Value format date-time to property configuration.modifiedAt of schema ApplicationInventory in response with status code 200 + - [Added] property configuration.search of schema ApplicationInventory in response with status code 200 + + +#### getApplications + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].tokens[].createdAt of schema TokenSchema in response with status code 200 + - [Breaking] [Added] Possible values website-and-mobile-apps,store to property items[].channelType of schema Application in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema Application in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].modifiedAt of schema Application in response with status code 200 + + +#### getApplicationById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property tokens[].createdAt of schema TokenSchemaID in response with status code 200 + - [Breaking] [Added] Possible values website-and-mobile-apps,store to property channelType of schema ApplicationById in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ApplicationById in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema ApplicationById in response with status code 200 + + +#### getCurrencies + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema Currency in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].modifiedAt of schema Currency in response with status code 200 + + +#### getDomainAvailibility + +- ##### What's New + - [Added] property customDomain of schema DomainSuggestionsRequestSchema in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property custom of schema DomainSuggestionsRequest in request body + + +#### getStoreByBrands + +- ##### What's New + - [Breaking] [Added] Possible values high_street,warehouse,mall to property items[].storeType of schema BrandStoreInfo in response with status code 200 + + +#### getCurrencyExchangeRates + +- ##### What's New + - [Added] method getCurrencyExchangeRates + + + +### Content + + + +#### getAnnouncementsList + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema AdminAnnouncementSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].modifiedAt of schema AdminAnnouncementSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### createAnnouncement + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema AdminAnnouncementSchema in request body + - [Breaking] [Added] Value format date-time to property modifiedAt of schema AdminAnnouncementSchema in request body + - [Breaking] [Added] Value format date-time to property data.createdAt of schema AdminAnnouncementSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.modifiedAt of schema AdminAnnouncementSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getAnnouncementById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema AdminAnnouncementSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema AdminAnnouncementSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updateAnnouncement + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema AdminAnnouncementSchema in request body + - [Breaking] [Added] Value format date-time to property modifiedAt of schema AdminAnnouncementSchema in request body + - [Breaking] [Added] Value format date-time to property data.createdAt of schema AdminAnnouncementSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.modifiedAt of schema AdminAnnouncementSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updateAnnouncementSchedule + +- ##### What's New + - [Breaking] [Added] Value format date-time to property data.createdAt of schema AdminAnnouncementSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.modifiedAt of schema AdminAnnouncementSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### deleteAnnouncement + +- ##### What's New + - [Breaking] [Added] Value format date-time to property data.createdAt of schema AdminAnnouncementSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.modifiedAt of schema AdminAnnouncementSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### createBlog + +- ##### What's New + - [Breaking] [Added] Value format date-time to property publishDate of schema BlogSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + + +#### getBlogs + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].publishDate of schema BlogSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updateBlog + +- ##### What's New + - [Breaking] [Added] Value format date-time to property publishDate of schema BlogSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + + +#### deleteBlog + +- ##### What's New + - [Breaking] [Added] Value format date-time to property publishDate of schema BlogSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### addDataLoader + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getDataLoaders + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### deleteDataLoader + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### editDataLoader + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getDataLoadersByService + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### selectDataLoader + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### resetDataLoader + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getFaqCategories + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getFaqCategoryBySlugOrId + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### createFaqCategory + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updateFaqCategory + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### deleteFaqCategory + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getFaqsByCategoryIdOrSlug + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### addFaq + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updateFaq + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### deleteFaq + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getFaqByIdOrSlug + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### generateSEOTitle + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getLandingPages + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### createLandingPage + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in request body + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in request body + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updateLandingPage + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in request body + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in request body + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### deleteLandingPage + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getLegalInformation + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updateLegalInformation + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getNavigations + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### createNavigation + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getDefaultNavigations + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getNavigationBySlug + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + +- ##### What's Changed + - [Changed] Required status of query parameter devicePlatform + + +#### updateNavigation + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### deleteNavigation + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getPageMeta + +- ##### What's New + - [Breaking] [Added] Value format date-time to property systemPages[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property systemPages[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property customPages[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property customPages[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getPageSpec + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### createPagePreview + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updatePagePreview + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### deletePage + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### addPathRedirectionRules + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getPathRedirectionRules + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getPathRedirectionRule + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updatePathRedirectionRules + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### deletePathRedirectionRules + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getSEOConfiguration + +- ##### What's New + - [Breaking] [Added] Value format date-time to property seo.createdAt of schema SeoSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property seo.updatedAt of schema SeoSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updateSEOConfiguration + +- ##### What's New + - [Breaking] [Added] Value format date-time to property seo.createdAt of schema SeoSchema in request body + - [Breaking] [Added] Value format date-time to property seo.updatedAt of schema SeoSchema in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema SeoSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema SeoSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getDefaultSEOMarkupSchema + +- ##### What's New + - [Breaking] [Added] Possible values about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status to property items[].pageType of schema DefaultSEOSchemaMarkupTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getSEOMarkupSchemas + +- ##### What's New + - [Breaking] [Added] Possible values about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status to property items[].pageType of schema SEOSchemaMarkupTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### createSEOMarkupSchema + +- ##### What's New + - [Breaking] [Added] Possible values about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status to property pageType of schema SEOSchemaMarkupTemplateRequestBody in request body + - [Breaking] [Added] Possible values about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status to property pageType of schema SEOSchemaMarkupTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getSEOMarkupSchema + +- ##### What's New + - [Breaking] [Added] Possible values about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status to property pageType of schema SEOSchemaMarkupTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### editSEOMarkupSchema + +- ##### What's New + - [Breaking] [Added] Possible values about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status to property pageType of schema SEOSchemaMarkupTemplateRequestBody in request body + - [Breaking] [Added] Possible values about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status to property pageType of schema SEOSchemaMarkupTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### deleteSEOMarkupSchema + +- ##### What's New + - [Breaking] [Added] Possible values about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status to property pageType of schema SEOSchemaMarkupTemplate in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getSlideshows + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### createSlideshow + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getSlideshowBySlug + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updateSlideshow + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### deleteSlideshow + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getSupportInformation + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Support in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Support in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updateSupportInformation + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Support in request body + - [Breaking] [Added] Value format date-time to property updatedAt of schema Support in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema Support in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Support in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updateInjectableTag + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getInjectableTags + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### addInjectableTag + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### removeInjectableTag + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### editInjectableTag + +- ##### What's New + - [Breaking] [Added] Possible values inline,external to property tag.subType of schema HandpickedTagSchema in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getBlogBySlug + +- ##### What's New + - [Breaking] [Added] Value format date-time to property publishDate of schema BlogSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### createPage + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getPages + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### updatePage + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in request body + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in request body + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getPageBySlug + +- ##### What's New + - [Breaking] [Added] Value format date-time to property dateMeta.createdOn of schema DateMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property dateMeta.modifiedOn of schema DateMeta in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getCustomFieldTypes + +- ##### What's New + - [Added] property metafieldTypes of schema MetafieldTypesSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property status of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] property definition of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] property references of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] property fields of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] property id of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] property displayName of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + + +#### getResources + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 5XX + + +#### getCustomFieldDefinitions + +- ##### What's New + - [Added] property items[].slug of schema FieldDefinitionSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].creator of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].key of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].createdBy of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].updatedBy of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].createdAt of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].updatedAt of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v1.0/company/{company_id}/metafields/definitions To /service/platform/content/v2.0/company/{company_id}/customfields/definition + + +#### createCustomFieldDefinition + +- ##### What's New + - [Added] property slug of schema CustomFieldDefinitionRequestSchema in request body + - [Added] property slug of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property resource of schema CustomFieldDefinitionRequestSchema in request body + - [Breaking] [Deleted] property key of schema CustomFieldDefinitionRequestSchema in request body + - [Breaking] [Deleted] property creator of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property key of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property createdBy of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property updatedBy of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v1.0/company/{company_id}/metafields/definitions To /service/platform/content/v2.0/company/{company_id}/customfields/resource/{resource}/definition + + +#### getCustomFieldDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomFieldDefinition + + + +#### updateCustomFieldDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateCustomFieldDefinition + + + +#### deleteCustomFieldDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteCustomFieldDefinition + + + +#### getCustomFields + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomFields + + + +#### getCustomFieldsByResourceId + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomFieldsByResourceId + + + +#### createCustomFieldByResourceId + +- ##### What's Deprecated + - [Breaking] [Deleted] method createCustomFieldByResourceId + + + +#### createCustomObjectDefinition + +- ##### What's New + - [Added] property fieldDefinitions[].slug of schema CustomObjectCustomFieldDefinitions in request body + - [Added] property definitionSlug of schema CustomObjectDefinitionRequestSchema in request body + - [Breaking] [Added] Value format integer to property fieldDefinitions[].companyId of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property fieldDefinitions[].slug of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property fieldDefinitions[].applicationId of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property definitionSlug of schema CustomObjectDefinitionSlugSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property fieldDefinitions[].key of schema CustomObjectCustomFieldDefinitions in request body + - [Breaking] [Deleted] property creator of schema CustomObjectDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property createdBy of schema CustomObjectDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property updatedBy of schema CustomObjectDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property fieldDefinitions[].creator of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Breaking] [Deleted] property fieldDefinitions[].key of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Deleted] Type from object from property fieldDefinitions[].validations[] of schema FieldValidations in response with status code 200 + - [Breaking] [Deleted] properties fieldDefinitions[].validations[].name, fieldDefinitions[].validations[].type, fieldDefinitions[].validations[].value in response with status code 200 + - [Breaking] [Deleted] property fieldDefinitions[].createdBy of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Breaking] [Deleted] property fieldDefinitions[].metaobjectDefinitionId of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v1.0/company/{company_id}/metaobjects/definitions To /service/platform/content/v2.0/company/{company_id}/customobjects/definition + + +#### getCustomObjectDefinitions + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v1.0/company/{company_id}/metaobjects/definitions To /service/platform/content/v2.0/company/{company_id}/customobjects/definition + + +#### getCustomObjectDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomObjectDefinition + + + +#### updateCustomObjectDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateCustomObjectDefinition + + + +#### deleteCustomObjectDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteCustomObjectDefinition + + + +#### getCustomObjects + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomObjects + + + +#### createCustomObject + +- ##### What's Deprecated + - [Breaking] [Deleted] method createCustomObject + + + +#### getCustomObject + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomObject + + + +#### deleteCustomObject + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteCustomObject + + + +#### updateCustomObject + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateCustomObject + + + +#### getJobs + +- ##### What's New + - [Breaking] [Added] Possible values download,upload to property items[].actionType of schema JobSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema JobSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema JobSchema in response with status code 200 + - [Added] property items[].applicationId of schema JobSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].creator of schema CustomObjectJobSchema in response with status code 200 + - [Breaking] [Deleted] property items[].url of schema CustomObjectJobSchema in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + + +#### importCustomObjectEntries + +- ##### What's Deprecated + - [Breaking] [Deleted] method importCustomObjectEntries + + + +#### exportCustomObjectEntries + +- ##### What's Deprecated + - [Breaking] [Deleted] method exportCustomObjectEntries + + + +#### sampleCustomObjectBulkEntry + +- ##### What's Deprecated + - [Breaking] [Deleted] method sampleCustomObjectBulkEntry + + + +#### getAppCustomFieldTypes + +- ##### What's New + - [Added] property metafieldTypes of schema MetafieldTypesSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property status of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] property definition of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] property references of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] property fields of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] property id of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] property displayName of schema CustomObjectByIdSchema in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + + +#### getAppResources + +- ##### What's New + - [Added] Response with status 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 4XX + - [Breaking] [Deleted] Response with status 5XX + + +#### getAppCustomFieldDefinitions + +- ##### What's New + - [Added] property items[].slug of schema FieldDefinitionSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].creator of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].key of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].createdBy of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].updatedBy of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].createdAt of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].updatedAt of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v1.0/company/{company_id}/application/{application_id}/metafields/definitions To /service/platform/content/v2.0/company/{company_id}/application/{application_id}/customfields/definition + + +#### createAppCustomFieldDefinition + +- ##### What's New + - [Added] property slug of schema CustomFieldDefinitionRequestSchema in request body + - [Added] property slug of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property resource of schema CustomFieldDefinitionRequestSchema in request body + - [Breaking] [Deleted] property key of schema CustomFieldDefinitionRequestSchema in request body + - [Breaking] [Deleted] property creator of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property key of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property createdBy of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property updatedBy of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v1.0/company/{company_id}/application/{application_id}/metafields/definitions To /service/platform/content/v2.0/company/{company_id}/application/{application_id}/customfields/resource/{resource}/definition + + +#### getAppCustomFieldDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomFieldDefinition + + + +#### updateAppCustomFieldDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateAppCustomFieldDefinition + + + +#### deleteAppCustomFieldDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteAppCustomFieldDefinition + + + +#### getAppCustomFields + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomFields + + + +#### getAppCustomFieldsByResourceId + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomFieldsByResourceId + + + +#### createAppCustomFieldByResourceId + +- ##### What's Deprecated + - [Breaking] [Deleted] method createAppCustomFieldByResourceId + + + +#### createAppCustomObjectDefinition + +- ##### What's New + - [Added] property fieldDefinitions[].slug of schema CustomObjectCustomFieldDefinitions in request body + - [Added] property definitionSlug of schema CustomObjectDefinitionRequestSchema in request body + - [Breaking] [Added] Value format integer to property fieldDefinitions[].companyId of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property fieldDefinitions[].slug of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property fieldDefinitions[].applicationId of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property definitionSlug of schema CustomObjectDefinitionSlugSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property fieldDefinitions[].key of schema CustomObjectCustomFieldDefinitions in request body + - [Breaking] [Deleted] property creator of schema CustomObjectDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property createdBy of schema CustomObjectDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property updatedBy of schema CustomObjectDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property fieldDefinitions[].creator of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Breaking] [Deleted] property fieldDefinitions[].key of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Deleted] Type from object from property fieldDefinitions[].validations[] of schema FieldValidations in response with status code 200 + - [Breaking] [Deleted] properties fieldDefinitions[].validations[].name, fieldDefinitions[].validations[].type, fieldDefinitions[].validations[].value in response with status code 200 + - [Breaking] [Deleted] property fieldDefinitions[].createdBy of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Breaking] [Deleted] property fieldDefinitions[].metaobjectDefinitionId of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v1.0/company/{company_id}/application/{application_id}/metaobjects/definitions To /service/platform/content/v2.0/company/{company_id}/application/{application_id}/customobjects/definition + + +#### getAppCustomObjectDefinitions + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v1.0/company/{company_id}/application/{application_id}/metaobjects/definitions To /service/platform/content/v2.0/company/{company_id}/application/{application_id}/customobjects/definition + + +#### getAppCustomObjectDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomObjectDefinition + + + +#### updateAppCustomObjectDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateAppCustomObjectDefinition + + + +#### deleteAppCustomObjectDefinition + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteAppCustomObjectDefinition + + + +#### getAppCustomObjects + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomObjects + + + +#### createAppCustomObject + +- ##### What's Deprecated + - [Breaking] [Deleted] method createAppCustomObject + + + +#### getAppCustomObject + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomObject + + + +#### deleteAppCustomObject + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteAppCustomObject + + + +#### updateAppCustomObject + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateAppCustomObject + + + +#### getAppJobs + +- ##### What's New + - [Breaking] [Added] Possible values download,upload to property items[].actionType of schema JobSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema JobSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema JobSchema in response with status code 200 + - [Added] property items[].applicationId of schema JobSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].creator of schema CustomObjectJobSchema in response with status code 200 + - [Breaking] [Deleted] property items[].url of schema CustomObjectJobSchema in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + + +#### importAppCustomObjectEntries + +- ##### What's Deprecated + - [Breaking] [Deleted] method importAppCustomObjectEntries + + + +#### exportAppCustomObjectEntries + +- ##### What's Deprecated + - [Breaking] [Deleted] method exportAppCustomObjectEntries + + + +#### sampleAppCustomObjectBulkEntry + +- ##### What's Deprecated + - [Breaking] [Deleted] method sampleAppCustomObjectBulkEntry + + + +#### getCustomFieldDefinitionByResource + +- ##### What's New + - [Added] method getCustomFieldDefinitionByResource + + + +#### getCustomFieldDefinitionBySlug + +- ##### What's New + - [Added] method getCustomFieldDefinitionBySlug + + + +#### updateCustomFieldDefinitionBySlug + +- ##### What's New + - [Added] method updateCustomFieldDefinitionBySlug + + + +#### deleteCustomFieldDefinitionBySlug + +- ##### What's New + - [Added] method deleteCustomFieldDefinitionBySlug + + + +#### getCustomFieldsByResourceSlug + +- ##### What's New + - [Added] method getCustomFieldsByResourceSlug + + + +#### updateCustomFieldByResourceSlug + +- ##### What's New + - [Added] method updateCustomFieldByResourceSlug + + + +#### deleteCustomFieldsByResourceSlug + +- ##### What's New + - [Added] method deleteCustomFieldsByResourceSlug + + + +#### getCustomObjectDefinitionBySlug + +- ##### What's New + - [Added] method getCustomObjectDefinitionBySlug + + + +#### updateCustomObjectDefinitionBySlug + +- ##### What's New + - [Added] method updateCustomObjectDefinitionBySlug + + + +#### deleteCustomObjectDefinitionBySlug + +- ##### What's New + - [Added] method deleteCustomObjectDefinitionBySlug + + + +#### getCustomObjectsBySlug + +- ##### What's New + - [Added] method getCustomObjectsBySlug + + + +#### createCustomObjectBySlug + +- ##### What's New + - [Added] method createCustomObjectBySlug + + + +#### getCustomObjectBySlug + +- ##### What's New + - [Added] method getCustomObjectBySlug + + + +#### deleteCustomObjectBySlug + +- ##### What's New + - [Added] method deleteCustomObjectBySlug + + + +#### updateCustomObjectBySlug + +- ##### What's New + - [Added] method updateCustomObjectBySlug + + + +#### importCustomObjectEntriesBySlug + +- ##### What's New + - [Added] method importCustomObjectEntriesBySlug + + + +#### exportCustomObjectEntriesBySlug + +- ##### What's New + - [Added] method exportCustomObjectEntriesBySlug + + + +#### sampleCustomObjectBulkEntryBySlug + +- ##### What's New + - [Added] method sampleCustomObjectBulkEntryBySlug + + + +#### getAppCustomFieldDefinitionByResource + +- ##### What's New + - [Added] method getAppCustomFieldDefinitionByResource + + + +#### getAppCustomFieldDefinitionBySlug + +- ##### What's New + - [Added] method getAppCustomFieldDefinitionBySlug + + + +#### updateAppCustomFieldDefinitionBySlug + +- ##### What's New + - [Added] method updateAppCustomFieldDefinitionBySlug + + + +#### deleteAppCustomFieldDefinitionBySlug + +- ##### What's New + - [Added] method deleteAppCustomFieldDefinitionBySlug + + + +#### getAppCustomFieldsByResourceSlug + +- ##### What's New + - [Added] method getAppCustomFieldsByResourceSlug + + + +#### updateAppCustomFieldByResourceSlug + +- ##### What's New + - [Added] method updateAppCustomFieldByResourceSlug + + + +#### getAppCustomObjectDefinitionBySlug + +- ##### What's New + - [Added] method getAppCustomObjectDefinitionBySlug + + + +#### updateAppCustomObjectDefinitionBySlug + +- ##### What's New + - [Added] method updateAppCustomObjectDefinitionBySlug + + + +#### deleteAppCustomObjectDefinitionBySlug + +- ##### What's New + - [Added] method deleteAppCustomObjectDefinitionBySlug + + + +#### getAppCustomObjectsBySlug + +- ##### What's New + - [Added] method getAppCustomObjectsBySlug + + + +#### createAppCustomObjectBySlug + +- ##### What's New + - [Added] method createAppCustomObjectBySlug + + + +#### getAppCustomObjectBySlug + +- ##### What's New + - [Added] method getAppCustomObjectBySlug + + + +#### deleteAppCustomObjectBySlug + +- ##### What's New + - [Added] method deleteAppCustomObjectBySlug + + + +#### updateAppCustomObjectBySlug + +- ##### What's New + - [Added] method updateAppCustomObjectBySlug + + + +#### importAppCustomObjectEntriesBySlug + +- ##### What's New + - [Added] method importAppCustomObjectEntriesBySlug + + + +#### exportAppCustomObjectEntriesBySlug + +- ##### What's New + - [Added] method exportAppCustomObjectEntriesBySlug + + + +#### sampleAppCustomObjectBulkEntryBySlug + +- ##### What's New + - [Added] method sampleAppCustomObjectBulkEntryBySlug + + + +### Discount + + + +#### getDiscounts + +- ##### What's New + - [Breaking] [Added] Possible values app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory to property items[].jobType of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Possible values flat,percentage to property items[].discountType of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].createdOn of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].modifiedOn of schema DiscountJob in response with status code 200 + + +#### createDiscount + +- ##### What's New + - [Breaking] [Added] Possible values app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory to property jobType of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Possible values flat,percentage to property discountType of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedOn of schema DiscountJob in response with status code 200 + + +#### getDiscount + +- ##### What's New + - [Breaking] [Added] Possible values app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory to property jobType of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Possible values flat,percentage to property discountType of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedOn of schema DiscountJob in response with status code 200 + + +#### updateDiscount + +- ##### What's New + - [Breaking] [Added] Possible values app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory to property jobType of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Possible values flat,percentage to property discountType of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema DiscountJob in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedOn of schema DiscountJob in response with status code 200 + + +#### validateDiscountFile + +- ##### What's New + - [Breaking] [Added] Possible values app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory to property jobType of schema FileJobRequestSchema in request body + - [Breaking] [Added] Possible values flat,percentage to property discountType of schema FileJobRequestSchema in request body + - [Breaking] [Added] Possible values app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory to property body.jobType of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Possible values flat,percentage to property body.discountType of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property body.createdOn of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property body.modifiedOn of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema FileJobResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedOn of schema FileJobResponseSchema in response with status code 200 + + +#### downloadDiscountFile + +- ##### What's New + - [Breaking] [Added] Possible values app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory to property body.jobType of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Possible values flat,percentage to property body.discountType of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property body.createdOn of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property body.modifiedOn of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema FileJobResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedOn of schema FileJobResponseSchema in response with status code 200 + + +#### getValidationJob + +- ##### What's New + - [Breaking] [Added] Possible values app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory to property body.jobType of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Possible values flat,percentage to property body.discountType of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property body.createdOn of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property body.modifiedOn of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema FileJobResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedOn of schema FileJobResponseSchema in response with status code 200 + + +#### getDownloadJob + +- ##### What's New + - [Breaking] [Added] Possible values app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory to property body.jobType of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Possible values flat,percentage to property body.discountType of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property body.createdOn of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property body.modifiedOn of schema FileJobBody in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema FileJobResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedOn of schema FileJobResponseSchema in response with status code 200 + + +### FileStorage + + + +#### startUpload + +- ##### What's New + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property cdn of schema StartResponse in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] cdn made optional in response with status code 200 + - [Changed] Path From /service/platform/assets/v1.0/company/{company_id}/namespaces/{namespace}/upload/start To /service/platform/assets/v2.0/company/{company_id}/namespaces/{namespace}/upload/start + + +#### completeUpload + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdOn of schema FileUploadComplete in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedOn of schema FileUploadComplete in response with status code 200 + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property cdn of schema StartResponse in request body + +- ##### What's Changed + - [Breaking] [Changed] cdn made optional in request body + - [Changed] Path From /service/platform/assets/v1.0/company/{company_id}/namespaces/{namespace}/upload/complete To /service/platform/assets/v2.0/company/{company_id}/namespaces/{namespace}/upload/complete + + +#### appStartUpload + +- ##### What's New + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property cdn of schema StartResponse in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] cdn made optional in response with status code 200 + - [Changed] Path From /service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/start To /service/platform/assets/v2.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/start + + +#### appCompleteUpload + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdOn of schema FileUploadComplete in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedOn of schema FileUploadComplete in response with status code 200 + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property cdn of schema StartResponse in request body + +- ##### What's Changed + - [Breaking] [Changed] cdn made optional in request body + - [Changed] Path From /service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/complete To /service/platform/assets/v2.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/complete + + +#### getSignUrls + +- ##### What's New + - [Added] Security in Request + + +#### copyFiles + +- ##### What's New + - [Added] Security in Request + + +#### appCopyFiles + +- ##### What's New + - [Added] Security in Request + + +#### browse + +- ##### What's New + - [Added] property items[].created_at of schema in response with status code 200 + - [Added] property items[].updated_at of schema in response with status code 200 + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].createdAt of schema in response with status code 200 + - [Breaking] [Deleted] property items[].updatedAt of schema in response with status code 200 + + +#### appbrowse + +- ##### What's New + - [Added] property items[].created_at of schema in response with status code 200 + - [Added] property items[].updated_at of schema in response with status code 200 + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].createdAt of schema in response with status code 200 + - [Breaking] [Deleted] property items[].updatedAt of schema in response with status code 200 + + +#### browsefiles + +- ##### What's New + - [Added] property items[].created_at of schema in response with status code 200 + - [Added] property items[].updated_at of schema in response with status code 200 + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].createdAt of schema in response with status code 200 + - [Breaking] [Deleted] property items[].updatedAt of schema in response with status code 200 + + +#### proxy + +- ##### What's New + - [Added] Security in Request + + +#### getPdfTypes + +- ##### What's New + - [Added] data[].store_os made required in response with status code 200 + - [Added] property data[].storeOs of schema InvoiceTypesData in response with status code 200 + - [Added] Security in Request + + +#### getDefaultPdfData + +- ##### What's New + - [Breaking] [Added] Value format date-time to property data[].payload.currentDate of schema PdfPayloadDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property data[].payload.invoiceDetail.invoiceDate of schema InvoiceDetail in response with status code 200 + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property data[].payload.shipmentMeta of schema DummyTemplateDataPayload in response with status code 200 + - [Breaking] [Deleted] property data[].payload.orderMeta of schema DummyTemplateDataPayload in response with status code 200 + + +#### updateHtmlTemplate + +- ##### What's New + - [Added] property countryCode of schema PdfConfig in request body + - [Added] property defaultTemplate of schema PdfConfig in request body + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getDefaultHtmlTemplate + +- ##### What's New + - [Added] Security in Request + +- ##### What's Changed + - [Breaking] [Changed] operationId from getDefaultHtmlTemplate to getHtmlTemplateConfig + + +#### saveHtmlTemplate + +- ##### What's New + - [Added] property countryCode of schema PdfConfig in request body + - [Added] property defaultTemplate of schema PdfConfig in request body + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getDefaultPdfTemplate + +- ##### What's New + - [Added] Security in Request + + +#### generatePaymentReceipt + +- ##### What's New + - [Breaking] [Added] Value format date-time to property payload.payments[].txnDate of schema PaymentReceiptPayments in request body + - [Added] Security in Request + + +#### fetchPdfTypeById + +- ##### What's New + - [Added] method fetchPdfTypeById + + + +#### getPdfPayloadById + +- ##### What's New + - [Added] method getPdfPayloadById + + + +#### getConfigHtmlTemplateById + +- ##### What's New + - [Added] method getConfigHtmlTemplateById + + + +#### deletePdfGeneratorConfig + +- ##### What's New + - [Added] method deletePdfGeneratorConfig + + + +#### fetchPdfDefaultTemplateById + +- ##### What's New + - [Added] method fetchPdfDefaultTemplateById + + + +### Serviceability + + + +#### createZone + +- ##### What's Changed + - [Changed] product made optional in request body + + +#### getAllStores + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdOn of schema ItemResult in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].verifiedOn of schema ItemResult in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].modifiedOn of schema ItemResult in response with status code 200 + + +#### updatePincodeAuditHistory + +- ##### What's New + - [Breaking] [Added] Value format date-time to property data[].updatedAt of schema PincodeMopUpdateAuditHistoryResult in response with status code 200 + + +#### createCourierPartnerAccount + +- ##### What's Changed + - [Changed] company_id made optional in request body + - [Breaking] [Changed] company_id made optional in response with status code 200 + + +#### updateCourierPartnerAccount + +- ##### What's Changed + - [Breaking] [Changed] company_id made optional in request body + + +#### updateCourierRule + +- ##### What's New + - [Breaking] [Added] Value format date-time to property modifiedOn of schema CourierPartnerRuleResult in response with status code 200 + +- ##### What's Changed + - [Changed] type made optional in request body + + +#### getCourierPartnerRule + +- ##### What's New + - [Breaking] [Added] Value format date-time to property modifiedOn of schema CourierPartnerRuleResult in response with status code 200 + + +#### createCourierPartnerRule + +- ##### What's New + - [Breaking] [Added] Value format date-time to property modifiedOn of schema CourierPartnerRuleResult in response with status code 200 + +- ##### What's Changed + - [Changed] type made optional in request body + + +#### getCourierPartnerRules + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].modifiedOn of schema CourierPartnerRuleResult in response with status code 200 + + +#### patchApplicationServiceabilitySelfShipment + +- ##### What's New + - [Added] properties data.selfShip.tat, data.selfShip.isActive in response with status code 200 + - [Added] data.selfShip.is_active, data.selfShip.tat made required in response with status code 200 + - [Added] properties data.selfShip.tat, data.selfShip.isActive in response with status code 400 + - [Added] data.selfShip.is_active, data.selfShip.tat made required in response with status code 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property data.selfShip of schema ApplicationSelfShipConfig in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.selfShip of schema ApplicationSelfShipConfig in response with status code 400 + + +#### getApplicationServiceabilitySelfShipment + +- ##### What's New + - [Added] properties data.selfShip.tat, data.selfShip.isActive in response with status code 200 + - [Added] data.selfShip.is_active, data.selfShip.tat made required in response with status code 200 + - [Added] properties data.selfShip.tat, data.selfShip.isActive in response with status code 400 + - [Added] data.selfShip.is_active, data.selfShip.tat made required in response with status code 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property data.selfShip of schema ApplicationSelfShipConfig in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.selfShip of schema ApplicationSelfShipConfig in response with status code 400 + + +#### getServiceability + +- ##### What's Changed + - [Breaking] [Changed] pickup_cutoff made optional in response with status code 200 + - [Breaking] [Changed] route_code made optional in response with status code 200 + + +#### updateServiceability + +- ##### What's Changed + - [Breaking] [Changed] pickup_cutoff made optional in request body + - [Breaking] [Changed] route_code made optional in request body + - [Breaking] [Changed] pickup_cutoff made optional in response with status code 200 + - [Breaking] [Changed] route_code made optional in response with status code 200 + + +#### createPackageMaterial + +- ##### What's New + - [Breaking] [Added] Possible values Box,Paper Bag,Corrugated Box,Wooden Box to property packageType of schema PackageMaterial in request body + - [Breaking] [Added] Possible values Box,Paper Bag,Corrugated Box,Wooden Box to property packageType of schema PackageMaterialResult in response with status code 201 + + +#### getPackageMaterialList + +- ##### What's New + - [Breaking] [Added] Possible values Box,Paper Bag,Corrugated Box,Wooden Box to property items.packageType of schema PackageMaterialResult in response with status code 200 + + +#### updatePackageMaterials + +- ##### What's New + - [Breaking] [Added] Possible values Box,Paper Bag,Corrugated Box,Wooden Box to property packageType of schema PackageMaterial in request body + - [Breaking] [Added] Possible values Box,Paper Bag,Corrugated Box,Wooden Box to property packageType of schema PackageMaterialResult in response with status code 200 + + +#### getPackageMaterials + +- ##### What's New + - [Breaking] [Added] Possible values Box,Paper Bag,Corrugated Box,Wooden Box to property packageType of schema PackageMaterialResult in response with status code 200 + + +#### getOptimalLocations + +- ##### What's New + - [Added] property articles of schema OptimlLocationsDetailsSchema in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property article of schema OptimlLocationsRequestSchema in request body + +- ##### What's Changed + - [Changed] articles made optional in request body + + +#### getCourierPartners + +- ##### What's New + - [Added] method getCourierPartners + + + +### Order + + + +#### getAnnouncements + +- ##### What's New + - [Breaking] [Added] Value format date-time to property announcements[].createdAt of schema AnnouncementResponseSchema in response with status code 200 + - [Added] property message of schema AnnouncementsResponseSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property status of schema AnnouncementsResponse in response with status code 200 + + +#### updateAddress + +- ##### What's New + - [Added] Response with status 400 + - [Added] Body content in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter name (type: string) + + - [Breaking] [Deleted] query parameter address (type: string) + + - [Breaking] [Deleted] query parameter addressType (type: string) + + - [Breaking] [Deleted] query parameter pincode (type: string) + + - [Breaking] [Deleted] query parameter phone (type: string) + + - [Breaking] [Deleted] query parameter email (type: string) + + - [Breaking] [Deleted] query parameter landmark (type: string) + + - [Breaking] [Deleted] Required query parameter addressCategory (type: string) + + - [Breaking] [Deleted] query parameter city (type: string) + + - [Breaking] [Deleted] query parameter state (type: string) + + - [Breaking] [Deleted] query parameter country (type: string) + + - [Breaking] [Deleted] Response with status 4XX + +- ##### What's Changed + - [Breaking] [Changed] location from query to path of parameter shipmentId + - [Changed] Security in Request + - [Changed] Security in Request + - [Breaking] [Changed] Security in Request + - [Changed] Path From /service/platform/order-manage/v1.0/company/{company_id}/delight/update-address To /service/platform/order-manage/v1.0/company/{company_id}/shipment/{shipment_id}/address + - [Changed] http method type from post To put + + +#### updateShipmentStatus + +- ##### What's New + - [Added] property statuses[].shipments[].dataUpdates.products[].filters[].quantity of schema ProductsDataUpdatesFilters in request body + - [Added] property statuses[].shipments[].dataUpdates.order of schema DataUpdates in request body + + +#### getRoleBasedActions + +- ##### What's New + - [Breaking] [Added] Value format int32 to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] Possible nullable value true to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] Possible nullable value true to property message of schema ErrorResponseSchema in response with status code 4XX + - [Added] property success of schema ErrorResponseSchema in response with status code 4XX + - [Added] property error of schema ErrorResponseSchema in response with status code 4XX + - [Added] property errorTrace of schema ErrorResponseSchema in response with status code 4XX + - [Added] message made required in response with status code 4XX + + +#### getShipmentHistory + +- ##### What's New + - [Breaking] [Added] Type object to property activityHistory[].meta of schema HistoryMeta in response with status code 200 + - [Added] properties activityHistory[].meta.status, activityHistory[].meta.status1, activityHistory[].meta.starttime, activityHistory[].meta.reason, activityHistory[].meta.endtime, activityHistory[].meta.caller, activityHistory[].meta.billsec, activityHistory[].meta.recordpath, activityHistory[].meta.status2, activityHistory[].meta.callerid, activityHistory[].meta.duration, activityHistory[].meta.receiver, activityHistory[].meta.recipient, activityHistory[].meta.slug, activityHistory[].meta.message, activityHistory[].meta.storeId, activityHistory[].meta.callId, activityHistory[].meta.shortLink, activityHistory[].meta.storeName, activityHistory[].meta.storeCode, activityHistory[].meta.channelType, activityHistory[].meta.activityComment, activityHistory[].meta.activityType, activityHistory[].meta.prevStoreName, activityHistory[].meta.prevStoreCode, activityHistory[].meta.prevStoreId, activityHistory[].meta.refundTo, activityHistory[].meta.refundInformation in response with status code 200 + - [Added] property activityHistory[].activityType of schema HistoryDict in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property activityHistory[].type of schema HistoryDict in response with status code 200 + - [Breaking] [Deleted] property activityHistory[].createdTs of schema HistoryDict in response with status code 200 + + +#### postShipmentHistory + +- ##### What's New + - [Breaking] [Added] Type object to property activityHistory[].meta of schema HistoryMeta in response with status code 200 + - [Added] properties activityHistory[].meta.status, activityHistory[].meta.status1, activityHistory[].meta.starttime, activityHistory[].meta.reason, activityHistory[].meta.endtime, activityHistory[].meta.caller, activityHistory[].meta.billsec, activityHistory[].meta.recordpath, activityHistory[].meta.status2, activityHistory[].meta.callerid, activityHistory[].meta.duration, activityHistory[].meta.receiver, activityHistory[].meta.recipient, activityHistory[].meta.slug, activityHistory[].meta.message, activityHistory[].meta.storeId, activityHistory[].meta.callId, activityHistory[].meta.shortLink, activityHistory[].meta.storeName, activityHistory[].meta.storeCode, activityHistory[].meta.channelType, activityHistory[].meta.activityComment, activityHistory[].meta.activityType, activityHistory[].meta.prevStoreName, activityHistory[].meta.prevStoreCode, activityHistory[].meta.prevStoreId, activityHistory[].meta.refundTo, activityHistory[].meta.refundInformation in response with status code 200 + - [Added] property activityHistory[].activityType of schema HistoryDict in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property activityHistory[].type of schema HistoryDict in response with status code 200 + - [Breaking] [Deleted] property activityHistory[].createdTs of schema HistoryDict in response with status code 200 + + +#### sendSmsNinja + +- ##### What's New + - [Added] success, message made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from int32 from property bagId of schema SendSmsPayload in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from integer to string of property bagId of schema SendSmsPayload in request body + + +#### updatePackagingDimensions + +- ##### What's New + - [Added] property success of schema ErrorResponseSchema in response with status code 4XX + - [Added] property message of schema ErrorResponseSchema in response with status code 4XX + - [Added] property errorTrace of schema ErrorResponseSchema in response with status code 4XX + - [Added] message made required in response with status code 4XX + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property error of schema UpdatePackingErrorResponse in response with status code 4XX + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property dimension[].weight of schema Dimension in request body + - [Breaking] [Changed] Type from number to string of property dimension[].height of schema Dimension in request body + + +#### createOrder + +- ##### What's New + - [Added] properties shipments[].tags[].slug, shipments[].tags[].displayText in request body + - [Breaking] [Added] Value format date-time to property shipments[].status.createdAt of schema ShipmentStatusData in request body + - [Breaking] [Added] Value format date-time to property shipments[].status.statusCreatedAt of schema ShipmentStatusData in request body + - [Breaking] [Added] Value format date-time to property shipments[].processingDates.dispatchAfterDate of schema ProcessingDates in request body + - [Breaking] [Added] Value format date-time to property shipments[].processingDates.dispatchByDate of schema ProcessingDates in request body + - [Breaking] [Added] Value format date-time to property shipments[].processingDates.confirmByDate of schema ProcessingDates in request body + - [Breaking] [Added] Value format date-time to property shipments[].processingDates.packByDate of schema ProcessingDates in request body + - [Added] Possible values Digital to property shipments[].orderType of schema Shipment in request body + - [Breaking] [Added] Possible values store,delivery,billing to property shipments[].billingAddressJson.addressCategory of schema Address in request body + - [Breaking] [Added] Value format date-time to property shipments[].billingAddressJson.createdAt of schema Address in request body + - [Breaking] [Added] Value format date-time to property shipments[].billingAddressJson.updatedAt of schema Address in request body + - [Breaking] [Added] Possible values store,delivery,billing to property shipments[].deliveryAddressJson.addressCategory of schema Address in request body + - [Breaking] [Added] Value format date-time to property shipments[].deliveryAddressJson.createdAt of schema Address in request body + - [Breaking] [Added] Value format date-time to property shipments[].deliveryAddressJson.updatedAt of schema Address in request body + - [Breaking] [Added] Value format date-time to property shipments[].createdAt of schema Shipment in request body + - [Breaking] [Added] Possible values store,delivery,billing to property shipments[].handOverContactJson.addressCategory of schema Address in request body + - [Breaking] [Added] Value format date-time to property shipments[].handOverContactJson.createdAt of schema Address in request body + - [Breaking] [Added] Value format date-time to property shipments[].handOverContactJson.updatedAt of schema Address in request body + - [Added] property shipments[].systemMessages of schema Shipment in request body + - [Added] property shipments[].processAfterConfig of schema Shipment in request body + - [Added] property config.lockStateMessages of schema CreateOrderConfig in request body + - [Breaking] [Added] Value format date-time to property externalCreationDate of schema CreateOrderAPI in request body + - [Added] property status of schema CreateOrderAPI in request body + - [Added] property systemMessages of schema CreateOrderAPI in request body + - [Added] property status of schema CreateOrderErrorReponse in response with status code 4XX + - [Added] property info of schema CreateOrderErrorReponse in response with status code 4XX + - [Added] property code of schema CreateOrderErrorReponse in response with status code 4XX + - [Added] property meta of schema CreateOrderErrorReponse in response with status code 4XX + - [Added] property message of schema CreateOrderErrorReponse in response with status code 4XX + - [Added] property exception of schema CreateOrderErrorReponse in response with status code 4XX + - [Added] property requestId of schema CreateOrderErrorReponse in response with status code 4XX + - [Added] property stackTrace of schema CreateOrderErrorReponse in response with status code 4XX + - [Added] message, status made required in response with status code 4XX + - [Added] property status of schema CreateOrderErrorReponse in response with status code 5XX + - [Added] property info of schema CreateOrderErrorReponse in response with status code 5XX + - [Added] property code of schema CreateOrderErrorReponse in response with status code 5XX + - [Added] property meta of schema CreateOrderErrorReponse in response with status code 5XX + - [Added] property message of schema CreateOrderErrorReponse in response with status code 5XX + - [Added] property exception of schema CreateOrderErrorReponse in response with status code 5XX + - [Added] property requestId of schema CreateOrderErrorReponse in response with status code 5XX + - [Added] property stackTrace of schema CreateOrderErrorReponse in response with status code 5XX + - [Added] message, status made required in response with status code 5XX + +- ##### What's Deprecated + - [Breaking] [Deleted] properties shipments[].lineItems[].charges[].amount.currency, shipments[].lineItems[].charges[].amount.value in request body + - [Breaking] [Deleted] properties charges[].amount.currency, charges[].amount.value in request body + - [Breaking] [Deleted] property config.integrationType of schema CreateOrderConfig in request body + - [Deleted] Possible values from delivery,pickup from property shippingInfo.shippingType of schema ShippingInfo in request body + - [Breaking] [Deleted] properties shippingInfo.geoLocation.latitude, shippingInfo.geoLocation.longitude in request body + - [Breaking] [Deleted] property billingInfo.slot of schema ShippingInfo in request body + - [Breaking] [Deleted] property billingInfo.shippingType of schema ShippingInfo in request body + - [Breaking] [Deleted] property billingInfo.geoLocation of schema ShippingInfo in request body + - [Breaking] [Deleted] property billingInfo.addressType of schema ShippingInfo in request body + - [Breaking] [Deleted] property paymentInfo.paymentMode of schema PaymentInfo in request body + - [Deleted] Possible values from platform-pos,platform-site,openapi,marketplace from property orderPlatform of schema CreateOrderAPI in request body + - [Breaking] [Deleted] property orderType of schema CreateOrderAPI in request body + - [Breaking] [Deleted] property fyndOrderId of schema CreateOrderAPI in request body + - [Breaking] [Deleted] property applicationId of schema CreateOrderAPI in request body + - [Breaking] [Deleted] property externalShipmentId of schema CreateOrderAPI in request body + - [Breaking] [Deleted] property success of schema CreateOrderErrorReponse in response with status code 4XX + - [Breaking] [Deleted] property errors of schema CreateOrderErrorReponse in response with status code 4XX + - [Breaking] [Deleted] property statusCode of schema CreateOrderErrorReponse in response with status code 4XX + - [Breaking] [Deleted] property fyndOrderId of schema CreateOrderErrorReponse in response with status code 4XX + - [Breaking] [Deleted] property success of schema CreateOrderErrorReponse in response with status code 5XX + - [Breaking] [Deleted] property errors of schema CreateOrderErrorReponse in response with status code 5XX + - [Breaking] [Deleted] property statusCode of schema CreateOrderErrorReponse in response with status code 5XX + - [Breaking] [Deleted] property fyndOrderId of schema CreateOrderErrorReponse in response with status code 5XX + +- ##### What's Changed + - [Breaking] [Changed] config.dp_configuration made optional in request body + - [Breaking] [Changed] Possible values from other to registered of property shippingInfo.addressType of schema ShippingInfo in request body + - [Changed] config made optional in request body + + +#### orderUpdate + +- ##### What's New + - [Added] property message[] of schema ResponseDetail in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property status of schema ResponseDetail in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property message of schema ResponseDetail in response with status code 200 + + +#### checkOrderStatus + +- ##### What's New + - [Added] property mobile of schema OrderStatus in request body + - [Added] property startDate of schema OrderStatus in request body + - [Added] property endDate of schema OrderStatus in request body + - [Breaking] [Added] end_date, mobile, start_date made required in request body + - [Breaking] [Added] Value format date-time to property result[].orderDetails.createdAt of schema OrderDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property result[].orderDetails.affiliateOrderDate of schema OrderDetails in response with status code 200 + - [Added] property result[].orderDetails.charges of schema OrderDetails in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property orderDetails[].mobile of schema FyndOrderIdList in request body + - [Breaking] [Deleted] property orderDetails[].startDate of schema FyndOrderIdList in request body + - [Breaking] [Deleted] property orderDetails[].endDate of schema FyndOrderIdList in request body + - [Breaking] [Deleted] Response with status 4XX + - [Breaking] [Deleted] Response with status 5XX + + +#### fetchRefundModeConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] property data[].format of schema RefundModeInfo in response with status code 200 + - [Breaking] [Deleted] property status of schema RefundModeConfigResponsePayload in response with status code 200 + - [Breaking] [Deleted] property message of schema RefundModeConfigResponsePayload in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property customerMobileNumber of schema RefundModeConfigRequestPayload in request body + + +#### sendUserMobileOTP + +- ##### What's New + - [Breaking] [Added] Value format int32 to property data.mobile of schema PointBlankOtpData in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property status of schema SendUserMobileOtpResponse in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property mobile of schema SendUserMobileOTP in request body + + +#### downloadLanesReport + +- ##### What's Deprecated + - [Breaking] [Deleted] property customHeaders[] of schema BulkReportsDownloadRequest in request body + - [Breaking] [Deleted] Possible values from fetch_by_filter_type from property reportType of schema BulkReportsDownloadRequest in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from array to string of property customHeaders of schema BulkReportsDownloadRequest in request body + - [Breaking] [Changed] Possible values from shipment_statuses to generation_report of property reportType of schema BulkReportsDownloadRequest in request body + - [Breaking] [Changed] Possible values from shipment_statuses_with_store_ids to invoice_report of property reportType of schema BulkReportsDownloadRequest in request body + + +#### bulkListing + +- ##### What's New + - [Breaking] [Added] Possible values a4,a6,pos to property data[].lastSelectedInvoiceLabelType of schema BulkActionListingData in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from COMPLETED,FAILED,PARTIALLY COMPLETED,PROCESSING from property data[].status of schema BulkActionListingData in response with status code 200 + - [Deleted] Possible values from yet_to_initiate,initiated,initiated_but_failed,success,failed from property data[].invoiceStatus of schema BulkActionListingData in response with status code 200 + - [Breaking] [Deleted] property data[].invoicelabelDocumentType of schema BulkActionListingData in response with status code 200 + - [Breaking] [Deleted] property data[].failedShCount of schema BulkActionListingData in response with status code 200 + - [Breaking] [Deleted] property data[].successfulShCount of schema BulkActionListingData in response with status code 200 + - [Breaking] [Deleted] property data[].totalCount of schema BulkActionListingData in response with status code 200 + - [Breaking] [Deleted] property data[].failedShipments of schema BulkActionListingData in response with status code 200 + - [Breaking] [Deleted] property data[].successfulInvoicedCount of schema BulkActionListingData in response with status code 200 + - [Breaking] [Deleted] property data[].failedInvoicedCount of schema BulkActionListingData in response with status code 200 + - [Breaking] [Deleted] property data[].totalInvoicedCount of schema BulkActionListingData in response with status code 200 + + +#### getManifestShipments + +- ##### What's New + - [Breaking] [Added] Value format int32 to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] Possible nullable value true to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] property success of schema ErrorResponseSchema in response with status code 4XX + - [Added] property message of schema ErrorResponseSchema in response with status code 4XX + - [Added] property errorTrace of schema ErrorResponseSchema in response with status code 4XX + - [Added] message made required in response with status code 4XX + +- ##### What's Changed + - [Breaking] [Changed] lane made optional in response with status code 200 + - [Breaking] [Changed] Type from boolean to integer of property status of schema APIFailedResponse in response with status code 4XX + + +#### getManifests + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].filters.dateRange.fromDate of schema DateRange in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].filters.dateRange.toDate of schema DateRange in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].filters.fromDate of schema Filters in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].filters.toDate of schema Filters in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].meta.filters.dateRange.fromDate of schema DateRange in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].meta.filters.dateRange.toDate of schema DateRange in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].meta.filters.fromDate of schema Filters in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].meta.filters.toDate of schema Filters in response with status code 200 + - [Breaking] [Added] Value format int32 to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] Possible nullable value true to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] property success of schema ErrorResponseSchema in response with status code 4XX + - [Added] property message of schema ErrorResponseSchema in response with status code 4XX + - [Added] property errorTrace of schema ErrorResponseSchema in response with status code 4XX + - [Added] message made required in response with status code 4XX + - [Breaking] [Added] Value format int32 to property status of schema ErrorResponseSchema in response with status code 5XX + - [Added] Possible nullable value true to property status of schema ErrorResponseSchema in response with status code 5XX + - [Added] property success of schema ErrorResponseSchema in response with status code 5XX + - [Added] property message of schema ErrorResponseSchema in response with status code 5XX + - [Added] property errorTrace of schema ErrorResponseSchema in response with status code 5XX + - [Added] message made required in response with status code 5XX + +- ##### What's Deprecated + - [Deleted] Possible values from save,process,pdf_generated,invalidate,pdf_failed,complete from property items[].status of schema Manifest in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from boolean to integer of property status of schema APIFailedResponse in response with status code 4XX + - [Breaking] [Changed] Type from boolean to integer of property status of schema APIFailedResponse in response with status code 5XX + - [Changed] Path From /service/platform/order-manage/v1.0/company/{company_id}/manifest/listing To /service/platform/order-manage/v1.0/company/{company_id}/manifests + + +#### generateProcessManifest + +- ##### What's New + - [Breaking] [Added] Value format date-time to property filters.dateRange.fromDate of schema DateRange in request body + - [Breaking] [Added] Value format date-time to property filters.dateRange.toDate of schema DateRange in request body + - [Breaking] [Added] Value format date-time to property filters.fromDate of schema Filters in request body + - [Breaking] [Added] Value format date-time to property filters.toDate of schema Filters in request body + - [Breaking] [Added] Value format date-time to property items.filters.dateRange.fromDate of schema DateRange in response with status code 200 + - [Breaking] [Added] Value format date-time to property items.filters.dateRange.toDate of schema DateRange in response with status code 200 + - [Breaking] [Added] Value format date-time to property items.filters.fromDate of schema Filters in response with status code 200 + - [Breaking] [Added] Value format date-time to property items.filters.toDate of schema Filters in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from save,process from property action of schema ProcessManifestRequest in request body + - [Deleted] Possible values from save,process from property items.action of schema ManifestItems in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + +- ##### What's Changed + - [Changed] action, unique_id, filters made optional in request body + + +#### getManifestDetails + +- ##### What's New + - [Breaking] [Added] Value format date-time to property manifestDetails[].filters.dateRange.fromDate of schema DateRange in response with status code 200 + - [Breaking] [Added] Value format date-time to property manifestDetails[].filters.dateRange.toDate of schema DateRange in response with status code 200 + - [Breaking] [Added] Value format date-time to property manifestDetails[].filters.fromDate of schema Filters in response with status code 200 + - [Breaking] [Added] Value format date-time to property manifestDetails[].filters.toDate of schema Filters in response with status code 200 + - [Breaking] [Added] Value format date-time to property manifestDetails[].meta.filters.dateRange.fromDate of schema DateRange in response with status code 200 + - [Breaking] [Added] Value format date-time to property manifestDetails[].meta.filters.dateRange.toDate of schema DateRange in response with status code 200 + - [Breaking] [Added] Value format date-time to property manifestDetails[].meta.filters.fromDate of schema Filters in response with status code 200 + - [Breaking] [Added] Value format date-time to property manifestDetails[].meta.filters.toDate of schema Filters in response with status code 200 + - [Breaking] [Added] Value format int32 to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] Possible nullable value true to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] property success of schema ErrorResponseSchema in response with status code 4XX + - [Added] property message of schema ErrorResponseSchema in response with status code 4XX + - [Added] property errorTrace of schema ErrorResponseSchema in response with status code 4XX + - [Added] message made required in response with status code 4XX + - [Breaking] [Added] Value format int32 to property status of schema ErrorResponseSchema in response with status code 5XX + - [Added] Possible nullable value true to property status of schema ErrorResponseSchema in response with status code 5XX + - [Added] property success of schema ErrorResponseSchema in response with status code 5XX + - [Added] property message of schema ErrorResponseSchema in response with status code 5XX + - [Added] property errorTrace of schema ErrorResponseSchema in response with status code 5XX + - [Added] message made required in response with status code 5XX + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter dpIds (type: string) + + - [Breaking] [Deleted] query parameter endDate (type: string) + + - [Breaking] [Deleted] query parameter startDate (type: string) + + - [Breaking] [Deleted] query parameter pageNo (type: integer) + + - [Breaking] [Deleted] query parameter pageSize (type: integer) + + - [Deleted] Possible values from save,process,pdf_generated,invalidate,pdf_failed,complete from property manifestDetails[].status of schema Manifest in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] location from query to path of parameter manifestId + - [Breaking] [Changed] Type from boolean to integer of property status of schema APIFailedResponse in response with status code 4XX + - [Breaking] [Changed] Type from boolean to integer of property status of schema APIFailedResponse in response with status code 5XX + - [Changed] Path From /service/platform/order-manage/v1.0/company/{company_id}/manifest/details To /service/platform/order-manage/v1.0/company/{company_id}/manifests/{manifest_id} + + +#### dispatchManifests + +- ##### What's New + - [Breaking] [Added] Value format int32 to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] Possible nullable value true to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] property success of schema ErrorResponseSchema in response with status code 4XX + - [Added] property message of schema ErrorResponseSchema in response with status code 4XX + - [Added] property errorTrace of schema ErrorResponseSchema in response with status code 4XX + - [Added] message made required in response with status code 4XX + +- ##### What's Changed + - [Breaking] [Changed] Type from boolean to integer of property status of schema APIFailedResponse in response with status code 4XX + + +#### uploadConsents + +- ##### What's New + - [Breaking] [Added] Required path parameter manifestId (type: string) + + - [Breaking] [Added] Value format int32 to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] Possible nullable value true to property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] property success of schema ErrorResponseSchema in response with status code 4XX + - [Added] property message of schema ErrorResponseSchema in response with status code 4XX + - [Added] property errorTrace of schema ErrorResponseSchema in response with status code 4XX + - [Added] message made required in response with status code 4XX + +- ##### What's Changed + - [Breaking] [Changed] Type from boolean to integer of property status of schema APIFailedResponse in response with status code 4XX + - [Changed] Path From /service/platform/order-manage/v1.0/company/{company_id}/manifest/uploadConsent To /service/platform/order-manage/v1.0/company/{company_id}/manifest/{manifest_id}/upload-consent + + +#### getManifestfilters + +- ##### What's Deprecated + - [Deleted] Possible values from multi_select,single_select from property advanceFilter[].type of schema FiltersInfo in response with status code 200 + - [Deleted] Possible values from multi_select,single_select from property globalFilter[].type of schema FiltersInfo in response with status code 200 + + +#### eInvoiceRetry + +- ##### What's New + - [Breaking] [Added] Possible values invoice,credit_note to property shipmentsData[].einvoiceType of schema EInvoiceRetryShipmentData in request body + - [Breaking] [Added] Possible values invoice,credit_note to property responseData[].einvoiceType of schema EInvoiceResponseData in response with status code 200 + - [Breaking] [Added] Possible values invoice,credit_note to property responseData[].einvoiceType of schema EInvoiceErrorResponseData in response with status code 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### trackShipment + +- ##### What's New + - [Added] Possible nullable value true to property message of schema ErrorResponseSchema in response with status code 4XX + - [Added] property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] property success of schema ErrorResponseSchema in response with status code 4XX + - [Added] property error of schema ErrorResponseSchema in response with status code 4XX + - [Added] property errorTrace of schema ErrorResponseSchema in response with status code 4XX + - [Added] message made required in response with status code 4XX + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property page.itemTotal of schema PageDetails in response with status code 200 + - [Breaking] [Deleted] property exception of schema ExceptionErrorResponse in response with status code 4XX + - [Breaking] [Deleted] property stackTrace of schema ExceptionErrorResponse in response with status code 4XX + + +#### updateShipmentTracking + +- ##### What's New + - [Added] Possible nullable value true to property message of schema ErrorResponseSchema in response with status code 4XX + - [Added] property status of schema ErrorResponseSchema in response with status code 4XX + - [Added] property success of schema ErrorResponseSchema in response with status code 4XX + - [Added] property error of schema ErrorResponseSchema in response with status code 4XX + - [Added] property errorTrace of schema ErrorResponseSchema in response with status code 4XX + - [Added] message made required in response with status code 4XX + +- ##### What's Deprecated + - [Breaking] [Deleted] property exception of schema ExceptionErrorResponse in response with status code 4XX + - [Breaking] [Deleted] property stackTrace of schema ExceptionErrorResponse in response with status code 4XX + + +#### failedOrderLogs + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items.createdAt of schema FailedOrdersItem in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property items.meta of schema FailedOrdersItem in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items.errorMessage of schema FailedOrdersItem in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items.displayMessage of schema FailedOrdersItem in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property page.itemTotal of schema PageDetails in response with status code 200 + + +#### failedOrderLogDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property exception of schema FailedOrderLogDetails in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property errorTrace of schema FailedOrderLogDetails in response with status code 200 + + +#### getShipmentBagReasons + +- ##### What's New + - [Added] property ruleId of schema ShipmentBagReasons in response with status code 200 + + +#### getShipments + +- ##### What's New + - [Added] query parameter groupEntity (type: string) + + - [Added] property items[].bags[].article.set of schema Article in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].brand.createdOn of schema ShipmentListingBrand in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].item.lastUpdatedAt of schema PlatformItem in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].dates.deliveryDate of schema Dates in response with status code 200 + - [Breaking] [Added] Possible values forward_standard to property items[].bags[].bagType of schema BagUnit in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].bagExpiryDate of schema BagUnit in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].bagStatus[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].bagStatus[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].bagStatus[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].bagStatus[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property items[].bags[].bagStatus[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].currentOperationalStatus.stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].currentOperationalStatus.createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].currentOperationalStatus.updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].currentOperationalStatus.bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property items[].bags[].currentOperationalStatus.bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].affiliateBagDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].currentStatus.stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].currentStatus.createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].currentStatus.updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].currentStatus.bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property items[].bags[].currentStatus.bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values bag to property items[].bags[].entityType of schema BagUnit in response with status code 200 + - [Added] property items[].bags[].orderingCurrencyPrices of schema BagUnit in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].orderDate of schema ShipmentItem in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipmentStatus.createdAt of schema ShipmentStatus in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipmentStatus.statusCreatedAt of schema ShipmentStatus in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property items[].deliveryAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].deliveryAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].deliveryAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].statusCreatedAt of schema ShipmentItem in response with status code 200 + - [Breaking] [Added] Possible values high_street,mall,store,warehouse to property items[].fulfillingStore.locationType of schema ShipmentItemFulFillingStore in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipmentCreatedAt of schema ShipmentItem in response with status code 200 + - [Added] property items[].billingAddress of schema ShipmentItem in response with status code 200 + - [Added] property items[].affiliateDetails of schema ShipmentItem in response with status code 200 + - [Added] property items[].isActive of schema ShipmentItem in response with status code 200 + - [Added] property items[].forwardEndShipmentId of schema ShipmentItem in response with status code 200 + - [Added] property items[].orderingCurrencyPrices of schema ShipmentItem in response with status code 200 + - [Added] property items[].logisticsMeta of schema ShipmentItem in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].bags[].article.aSet of schema Article in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].shipmentStatus.status of schema ShipmentStatus in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].totalBags of schema ShipmentItem in response with status code 200 + + +#### getShipmentById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property shipments[].invoice.updatedDate of schema InvoiceInfo in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].order.orderDate of schema OrderDetailsData in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].brand.createdOn of schema OrderBrandName in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].brand.modifiedOn of schema OrderBrandName in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].item.lastUpdatedAt of schema PlatformItem in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bags[].bagStatus[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].bagStatus[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].bagStatus[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bags[].bagStatus[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property shipments[].bags[].bagStatus[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property shipments[].bags[].deliveryAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].deliveryAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].deliveryAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].affiliateBagDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items to property shipments[].bags[].appliedPromos[].promotionType of schema AppliedPromos in response with status code 200 + - [Added] property shipments[].bags[].appliedPromos[].appliedFreeArticles of schema AppliedPromos in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bags[].currentStatus.stateType of schema CurrentStatus in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bags[].currentStatus.bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property shipments[].bags[].currentStatus.bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values bag,shipments to property shipments[].bags[].entityType of schema OrderBags in response with status code 200 + - [Added] property shipments[].bags[].charges of schema OrderBags in response with status code 200 + - [Added] property shipments[].bags[].orderingCurrencyPrices of schema OrderBags in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].status.createdAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].status.statusCreatedAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].pickedDate of schema PlatformShipment in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].orderStatus.orderDetails.createdAt of schema OrderDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].orderStatus.orderDetails.affiliateOrderDate of schema OrderDetails in response with status code 200 + - [Added] property shipments[].orderStatus.orderDetails.charges of schema OrderDetails in response with status code 200 + - [Added] property shipments[].affiliateDetails.config.app of schema AffiliateConfig in response with status code 200 + - [Added] property shipments[].affiliateDetails.config.inventory of schema AffiliateConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].affiliateDetails.shipmentMeta.estimatedDeliveryDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].affiliateDetails.shipmentMeta.dueDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].affiliateDetails.shipmentMeta.storeInvoiceUpdatedDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Possible values bag,shipments to property shipments[].affiliateDetails.shipmentMeta.shipmentTags[].entityType of schema ShipmentTags in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property shipments[].affiliateDetails.shipmentMeta.orderType of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].affiliateDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Breaking] [Added] Possible values fynd,external to property shipments[].affiliateDetails.pdfLinks.invoiceType of schema PDFLinks in response with status code 200 + - [Breaking] [Added] Possible values fynd,external,parent_child to property shipments[].affiliateDetails.pdfLinks.labelType of schema PDFLinks in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bagStatusHistory[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bagStatusHistory[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bagStatusHistory[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bagStatusHistory[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property shipments[].bagStatusHistory[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property shipments[].journeyType of schema PlatformShipment in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].shipmentCreatedAt of schema PlatformShipment in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property shipments[].rtoAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].rtoAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].rtoAddress.updatedAt of schema Address in response with status code 200 + - [Added] property shipments[].charges of schema PlatformShipment in response with status code 200 + - [Added] property shipments[].orderingCurrencyPrices of schema PlatformShipment in response with status code 200 + - [Added] property shipments[].forwardEndShipmentId of schema PlatformShipment in response with status code 200 + - [Added] property shipments[].logisticsMeta of schema PlatformShipment in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties shipments[].deliveryDetails.phone, shipments[].deliveryDetails.pincode, shipments[].deliveryDetails.address, shipments[].deliveryDetails.area, shipments[].deliveryDetails.country, shipments[].deliveryDetails.email, shipments[].deliveryDetails.address1, shipments[].deliveryDetails.landmark, shipments[].deliveryDetails.state, shipments[].deliveryDetails.name, shipments[].deliveryDetails.city, shipments[].deliveryDetails.addressType, shipments[].deliveryDetails.stateCode, shipments[].deliveryDetails.countryIsoCode, shipments[].deliveryDetails.countryPhoneCode, shipments[].deliveryDetails.displayAddress in response with status code 200 + - [Breaking] [Deleted] properties shipments[].billingDetails.phone, shipments[].billingDetails.pincode, shipments[].billingDetails.address, shipments[].billingDetails.area, shipments[].billingDetails.country, shipments[].billingDetails.email, shipments[].billingDetails.address1, shipments[].billingDetails.landmark, shipments[].billingDetails.state, shipments[].billingDetails.name, shipments[].billingDetails.city, shipments[].billingDetails.addressType, shipments[].billingDetails.stateCode, shipments[].billingDetails.countryIsoCode, shipments[].billingDetails.countryPhoneCode, shipments[].billingDetails.displayAddress in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property shipments[].affiliateDetails.shipmentMeta.b2BBuyerDetails.address of schema BuyerDetails in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] shipments[].deliveryDetails.address, shipments[].deliveryDetails.city, shipments[].deliveryDetails.country, shipments[].deliveryDetails.name, shipments[].deliveryDetails.phone, shipments[].deliveryDetails.pincode, shipments[].deliveryDetails.state made optional in response with status code 200 + - [Breaking] [Changed] shipments[].billingDetails.address, shipments[].billingDetails.city, shipments[].billingDetails.country, shipments[].billingDetails.name, shipments[].billingDetails.phone, shipments[].billingDetails.pincode, shipments[].billingDetails.state made optional in response with status code 200 + + +#### getOrderById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property order.orderDate of schema OrderData in response with status code 200 + - [Added] property order.charges of schema OrderData in response with status code 200 + - [Added] property order.orderingCurrencyPrices of schema OrderData in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].invoice.updatedDate of schema InvoiceInfo in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].order.orderDate of schema OrderDetailsData in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].brand.createdOn of schema OrderBrandName in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].brand.modifiedOn of schema OrderBrandName in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].item.lastUpdatedAt of schema PlatformItem in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bags[].bagStatus[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].bagStatus[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].bagStatus[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bags[].bagStatus[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property shipments[].bags[].bagStatus[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property shipments[].bags[].deliveryAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].deliveryAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].deliveryAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bags[].affiliateBagDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items to property shipments[].bags[].appliedPromos[].promotionType of schema AppliedPromos in response with status code 200 + - [Added] property shipments[].bags[].appliedPromos[].appliedFreeArticles of schema AppliedPromos in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bags[].currentStatus.stateType of schema CurrentStatus in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bags[].currentStatus.bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property shipments[].bags[].currentStatus.bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values bag,shipments to property shipments[].bags[].entityType of schema OrderBags in response with status code 200 + - [Added] property shipments[].bags[].charges of schema OrderBags in response with status code 200 + - [Added] property shipments[].bags[].orderingCurrencyPrices of schema OrderBags in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].status.createdAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].status.statusCreatedAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].pickedDate of schema PlatformShipment in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].orderStatus.orderDetails.createdAt of schema OrderDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].orderStatus.orderDetails.affiliateOrderDate of schema OrderDetails in response with status code 200 + - [Added] property shipments[].orderStatus.orderDetails.charges of schema OrderDetails in response with status code 200 + - [Added] property shipments[].affiliateDetails.config.app of schema AffiliateConfig in response with status code 200 + - [Added] property shipments[].affiliateDetails.config.inventory of schema AffiliateConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].affiliateDetails.shipmentMeta.estimatedDeliveryDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].affiliateDetails.shipmentMeta.dueDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].affiliateDetails.shipmentMeta.storeInvoiceUpdatedDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Possible values bag,shipments to property shipments[].affiliateDetails.shipmentMeta.shipmentTags[].entityType of schema ShipmentTags in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property shipments[].affiliateDetails.shipmentMeta.orderType of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].affiliateDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Breaking] [Added] Possible values fynd,external to property shipments[].affiliateDetails.pdfLinks.invoiceType of schema PDFLinks in response with status code 200 + - [Breaking] [Added] Possible values fynd,external,parent_child to property shipments[].affiliateDetails.pdfLinks.labelType of schema PDFLinks in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bagStatusHistory[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bagStatusHistory[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].bagStatusHistory[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property shipments[].bagStatusHistory[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property shipments[].bagStatusHistory[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property shipments[].journeyType of schema PlatformShipment in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].shipmentCreatedAt of schema PlatformShipment in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property shipments[].rtoAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].rtoAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property shipments[].rtoAddress.updatedAt of schema Address in response with status code 200 + - [Added] property shipments[].charges of schema PlatformShipment in response with status code 200 + - [Added] property shipments[].orderingCurrencyPrices of schema PlatformShipment in response with status code 200 + - [Added] property shipments[].forwardEndShipmentId of schema PlatformShipment in response with status code 200 + - [Added] property shipments[].logisticsMeta of schema PlatformShipment in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties shipments[].deliveryDetails.phone, shipments[].deliveryDetails.pincode, shipments[].deliveryDetails.address, shipments[].deliveryDetails.area, shipments[].deliveryDetails.country, shipments[].deliveryDetails.email, shipments[].deliveryDetails.address1, shipments[].deliveryDetails.landmark, shipments[].deliveryDetails.state, shipments[].deliveryDetails.name, shipments[].deliveryDetails.city, shipments[].deliveryDetails.addressType, shipments[].deliveryDetails.stateCode, shipments[].deliveryDetails.countryIsoCode, shipments[].deliveryDetails.countryPhoneCode, shipments[].deliveryDetails.displayAddress in response with status code 200 + - [Breaking] [Deleted] properties shipments[].billingDetails.phone, shipments[].billingDetails.pincode, shipments[].billingDetails.address, shipments[].billingDetails.area, shipments[].billingDetails.country, shipments[].billingDetails.email, shipments[].billingDetails.address1, shipments[].billingDetails.landmark, shipments[].billingDetails.state, shipments[].billingDetails.name, shipments[].billingDetails.city, shipments[].billingDetails.addressType, shipments[].billingDetails.stateCode, shipments[].billingDetails.countryIsoCode, shipments[].billingDetails.countryPhoneCode, shipments[].billingDetails.displayAddress in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property shipments[].affiliateDetails.shipmentMeta.b2BBuyerDetails.address of schema BuyerDetails in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] shipments[].deliveryDetails.address, shipments[].deliveryDetails.city, shipments[].deliveryDetails.country, shipments[].deliveryDetails.name, shipments[].deliveryDetails.phone, shipments[].deliveryDetails.pincode, shipments[].deliveryDetails.state made optional in response with status code 200 + - [Breaking] [Changed] shipments[].billingDetails.address, shipments[].billingDetails.city, shipments[].billingDetails.country, shipments[].billingDetails.name, shipments[].billingDetails.phone, shipments[].billingDetails.pincode, shipments[].billingDetails.state made optional in response with status code 200 + + +#### getOrders + +- ##### What's New + - [Added] query parameter groupEntity (type: string) + + - [Breaking] [Added] Value format date-time to property items[].shipments[].invoice.updatedDate of schema InvoiceInfo in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].order.orderDate of schema OrderDetailsData in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bags[].brand.createdOn of schema OrderBrandName in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bags[].brand.modifiedOn of schema OrderBrandName in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bags[].item.lastUpdatedAt of schema PlatformItem in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].shipments[].bags[].bagStatus[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bags[].bagStatus[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bags[].bagStatus[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].shipments[].bags[].bagStatus[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property items[].shipments[].bags[].bagStatus[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property items[].shipments[].bags[].deliveryAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bags[].deliveryAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bags[].deliveryAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bags[].affiliateBagDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Breaking] [Added] Possible values percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items to property items[].shipments[].bags[].appliedPromos[].promotionType of schema AppliedPromos in response with status code 200 + - [Added] property items[].shipments[].bags[].appliedPromos[].appliedFreeArticles of schema AppliedPromos in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].shipments[].bags[].currentStatus.stateType of schema CurrentStatus in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].shipments[].bags[].currentStatus.bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property items[].shipments[].bags[].currentStatus.bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values bag,shipments to property items[].shipments[].bags[].entityType of schema OrderBags in response with status code 200 + - [Added] property items[].shipments[].bags[].charges of schema OrderBags in response with status code 200 + - [Added] property items[].shipments[].bags[].orderingCurrencyPrices of schema OrderBags in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].status.createdAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].status.statusCreatedAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].pickedDate of schema PlatformShipment in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].orderStatus.orderDetails.createdAt of schema OrderDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].orderStatus.orderDetails.affiliateOrderDate of schema OrderDetails in response with status code 200 + - [Added] property items[].shipments[].orderStatus.orderDetails.charges of schema OrderDetails in response with status code 200 + - [Added] property items[].shipments[].affiliateDetails.config.app of schema AffiliateConfig in response with status code 200 + - [Added] property items[].shipments[].affiliateDetails.config.inventory of schema AffiliateConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].affiliateDetails.shipmentMeta.estimatedDeliveryDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].affiliateDetails.shipmentMeta.dueDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].affiliateDetails.shipmentMeta.storeInvoiceUpdatedDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Possible values bag,shipments to property items[].shipments[].affiliateDetails.shipmentMeta.shipmentTags[].entityType of schema ShipmentTags in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property items[].shipments[].affiliateDetails.shipmentMeta.orderType of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].affiliateDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Breaking] [Added] Possible values fynd,external to property items[].shipments[].affiliateDetails.pdfLinks.invoiceType of schema PDFLinks in response with status code 200 + - [Breaking] [Added] Possible values fynd,external,parent_child to property items[].shipments[].affiliateDetails.pdfLinks.labelType of schema PDFLinks in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].shipments[].bagStatusHistory[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bagStatusHistory[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].bagStatusHistory[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].shipments[].bagStatusHistory[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property items[].shipments[].bagStatusHistory[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property items[].shipments[].journeyType of schema PlatformShipment in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].shipmentCreatedAt of schema PlatformShipment in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property items[].shipments[].rtoAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].rtoAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipments[].rtoAddress.updatedAt of schema Address in response with status code 200 + - [Added] property items[].shipments[].charges of schema PlatformShipment in response with status code 200 + - [Added] property items[].shipments[].orderingCurrencyPrices of schema PlatformShipment in response with status code 200 + - [Added] property items[].shipments[].forwardEndShipmentId of schema PlatformShipment in response with status code 200 + - [Added] property items[].shipments[].logisticsMeta of schema PlatformShipment in response with status code 200 + - [Added] property items[].prices of schema PlatformOrderItems in response with status code 200 + - [Added] property items[].orderingCurrencyPrices of schema PlatformOrderItems in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[].shipments[].deliveryDetails.phone, items[].shipments[].deliveryDetails.pincode, items[].shipments[].deliveryDetails.address, items[].shipments[].deliveryDetails.area, items[].shipments[].deliveryDetails.country, items[].shipments[].deliveryDetails.email, items[].shipments[].deliveryDetails.address1, items[].shipments[].deliveryDetails.landmark, items[].shipments[].deliveryDetails.state, items[].shipments[].deliveryDetails.name, items[].shipments[].deliveryDetails.city, items[].shipments[].deliveryDetails.addressType, items[].shipments[].deliveryDetails.stateCode, items[].shipments[].deliveryDetails.countryIsoCode, items[].shipments[].deliveryDetails.countryPhoneCode, items[].shipments[].deliveryDetails.displayAddress in response with status code 200 + - [Breaking] [Deleted] properties items[].shipments[].billingDetails.phone, items[].shipments[].billingDetails.pincode, items[].shipments[].billingDetails.address, items[].shipments[].billingDetails.area, items[].shipments[].billingDetails.country, items[].shipments[].billingDetails.email, items[].shipments[].billingDetails.address1, items[].shipments[].billingDetails.landmark, items[].shipments[].billingDetails.state, items[].shipments[].billingDetails.name, items[].shipments[].billingDetails.city, items[].shipments[].billingDetails.addressType, items[].shipments[].billingDetails.stateCode, items[].shipments[].billingDetails.countryIsoCode, items[].shipments[].billingDetails.countryPhoneCode, items[].shipments[].billingDetails.displayAddress in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].shipments[].affiliateDetails.shipmentMeta.b2BBuyerDetails.address of schema BuyerDetails in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] items[].shipments[].deliveryDetails.address, items[].shipments[].deliveryDetails.city, items[].shipments[].deliveryDetails.country, items[].shipments[].deliveryDetails.name, items[].shipments[].deliveryDetails.phone, items[].shipments[].deliveryDetails.pincode, items[].shipments[].deliveryDetails.state made optional in response with status code 200 + - [Breaking] [Changed] items[].shipments[].billingDetails.address, items[].shipments[].billingDetails.city, items[].shipments[].billingDetails.country, items[].shipments[].billingDetails.name, items[].shipments[].billingDetails.phone, items[].shipments[].billingDetails.pincode, items[].shipments[].billingDetails.state made optional in response with status code 200 + + +#### getApplicationShipments + +- ##### What's New + - [Added] property items[].bags[].article.set of schema Article in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].brand.createdOn of schema ShipmentListingBrand in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].item.lastUpdatedAt of schema PlatformItem in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].dates.deliveryDate of schema Dates in response with status code 200 + - [Breaking] [Added] Possible values forward_standard to property items[].bags[].bagType of schema BagUnit in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].bagExpiryDate of schema BagUnit in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].bagStatus[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].bagStatus[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].bagStatus[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].bagStatus[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property items[].bags[].bagStatus[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].currentOperationalStatus.stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].currentOperationalStatus.createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].currentOperationalStatus.updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].currentOperationalStatus.bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property items[].bags[].currentOperationalStatus.bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].affiliateBagDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].currentStatus.stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].currentStatus.createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].bags[].currentStatus.updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property items[].bags[].currentStatus.bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property items[].bags[].currentStatus.bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values bag to property items[].bags[].entityType of schema BagUnit in response with status code 200 + - [Added] property items[].bags[].orderingCurrencyPrices of schema BagUnit in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].orderDate of schema ShipmentItem in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipmentStatus.createdAt of schema ShipmentStatus in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipmentStatus.statusCreatedAt of schema ShipmentStatus in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property items[].deliveryAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].deliveryAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].deliveryAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].statusCreatedAt of schema ShipmentItem in response with status code 200 + - [Breaking] [Added] Possible values high_street,mall,store,warehouse to property items[].fulfillingStore.locationType of schema ShipmentItemFulFillingStore in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].shipmentCreatedAt of schema ShipmentItem in response with status code 200 + - [Added] property items[].billingAddress of schema ShipmentItem in response with status code 200 + - [Added] property items[].affiliateDetails of schema ShipmentItem in response with status code 200 + - [Added] property items[].isActive of schema ShipmentItem in response with status code 200 + - [Added] property items[].forwardEndShipmentId of schema ShipmentItem in response with status code 200 + - [Added] property items[].orderingCurrencyPrices of schema ShipmentItem in response with status code 200 + - [Added] property items[].logisticsMeta of schema ShipmentItem in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].bags[].article.aSet of schema Article in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].shipmentStatus.status of schema ShipmentStatus in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].totalBags of schema ShipmentItem in response with status code 200 + + +#### trackShipmentPlatform + +- ##### What's New + - [Breaking] [Added] Value format date-time to property results[].lastLocationRecievedAt of schema PlatformTrack in response with status code 200 + - [Breaking] [Added] Value format date-time to property results[].updatedAt of schema PlatformTrack in response with status code 200 + - [Breaking] [Added] Possible values forward,reverse,RTO to property results[].shipmentType of schema PlatformTrack in response with status code 200 + + +#### getfilters + +- ##### What's Deprecated + - [Deleted] Possible values from multi_select,single_select from property advanceFilter.returned[].type of schema FiltersInfo in response with status code 200 + - [Deleted] Possible values from multi_select,single_select from property advanceFilter.unfulfilled[].type of schema FiltersInfo in response with status code 200 + - [Deleted] Possible values from multi_select,single_select from property advanceFilter.filters[].type of schema FiltersInfo in response with status code 200 + - [Deleted] Possible values from multi_select,single_select from property advanceFilter.processed[].type of schema FiltersInfo in response with status code 200 + - [Deleted] Possible values from multi_select,single_select from property advanceFilter.actionCentre[].type of schema FiltersInfo in response with status code 200 + - [Deleted] Possible values from multi_select,single_select from property globalFilter[].type of schema FiltersInfo in response with status code 200 + + +#### getShipmentReasons + +- ##### What's New + - [Breaking] [Added] Possible values doorstep_qc,pre_qc to property reasons[].qcType[] of schema Reason in response with status code 200 + - [Added] property reasons[].reasons of schema Reason in response with status code 200 + - [Added] property reasons[].meta of schema Reason in response with status code 200 + - [Added] property reasons[].isActive of schema Reason in response with status code 200 + - [Added] reasons[].display_name, reasons[].qc_type, reasons[].question_set, reasons[].meta, reasons[].is_active made required in response with status code 200 + + +#### getBagById + +- ##### What's New + - [Added] property data.article.set of schema Article in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.brand.startDate of schema Brand in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.brand.createdOn of schema Brand in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.brand.modifiedOn of schema Brand in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.company.createdOn of schema Company in response with status code 200 + - [Breaking] [Added] Possible values mbo,distributor,manufacturer-owner,franchise to property data.company.companyType of schema Company in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.company.modifiedOn of schema Company in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.company.agreementStartDate of schema Company in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.dates.deliveryDate of schema Dates in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.invoice.updatedDate of schema InvoiceDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.order.createdAt of schema OrderDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.order.affiliateOrderDate of schema OrderDetails in response with status code 200 + - [Added] property data.order.charges of schema OrderDetails in response with status code 200 + - [Added] properties data.shipment.tags[].slug, data.shipment.tags[].displayText in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.status.createdAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.status.statusCreatedAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.processingDates.dispatchAfterDate of schema ProcessingDates in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.processingDates.dispatchByDate of schema ProcessingDates in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.processingDates.confirmByDate of schema ProcessingDates in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.processingDates.packByDate of schema ProcessingDates in response with status code 200 + - [Added] Possible values Digital to property data.shipment.orderType of schema Shipment in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.shipment.billingAddressJson.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.billingAddressJson.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.billingAddressJson.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.shipment.deliveryAddressJson.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.deliveryAddressJson.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.deliveryAddressJson.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.createdAt of schema Shipment in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.shipment.handOverContactJson.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.handOverContactJson.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipment.handOverContactJson.updatedAt of schema Address in response with status code 200 + - [Added] property data.shipment.systemMessages of schema Shipment in response with status code 200 + - [Added] property data.shipment.processAfterConfig of schema Shipment in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.affiliateBagDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Added] property data.affiliateDetails.config.app of schema AffiliateConfig in response with status code 200 + - [Added] property data.affiliateDetails.config.inventory of schema AffiliateConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.affiliateDetails.shipmentMeta.estimatedDeliveryDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.affiliateDetails.shipmentMeta.dueDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.affiliateDetails.shipmentMeta.storeInvoiceUpdatedDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Possible values bag,shipments to property data.affiliateDetails.shipmentMeta.shipmentTags[].entityType of schema ShipmentTags in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property data.affiliateDetails.shipmentMeta.orderType of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.affiliateDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Breaking] [Added] Possible values fynd,external to property data.affiliateDetails.pdfLinks.invoiceType of schema PDFLinks in response with status code 200 + - [Breaking] [Added] Possible values fynd,external,parent_child to property data.affiliateDetails.pdfLinks.labelType of schema PDFLinks in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.bagStatus[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.bagStatus[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.bagStatus[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.bagStatus[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property data.bagStatus[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.bagStatusHistory[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.bagStatusHistory[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.bagStatusHistory[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.bagStatusHistory[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property data.bagStatusHistory[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.currentOperationalStatus.stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.currentOperationalStatus.createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.currentOperationalStatus.updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.currentOperationalStatus.bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property data.currentOperationalStatus.bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.currentStatus.stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.currentStatus.createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.currentStatus.updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.currentStatus.bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property data.currentStatus.bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.deliveryAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.deliveryAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.deliveryAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values bag to property data.entityType of schema BagDetails in response with status code 200 + - [Added] property data.fulfillingStore.meta.documents.gst.type of schema Document in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.fulfillingStore.createdAt of schema Store in response with status code 200 + - [Breaking] [Added] Possible values high_street,mall,store,warehouse to property data.fulfillingStore.locationType of schema Store in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.fulfillingStore.updatedAt of schema Store in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.fulfillingStore.storeAddressJson.createdAt of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.fulfillingStore.storeAddressJson.addressCategory of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.fulfillingStore.storeAddressJson.updatedAt of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property data.journeyType of schema BagDetails in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property data.orderType of schema BagDetails in response with status code 200 + - [Added] property data.orderingStore.meta.documents.gst.type of schema Document in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.orderingStore.createdAt of schema Store in response with status code 200 + - [Breaking] [Added] Possible values high_street,mall,store,warehouse to property data.orderingStore.locationType of schema Store in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.orderingStore.updatedAt of schema Store in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.orderingStore.storeAddressJson.createdAt of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.orderingStore.storeAddressJson.addressCategory of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.orderingStore.storeAddressJson.updatedAt of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Possible values partner,self,fynd to property data.paymentType of schema BagDetails in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.rtoAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.rtoAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.rtoAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format int32 to property data.shipmentDetails.dpId of schema ShipmentDetails in response with status code 200 + - [Added] property data.shipmentDetails.shipments of schema ShipmentDetails in response with status code 200 + - [Added] property data.shipmentDetails.articles of schema ShipmentDetails in response with status code 200 + - [Added] property data.shipmentDetails.meta of schema ShipmentDetails in response with status code 200 + - [Added] property data.shipmentDetails.boxType of schema ShipmentDetails in response with status code 200 + - [Added] property data.shipmentDetails.fulfillmentId of schema ShipmentDetails in response with status code 200 + - [Added] property data.shipmentDetails.affiliateShipmentId of schema ShipmentDetails in response with status code 200 + - [Added] data.shipmentDetails.affiliate_shipment_id, data.shipmentDetails.articles, data.shipmentDetails.fulfillment_id, data.shipmentDetails.shipments made required in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipmentStatus.createdAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipmentStatus.statusCreatedAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipmentStatusHistory[].createdAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.shipmentStatusHistory[].statusCreatedAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Possible values shipment to property data.transactionType of schema BagDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.updatedAt of schema BagDetails in response with status code 200 + - [Added] property data.charges of schema BagDetails in response with status code 200 + - [Breaking] [Added] Possible values 200,400,500 to property statusCode of schema BagDetailsPlatformResponseSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property data.article.aSet of schema Article in response with status code 200 + - [Breaking] [Deleted] properties data.shipment.lineItems[].charges[].amount.currency, data.shipment.lineItems[].charges[].amount.value in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.affiliateDetails.shipmentMeta.b2BBuyerDetails.address of schema BuyerDetails in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.fulfillingStore.address1 of schema Store in response with status code 200 + - [Breaking] [Deleted] property data.fulfillingStore.meta.documents.gst.dsType of schema Document in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.fulfillingStore.storeAddressJson.phone of schema StoreAddress in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.orderingStore.address1 of schema Store in response with status code 200 + - [Breaking] [Deleted] property data.orderingStore.meta.documents.gst.dsType of schema Document in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.orderingStore.storeAddressJson.phone of schema StoreAddress in response with status code 200 + + +#### getBags + +- ##### What's New + - [Added] property data.items[].article.set of schema Article in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].brand.startDate of schema Brand in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].brand.createdOn of schema Brand in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].brand.modifiedOn of schema Brand in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].company.createdOn of schema Company in response with status code 200 + - [Breaking] [Added] Possible values mbo,distributor,manufacturer-owner,franchise to property data.items[].company.companyType of schema Company in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].company.modifiedOn of schema Company in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].company.agreementStartDate of schema Company in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].dates.deliveryDate of schema Dates in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].invoice.updatedDate of schema InvoiceDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].order.createdAt of schema OrderDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].order.affiliateOrderDate of schema OrderDetails in response with status code 200 + - [Added] property data.items[].order.charges of schema OrderDetails in response with status code 200 + - [Added] properties data.items[].shipment.tags[].slug, data.items[].shipment.tags[].displayText in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.status.createdAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.status.statusCreatedAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.processingDates.dispatchAfterDate of schema ProcessingDates in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.processingDates.dispatchByDate of schema ProcessingDates in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.processingDates.confirmByDate of schema ProcessingDates in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.processingDates.packByDate of schema ProcessingDates in response with status code 200 + - [Added] Possible values Digital to property data.items[].shipment.orderType of schema Shipment in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.items[].shipment.billingAddressJson.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.billingAddressJson.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.billingAddressJson.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.items[].shipment.deliveryAddressJson.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.deliveryAddressJson.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.deliveryAddressJson.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.createdAt of schema Shipment in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.items[].shipment.handOverContactJson.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.handOverContactJson.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipment.handOverContactJson.updatedAt of schema Address in response with status code 200 + - [Added] property data.items[].shipment.systemMessages of schema Shipment in response with status code 200 + - [Added] property data.items[].shipment.processAfterConfig of schema Shipment in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].affiliateBagDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Added] property data.items[].affiliateDetails.config.app of schema AffiliateConfig in response with status code 200 + - [Added] property data.items[].affiliateDetails.config.inventory of schema AffiliateConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].affiliateDetails.shipmentMeta.estimatedDeliveryDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].affiliateDetails.shipmentMeta.dueDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].affiliateDetails.shipmentMeta.storeInvoiceUpdatedDate of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Possible values bag,shipments to property data.items[].affiliateDetails.shipmentMeta.shipmentTags[].entityType of schema ShipmentTags in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property data.items[].affiliateDetails.shipmentMeta.orderType of schema ShipmentMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].affiliateDetails.affiliateMeta.dueDate of schema AffiliateMeta in response with status code 200 + - [Breaking] [Added] Possible values fynd,external to property data.items[].affiliateDetails.pdfLinks.invoiceType of schema PDFLinks in response with status code 200 + - [Breaking] [Added] Possible values fynd,external,parent_child to property data.items[].affiliateDetails.pdfLinks.labelType of schema PDFLinks in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.items[].bagStatus[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].bagStatus[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].bagStatus[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.items[].bagStatus[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property data.items[].bagStatus[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.items[].bagStatusHistory[].stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].bagStatusHistory[].createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].bagStatusHistory[].updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.items[].bagStatusHistory[].bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property data.items[].bagStatusHistory[].bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.items[].currentOperationalStatus.stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].currentOperationalStatus.createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].currentOperationalStatus.updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.items[].currentOperationalStatus.bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property data.items[].currentOperationalStatus.bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.items[].currentStatus.stateType of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].currentStatus.createdAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].currentStatus.updatedAt of schema BagStatusHistory in response with status code 200 + - [Breaking] [Added] Possible values operational,financial,logistics to property data.items[].currentStatus.bagStateMapper.stateType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property data.items[].currentStatus.bagStateMapper.journeyType of schema BagStateMapper in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.items[].deliveryAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].deliveryAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].deliveryAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Possible values bag to property data.items[].entityType of schema BagDetails in response with status code 200 + - [Added] property data.items[].fulfillingStore.meta.documents.gst.type of schema Document in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].fulfillingStore.createdAt of schema Store in response with status code 200 + - [Breaking] [Added] Possible values high_street,mall,store,warehouse to property data.items[].fulfillingStore.locationType of schema Store in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].fulfillingStore.updatedAt of schema Store in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].fulfillingStore.storeAddressJson.createdAt of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.items[].fulfillingStore.storeAddressJson.addressCategory of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].fulfillingStore.storeAddressJson.updatedAt of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Possible values return,forward to property data.items[].journeyType of schema BagDetails in response with status code 200 + - [Breaking] [Added] Possible values HomeDelivery,PickAtStore,Digital to property data.items[].orderType of schema BagDetails in response with status code 200 + - [Added] property data.items[].orderingStore.meta.documents.gst.type of schema Document in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].orderingStore.createdAt of schema Store in response with status code 200 + - [Breaking] [Added] Possible values high_street,mall,store,warehouse to property data.items[].orderingStore.locationType of schema Store in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].orderingStore.updatedAt of schema Store in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].orderingStore.storeAddressJson.createdAt of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.items[].orderingStore.storeAddressJson.addressCategory of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].orderingStore.storeAddressJson.updatedAt of schema StoreAddress in response with status code 200 + - [Breaking] [Added] Possible values partner,self,fynd to property data.items[].paymentType of schema BagDetails in response with status code 200 + - [Breaking] [Added] Possible values store,delivery,billing to property data.items[].rtoAddress.addressCategory of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].rtoAddress.createdAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].rtoAddress.updatedAt of schema Address in response with status code 200 + - [Breaking] [Added] Value format int32 to property data.items[].shipmentDetails.dpId of schema ShipmentDetails in response with status code 200 + - [Added] property data.items[].shipmentDetails.shipments of schema ShipmentDetails in response with status code 200 + - [Added] property data.items[].shipmentDetails.articles of schema ShipmentDetails in response with status code 200 + - [Added] property data.items[].shipmentDetails.meta of schema ShipmentDetails in response with status code 200 + - [Added] property data.items[].shipmentDetails.boxType of schema ShipmentDetails in response with status code 200 + - [Added] property data.items[].shipmentDetails.fulfillmentId of schema ShipmentDetails in response with status code 200 + - [Added] property data.items[].shipmentDetails.affiliateShipmentId of schema ShipmentDetails in response with status code 200 + - [Added] data.items[].shipmentDetails.affiliate_shipment_id, data.items[].shipmentDetails.articles, data.items[].shipmentDetails.fulfillment_id, data.items[].shipmentDetails.shipments made required in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipmentStatus.createdAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipmentStatus.statusCreatedAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipmentStatusHistory[].createdAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].shipmentStatusHistory[].statusCreatedAt of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Added] Possible values shipment to property data.items[].transactionType of schema BagDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property data.items[].updatedAt of schema BagDetails in response with status code 200 + - [Added] property data.items[].charges of schema BagDetails in response with status code 200 + - [Breaking] [Added] Possible values 200,400,500 to property statusCode of schema GetBagsPlatformResponseSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property data.items[].article.aSet of schema Article in response with status code 200 + - [Breaking] [Deleted] properties data.items[].shipment.lineItems[].charges[].amount.currency, data.items[].shipment.lineItems[].charges[].amount.value in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.items[].affiliateDetails.shipmentMeta.b2BBuyerDetails.address of schema BuyerDetails in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.items[].fulfillingStore.address1 of schema Store in response with status code 200 + - [Breaking] [Deleted] property data.items[].fulfillingStore.meta.documents.gst.dsType of schema Document in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.items[].fulfillingStore.storeAddressJson.phone of schema StoreAddress in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.items[].orderingStore.address1 of schema Store in response with status code 200 + - [Breaking] [Deleted] property data.items[].orderingStore.meta.documents.gst.dsType of schema Document in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property data.items[].orderingStore.storeAddressJson.phone of schema StoreAddress in response with status code 200 + + +#### getChannelConfig + +- ##### What's New + - [Added] method getChannelConfig + + + +#### createChannelConfig + +- ##### What's New + - [Added] method createChannelConfig + + + +#### fetchCreditBalanceDetail + +- ##### What's New + - [Added] method fetchCreditBalanceDetail + + + +#### processManifests + +- ##### What's New + - [Added] method processManifests + + + +#### getRules + +- ##### What's New + - [Added] method getRules + + + +#### updatePaymentInfo + +- ##### What's New + - [Added] method updatePaymentInfo + + + +### Partner + + + +#### addProxyPath + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ExtensionProxyPathCreation in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema ExtensionProxyPathCreation in response with status code 200 + + +### Payment + + + +#### getBrandPaymentGatewayConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### saveBrandPaymentGatewayConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPaymentModeRoutes + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getAllPayouts + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### savePayout + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updatePayout + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### activateAndDectivatePayout + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### deletePayout + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getSubscriptionPaymentMethod + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### deleteSubscriptionPaymentMethod + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getSubscriptionConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### saveSubscriptionSetupIntent + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getBankAccountDetailsOpenAPI + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### addRefundBankAccountUsingOTP + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### verifyIfscCode + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getUserOrderBeneficiaries + +- ##### What's New + - [Breaking] [Added] Value format date-time to property beneficiaries[].createdOn of schema OrderBeneficiaryDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property beneficiaries[].modifiedOn of schema OrderBeneficiaryDetails in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getUserBeneficiaries + +- ##### What's New + - [Breaking] [Added] Value format date-time to property beneficiaries[].createdOn of schema OrderBeneficiaryDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property beneficiaries[].modifiedOn of schema OrderBeneficiaryDetails in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### confirmPayment + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getUserCODlimitRoutes + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### setUserCODlimitRoutes + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### edcAggregatorsAndModelList + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### edcDeviceStats + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updateEdcDevice + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getEdcDevice + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### addEdcDevice + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### edcDeviceList + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPosPaymentModeRoutes + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### initialisePayment + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property amount of schema PaymentInitializationRequest in request body + - [Breaking] [Deleted] Response with status 500 + + +#### checkAndUpdatePaymentStatus + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property amount of schema PaymentStatusUpdateRequest in request body + - [Breaking] [Deleted] Response with status 500 + + +#### resendOrCancelPayment + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### paymentStatusBulk + +- ##### What's New + - [Breaking] [Added] Value format date-time to property data[].paymentObjectList[].modifiedOn of schema PaymentObjectList in response with status code 200 + - [Breaking] [Added] Value format date-time to property data[].paymentObjectList[].createdOn of schema PaymentObjectList in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### oauthGetUrl + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### revokeOauthToken + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### repaymentDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property extensionOrderId of schema RepaymentDetailsSerialiserPayAll in request body + - [Breaking] [Deleted] Response with status 500 + + +#### merchantOnBoarding + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### verifyCustomerForPayment + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPaymentLink + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createPaymentLink + +- ##### What's New + - [Added] property successRedirectionUrl of schema CreatePaymentLinkCreation in request body + - [Added] property failureRedirectionUrl of schema CreatePaymentLinkCreation in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### pollingPaymentLink + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### resendPaymentLink + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### cancelPaymentLink + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPaymentModeControlRoutes + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### setMerchantModeControlRoutes + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPaymentModeCustomConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### setPaymentModeCustomConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPaymentCodeOption + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPaymentSession + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property gid of schema PaymentSessionSerializer in response with status code 200 + - [Breaking] [Deleted] Response with status 500 + + +#### updatePaymentSession + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updateRefundSession + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getMerchantPaymentOption + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### patchMerchantPaymentOption + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getMerchantAggregatorPaymentModeDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### patchMerchantAggregatorPaymentModeDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getPGConfigAggregators + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getMerchantRefundPriority + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createMerchantRefundPriority + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updateMerchantRefundPriority + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### createPaymentOrder + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getMerchantAggregatorAppVersion + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### patchMerchantPaymentOptionVersion + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +### Rewards + + + +#### showGiveaways + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema Giveaway in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema Giveaway in response with status code 200 + + +#### saveGiveAway + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Giveaway in request body + - [Breaking] [Added] Value format date-time to property updatedAt of schema Giveaway in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema Giveaway in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Giveaway in response with status code 200 + + +#### getGiveawayById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Giveaway in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Giveaway in response with status code 200 + + +#### updateGiveAway + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Giveaway in request body + - [Breaking] [Added] Value format date-time to property updatedAt of schema Giveaway in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema Giveaway in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Giveaway in response with status code 200 + + +#### showOffers + +- ##### What's New + - [Breaking] [Added] Value format date-time to property [].createdAt of schema Offer in response with status code 200 + - [Breaking] [Added] Value format date-time to property [].updatedAt of schema Offer in response with status code 200 + + +#### getOfferByName + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Offer in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Offer in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### updateOfferByName + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema Offer in request body + - [Breaking] [Added] Value format date-time to property updatedAt of schema Offer in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema Offer in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema Offer in response with status code 200 + + +#### updateUserStatus + +- ##### What's New + - [Breaking] [Added] Value format date-time to property updatedAt of schema AppUser in request body + - [Breaking] [Added] Value format date-time to property updatedAt of schema AppUser in response with status code 200 + + +#### getUserDetails + +- ##### What's New + - [Breaking] [Added] Value format date-time to property user.createdAt of schema RewardUser in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema RewardUser in response with status code 200 + + +#### getUserPointsHistory + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema PointsHistory in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema PointsHistory in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +#### getRewardsConfiguration + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 500 + + +### Share + + + +#### createShortLink + +- ##### What's New + - [Breaking] [Added] Value format date-time to property expireAt of schema ShortLinkReq in request body + - [Added] property meta of schema ShortLinkReq in request body + - [Added] property url.alias of schema UrlInfo in response with status code 200 + - [Breaking] [Added] Value format date-time to property expireAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ShortLinkRes in response with status code 200 + +- ##### What's Changed + - [Changed] redirects.expiry, redirects.url made optional in request body + - [Changed] redirects.expiry, redirects.url made optional in response with status code 200 + + +#### getShortLinks + +- ##### What's New + - [Added] property items[].url.alias of schema UrlInfo in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].expireAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema ShortLinkRes in response with status code 200 + +- ##### What's Changed + - [Changed] items[].redirects.expiry, items[].redirects.url made optional in response with status code 200 + + +#### getShortLinkByHash + +- ##### What's New + - [Added] property url.alias of schema UrlInfo in response with status code 200 + - [Breaking] [Added] Value format date-time to property expireAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ShortLinkRes in response with status code 200 + +- ##### What's Changed + - [Changed] redirects.expiry, redirects.url made optional in response with status code 200 + + +#### updateShortLinkById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property expireAt of schema ShortLinkReq in request body + - [Added] property meta of schema ShortLinkReq in request body + - [Added] property url.alias of schema UrlInfo in response with status code 200 + - [Breaking] [Added] Value format date-time to property expireAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ShortLinkRes in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ShortLinkRes in response with status code 200 + +- ##### What's Changed + - [Changed] redirects.expiry, redirects.url made optional in request body + - [Changed] redirects.expiry, redirects.url made optional in response with status code 200 + + +### Theme + + + +#### getAllPages + +- ##### What's New + - [Added] properties pages[].sections[].source.id, pages[].sections[].source.type, pages[].sections[].source.bundleName in response with status code 200 + - [Breaking] [Added] Value format date-time to property pages[].createdAt of schema AvailablePageSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property pages[].updatedAt of schema AvailablePageSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to object of property pages[].sections[].source of schema AvailablePageSchemaSections in response with status code 200 + + +#### createPage + +- ##### What's New + - [Added] properties sections[].source.id, sections[].source.type, sections[].source.bundleName in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema AvailablePageSchema in request body + - [Breaking] [Added] Value format date-time to property updatedAt of schema AvailablePageSchema in request body + - [Added] properties sections[].source.id, sections[].source.type, sections[].source.bundleName in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema AvailablePageSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema AvailablePageSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to object of property sections[].source of schema AvailablePageSchemaSections in request body + - [Breaking] [Changed] Type from string to object of property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + + +#### updateMultiplePages + +- ##### What's New + - [Added] properties pages[].sections[].source.id, pages[].sections[].source.type, pages[].sections[].source.bundleName in request body + - [Breaking] [Added] Value format date-time to property pages[].createdAt of schema AvailablePageSchema in request body + - [Breaking] [Added] Value format date-time to property pages[].updatedAt of schema AvailablePageSchema in request body + - [Added] properties pages[].sections[].source.id, pages[].sections[].source.type, pages[].sections[].source.bundleName in response with status code 200 + - [Breaking] [Added] Value format date-time to property pages[].createdAt of schema AvailablePageSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property pages[].updatedAt of schema AvailablePageSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to object of property pages[].sections[].source of schema AvailablePageSchemaSections in request body + - [Breaking] [Changed] Type from string to object of property pages[].sections[].source of schema AvailablePageSchemaSections in response with status code 200 + + +#### getPage + +- ##### What's New + - [Added] properties sections[].source.id, sections[].source.type, sections[].source.bundleName in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema AvailablePageSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema AvailablePageSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to object of property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + + +#### updatePage + +- ##### What's New + - [Breaking] [Added] Required path parameter socketId (type: string) + + - [Added] properties sections[].source.id, sections[].source.type, sections[].source.bundleName in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema AvailablePageSchema in request body + - [Breaking] [Added] Value format date-time to property updatedAt of schema AvailablePageSchema in request body + - [Added] properties sections[].source.id, sections[].source.type, sections[].source.bundleName in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema AvailablePageSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema AvailablePageSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to object of property sections[].source of schema AvailablePageSchemaSections in request body + - [Breaking] [Changed] Type from string to object of property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + - [Changed] Path From /service/platform/theme/v1.0/company/{company_id}/application/{application_id}/{theme_id}/{page_value} To /service/platform/theme/v1.0/company/{company_id}/application/{application_id}/{theme_id}/{page_value}/{socket_id} + + +#### deletePage + +- ##### What's New + - [Added] properties sections[].source.id, sections[].source.type, sections[].source.bundleName in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema AvailablePageSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema AvailablePageSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to object of property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + + +#### getCompanyLevelThemes + +- ##### What's New + - [Breaking] [Added] Value format date-time to property [].marketplaceThemeId.createdAt of schema MarketplaceThemeId in response with status code 200 + - [Breaking] [Added] Value format date-time to property [].marketplaceThemeId.updatedAt of schema MarketplaceThemeId in response with status code 200 + + +#### getCompanyLevelPrivateThemes + +- ##### What's New + - [Breaking] [Added] Possible values vue2,react to property [].themeType of schema CompanyPrivateTheme in response with status code 200 + + +#### addMarketplaceThemeToCompany + +- ##### What's New + - [Breaking] [Added] Value format date-time to property marketplaceThemeId.createdAt of schema MarketplaceThemeId in response with status code 200 + - [Breaking] [Added] Value format date-time to property marketplaceThemeId.updatedAt of schema MarketplaceThemeId in response with status code 200 + + +#### deleteCompanyTheme + +- ##### What's New + - [Breaking] [Added] Value format date-time to property marketplaceThemeId.createdAt of schema MarketplaceThemeId in response with status code 200 + - [Breaking] [Added] Value format date-time to property marketplaceThemeId.updatedAt of schema MarketplaceThemeId in response with status code 200 + + +#### getApplicationThemes + +- ##### What's New + - [Breaking] [Added] Value format date-time to property [].createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property [].updatedAt of schema ThemesSchema in response with status code 200 + + +#### getThemeById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + + +#### updateTheme + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + + +#### deleteTheme + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + + +#### addThemeToApplication + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + + +#### updateThemeName + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + + +#### applyTheme + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + + +#### duplicateTheme + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + + +#### getAppliedTheme + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + + +#### getThemeForPreview + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + + +#### upgradeTheme + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema ThemesSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedAt of schema ThemesSchema in response with status code 200 + + +### User + + + +#### getCustomers + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property items[].accountType of schema UserSearchSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema UserSearchSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedAt of schema UserSearchSchema in response with status code 200 + + +#### searchUsers + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property users[].accountType of schema UserSearchSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property users[].createdAt of schema UserSearchSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property users[].updatedAt of schema UserSearchSchema in response with status code 200 + + +#### createUser + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### updateUser + +- ##### What's New + - [Breaking] [Added] Possible values user,programmatic to property user.accountType of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.createdAt of schema UserSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property user.updatedAt of schema UserSchema in response with status code 200 + + +#### getPlatformConfig + +- ##### What's New + - [Breaking] [Added] Value format date-time to property updatedAt of schema PlatformSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema PlatformSchema in response with status code 200 + + +#### updatePlatformConfig + +- ##### What's New + - [Breaking] [Added] Value format date-time to property updatedAt of schema PlatformSchema in request body + - [Breaking] [Added] Value format date-time to property createdAt of schema PlatformSchema in request body + - [Breaking] [Added] Value format date-time to property updatedAt of schema PlatformSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema PlatformSchema in response with status code 200 + + +#### createUserGroup + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema UserGroupResponseSchema in response with status code 201 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema UserGroupResponseSchema in response with status code 201 + + +#### getUserGroups + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema UserGroupResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].modifiedAt of schema UserGroupResponseSchema in response with status code 200 + + +#### updateUserGroup + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema UserGroupResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema UserGroupResponseSchema in response with status code 200 + + +#### getUserGroupById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema UserGroupResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema UserGroupResponseSchema in response with status code 200 + + +#### updateUserGroupPartially + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema UserGroupResponseSchema in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema UserGroupResponseSchema in response with status code 200 + + +#### getUserAttributeDefinitions + +- ##### What's New + - [Breaking] [Added] Value format date-time to property items[].createdAt of schema UserAttributeDefinition in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].modifiedAt of schema UserAttributeDefinition in response with status code 200 + + +#### updateUserAttributeDefinition + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema UserAttributeDefinition in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema UserAttributeDefinition in response with status code 200 + + +#### getUserAttributeDefinitionById + +- ##### What's New + - [Breaking] [Added] Value format date-time to property createdAt of schema UserAttributeDefinition in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema UserAttributeDefinition in response with status code 200 + + +#### updateUserAttribute + +- ##### What's New + - [Added] property customerOverridden of schema CreateUserAttribute in request body + - [Added] property customerOverridden of schema UserAttribute in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property customerOverriden of schema CreateUserAttributeRequest in request body + - [Breaking] [Deleted] property customerOverriden of schema UserAttributeResponse in response with status code 200 + + +#### getUserAttribute + +- ##### What's New + - [Added] property customerOverridden of schema UserAttribute in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property customerOverriden of schema UserAttributeResponse in response with status code 200 + + +#### getUserAttributesForUser + +- ##### What's New + - [Added] property items[].customerOverridden of schema UserAttribute in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].customerOverriden of schema UserAttributeResponse in response with status code 200 + + +#### getUserAttributeById + +- ##### What's New + - [Added] property customerOverridden of schema UserAttribute in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property customerOverriden of schema UserAttributeResponse in response with status code 200 + + +### Webhook + + + +#### downloadDeliveryReport + +- ##### What's Deprecated + - [Breaking] [Deleted] method downloadDeliveryReport + + + +#### pingWebhook + +- ##### What's Deprecated + - [Breaking] [Deleted] method pingWebhook + + + +#### getReportFilters + +- ##### What's Deprecated + - [Breaking] [Deleted] method getReportFilters + + + +#### getHistoricalReports + +- ##### What's Deprecated + - [Breaking] [Deleted] method getHistoricalReports + + + +#### cancelJobByName + +- ##### What's Deprecated + - [Breaking] [Deleted] method cancelJobByName + + + +#### getDeliveryReports + +- ##### What's Deprecated + - [Breaking] [Deleted] method getDeliveryReports + + + +#### fetchAllEventConfigurations + +- ##### What's New + - [Breaking] [Added] Value format date-time to property eventConfigs[].subscriberEventMapping.createdOn of schema SubscriberEventMapping in response with status code 200 + - [Added] property eventConfigs[].subscriberEventMapping.broadcasterConfig of schema SubscriberEventMapping in response with status code 200 + - [Breaking] [Added] Value format date-time to property eventConfigs[].createdOn of schema EventConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property eventConfigs[].updatedOn of schema EventConfig in response with status code 200 + - [Added] property eventConfigs[].type of schema EventConfig in response with status code 200 + - [Added] property eventConfigs[].modifiedBy of schema EventConfig in response with status code 200 + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property eventConfigs[].subscriberEventMapping.topic of schema SubscriberEventMapping in response with status code 200 + + +#### registerSubscriberToEventV2 + +- ##### What's New + - [Breaking] [Added] Possible values kafka,sqs,rest,event_bridge,pub_sub,temporal to property provider of schema SubscriberConfigPostRequestV2 in request body + - [Breaking] [Added] Type object to property association of schema Association in request body + - [Added] property events[].queue of schema Events in request body + - [Added] property events[].eventBridgeName of schema Events in request body + - [Added] property events[].workflowName of schema Events in request body + - [Added] property events[].detailType of schema Events in request body + - [Breaking] [Added] Possible values hmac to property authMeta.type of schema AuthMeta in request body + - [Breaking] [Added] Type object to property authMeta of schema AuthMeta in request body + - [Added] property type of schema SubscriberConfigPostRequestV2 in request body + - [Breaking] [Added] Possible values kafka,sqs,rest,event_bridge,pub_sub,temporal to property provider of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Type object to property association of schema AssociationResp in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedOn of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Possible values hmac to property authMeta.type of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Type object to property authMeta of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Type object to property of schema SubscriberConfigResult in response with status code 200 + - [Added] Security in Request + + +#### updateSubscriberV2 + +- ##### What's New + - [Breaking] [Added] Possible values kafka,sqs,rest,event_bridge,pub_sub,temporal to property provider of schema SubscriberConfigUpdateRequestV2 in request body + - [Breaking] [Added] Type object to property association of schema Association in request body + - [Added] property events[].queue of schema Events in request body + - [Added] property events[].eventBridgeName of schema Events in request body + - [Added] property events[].workflowName of schema Events in request body + - [Added] property events[].detailType of schema Events in request body + - [Breaking] [Added] Possible values hmac to property authMeta.type of schema AuthMeta in request body + - [Breaking] [Added] Type object to property authMeta of schema AuthMeta in request body + - [Added] property type of schema SubscriberConfigUpdateRequestV2 in request body + - [Breaking] [Added] Possible values kafka,sqs,rest,event_bridge,pub_sub,temporal to property provider of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Type object to property association of schema AssociationResp in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedOn of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Possible values hmac to property authMeta.type of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Type object to property authMeta of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Type object to property of schema SubscriberConfigResult in response with status code 200 + + +#### registerSubscriberToEvent + +- ##### What's New + - [Breaking] [Added] Type object to property association of schema Association in request body + - [Breaking] [Added] Possible values hmac to property authMeta.type of schema AuthMeta in request body + - [Breaking] [Added] Type object to property authMeta of schema AuthMeta in request body + - [Added] property type of schema SubscriberConfigPost in request body + - [Breaking] [Added] Possible values kafka,sqs,rest,event_bridge,pub_sub,temporal to property provider of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Type object to property association of schema AssociationResp in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedOn of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Possible values hmac to property authMeta.type of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Type object to property authMeta of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Type object to property of schema SubscriberConfigResult in response with status code 200 + + +#### getSubscribersByCompany + +- ##### What's New + - [Breaking] [Added] Possible values kafka,sqs,rest,event_bridge,pub_sub,temporal to property items[].provider of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Type object to property items[].association of schema AssociationResp in response with status code 200 + - [Added] Possible nullable value true to property items[].customHeaders of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedOn of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].createdOn of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Possible values hmac to property items[].authMeta.type of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Type object to property items[].authMeta of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].eventConfigs[].subscriberEventMapping.createdOn of schema SubscriberEventMapping in response with status code 200 + - [Added] property items[].eventConfigs[].subscriberEventMapping.broadcasterConfig of schema SubscriberEventMapping in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].eventConfigs[].createdOn of schema EventConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].eventConfigs[].updatedOn of schema EventConfig in response with status code 200 + - [Added] property items[].eventConfigs[].type of schema EventConfig in response with status code 200 + - [Added] property items[].eventConfigs[].modifiedBy of schema EventConfig in response with status code 200 + - [Breaking] [Added] Type object to property items[] of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Type object to property of schema SubscriberConfigList in response with status code 200 + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].eventConfigs[].subscriberEventMapping.topic of schema SubscriberEventMapping in response with status code 200 + + +#### updateSubscriberConfig + +- ##### What's New + - [Breaking] [Added] Type object to property association of schema Association in request body + - [Breaking] [Added] Possible values hmac to property authMeta.type of schema AuthMeta in request body + - [Breaking] [Added] Type object to property authMeta of schema AuthMeta in request body + - [Added] property type of schema SubscriberConfigUpdate in request body + - [Breaking] [Added] Possible values kafka,sqs,rest,event_bridge,pub_sub,temporal to property provider of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Type object to property association of schema AssociationResp in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedOn of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema SubscriberConfigResult in response with status code 200 + - [Breaking] [Added] Possible values hmac to property authMeta.type of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Type object to property authMeta of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Type object to property of schema SubscriberConfigResult in response with status code 200 + + +#### getSubscriberById + +- ##### What's New + - [Breaking] [Added] Possible values kafka,sqs,rest,event_bridge,pub_sub,temporal to property provider of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Type object to property association of schema AssociationResp in response with status code 200 + - [Added] Possible nullable value true to property customHeaders of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property updatedOn of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdOn of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Possible values hmac to property authMeta.type of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Type object to property authMeta of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property eventConfigs[].subscriberEventMapping.createdOn of schema SubscriberEventMapping in response with status code 200 + - [Added] property eventConfigs[].subscriberEventMapping.broadcasterConfig of schema SubscriberEventMapping in response with status code 200 + - [Breaking] [Added] Value format date-time to property eventConfigs[].createdOn of schema EventConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property eventConfigs[].updatedOn of schema EventConfig in response with status code 200 + - [Added] property eventConfigs[].type of schema EventConfig in response with status code 200 + - [Added] property eventConfigs[].modifiedBy of schema EventConfig in response with status code 200 + - [Breaking] [Added] Type object to property of schema SubscriberDetails in response with status code 200 + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property eventConfigs[].subscriberEventMapping.topic of schema SubscriberEventMapping in response with status code 200 + + +#### getSubscribersByExtensionId + +- ##### What's New + - [Breaking] [Added] Possible values kafka,sqs,rest,event_bridge,pub_sub,temporal to property items[].provider of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Type object to property items[].association of schema AssociationResp in response with status code 200 + - [Added] Possible nullable value true to property items[].customHeaders of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].updatedOn of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].createdOn of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Possible values hmac to property items[].authMeta.type of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Type object to property items[].authMeta of schema AuthMeta in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].eventConfigs[].subscriberEventMapping.createdOn of schema SubscriberEventMapping in response with status code 200 + - [Added] property items[].eventConfigs[].subscriberEventMapping.broadcasterConfig of schema SubscriberEventMapping in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].eventConfigs[].createdOn of schema EventConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property items[].eventConfigs[].updatedOn of schema EventConfig in response with status code 200 + - [Added] property items[].eventConfigs[].type of schema EventConfig in response with status code 200 + - [Added] property items[].eventConfigs[].modifiedBy of schema EventConfig in response with status code 200 + - [Breaking] [Added] Type object to property items[] of schema SubscriberDetails in response with status code 200 + - [Breaking] [Added] Type object to property of schema SubscriberConfigList in response with status code 200 + - [Added] Security in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].eventConfigs[].subscriberEventMapping.topic of schema SubscriberEventMapping in response with status code 200 + + +#### upsertSubscriberEvent + +- ##### What's New + - [Added] method upsertSubscriberEvent + + + +## Public Client + + + +### Configuration + + + +#### searchApplication + +- ##### What's New + - [Breaking] [Added] Value format date-time to property application.createdAt of schema Application in response with status code 200 + - [Breaking] [Added] Value format date-time to property application.updatedAt of schema Application in response with status code 200 + + +### Content + + + +#### getCredentialsByEntity + +- ##### What's New + - [Added] properties items[].configuration.token, items[].configuration.host in response with status code 200 + - [Breaking] [Added] Possible values partner,platform to property items[].entityType of schema CredentialSchema in response with status code 200 + - [Added] property items[].id of schema CredentialSchema in response with status code 200 + - [Added] property items[].updatedAt of schema CredentialSchema in response with status code 200 + - [Added] property items[].createdAt of schema CredentialSchema in response with status code 200 + - [Added] property items[].v of schema CredentialSchema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 4XX + + +#### getBasicDetails + +- ##### What's New + - [Added] method getBasicDetails + + + +#### getMenuContent + +- ##### What's New + - [Added] method getMenuContent + + + +#### getMenuContentByType + +- ##### What's New + - [Added] method getMenuContentByType + + + +#### getAnalyticsTags + +- ##### What's New + - [Added] method getAnalyticsTags + + + +#### getCustomPage + +- ##### What's New + - [Added] method getCustomPage + + + +#### getFooterContent + +- ##### What's New + - [Added] method getFooterContent + + + +#### getHomePageContent + +- ##### What's New + - [Added] method getHomePageContent + + + +#### getNavbar + +- ##### What's New + - [Added] method getNavbar + + + +#### getPricingBanner + +- ##### What's New + - [Added] method getPricingBanner + + + +#### getAllTags + +- ##### What's New + - [Added] method getAllTags + + + +### Partner + + + +#### getPanelExtensionDetails + +- ##### What's New + - [Breaking] [Added] Value format int64 to property plans[].recurring.recurringTime of schema Recurring in response with status code 200 + - [Breaking] [Added] Value format date-time to property createdAt of schema ExtensionUsingSlug in response with status code 200 + - [Breaking] [Added] Value format date-time to property modifiedAt of schema ExtensionUsingSlug in response with status code 200 + - [Breaking] [Added] Possible values free,one_time,recurring to property planType of schema ExtensionUsingSlug in response with status code 200 + + +### Webhook + + + +#### fetchAllWebhookEvents + +- ##### What's New + - [Breaking] [Added] Value format date-time to property eventConfigs[].createdOn of schema EventConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property eventConfigs[].updatedOn of schema EventConfig in response with status code 200 + + +#### queryWebhookEventDetails + +- ##### What's New + - [Breaking] [Added] Value format date-time to property eventConfigs[].createdOn of schema EventConfig in response with status code 200 + - [Breaking] [Added] Value format date-time to property eventConfigs[].updatedOn of schema EventConfig in response with status code 200 + + # CHANGE LOG (1.4.13) - 1.9.4 ## Application Client diff --git a/FDKClient.podspec b/FDKClient.podspec index 042ec7afdc..699eb5c165 100644 --- a/FDKClient.podspec +++ b/FDKClient.podspec @@ -5,7 +5,7 @@ Pod::Spec.new do |s| s.name = 'FDKClient' - s.version = '1.4.13' + s.version = '1.4.14' s.summary = 'FDK Client SDK for Swift language' s.description = 'FDK Client SDK for Swift language that can be used to make Apps or extensions.' diff --git a/Sources/code/application/ApplicationAPIClient.swift b/Sources/code/application/ApplicationAPIClient.swift index 493b96320c..ed21157457 100644 --- a/Sources/code/application/ApplicationAPIClient.swift +++ b/Sources/code/application/ApplicationAPIClient.swift @@ -13,7 +13,7 @@ class ApplicationAPIClient { var headers = [ (key: "Authorization", value: "Bearer " + "\(config.applicationId):\(config.applicationToken)".asBase64) ] - headers.append((key: "x-fp-sdk-version", value: "1.4.13")) + headers.append((key: "x-fp-sdk-version", value: "1.4.14")) headers.append(contentsOf: config.extraHeaders) if let userAgent = config.userAgent { headers.append((key: "User-Agent", value: userAgent)) diff --git a/Sources/code/application/ApplicationClient.swift b/Sources/code/application/ApplicationClient.swift index 26aa616e69..003d4b8d88 100644 --- a/Sources/code/application/ApplicationClient.swift +++ b/Sources/code/application/ApplicationClient.swift @@ -18,6 +18,8 @@ public class ApplicationClient { public let fileStorage: FileStorage + public let finance: Finance + public let lead: Lead public let logistic: Logistic @@ -54,6 +56,8 @@ public class ApplicationClient { fileStorage = FileStorage(config: config) + finance = Finance(config: config) + lead = Lead(config: config) logistic = Logistic(config: config) diff --git a/Sources/code/application/ApplicationEnums.swift b/Sources/code/application/ApplicationEnums.swift index 0e95ba4119..b3544caf72 100644 --- a/Sources/code/application/ApplicationEnums.swift +++ b/Sources/code/application/ApplicationEnums.swift @@ -22,6 +22,8 @@ public extension ApplicationClient.Content { + + public extension ApplicationClient.Lead { diff --git a/Sources/code/application/ApplicationModelsExtenstions.swift b/Sources/code/application/ApplicationModelsExtenstions.swift index 66e05809d7..f5e7bafcf3 100644 --- a/Sources/code/application/ApplicationModelsExtenstions.swift +++ b/Sources/code/application/ApplicationModelsExtenstions.swift @@ -130,6 +130,8 @@ public extension ApplicationClient.Content.ActionPage { + + public extension ApplicationClient.Theme.ActionPage { static func convertURLToAction(urlString: String) -> ApplicationClient.Theme.ActionPage? { diff --git a/Sources/code/application/ApplicationPageType.swift b/Sources/code/application/ApplicationPageType.swift index 58afdcd851..b283cf0f94 100644 --- a/Sources/code/application/ApplicationPageType.swift +++ b/Sources/code/application/ApplicationPageType.swift @@ -533,6 +533,8 @@ public extension ApplicationClient.Content { + + public extension ApplicationClient.Theme { enum PageType: String, Codable, CaseIterable { diff --git a/Sources/code/application/Client/CartApplicationClient.swift b/Sources/code/application/Client/CartApplicationClient.swift index 8256997e69..f928ca0b02 100644 --- a/Sources/code/application/Client/CartApplicationClient.swift +++ b/Sources/code/application/Client/CartApplicationClient.swift @@ -51,6 +51,8 @@ extension ApplicationClient { ulrs["getShipments"] = config.domain.appendAsPath("/service/application/cart/v1.0/shipment") + ulrs["checkoutCart"] = config.domain.appendAsPath("/service/application/cart/v1.0/checkout") + ulrs["updateCartMeta"] = config.domain.appendAsPath("/service/application/cart/v1.0/meta") ulrs["getCartShareLink"] = config.domain.appendAsPath("/service/application/cart/v1.0/share-cart") @@ -93,7 +95,7 @@ extension ApplicationClient { orderType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -156,7 +158,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -238,9 +240,9 @@ extension ApplicationClient { buyNow: Bool?, id: String?, orderType: String?, - body: AddCartRequest, + body: AddCartCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AddCartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AddCartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -295,7 +297,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AddCartDetailResponse.self, from: data) + let response = Utility.decode(AddCartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -321,9 +323,9 @@ extension ApplicationClient { buyNow: Bool?, cartType: String?, orderType: String?, - body: UpdateCartRequest, + body: UpdateCartCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdateCartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UpdateCartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -382,7 +384,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdateCartDetailResponse.self, from: data) + let response = Utility.decode(UpdateCartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -404,7 +406,7 @@ extension ApplicationClient { id: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DeleteCartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DeleteCartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -439,7 +441,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteCartDetailResponse.self, from: data) + let response = Utility.decode(DeleteCartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -462,7 +464,7 @@ extension ApplicationClient { buyNow: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartItemCountResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartItemCountResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -501,7 +503,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartItemCountResponse.self, from: data) + let response = Utility.decode(CartItemCountResult.self, from: data) onResponse(response, nil) } else { @@ -526,7 +528,7 @@ extension ApplicationClient { storeId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetCouponResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetCouponResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -573,7 +575,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetCouponResponse.self, from: data) + let response = Utility.decode(GetCouponResult.self, from: data) onResponse(response, nil) } else { @@ -598,9 +600,9 @@ extension ApplicationClient { id: String?, buyNow: Bool?, cartType: String?, - body: ApplyCouponRequest, + body: ApplyCoupon, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -655,7 +657,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -678,7 +680,7 @@ extension ApplicationClient { buyNow: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -717,7 +719,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -742,7 +744,7 @@ extension ApplicationClient { slug: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkPriceResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkPriceResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -789,7 +791,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkPriceResponse.self, from: data) + let response = Utility.decode(BulkPriceResult.self, from: data) onResponse(response, nil) } else { @@ -812,9 +814,9 @@ extension ApplicationClient { i: Bool?, b: Bool?, buyNow: Bool?, - body: RewardPointRequest, + body: RewardPointCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -861,7 +863,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -888,7 +890,7 @@ extension ApplicationClient { isDefault: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetAddressesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetAddressesResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -943,7 +945,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetAddressesResponse.self, from: data) + let response = Utility.decode(GetAddressesResult.self, from: data) onResponse(response, nil) } else { @@ -964,7 +966,7 @@ extension ApplicationClient { public func addAddress( body: Address, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SaveAddressResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SaveAddressResult?, _ error: FDKError?) -> Void ) { @@ -995,7 +997,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SaveAddressResponse.self, from: data) + let response = Utility.decode(SaveAddressResult.self, from: data) onResponse(response, nil) } else { @@ -1102,7 +1104,7 @@ extension ApplicationClient { id: String, body: Address, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdateAddressResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UpdateAddressResult?, _ error: FDKError?) -> Void ) { @@ -1135,7 +1137,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdateAddressResponse.self, from: data) + let response = Utility.decode(UpdateAddressResult.self, from: data) onResponse(response, nil) } else { @@ -1157,7 +1159,7 @@ extension ApplicationClient { id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DeleteAddressResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DeleteAddressResult?, _ error: FDKError?) -> Void ) { @@ -1190,7 +1192,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteAddressResponse.self, from: data) + let response = Utility.decode(DeleteAddressResult.self, from: data) onResponse(response, nil) } else { @@ -1213,9 +1215,9 @@ extension ApplicationClient { buyNow: Bool?, i: Bool?, b: Bool?, - body: SelectCartAddressRequest, + body: SelectCartAddressCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1262,7 +1264,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -1283,9 +1285,9 @@ extension ApplicationClient { public func selectPaymentMode( id: String?, buyNow: Bool?, - body: UpdateCartPaymentRequest, + body: UpdateCartPaymentCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1324,7 +1326,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -1463,7 +1465,7 @@ extension ApplicationClient { orderType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartShipmentsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartShipmentsResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1518,7 +1520,69 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartShipmentsResponse.self, from: data) + let response = Utility.decode(CartShipmentsResult.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Checkout cart + * Description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. + **/ + public func checkoutCart( + buyNow: Bool?, + cartType: String?, + body: CartCheckoutDetailCreation, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: CartCheckoutResult?, _ error: FDKError?) -> Void + ) { + + var xQuery: [String: Any] = [:] + + if let value = buyNow { + xQuery["buy_now"] = value + } + + if let value = cartType { + xQuery["cart_type"] = value + } + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + + let fullUrl = relativeUrls["checkoutCart"] ?? "" + + ApplicationAPIClient.execute( + config: config, + method: "POST", + url: fullUrl, + query: xQuery, + extraHeaders: xHeaders, + body: body.dictionary, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(CartCheckoutResult.self, from: data) onResponse(response, nil) } else { @@ -1539,9 +1603,9 @@ extension ApplicationClient { public func updateCartMeta( id: String?, buyNow: Bool?, - body: CartMetaRequest, + body: CartMetaCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartMetaResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartMetaResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1580,7 +1644,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartMetaResponse.self, from: data) + let response = Utility.decode(CartMetaResult.self, from: data) onResponse(response, nil) } else { @@ -1599,9 +1663,9 @@ extension ApplicationClient { * Description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. **/ public func getCartShareLink( - body: GetShareCartLinkRequest, + body: GetShareCartLinkCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetShareCartLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetShareCartLinkResult?, _ error: FDKError?) -> Void ) { @@ -1632,7 +1696,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetShareCartLinkResponse.self, from: data) + let response = Utility.decode(GetShareCartLinkResult.self, from: data) onResponse(response, nil) } else { @@ -1654,7 +1718,7 @@ extension ApplicationClient { token: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SharedCartResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SharedCartResult?, _ error: FDKError?) -> Void ) { @@ -1687,7 +1751,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SharedCartResponse.self, from: data) + let response = Utility.decode(SharedCartResult.self, from: data) onResponse(response, nil) } else { @@ -1710,7 +1774,7 @@ extension ApplicationClient { action: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SharedCartResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SharedCartResult?, _ error: FDKError?) -> Void ) { @@ -1745,7 +1809,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SharedCartResponse.self, from: data) + let response = Utility.decode(SharedCartResult.self, from: data) onResponse(response, nil) } else { @@ -1771,7 +1835,7 @@ extension ApplicationClient { cartType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PromotionOffersResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PromotionOffersResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1822,7 +1886,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PromotionOffersResponse.self, from: data) + let response = Utility.decode(PromotionOffersResult.self, from: data) onResponse(response, nil) } else { @@ -1914,7 +1978,7 @@ extension ApplicationClient { uid: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PromotionPaymentOffersResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PromotionPaymentOffersResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1953,7 +2017,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PromotionPaymentOffersResponse.self, from: data) + let response = Utility.decode(PromotionPaymentOffersResult.self, from: data) onResponse(response, nil) } else { @@ -1974,9 +2038,9 @@ extension ApplicationClient { public func checkoutCartV2( buyNow: Bool?, cartType: String?, - body: CartCheckoutDetailV2Request, + body: CartCheckoutDetailV2Creation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartCheckoutResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartCheckoutResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2015,7 +2079,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartCheckoutResponse.self, from: data) + let response = Utility.decode(CartCheckoutResult.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/application/Client/CatalogApplicationClient.swift b/Sources/code/application/Client/CatalogApplicationClient.swift index fab9aea37f..e54289cb3d 100644 --- a/Sources/code/application/Client/CatalogApplicationClient.swift +++ b/Sources/code/application/Client/CatalogApplicationClient.swift @@ -205,7 +205,7 @@ extension ApplicationClient { slug: [String], headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductsComparisonResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductsComparisonResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -237,7 +237,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductsComparisonResponse.self, from: data) + let response = Utility.decode(ProductsComparisonResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -259,7 +259,7 @@ extension ApplicationClient { slug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductCompareResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductCompareResponseSchema?, _ error: FDKError?) -> Void ) { @@ -292,7 +292,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductCompareResponse.self, from: data) + let response = Utility.decode(ProductCompareResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -314,7 +314,7 @@ extension ApplicationClient { slug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductFrequentlyComparedSimilarResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductFrequentlyComparedSimilarResponseSchema?, _ error: FDKError?) -> Void ) { @@ -347,7 +347,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductFrequentlyComparedSimilarResponse.self, from: data) + let response = Utility.decode(ProductFrequentlyComparedSimilarResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -369,7 +369,7 @@ extension ApplicationClient { slug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductVariantsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductVariantsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -402,7 +402,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductVariantsResponse.self, from: data) + let response = Utility.decode(ProductVariantsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -428,7 +428,7 @@ extension ApplicationClient { upc: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductStockStatusResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductStockStatusResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -479,7 +479,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductStockStatusResponse.self, from: data) + let response = Utility.decode(ProductStockStatusResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -608,7 +608,7 @@ extension ApplicationClient { pageType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -671,7 +671,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductListingResponse.self, from: data) + let response = Utility.decode(ProductListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -709,9 +709,9 @@ extension ApplicationClient { sortOn: String?, pageSize: Int?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "cursor") + let paginator = Paginator(pageSize: pageSize, type: "cursor") paginator.onPage = { self.getProducts( q: q, @@ -749,7 +749,7 @@ extension ApplicationClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BrandListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BrandListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -792,7 +792,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BrandListingResponse.self, from: data) + let response = Utility.decode(BrandListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -817,9 +817,9 @@ extension ApplicationClient { department: String?, pageSize: Int?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getBrands( department: department, @@ -849,7 +849,7 @@ extension ApplicationClient { slug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BrandDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BrandDetailResponseSchema?, _ error: FDKError?) -> Void ) { @@ -882,7 +882,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BrandDetailResponse.self, from: data) + let response = Utility.decode(BrandDetailResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -904,7 +904,7 @@ extension ApplicationClient { department: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CategoryListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CategoryListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -939,7 +939,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CategoryListingResponse.self, from: data) + let response = Utility.decode(CategoryListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -961,7 +961,7 @@ extension ApplicationClient { slug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CategoryMetaResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CategoryMetaResponseSchema?, _ error: FDKError?) -> Void ) { @@ -994,7 +994,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CategoryMetaResponse.self, from: data) + let response = Utility.decode(CategoryMetaResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1018,7 +1018,7 @@ extension ApplicationClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: HomeListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: HomeListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1061,7 +1061,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(HomeListingResponse.self, from: data) + let response = Utility.decode(HomeListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1086,9 +1086,9 @@ extension ApplicationClient { sortOn: String?, pageSize: Int?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "cursor") + let paginator = Paginator(pageSize: pageSize, type: "cursor") paginator.onPage = { self.getHomeProducts( sortOn: sortOn, @@ -1118,7 +1118,7 @@ extension ApplicationClient { public func getDepartments( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DepartmentResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DepartmentResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1149,7 +1149,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DepartmentResponse.self, from: data) + let response = Utility.decode(DepartmentResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1171,7 +1171,7 @@ extension ApplicationClient { q: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AutoCompleteResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AutoCompleteResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1203,7 +1203,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AutoCompleteResponse.self, from: data) + let response = Utility.decode(AutoCompleteResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1228,7 +1228,7 @@ extension ApplicationClient { q: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetCollectionListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetCollectionListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1275,7 +1275,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetCollectionListingResponse.self, from: data) + let response = Utility.decode(GetCollectionListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1303,9 +1303,9 @@ extension ApplicationClient { tag: [String]?, q: String?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getCollections( pageNo: paginator.pageNo, @@ -1344,7 +1344,7 @@ extension ApplicationClient { pageType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1409,7 +1409,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductListingResponse.self, from: data) + let response = Utility.decode(ProductListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1450,9 +1450,9 @@ extension ApplicationClient { sortOn: String?, pageSize: Int?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "cursor") + let paginator = Paginator(pageSize: pageSize, type: "cursor") paginator.onPage = { self.getCollectionItemsBySlug( slug: slug, @@ -1489,7 +1489,7 @@ extension ApplicationClient { slug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CollectionDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CollectionDetailResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1522,7 +1522,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CollectionDetailResponse.self, from: data) + let response = Utility.decode(CollectionDetailResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1546,7 +1546,7 @@ extension ApplicationClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetFollowListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetFollowListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1587,7 +1587,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetFollowListingResponse.self, from: data) + let response = Utility.decode(GetFollowListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1612,9 +1612,9 @@ extension ApplicationClient { collectionType: String, pageSize: Int?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "cursor") + let paginator = Paginator(pageSize: pageSize, type: "cursor") paginator.onPage = { self.getFollowedListing( collectionType: collectionType, @@ -1646,7 +1646,7 @@ extension ApplicationClient { collectionId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: FollowPostResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FollowPostResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1681,7 +1681,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(FollowPostResponse.self, from: data) + let response = Utility.decode(FollowPostResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1704,7 +1704,7 @@ extension ApplicationClient { collectionId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: FollowPostResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FollowPostResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1739,7 +1739,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(FollowPostResponse.self, from: data) + let response = Utility.decode(FollowPostResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1762,7 +1762,7 @@ extension ApplicationClient { collectionId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: FollowerCountResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FollowerCountResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1797,7 +1797,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(FollowerCountResponse.self, from: data) + let response = Utility.decode(FollowerCountResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1819,7 +1819,7 @@ extension ApplicationClient { collectionType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: FollowIdsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FollowIdsResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1854,7 +1854,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(FollowIdsResponse.self, from: data) + let response = Utility.decode(FollowIdsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1883,7 +1883,7 @@ extension ApplicationClient { tags: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: StoreListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: StoreListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1946,7 +1946,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(StoreListingResponse.self, from: data) + let response = Utility.decode(StoreListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1986,9 +1986,9 @@ extension ApplicationClient { longitude: Double?, tags: String?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getStores( pageNo: paginator.pageNo, diff --git a/Sources/code/application/Client/CommonApplicationClient.swift b/Sources/code/application/Client/CommonApplicationClient.swift index 275d9f2560..33c533c4a0 100644 --- a/Sources/code/application/Client/CommonApplicationClient.swift +++ b/Sources/code/application/Client/CommonApplicationClient.swift @@ -35,7 +35,7 @@ extension ApplicationClient { query: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ApplicationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ApplicationResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -74,7 +74,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ApplicationResponse.self, from: data) + let response = Utility.decode(ApplicationResponseSchema.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/application/Client/ConfigurationApplicationClient.swift b/Sources/code/application/Client/ConfigurationApplicationClient.swift index 4994d06aed..9117df6a41 100644 --- a/Sources/code/application/Client/ConfigurationApplicationClient.swift +++ b/Sources/code/application/Client/ConfigurationApplicationClient.swift @@ -113,7 +113,7 @@ extension ApplicationClient { public func getOwnerInfo( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ApplicationAboutResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ApplicationAboutResponseSchema?, _ error: FDKError?) -> Void ) { @@ -144,7 +144,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ApplicationAboutResponse.self, from: data) + let response = Utility.decode(ApplicationAboutResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -217,7 +217,7 @@ extension ApplicationClient { public func getIntegrationTokens( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AppTokenResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AppTokenResponseSchema?, _ error: FDKError?) -> Void ) { @@ -248,7 +248,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AppTokenResponse.self, from: data) + let response = Utility.decode(AppTokenResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -391,7 +391,7 @@ extension ApplicationClient { public func getFeatures( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AppFeatureResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AppFeatureResponseSchema?, _ error: FDKError?) -> Void ) { @@ -422,7 +422,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AppFeatureResponse.self, from: data) + let response = Utility.decode(AppFeatureResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -495,7 +495,7 @@ extension ApplicationClient { public func getCurrencies( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CurrenciesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CurrenciesResponseSchema?, _ error: FDKError?) -> Void ) { @@ -526,7 +526,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CurrenciesResponse.self, from: data) + let response = Utility.decode(CurrenciesResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -602,7 +602,7 @@ extension ApplicationClient { public func getAppCurrencies( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AppCurrencyResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AppCurrencyResponseSchema?, _ error: FDKError?) -> Void ) { @@ -633,7 +633,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AppCurrencyResponse.self, from: data) + let response = Utility.decode(AppCurrencyResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -654,7 +654,7 @@ extension ApplicationClient { public func getLanguages( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: LanguageResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: LanguageResponseSchema?, _ error: FDKError?) -> Void ) { @@ -685,7 +685,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(LanguageResponse.self, from: data) + let response = Utility.decode(LanguageResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -704,9 +704,9 @@ extension ApplicationClient { * Description: Reset cookie of ordering store. **/ public func getOrderingStoreCookie( - body: OrderingStoreSelectRequest, + body: OrderingStoreSelectRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessMessageResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessMessageResponseSchema?, _ error: FDKError?) -> Void ) { @@ -737,7 +737,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessMessageResponse.self, from: data) + let response = Utility.decode(SuccessMessageResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -758,7 +758,7 @@ extension ApplicationClient { public func removeOrderingStoreCookie( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessMessageResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessMessageResponseSchema?, _ error: FDKError?) -> Void ) { @@ -789,7 +789,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessMessageResponse.self, from: data) + let response = Utility.decode(SuccessMessageResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -816,7 +816,7 @@ extension ApplicationClient { userName: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AppStaffListResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AppStaffListResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -871,7 +871,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AppStaffListResponse.self, from: data) + let response = Utility.decode(AppStaffListResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -895,7 +895,7 @@ extension ApplicationClient { user: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AppStaffResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AppStaffResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -938,7 +938,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AppStaffResponse.self, from: data) + let response = Utility.decode(AppStaffResponseSchema.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/application/Client/ContentApplicationClient.swift b/Sources/code/application/Client/ContentApplicationClient.swift index 2270102b4f..faad9e9047 100644 --- a/Sources/code/application/Client/ContentApplicationClient.swift +++ b/Sources/code/application/Client/ContentApplicationClient.swift @@ -15,7 +15,7 @@ extension ApplicationClient { ulrs["getBlog"] = config.domain.appendAsPath("/service/application/content/v1.0/blogs/{slug}") - ulrs["getBlogs"] = config.domain.appendAsPath("/service/application/content/v1.0/blogs/") + ulrs["getBlogs"] = config.domain.appendAsPath("/service/application/content/v1.0/blogs") ulrs["getDataLoaders"] = config.domain.appendAsPath("/service/application/content/v1.0/data-loader") @@ -33,13 +33,13 @@ extension ApplicationClient { ulrs["getLegalInformation"] = config.domain.appendAsPath("/service/application/content/v1.0/legal") - ulrs["getNavigations"] = config.domain.appendAsPath("/service/application/content/v1.0/navigations/") + ulrs["getNavigations"] = config.domain.appendAsPath("/service/application/content/v1.0/navigations") ulrs["getSEOConfiguration"] = config.domain.appendAsPath("/service/application/content/v1.0/seo") ulrs["getSEOMarkupSchemas"] = config.domain.appendAsPath("/service/application/content/v1.0/seo/schema") - ulrs["getSlideshows"] = config.domain.appendAsPath("/service/application/content/v1.0/slideshow/") + ulrs["getSlideshows"] = config.domain.appendAsPath("/service/application/content/v1.0/slideshow") ulrs["getSlideshow"] = config.domain.appendAsPath("/service/application/content/v1.0/slideshow/{slug}") @@ -49,11 +49,11 @@ extension ApplicationClient { ulrs["getPage"] = config.domain.appendAsPath("/service/application/content/v2.0/pages/{slug}") - ulrs["getPages"] = config.domain.appendAsPath("/service/application/content/v2.0/pages/") + ulrs["getPages"] = config.domain.appendAsPath("/service/application/content/v2.0/pages") - ulrs["getCustomObject"] = config.domain.appendAsPath("/service/application/content/v1.0/metaobjects/{metaobject_id}") + ulrs["getCustomObjectBySlug"] = config.domain.appendAsPath("/service/application/content/v2.0/customobjects/definition/{definition_slug}/entries/{slug}") - ulrs["getCustomFields"] = config.domain.appendAsPath("/service/application/content/v1.0/metafields/{resource}/{resource_id}") + ulrs["getCustomFieldsByResourceId"] = config.domain.appendAsPath("/service/application/content/v2.0/customfields/resource/{resource}/{resource_slug}") self.relativeUrls = ulrs } @@ -125,6 +125,7 @@ extension ApplicationClient { public func getBlog( slug: String, rootId: String?, + preview: Bool?, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: BlogSchema?, _ error: FDKError?) -> Void @@ -136,6 +137,10 @@ extension ApplicationClient { xQuery["root_id"] = value } + if let value = preview { + xQuery["preview"] = value + } + var xHeaders: [(key: String, value: String)] = [] @@ -189,7 +194,7 @@ extension ApplicationClient { search: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BlogGetResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BlogGetDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -236,7 +241,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BlogGetResponse.self, from: data) + let response = Utility.decode(BlogGetDetails.self, from: data) onResponse(response, nil) } else { @@ -684,7 +689,7 @@ extension ApplicationClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: NavigationGetResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: NavigationGetDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -723,7 +728,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(NavigationGetResponse.self, from: data) + let response = Utility.decode(NavigationGetDetails.self, from: data) onResponse(response, nil) } else { @@ -860,7 +865,7 @@ extension ApplicationClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SlideshowGetResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SlideshowGetDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -899,7 +904,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SlideshowGetResponse.self, from: data) + let response = Utility.decode(SlideshowGetDetails.self, from: data) onResponse(response, nil) } else { @@ -912,37 +917,6 @@ extension ApplicationClient { } - - /** - * - * Summary: get paginator for getSlideshows - * Description: fetch the next page by calling .next(...) function - **/ - public func getSlideshowsPaginator( - pageSize: Int?, - headers: [(key: String, value: String)]? = nil - ) -> Paginator { - let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") - paginator.onPage = { - self.getSlideshows( - pageNo: paginator.pageNo, - pageSize: paginator.pageSize, - - headers: headers - ) { response, error in - if let response = response { - paginator.hasNext = response.page?.hasNext ?? false - paginator.pageNo = (paginator.pageNo ?? 0) + 1 - } - paginator.onNext?(response, error) - } - } - return paginator - } - - - /** * * Summary: Get a Slideshow @@ -1172,7 +1146,7 @@ extension ApplicationClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PageGetResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PageGetDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1211,7 +1185,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PageGetResponse.self, from: data) + let response = Utility.decode(PageGetDetails.self, from: data) onResponse(response, nil) } else { @@ -1226,11 +1200,12 @@ extension ApplicationClient { /** * - * Summary: Get custom object - * Description: Get details of custom objects, their field details, definitions, and references can be obtained using this endpoint. + * Summary: Get custom object details + * Description: Details of a custom object entry can be obtained using this endpoint. **/ - public func getCustomObject( - metaobjectId: String, + public func getCustomObjectBySlug( + definitionSlug: String, + slug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomObjectByIdSchema?, _ error: FDKError?) -> Void @@ -1245,9 +1220,11 @@ extension ApplicationClient { xHeaders.append(contentsOf: headers) } - var fullUrl = relativeUrls["getCustomObject"] ?? "" + var fullUrl = relativeUrls["getCustomObjectBySlug"] ?? "" - fullUrl = fullUrl.replacingOccurrences(of: "{" + "metaobject_id" + "}", with: "\(metaobjectId)") + fullUrl = fullUrl.replacingOccurrences(of: "{" + "definition_slug" + "}", with: "\(definitionSlug)") + + fullUrl = fullUrl.replacingOccurrences(of: "{" + "slug" + "}", with: "\(slug)") ApplicationAPIClient.execute( config: config, @@ -1281,12 +1258,12 @@ extension ApplicationClient { /** * - * Summary: Get list of custom fields - * Description: List custom fields attached to a particular resource by using the resource. + * Summary: Get list of custom fields of given resource and resource slug + * Description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. **/ - public func getCustomFields( + public func getCustomFieldsByResourceId( resource: String, - resourceId: String, + resourceSlug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomFieldsResponseByResourceIdSchema?, _ error: FDKError?) -> Void @@ -1301,11 +1278,11 @@ extension ApplicationClient { xHeaders.append(contentsOf: headers) } - var fullUrl = relativeUrls["getCustomFields"] ?? "" + var fullUrl = relativeUrls["getCustomFieldsByResourceId"] ?? "" fullUrl = fullUrl.replacingOccurrences(of: "{" + "resource" + "}", with: "\(resource)") - fullUrl = fullUrl.replacingOccurrences(of: "{" + "resource_id" + "}", with: "\(resourceId)") + fullUrl = fullUrl.replacingOccurrences(of: "{" + "resource_slug" + "}", with: "\(resourceSlug)") ApplicationAPIClient.execute( config: config, diff --git a/Sources/code/application/Client/FileStorageApplicationClient.swift b/Sources/code/application/Client/FileStorageApplicationClient.swift index 0422d59ce2..cd91eae55f 100644 --- a/Sources/code/application/Client/FileStorageApplicationClient.swift +++ b/Sources/code/application/Client/FileStorageApplicationClient.swift @@ -11,9 +11,9 @@ extension ApplicationClient { self.config = config; var ulrs = [String: String]() - ulrs["startUpload"] = config.domain.appendAsPath("/service/application/assets/v1.0/namespaces/{namespace}/upload/start") + ulrs["startUpload"] = config.domain.appendAsPath("/service/application/assets/v2.0/namespaces/{namespace}/upload/start") - ulrs["completeUpload"] = config.domain.appendAsPath("/service/application/assets/v1.0/namespaces/{namespace}/upload/complete") + ulrs["completeUpload"] = config.domain.appendAsPath("/service/application/assets/v2.0/namespaces/{namespace}/upload/complete") ulrs["signUrls"] = config.domain.appendAsPath("/service/application/assets/v1.0/sign-urls") @@ -34,9 +34,9 @@ extension ApplicationClient { **/ public func startUpload( namespace: String, - body: StartRequest, + body: FileUploadStart, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: StartResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileUpload?, _ error: FDKError?) -> Void ) { @@ -69,7 +69,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(StartResponse.self, from: data) + let response = Utility.decode(FileUpload.self, from: data) onResponse(response, nil) } else { @@ -84,15 +84,15 @@ extension ApplicationClient { /** * - * Summary: Complete file upload + * Summary: Finalizes upload process. * Description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database. **/ public func completeUpload( namespace: String, - body: StartResponse, + body: FileUpload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CompleteResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileUploadComplete?, _ error: FDKError?) -> Void ) { @@ -125,7 +125,7 @@ Complete the file upload and store the file details such as name, size, content onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CompleteResponse.self, from: data) + let response = Utility.decode(FileUploadComplete.self, from: data) onResponse(response, nil) } else { @@ -140,13 +140,13 @@ Complete the file upload and store the file details such as name, size, content /** * - * Summary: Get signed URLs + * Summary: Signs file URLs. * Description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. **/ public func signUrls( - body: SignUrlRequest, + body: SignUrl, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SignUrlResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SignUrlResult?, _ error: FDKError?) -> Void ) { @@ -177,7 +177,7 @@ Complete the file upload and store the file details such as name, size, content onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SignUrlResponse.self, from: data) + let response = Utility.decode(SignUrlResult.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/application/Client/FinanceApplicationClient.swift b/Sources/code/application/Client/FinanceApplicationClient.swift new file mode 100644 index 0000000000..e8eeeecd03 --- /dev/null +++ b/Sources/code/application/Client/FinanceApplicationClient.swift @@ -0,0 +1,130 @@ +import Foundation + +extension ApplicationClient { + + public class Finance { + + var config: ApplicationConfig + var relativeUrls = [String: String]() + + init(config: ApplicationConfig) { + self.config = config; + var ulrs = [String: String]() + + ulrs["customerCreditBalance"] = config.domain.appendAsPath("/service/application/finance/v1.0/customer-credit-balance") + + ulrs["lockUnlockCreditNote"] = config.domain.appendAsPath("/service/application/finance/v1.0/lock-unlock-credit-note") + + self.relativeUrls = ulrs + } + public func update(updatedUrl : [String: String]){ + for (key, value) in updatedUrl{ + self.relativeUrls[key] = value + } + } + + + + /** + * + * Summary: This API will provide customer's credit balance against phone number or email and seller*affiliate id + * Description: This API will provide customer's credit balance against phone number or email and seller*affiliate id + **/ + public func customerCreditBalance( + body: CustomerCreditBalanceRequestSchema, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: CustomerCreditBalanceResponseSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + + let fullUrl = relativeUrls["customerCreditBalance"] ?? "" + + ApplicationAPIClient.execute( + config: config, + method: "POST", + url: fullUrl, + query: nil, + extraHeaders: xHeaders, + body: body.dictionary, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(CustomerCreditBalanceResponseSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Lock or Unlock requested credit note. + * Description: Used to lock or unlock requested credit note. + **/ + public func lockUnlockCreditNote( + body: LockUnlockRequestSchema, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: LockUnlockResponseSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + + let fullUrl = relativeUrls["lockUnlockCreditNote"] ?? "" + + ApplicationAPIClient.execute( + config: config, + method: "POST", + url: fullUrl, + query: nil, + extraHeaders: xHeaders, + body: body.dictionary, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(LockUnlockResponseSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + }} +} \ No newline at end of file diff --git a/Sources/code/application/Client/LeadApplicationClient.swift b/Sources/code/application/Client/LeadApplicationClient.swift index 13c5d96a3e..2894210c75 100644 --- a/Sources/code/application/Client/LeadApplicationClient.swift +++ b/Sources/code/application/Client/LeadApplicationClient.swift @@ -257,7 +257,7 @@ extension ApplicationClient { slug: String, body: CustomFormSubmissionPayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SubmitCustomFormResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SubmitCustomFormDetails?, _ error: FDKError?) -> Void ) { @@ -290,7 +290,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SubmitCustomFormResponse.self, from: data) + let response = Utility.decode(SubmitCustomFormDetails.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/application/Client/LogisticApplicationClient.swift b/Sources/code/application/Client/LogisticApplicationClient.swift index 06428462da..55892989ba 100644 --- a/Sources/code/application/Client/LogisticApplicationClient.swift +++ b/Sources/code/application/Client/LogisticApplicationClient.swift @@ -21,12 +21,16 @@ extension ApplicationClient { ulrs["getOptimalLocations"] = config.domain.appendAsPath("/service/application/logistics/v1.0/reassign_stores") + ulrs["getCourierPartners"] = config.domain.appendAsPath("/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipment/courier-partners") + ulrs["getLocations"] = config.domain.appendAsPath("/service/application/logistics/v1.0/locations") ulrs["getCountries"] = config.domain.appendAsPath("/service/application/logistics/v2.0/countries") ulrs["getCountry"] = config.domain.appendAsPath("/service/application/logistics/v1.0/countries/{country_iso_code}") + ulrs["getDeliveryPromise"] = config.domain.appendAsPath("/service/application/logistics/v1.0/delivery-promise") + ulrs["getLocalities"] = config.domain.appendAsPath("/service/application/logistics/v1.0/localities/{locality_type}") ulrs["getLocality"] = config.domain.appendAsPath("/service/application/logistics/v1.0/localities/{locality_type}/{locality_value}") @@ -52,7 +56,7 @@ extension ApplicationClient { pincode: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PincodeApiResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PincodeDetails?, _ error: FDKError?) -> Void ) { @@ -85,7 +89,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PincodeApiResponse.self, from: data) + let response = Utility.decode(PincodeDetails.self, from: data) onResponse(response, nil) } else { @@ -104,9 +108,9 @@ extension ApplicationClient { * Description: Get the estimated delivery time frame for a specific product from a designated store. **/ public func getTatProduct( - body: TATViewRequest, + body: TATViewDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: TATViewResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: TATViewResult?, _ error: FDKError?) -> Void ) { @@ -137,7 +141,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(TATViewResponse.self, from: data) + let response = Utility.decode(TATViewResult.self, from: data) onResponse(response, nil) } else { @@ -158,7 +162,7 @@ extension ApplicationClient { public func getAllCountries( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CountryListResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CountryListResult?, _ error: FDKError?) -> Void ) { @@ -189,7 +193,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CountryListResponse.self, from: data) + let response = Utility.decode(CountryListResult.self, from: data) onResponse(response, nil) } else { @@ -208,9 +212,9 @@ extension ApplicationClient { * Description: Get the delivery zone associated with a given pincode. **/ public func getPincodeZones( - body: GetZoneFromPincodeViewRequest, + body: GetZoneFromPincodeViewDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetZoneFromPincodeViewResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetZoneFromPincodeViewResult?, _ error: FDKError?) -> Void ) { @@ -241,7 +245,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetZoneFromPincodeViewResponse.self, from: data) + let response = Utility.decode(GetZoneFromPincodeViewResult.self, from: data) onResponse(response, nil) } else { @@ -260,9 +264,9 @@ extension ApplicationClient { * Description: Get optimal fulfillment centre for customers by analyzing their location, product availability, and inventory levels. **/ public func getOptimalLocations( - body: ReAssignStoreRequest, + body: ReAssignStoreDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ReAssignStoreResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ReAssignStoreResult?, _ error: FDKError?) -> Void ) { @@ -293,7 +297,65 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ReAssignStoreResponse.self, from: data) + let response = Utility.decode(ReAssignStoreResult.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Serviceable Courier Partners. + * Description: Get all the serviceable courier partners of a destination and the shipments. + **/ + public func getCourierPartners( + companyId: Int, + applicationId: String, + body: ShipmentCourierPartnerDetails, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: ShipmentCourierPartnerResult?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + + var fullUrl = relativeUrls["getCourierPartners"] ?? "" + + fullUrl = fullUrl.replacingOccurrences(of: "{" + "company_id" + "}", with: "\(companyId)") + + fullUrl = fullUrl.replacingOccurrences(of: "{" + "application_id" + "}", with: "\(applicationId)") + + ApplicationAPIClient.execute( + config: config, + method: "POST", + url: fullUrl, + query: nil, + extraHeaders: xHeaders, + body: body.dictionary, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(ShipmentCourierPartnerResult.self, from: data) onResponse(response, nil) } else { @@ -323,7 +385,7 @@ extension ApplicationClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetStoreResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetStoreResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -384,7 +446,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetStoreResponse.self, from: data) + let response = Utility.decode(GetStoreResult.self, from: data) onResponse(response, nil) } else { @@ -407,6 +469,7 @@ extension ApplicationClient { pageNo: Int?, pageSize: Int?, q: String?, + hierarchy: String?, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: GetCountries?, _ error: FDKError?) -> Void @@ -430,6 +493,10 @@ extension ApplicationClient { xQuery["q"] = value } + if let value = hierarchy { + xQuery["hierarchy"] = value + } + var xHeaders: [(key: String, value: String)] = [] @@ -524,6 +591,68 @@ extension ApplicationClient { } + /** + * + * Summary: Get delivery promise + * Description: Get delivery promises for both global and store levels based on a specific locality type. + **/ + public func getDeliveryPromise( + pageNo: Int?, + pageSize: Int?, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: GetPromiseDetails?, _ error: FDKError?) -> Void + ) { + + var xQuery: [String: Any] = [:] + + if let value = pageNo { + xQuery["page_no"] = value + } + + if let value = pageSize { + xQuery["page_size"] = value + } + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + + let fullUrl = relativeUrls["getDeliveryPromise"] ?? "" + + ApplicationAPIClient.execute( + config: config, + method: "GET", + url: fullUrl, + query: xQuery, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(GetPromiseDetails.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + /** * * Summary: Get localities @@ -690,9 +819,9 @@ extension ApplicationClient { public func validateAddress( countryIsoCode: String, templateName: String, - body: ValidateAddressRequest, + body: ValidateAddressDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ValidateAddressRequest?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ValidateAddressDetails?, _ error: FDKError?) -> Void ) { @@ -727,7 +856,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ValidateAddressRequest.self, from: data) + let response = Utility.decode(ValidateAddressDetails.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/application/Client/OrderApplicationClient.swift b/Sources/code/application/Client/OrderApplicationClient.swift index 22f2bd44fc..7887c932ce 100644 --- a/Sources/code/application/Client/OrderApplicationClient.swift +++ b/Sources/code/application/Client/OrderApplicationClient.swift @@ -15,6 +15,8 @@ extension ApplicationClient { ulrs["getOrderById"] = config.domain.appendAsPath("/service/application/order/v1.0/orders/{order_id}") + ulrs["getPosOrderById"] = config.domain.appendAsPath("/service/application/order/v1.0/orders/pos-order/{order_id}") + ulrs["getShipmentById"] = config.domain.appendAsPath("/service/application/order/v1.0/orders/shipments/{shipment_id}") ulrs["getInvoiceByShipmentId"] = config.domain.appendAsPath("/service/application/order/v1.0/orders/shipments/{shipment_id}/invoice") @@ -200,6 +202,61 @@ extension ApplicationClient { } + /** + * + * Summary: Retrieves POS order details + * Description: Retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID. + **/ + public func getPosOrderById( + orderId: String, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: OrderById?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + + var fullUrl = relativeUrls["getPosOrderById"] ?? "" + + fullUrl = fullUrl.replacingOccurrences(of: "{" + "order_id" + "}", with: "\(orderId)") + + ApplicationAPIClient.execute( + config: config, + method: "GET", + url: fullUrl, + query: nil, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(OrderById.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + /** * * Summary: Get a Shipment @@ -380,7 +437,7 @@ extension ApplicationClient { shipmentId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomerDetailsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomerDetailsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -415,7 +472,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomerDetailsResponse.self, from: data) + let response = Utility.decode(CustomerDetailsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -438,7 +495,7 @@ extension ApplicationClient { shipmentId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SendOtpToCustomerResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SendOtpToCustomerResponseSchema?, _ error: FDKError?) -> Void ) { @@ -473,7 +530,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SendOtpToCustomerResponse.self, from: data) + let response = Utility.decode(SendOtpToCustomerResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -496,7 +553,7 @@ extension ApplicationClient { shipmentId: String, body: VerifyOtp, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: VerifyOtpResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: VerifyOtpResponseSchema?, _ error: FDKError?) -> Void ) { @@ -531,7 +588,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(VerifyOtpResponse.self, from: data) + let response = Utility.decode(VerifyOtpResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -664,9 +721,9 @@ extension ApplicationClient { **/ public func updateShipmentStatus( shipmentId: String, - body: UpdateShipmentStatusRequest, + body: UpdateShipmentStatusRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ShipmentApplicationStatusResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ShipmentApplicationStatusResponseSchema?, _ error: FDKError?) -> Void ) { @@ -699,7 +756,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ShipmentApplicationStatusResponse.self, from: data) + let response = Utility.decode(ShipmentApplicationStatusResponseSchema.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/application/Client/PaymentApplicationClient.swift b/Sources/code/application/Client/PaymentApplicationClient.swift index 7731b2faa5..b6fe3630a2 100644 --- a/Sources/code/application/Client/PaymentApplicationClient.swift +++ b/Sources/code/application/Client/PaymentApplicationClient.swift @@ -123,7 +123,7 @@ extension ApplicationClient { refresh: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AggregatorsConfigDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AggregatorsConfigDetail?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -162,7 +162,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AggregatorsConfigDetailResponse.self, from: data) + let response = Utility.decode(AggregatorsConfigDetail.self, from: data) onResponse(response, nil) } else { @@ -181,9 +181,9 @@ extension ApplicationClient { * Description: Link payment card to a user account for seamless transactions. Upon successful linking, the card becomes associated with the user's profile, enabling secure and convenient payments. **/ public func attachCardToCustomer( - body: AttachCardRequest, + body: AttachCard, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AttachCardsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AttachCardsDetails?, _ error: FDKError?) -> Void ) { @@ -214,7 +214,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AttachCardsResponse.self, from: data) + let response = Utility.decode(AttachCardsDetails.self, from: data) onResponse(response, nil) } else { @@ -236,7 +236,7 @@ extension ApplicationClient { refresh: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ActiveCardPaymentGatewayResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ActiveCardPaymentGatewayDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -271,7 +271,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ActiveCardPaymentGatewayResponse.self, from: data) + let response = Utility.decode(ActiveCardPaymentGatewayDetails.self, from: data) onResponse(response, nil) } else { @@ -293,7 +293,7 @@ extension ApplicationClient { forceRefresh: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ListCardsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ListCardsDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -328,7 +328,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ListCardsResponse.self, from: data) + let response = Utility.decode(ListCardsDetails.self, from: data) onResponse(response, nil) } else { @@ -347,9 +347,9 @@ extension ApplicationClient { * Description: Delete payment card from the user's account. **/ public func deleteUserCard( - body: DeletehCardRequest, + body: DeleteCard, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DeleteCardsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DeleteCardsDetails?, _ error: FDKError?) -> Void ) { @@ -380,7 +380,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteCardsResponse.self, from: data) + let response = Utility.decode(DeleteCardsDetails.self, from: data) onResponse(response, nil) } else { @@ -399,9 +399,9 @@ extension ApplicationClient { * Description: Verify if the user is eligible for pay-later payment from the payment aggregator side using the customer's phone number. **/ public func verifyCustomerForPayment( - body: ValidateCustomerRequest, + body: ValidateCustomer, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ValidateCustomerResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ValidateCustomerDetails?, _ error: FDKError?) -> Void ) { @@ -432,7 +432,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ValidateCustomerResponse.self, from: data) + let response = Utility.decode(ValidateCustomerDetails.self, from: data) onResponse(response, nil) } else { @@ -451,9 +451,9 @@ extension ApplicationClient { * Description: Verify the payment status and charge from the customer's BNPL (Buy Now, Pay Later) account after order confirmation. **/ public func verifyAndChargePayment( - body: ChargeCustomerRequest, + body: ChargeCustomer, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ChargeCustomerResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ChargeCustomerDetails?, _ error: FDKError?) -> Void ) { @@ -484,7 +484,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ChargeCustomerResponse.self, from: data) + let response = Utility.decode(ChargeCustomerDetails.self, from: data) onResponse(response, nil) } else { @@ -503,9 +503,9 @@ extension ApplicationClient { * Description: Initiate the payment procedure for an order. Upon successful initiation, it returns a details including the success status, aggregator information, payment method, status, merchant order ID aggregator order , polling URL, timeout, virtual ID, Razorpay payment ID, customer ID, and device ID. **/ public func initialisePayment( - body: PaymentInitializationRequest, + body: PaymentInitialization, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentInitializationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentInitializationDetails?, _ error: FDKError?) -> Void ) { @@ -536,7 +536,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentInitializationResponse.self, from: data) + let response = Utility.decode(PaymentInitializationDetails.self, from: data) onResponse(response, nil) } else { @@ -555,9 +555,9 @@ extension ApplicationClient { * Description: Polling process to confirm the payment status. It periodically checks and updates the current status of a payment, ensuring timely and accurate confirmation of payment transactions. **/ public func checkAndUpdatePaymentStatus( - body: PaymentStatusUpdateRequest, + body: PaymentStatusUpdate, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentStatusUpdateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentStatusUpdateDetails?, _ error: FDKError?) -> Void ) { @@ -588,7 +588,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentStatusUpdateResponse.self, from: data) + let response = Utility.decode(PaymentStatusUpdateDetails.self, from: data) onResponse(response, nil) } else { @@ -619,7 +619,7 @@ extension ApplicationClient { shipmentId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentModeRouteResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentModeRouteDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -687,7 +687,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentModeRouteResponse.self, from: data) + let response = Utility.decode(PaymentModeRouteDetails.self, from: data) onResponse(response, nil) } else { @@ -716,7 +716,7 @@ extension ApplicationClient { userDetails: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentModeRouteResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentModeRouteDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -770,7 +770,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentModeRouteResponse.self, from: data) + let response = Utility.decode(PaymentModeRouteDetails.self, from: data) onResponse(response, nil) } else { @@ -947,7 +947,7 @@ extension ApplicationClient { public func getRupifiBannerDetails( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RupifiBannerResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RupifiBannerDetails?, _ error: FDKError?) -> Void ) { @@ -978,7 +978,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RupifiBannerResponse.self, from: data) + let response = Utility.decode(RupifiBannerDetails.self, from: data) onResponse(response, nil) } else { @@ -999,7 +999,7 @@ extension ApplicationClient { public func getEpaylaterBannerDetails( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EpaylaterBannerResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EpaylaterBannerDetails?, _ error: FDKError?) -> Void ) { @@ -1030,7 +1030,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EpaylaterBannerResponse.self, from: data) + let response = Utility.decode(EpaylaterBannerDetails.self, from: data) onResponse(response, nil) } else { @@ -1049,9 +1049,9 @@ extension ApplicationClient { * Description: Resend or cancel payment link that have been initiated but may require modification or cancellation for various reasons, ensuring flexibility and control in payment processing. **/ public func resendOrCancelPayment( - body: ResendOrCancelPaymentRequest, + body: ResendOrCancelPayment, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ResendOrCancelPaymentResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ResendOrCancelPaymentDetails?, _ error: FDKError?) -> Void ) { @@ -1082,7 +1082,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ResendOrCancelPaymentResponse.self, from: data) + let response = Utility.decode(ResendOrCancelPaymentDetails.self, from: data) onResponse(response, nil) } else { @@ -1101,9 +1101,9 @@ extension ApplicationClient { * Description: Render HTML for a payment aggregator page. **/ public func renderHTML( - body: renderHTMLRequest, + body: RenderHTML, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: renderHTMLResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RenderHTMLDetails?, _ error: FDKError?) -> Void ) { @@ -1134,7 +1134,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(renderHTMLResponse.self, from: data) + let response = Utility.decode(RenderHTMLDetails.self, from: data) onResponse(response, nil) } else { @@ -1153,9 +1153,9 @@ extension ApplicationClient { * Description: Validate if a Virtual Payment Address (VPA) is valid for processing payments and returns the validation result.is_valid boolean value indicating whether the VPA is valid for payments. **/ public func validateVPA( - body: ValidateVPARequest, + body: ValidateVPA, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ValidateVPAResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ValidateVPADetails?, _ error: FDKError?) -> Void ) { @@ -1186,7 +1186,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ValidateVPAResponse.self, from: data) + let response = Utility.decode(ValidateVPADetails.self, from: data) onResponse(response, nil) } else { @@ -1209,7 +1209,7 @@ extension ApplicationClient { aggregator: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CardDetailsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CardDetailsFetchedDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1246,7 +1246,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CardDetailsResponse.self, from: data) + let response = Utility.decode(CardDetailsFetchedDetails.self, from: data) onResponse(response, nil) } else { @@ -1267,7 +1267,7 @@ extension ApplicationClient { public func getActiveRefundTransferModes( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: TransferModeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: TransferModeFetchDetails?, _ error: FDKError?) -> Void ) { @@ -1298,7 +1298,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(TransferModeResponse.self, from: data) + let response = Utility.decode(TransferModeFetchDetails.self, from: data) onResponse(response, nil) } else { @@ -1317,9 +1317,9 @@ extension ApplicationClient { * Description: Enable/Disable a particular refund transfer mode based on the request body parameters, indicating whether the mode should be enabled or disabled. **/ public func enableOrDisableRefundTransferMode( - body: UpdateRefundTransferModeRequest, + body: UpdateRefundTransferMode, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdateRefundTransferModeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RefundTransferModeUpdateDetails?, _ error: FDKError?) -> Void ) { @@ -1350,7 +1350,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdateRefundTransferModeResponse.self, from: data) + let response = Utility.decode(RefundTransferModeUpdateDetails.self, from: data) onResponse(response, nil) } else { @@ -1372,7 +1372,7 @@ extension ApplicationClient { orderId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OrderBeneficiaryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OrderBeneficiaryFetchDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1404,7 +1404,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OrderBeneficiaryResponse.self, from: data) + let response = Utility.decode(OrderBeneficiaryFetchDetails.self, from: data) onResponse(response, nil) } else { @@ -1426,7 +1426,7 @@ extension ApplicationClient { ifscCode: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: IfscCodeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: IfscCodeDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1461,7 +1461,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(IfscCodeResponse.self, from: data) + let response = Utility.decode(IfscCodeDetails.self, from: data) onResponse(response, nil) } else { @@ -1483,7 +1483,7 @@ extension ApplicationClient { orderId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OrderBeneficiaryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OrderBeneficiaryFetchDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1515,7 +1515,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OrderBeneficiaryResponse.self, from: data) + let response = Utility.decode(OrderBeneficiaryFetchDetails.self, from: data) onResponse(response, nil) } else { @@ -1534,9 +1534,9 @@ extension ApplicationClient { * Description: Verify the OTP provided by the user and adds a bank beneficiary for refund processing. **/ public func verifyOtpAndAddBeneficiaryForBank( - body: AddBeneficiaryViaOtpVerificationRequest, + body: AddBeneficiaryViaOtpVerification, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AddBeneficiaryViaOtpVerificationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AddBeneficiaryViaOtpVerificationDetails?, _ error: FDKError?) -> Void ) { @@ -1567,7 +1567,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AddBeneficiaryViaOtpVerificationResponse.self, from: data) + let response = Utility.decode(AddBeneficiaryViaOtpVerificationDetails.self, from: data) onResponse(response, nil) } else { @@ -1586,9 +1586,9 @@ extension ApplicationClient { * Description: Add beneficiary details specifically for refund transactions, including account holder name, account number and bank details. **/ public func addBeneficiaryDetails( - body: AddBeneficiaryDetailsRequest, + body: AddBeneficiaryDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RefundAccountResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RefundAccountDetails?, _ error: FDKError?) -> Void ) { @@ -1619,7 +1619,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RefundAccountResponse.self, from: data) + let response = Utility.decode(RefundAccountDetails.self, from: data) onResponse(response, nil) } else { @@ -1638,9 +1638,9 @@ extension ApplicationClient { * Description: Add bank account specifically for refunds, employing OTP verification for security. **/ public func addRefundBankAccountUsingOTP( - body: AddBeneficiaryDetailsOTPRequest, + body: AddBeneficiaryDetailsOTP, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RefundAccountResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RefundAccountDetails?, _ error: FDKError?) -> Void ) { @@ -1671,7 +1671,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RefundAccountResponse.self, from: data) + let response = Utility.decode(RefundAccountDetails.self, from: data) onResponse(response, nil) } else { @@ -1690,9 +1690,9 @@ extension ApplicationClient { * Description: Verify OTP provided by the user and adds a wallet beneficiary. **/ public func verifyOtpAndAddBeneficiaryForWallet( - body: WalletOtpRequest, + body: WalletOtp, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: WalletOtpResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: WalletOtpDetails?, _ error: FDKError?) -> Void ) { @@ -1723,7 +1723,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(WalletOtpResponse.self, from: data) + let response = Utility.decode(WalletOtpDetails.self, from: data) onResponse(response, nil) } else { @@ -1742,9 +1742,9 @@ extension ApplicationClient { * Description: Update default beneficiary for the order refund of the user. **/ public func updateDefaultBeneficiary( - body: SetDefaultBeneficiaryRequest, + body: SetDefaultBeneficiary, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SetDefaultBeneficiaryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SetDefaultBeneficiaryDetails?, _ error: FDKError?) -> Void ) { @@ -1775,7 +1775,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SetDefaultBeneficiaryResponse.self, from: data) + let response = Utility.decode(SetDefaultBeneficiaryDetails.self, from: data) onResponse(response, nil) } else { @@ -1797,7 +1797,7 @@ extension ApplicationClient { paymentLinkId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetPaymentLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetPaymentLinkDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1832,7 +1832,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetPaymentLinkResponse.self, from: data) + let response = Utility.decode(GetPaymentLinkDetails.self, from: data) onResponse(response, nil) } else { @@ -1851,9 +1851,9 @@ extension ApplicationClient { * Description: Create new payment link for transactions. **/ public func createPaymentLink( - body: CreatePaymentLinkRequest, + body: CreatePaymentLink, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreatePaymentLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreatePaymentLinkDetails?, _ error: FDKError?) -> Void ) { @@ -1884,7 +1884,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CreatePaymentLinkResponse.self, from: data) + let response = Utility.decode(CreatePaymentLinkDetails.self, from: data) onResponse(response, nil) } else { @@ -1903,9 +1903,9 @@ extension ApplicationClient { * Description: Resend an existing payment link to the user to complete the payment. **/ public func resendPaymentLink( - body: CancelOrResendPaymentLinkRequest, + body: CancelOrResendPaymentLink, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ResendPaymentLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ResendPaymentLinkDetails?, _ error: FDKError?) -> Void ) { @@ -1936,7 +1936,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ResendPaymentLinkResponse.self, from: data) + let response = Utility.decode(ResendPaymentLinkDetails.self, from: data) onResponse(response, nil) } else { @@ -1955,9 +1955,9 @@ extension ApplicationClient { * Description: Cancel previously generated payment link. **/ public func cancelPaymentLink( - body: CancelOrResendPaymentLinkRequest, + body: CancelOrResendPaymentLink, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CancelPaymentLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CancelPaymentLinkDetails?, _ error: FDKError?) -> Void ) { @@ -1988,7 +1988,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CancelPaymentLinkResponse.self, from: data) + let response = Utility.decode(CancelPaymentLinkDetails.self, from: data) onResponse(response, nil) } else { @@ -2010,7 +2010,7 @@ extension ApplicationClient { paymentLinkId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentModeRouteResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentModeRouteDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2042,7 +2042,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentModeRouteResponse.self, from: data) + let response = Utility.decode(PaymentModeRouteDetails.self, from: data) onResponse(response, nil) } else { @@ -2064,7 +2064,7 @@ extension ApplicationClient { paymentLinkId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PollingPaymentLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PollingPaymentLinkDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2099,7 +2099,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PollingPaymentLinkResponse.self, from: data) + let response = Utility.decode(PollingPaymentLinkDetails.self, from: data) onResponse(response, nil) } else { @@ -2118,9 +2118,9 @@ extension ApplicationClient { * Description: Initiate the creation of an order handler for processing payments through a link. **/ public func createOrderHandlerPaymentLink( - body: CreateOrderUserRequest, + body: CreateOrderUser, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreateOrderUserResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreateOrderUserDetails?, _ error: FDKError?) -> Void ) { @@ -2151,7 +2151,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CreateOrderUserResponse.self, from: data) + let response = Utility.decode(CreateOrderUserDetails.self, from: data) onResponse(response, nil) } else { @@ -2170,9 +2170,9 @@ extension ApplicationClient { * Description: Begin payment process for an order by initializing it through a payment link.Upon successful initialization, the response includes details about the payment status, aggregator details, order IDs, polling URL for status updates, and other relevant information. **/ public func initialisePaymentPaymentLink( - body: PaymentInitializationRequest, + body: PaymentInitialization, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentInitializationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentInitializationDetails?, _ error: FDKError?) -> Void ) { @@ -2203,7 +2203,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentInitializationResponse.self, from: data) + let response = Utility.decode(PaymentInitializationDetails.self, from: data) onResponse(response, nil) } else { @@ -2222,9 +2222,9 @@ extension ApplicationClient { * Description: Verify and update status of a payment made through a link.Upon successful verification and update, the response includes details about the aggregator name, payment status, and whether retrying the process is required. **/ public func checkAndUpdatePaymentStatusPaymentLink( - body: PaymentStatusUpdateRequest, + body: PaymentStatusUpdate, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentStatusUpdateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentStatusUpdateDetails?, _ error: FDKError?) -> Void ) { @@ -2255,7 +2255,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentStatusUpdateResponse.self, from: data) + let response = Utility.decode(PaymentStatusUpdateDetails.self, from: data) onResponse(response, nil) } else { @@ -2277,7 +2277,7 @@ extension ApplicationClient { aggregator: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomerCreditSummaryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomerCreditSummaryDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2312,7 +2312,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomerCreditSummaryResponse.self, from: data) + let response = Utility.decode(CustomerCreditSummaryDetails.self, from: data) onResponse(response, nil) } else { @@ -2335,7 +2335,7 @@ extension ApplicationClient { aggregator: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RedirectToAggregatorResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RedirectToAggregatorDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2374,7 +2374,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RedirectToAggregatorResponse.self, from: data) + let response = Utility.decode(RedirectToAggregatorDetails.self, from: data) onResponse(response, nil) } else { @@ -2396,7 +2396,7 @@ extension ApplicationClient { aggregator: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CheckCreditResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CheckCreditDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2431,7 +2431,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CheckCreditResponse.self, from: data) + let response = Utility.decode(CheckCreditDetails.self, from: data) onResponse(response, nil) } else { @@ -2450,9 +2450,9 @@ extension ApplicationClient { * Description: Initiate the onboarding process for payment services, providing personal, business, and device information, along with marketplace details, to enable customer registration and credit availability. **/ public func customerOnboard( - body: CustomerOnboardingRequest, + body: CustomerOnboarding, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomerOnboardingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomerOnboardingDetails?, _ error: FDKError?) -> Void ) { @@ -2483,7 +2483,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomerOnboardingResponse.self, from: data) + let response = Utility.decode(CustomerOnboardingDetails.self, from: data) onResponse(response, nil) } else { @@ -2505,7 +2505,7 @@ extension ApplicationClient { aggregator: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OutstandingOrderDetailsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OutstandingOrderDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2540,7 +2540,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OutstandingOrderDetailsResponse.self, from: data) + let response = Utility.decode(OutstandingOrderDetails.self, from: data) onResponse(response, nil) } else { @@ -2562,7 +2562,7 @@ extension ApplicationClient { aggregator: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaidOrderDetailsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaidOrderDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2597,7 +2597,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaidOrderDetailsResponse.self, from: data) + let response = Utility.decode(PaidOrderDetails.self, from: data) onResponse(response, nil) } else { @@ -2616,9 +2616,9 @@ extension ApplicationClient { * Description: Create an order and payment on the aggregator side. **/ public func createPaymentOrder( - body: PaymentOrderRequest, + body: PaymentOrder, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentOrderResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentOrderDetails?, _ error: FDKError?) -> Void ) { @@ -2649,7 +2649,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentOrderResponse.self, from: data) + let response = Utility.decode(PaymentOrderDetails.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/application/Client/RewardsApplicationClient.swift b/Sources/code/application/Client/RewardsApplicationClient.swift index be259a0c1e..1c13c0167f 100644 --- a/Sources/code/application/Client/RewardsApplicationClient.swift +++ b/Sources/code/application/Client/RewardsApplicationClient.swift @@ -93,12 +93,12 @@ extension ApplicationClient { /** * * Summary: Order from catalogue - * Description: Place an reward on order items available in the catalogue. + * Description: Place a reward on order items available in the catalogue. **/ public func catalogueOrder( - body: CatalogueOrderRequest, + body: CatalogueOrderCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CatalogueOrderResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CatalogueOrderDetails?, _ error: FDKError?) -> Void ) { @@ -129,7 +129,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CatalogueOrderResponse.self, from: data) + let response = Utility.decode(CatalogueOrderDetails.self, from: data) onResponse(response, nil) } else { @@ -152,7 +152,7 @@ extension ApplicationClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PointsHistoryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PointsHistoryDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -191,7 +191,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PointsHistoryResponse.self, from: data) + let response = Utility.decode(PointsHistoryDetails.self, from: data) onResponse(response, nil) } else { @@ -212,7 +212,7 @@ extension ApplicationClient { public func getUserPoints( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PointsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PointsDetails?, _ error: FDKError?) -> Void ) { @@ -243,7 +243,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PointsResponse.self, from: data) + let response = Utility.decode(PointsDetails.self, from: data) onResponse(response, nil) } else { @@ -264,7 +264,7 @@ extension ApplicationClient { public func getUserReferralDetails( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ReferralDetailsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ReferralDetails?, _ error: FDKError?) -> Void ) { @@ -295,7 +295,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ReferralDetailsResponse.self, from: data) + let response = Utility.decode(ReferralDetails.self, from: data) onResponse(response, nil) } else { @@ -314,9 +314,9 @@ extension ApplicationClient { * Description: Retrieve the discount applied to a specific order. **/ public func getOrderDiscount( - body: OrderDiscountRequest, + body: RetrieveOrderDiscount, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OrderDiscountResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OrderDiscountDetails?, _ error: FDKError?) -> Void ) { @@ -347,7 +347,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OrderDiscountResponse.self, from: data) + let response = Utility.decode(OrderDiscountDetails.self, from: data) onResponse(response, nil) } else { @@ -366,9 +366,9 @@ extension ApplicationClient { * Description: Applies a referral code to earn or redeem rewards. **/ public func redeemReferralCode( - body: RedeemReferralCodeRequest, + body: RedeemReferralCode, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RedeemReferralCodeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RedeemReferralCodeDetails?, _ error: FDKError?) -> Void ) { @@ -399,7 +399,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RedeemReferralCodeResponse.self, from: data) + let response = Utility.decode(RedeemReferralCodeDetails.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/application/Client/ThemeApplicationClient.swift b/Sources/code/application/Client/ThemeApplicationClient.swift index 2cbcfb67f3..c5618e4d65 100644 --- a/Sources/code/application/Client/ThemeApplicationClient.swift +++ b/Sources/code/application/Client/ThemeApplicationClient.swift @@ -163,12 +163,17 @@ extension ApplicationClient { * Description: Gets the theme configuration and template details of a theme applied to the application. **/ public func getAppliedTheme( + filters: Bool?, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: ThemesSchema?, _ error: FDKError?) -> Void ) { - + var xQuery: [String: Any] = [:] + + if let value = filters { + xQuery["filters"] = value + } var xHeaders: [(key: String, value: String)] = [] @@ -183,7 +188,7 @@ extension ApplicationClient { config: config, method: "GET", url: fullUrl, - query: nil, + query: xQuery, extraHeaders: xHeaders, body: nil, responseType: "application/json", @@ -216,12 +221,17 @@ extension ApplicationClient { **/ public func getThemeForPreview( themeId: String, + filters: Bool?, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: ThemesSchema?, _ error: FDKError?) -> Void ) { - + var xQuery: [String: Any] = [:] + + if let value = filters { + xQuery["filters"] = value + } var xHeaders: [(key: String, value: String)] = [] @@ -238,7 +248,7 @@ extension ApplicationClient { config: config, method: "GET", url: fullUrl, - query: nil, + query: xQuery, extraHeaders: xHeaders, body: nil, responseType: "application/json", diff --git a/Sources/code/application/Client/UserApplicationClient.swift b/Sources/code/application/Client/UserApplicationClient.swift index 72b5bebd3a..5adbae3af6 100644 --- a/Sources/code/application/Client/UserApplicationClient.swift +++ b/Sources/code/application/Client/UserApplicationClient.swift @@ -401,7 +401,7 @@ extension ApplicationClient { platform: String?, body: SendOtpRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SendOtpResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SendOtp?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -436,7 +436,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SendOtpResponse.self, from: data) + let response = Utility.decode(SendOtp.self, from: data) onResponse(response, nil) } else { @@ -1038,7 +1038,7 @@ extension ApplicationClient { /** * - * Summary: Update Password + * Summary: Update password * Description: Allow user to change their password. **/ public func updatePassword( @@ -1097,7 +1097,7 @@ extension ApplicationClient { platform: String?, body: SendMobileOtpRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OtpSuccess?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SendOtpSuccess?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1132,7 +1132,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OtpSuccess.self, from: data) + let response = Utility.decode(SendOtpSuccess.self, from: data) onResponse(response, nil) } else { @@ -1154,7 +1154,7 @@ extension ApplicationClient { platform: String?, body: SendMobileForgotOtpRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OtpSuccess?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SendOtpSuccess?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1189,7 +1189,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OtpSuccess.self, from: data) + let response = Utility.decode(SendOtpSuccess.self, from: data) onResponse(response, nil) } else { @@ -1204,7 +1204,7 @@ extension ApplicationClient { /** * - * Summary: Verify Mobile OTP + * Summary: Verify mobile OTP * Description: Verify one-time password sent to user's mobile. **/ public func verifyMobileOTP( @@ -2235,7 +2235,7 @@ extension ApplicationClient { q: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UserExistsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UserExistsDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2267,7 +2267,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UserExistsResponse.self, from: data) + let response = Utility.decode(UserExistsDetails.self, from: data) onResponse(response, nil) } else { @@ -2447,7 +2447,7 @@ extension ApplicationClient { * Description: Update user attributes. **/ public func updateUserAttributes( - body: UpdateUserAttributesRequest, + body: UpdateUserAttributes, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: UserAttributes?, _ error: FDKError?) -> Void ) { diff --git a/Sources/code/application/Client/WebhookApplicationClient.swift b/Sources/code/application/Client/WebhookApplicationClient.swift index 4755bc9e31..7333751bbf 100644 --- a/Sources/code/application/Client/WebhookApplicationClient.swift +++ b/Sources/code/application/Client/WebhookApplicationClient.swift @@ -25,13 +25,13 @@ extension ApplicationClient { /** * - * Summary: Endpoint to capture click events from sales channels and persist them in database. - * Description: Send click events from sales channels. + * Summary: Capture and save click events from various sales channels + * Description: Send click events from various sales channels to enable insightful data collection and analysis. **/ public func saveClickEvent( - body: ClickEventRequest, + body: ClickEventPayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ClickEventResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ClickEventDetails?, _ error: FDKError?) -> Void ) { @@ -62,7 +62,7 @@ extension ApplicationClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ClickEventResponse.self, from: data) + let response = Utility.decode(ClickEventDetails.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/application/FileStorage.swift b/Sources/code/application/FileStorage.swift index 8828f082b4..a4ef86e9ea 100644 --- a/Sources/code/application/FileStorage.swift +++ b/Sources/code/application/FileStorage.swift @@ -2,8 +2,8 @@ import Alamofire import Foundation public extension ApplicationClient.FileStorage { - func upload(data: Data, withFileName fileName: String, as contentType: String, toNameSpace namespace: String, onResponse: @escaping (_ response: ApplicationClient.FileStorage.CompleteResponse?, _ error: FDKError?) -> Void) { - startUpload(namespace: namespace, body: ApplicationClient.FileStorage.StartRequest(contentType: contentType, fileName: fileName, params: nil, size: data.count, tags: nil)) { (startResponse, error) in + func upload(data: Data, withFileName fileName: String, as contentType: String, toNameSpace namespace: String, onResponse: @escaping (_ response: ApplicationClient.FileStorage.FileUploadComplete?, _ error: FDKError?) -> Void) { + startUpload(namespace: namespace, body: ApplicationClient.FileStorage.FileUploadStart(contentType: contentType, fileName: fileName, params: nil, size: data.count, tags: nil)) { (startResponse, error) in guard let startResponse = startResponse else { return onResponse(nil, error) } diff --git a/Sources/code/application/Models/Cart/AddCartRequestCartAppModel.swift b/Sources/code/application/Models/Cart/AddCartCreationCartAppModel.swift similarity index 96% rename from Sources/code/application/Models/Cart/AddCartRequestCartAppModel.swift rename to Sources/code/application/Models/Cart/AddCartCreationCartAppModel.swift index 96683c2025..4c4cba109d 100644 --- a/Sources/code/application/Models/Cart/AddCartRequestCartAppModel.swift +++ b/Sources/code/application/Models/Cart/AddCartCreationCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: AddCartRequest + Model: AddCartCreation Used By: Cart */ - class AddCartRequest: Codable { + class AddCartCreation: Codable { public var items: [AddProductCart]? diff --git a/Sources/code/application/Models/Cart/AddCartDetailResponseCartAppModel.swift b/Sources/code/application/Models/Cart/AddCartDetailResultCartAppModel.swift similarity index 90% rename from Sources/code/application/Models/Cart/AddCartDetailResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/AddCartDetailResultCartAppModel.swift index cf869501db..4ff1f21759 100644 --- a/Sources/code/application/Models/Cart/AddCartDetailResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/AddCartDetailResultCartAppModel.swift @@ -3,16 +3,16 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: AddCartDetailResponse + Model: AddCartDetailResult Used By: Cart */ - class AddCartDetailResponse: Codable { + class AddCartDetailResult: Codable { public var message: String? public var partial: Bool? - public var cart: CartDetailResponse? + public var cart: CartDetailResult? public var success: Bool? @@ -29,7 +29,7 @@ public extension ApplicationClient.Cart { } - public init(cart: CartDetailResponse? = nil, message: String? = nil, partial: Bool? = nil, success: Bool? = nil) { + public init(cart: CartDetailResult? = nil, message: String? = nil, partial: Bool? = nil, success: Bool? = nil) { self.message = message @@ -70,7 +70,7 @@ public extension ApplicationClient.Cart { do { - cart = try container.decode(CartDetailResponse.self, forKey: .cart) + cart = try container.decode(CartDetailResult.self, forKey: .cart) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Cart/ApplyCouponRequestCartAppModel.swift b/Sources/code/application/Models/Cart/ApplyCouponCartAppModel.swift similarity index 93% rename from Sources/code/application/Models/Cart/ApplyCouponRequestCartAppModel.swift rename to Sources/code/application/Models/Cart/ApplyCouponCartAppModel.swift index 4953ad50bb..927756f1b2 100644 --- a/Sources/code/application/Models/Cart/ApplyCouponRequestCartAppModel.swift +++ b/Sources/code/application/Models/Cart/ApplyCouponCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: ApplyCouponRequest + Model: ApplyCoupon Used By: Cart */ - class ApplyCouponRequest: Codable { + class ApplyCoupon: Codable { public var couponCode: String diff --git a/Sources/code/application/Models/Cart/ArticlePriceDetailsCartAppModel.swift b/Sources/code/application/Models/Cart/ArticlePriceDetailsCartAppModel.swift new file mode 100644 index 0000000000..f76b5dba15 --- /dev/null +++ b/Sources/code/application/Models/Cart/ArticlePriceDetailsCartAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Cart { + /* + Model: ArticlePriceDetails + Used By: Cart + */ + class ArticlePriceDetails: Codable { + + public var marked: Double? + + public var effective: Double? + + + public enum CodingKeys: String, CodingKey { + + case marked = "marked" + + case effective = "effective" + + } + + public init(effective: Double? = nil, marked: Double? = nil) { + + self.marked = marked + + self.effective = effective + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + marked = try container.decode(Double.self, forKey: .marked) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + effective = try container.decode(Double.self, forKey: .effective) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} diff --git a/Sources/code/application/Models/Cart/BulkPriceResponseCartAppModel.swift b/Sources/code/application/Models/Cart/BulkPriceResultCartAppModel.swift similarity index 94% rename from Sources/code/application/Models/Cart/BulkPriceResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/BulkPriceResultCartAppModel.swift index 55b995b07d..6153ea28ae 100644 --- a/Sources/code/application/Models/Cart/BulkPriceResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/BulkPriceResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: BulkPriceResponse + Model: BulkPriceResult Used By: Cart */ - class BulkPriceResponse: Codable { + class BulkPriceResult: Codable { public var data: [BulkPriceOffer]? diff --git a/Sources/code/application/Models/Cart/CartCheckoutCustomMetaCartAppModel.swift b/Sources/code/application/Models/Cart/CartCheckoutCustomMetaCartAppModel.swift new file mode 100644 index 0000000000..3141abd6fc --- /dev/null +++ b/Sources/code/application/Models/Cart/CartCheckoutCustomMetaCartAppModel.swift @@ -0,0 +1,61 @@ + + +import Foundation +public extension ApplicationClient.Cart { + /* + Model: CartCheckoutCustomMeta + Used By: Cart + */ + class CartCheckoutCustomMeta: Codable { + + public var key: String + + public var value: String + + + public enum CodingKeys: String, CodingKey { + + case key = "key" + + case value = "value" + + } + + public init(key: String, value: String) { + + self.key = key + + self.value = value + + } + + 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) + + + + } + + 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) + + + } + + } +} diff --git a/Sources/code/application/Models/Cart/CartCheckoutDetailCreationCartAppModel.swift b/Sources/code/application/Models/Cart/CartCheckoutDetailCreationCartAppModel.swift new file mode 100644 index 0000000000..96ad3e52ea --- /dev/null +++ b/Sources/code/application/Models/Cart/CartCheckoutDetailCreationCartAppModel.swift @@ -0,0 +1,552 @@ + + +import Foundation +public extension ApplicationClient.Cart { + /* + Model: CartCheckoutDetailCreation + Used By: Cart + */ + class CartCheckoutDetailCreation: Codable { + + public var customMeta: [CartCheckoutCustomMeta]? + + public var customerDetails: CustomerDetails? + + public var merchantCode: String? + + public var id: String? + + public var paymentAutoConfirm: Bool? + + public var paymentMode: String + + public var aggregator: String? + + public var addressId: String? + + public var callbackUrl: String? + + public var deliveryAddress: [String: Any]? + + public var staff: StaffCheckout? + + public var orderType: String? + + public var orderingStore: Int? + + public var extraMeta: [String: Any]? + + public var paymentIdentifier: String? + + public var billingAddress: [String: Any]? + + public var paymentParams: [String: Any]? + + public var billingAddressId: String? + + public var meta: [String: Any]? + + public var paymentExtraIdentifiers: [String: Any]? + + public var iin: String? + + public var network: String? + + public var type: String? + + public var cardId: String? + + + public enum CodingKeys: String, CodingKey { + + case customMeta = "custom_meta" + + case customerDetails = "customer_details" + + case merchantCode = "merchant_code" + + case id = "id" + + case paymentAutoConfirm = "payment_auto_confirm" + + case paymentMode = "payment_mode" + + case aggregator = "aggregator" + + case addressId = "address_id" + + case callbackUrl = "callback_url" + + case deliveryAddress = "delivery_address" + + case staff = "staff" + + case orderType = "order_type" + + case orderingStore = "ordering_store" + + case extraMeta = "extra_meta" + + case paymentIdentifier = "payment_identifier" + + case billingAddress = "billing_address" + + case paymentParams = "payment_params" + + case billingAddressId = "billing_address_id" + + case meta = "meta" + + case paymentExtraIdentifiers = "payment_extra_identifiers" + + case iin = "iin" + + case network = "network" + + case type = "type" + + case cardId = "card_id" + + } + + public init(addressId: String? = nil, aggregator: String? = nil, billingAddress: [String: Any]? = nil, billingAddressId: String? = nil, callbackUrl: String? = nil, cardId: String? = nil, customerDetails: CustomerDetails? = nil, customMeta: [CartCheckoutCustomMeta]? = nil, deliveryAddress: [String: Any]? = nil, extraMeta: [String: Any]? = nil, id: String? = nil, iin: String? = nil, merchantCode: String? = nil, meta: [String: Any]? = nil, network: String? = nil, orderingStore: Int? = nil, orderType: String? = nil, paymentAutoConfirm: Bool? = nil, paymentExtraIdentifiers: [String: Any]? = nil, paymentIdentifier: String? = nil, paymentMode: String, paymentParams: [String: Any]? = nil, staff: StaffCheckout? = nil, type: String? = nil) { + + self.customMeta = customMeta + + self.customerDetails = customerDetails + + self.merchantCode = merchantCode + + self.id = id + + self.paymentAutoConfirm = paymentAutoConfirm + + self.paymentMode = paymentMode + + self.aggregator = aggregator + + self.addressId = addressId + + self.callbackUrl = callbackUrl + + self.deliveryAddress = deliveryAddress + + self.staff = staff + + self.orderType = orderType + + self.orderingStore = orderingStore + + self.extraMeta = extraMeta + + self.paymentIdentifier = paymentIdentifier + + self.billingAddress = billingAddress + + self.paymentParams = paymentParams + + self.billingAddressId = billingAddressId + + self.meta = meta + + self.paymentExtraIdentifiers = paymentExtraIdentifiers + + self.iin = iin + + self.network = network + + self.type = type + + self.cardId = cardId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + customMeta = try container.decode([CartCheckoutCustomMeta].self, forKey: .customMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + customerDetails = try container.decode(CustomerDetails.self, forKey: .customerDetails) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + merchantCode = try container.decode(String.self, forKey: .merchantCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + paymentAutoConfirm = try container.decode(Bool.self, forKey: .paymentAutoConfirm) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + paymentMode = try container.decode(String.self, forKey: .paymentMode) + + + + + do { + aggregator = try container.decode(String.self, forKey: .aggregator) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + addressId = try container.decode(String.self, forKey: .addressId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + callbackUrl = try container.decode(String.self, forKey: .callbackUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + deliveryAddress = try container.decode([String: Any].self, forKey: .deliveryAddress) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + staff = try container.decode(StaffCheckout.self, forKey: .staff) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderType = try container.decode(String.self, forKey: .orderType) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderingStore = try container.decode(Int.self, forKey: .orderingStore) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + extraMeta = try container.decode([String: Any].self, forKey: .extraMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentIdentifier = try container.decode(String.self, forKey: .paymentIdentifier) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + billingAddress = try container.decode([String: Any].self, forKey: .billingAddress) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentParams = try container.decode([String: Any].self, forKey: .paymentParams) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + billingAddressId = try container.decode(String.self, forKey: .billingAddressId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + paymentExtraIdentifiers = try container.decode([String: Any].self, forKey: .paymentExtraIdentifiers) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + iin = try container.decode(String.self, forKey: .iin) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + network = try container.decode(String.self, forKey: .network) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + cardId = try container.decode(String.self, forKey: .cardId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(customMeta, forKey: .customMeta) + + + + try? container.encodeIfPresent(customerDetails, forKey: .customerDetails) + + + + try? container.encodeIfPresent(merchantCode, forKey: .merchantCode) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + try? container.encodeIfPresent(paymentAutoConfirm, forKey: .paymentAutoConfirm) + + + + try? container.encodeIfPresent(paymentMode, forKey: .paymentMode) + + + + try? container.encodeIfPresent(aggregator, forKey: .aggregator) + + + + try? container.encodeIfPresent(addressId, forKey: .addressId) + + + + try? container.encodeIfPresent(callbackUrl, forKey: .callbackUrl) + + + + try? container.encodeIfPresent(deliveryAddress, forKey: .deliveryAddress) + + + + try? container.encodeIfPresent(staff, forKey: .staff) + + + + try? container.encodeIfPresent(orderType, forKey: .orderType) + + + + try? container.encodeIfPresent(orderingStore, forKey: .orderingStore) + + + + try? container.encodeIfPresent(extraMeta, forKey: .extraMeta) + + + + try? container.encodeIfPresent(paymentIdentifier, forKey: .paymentIdentifier) + + + + try? container.encodeIfPresent(billingAddress, forKey: .billingAddress) + + + + try? container.encodeIfPresent(paymentParams, forKey: .paymentParams) + + + + try? container.encodeIfPresent(billingAddressId, forKey: .billingAddressId) + + + + try? container.encodeIfPresent(meta, forKey: .meta) + + + + try? container.encodeIfPresent(paymentExtraIdentifiers, forKey: .paymentExtraIdentifiers) + + + + try? container.encodeIfPresent(iin, forKey: .iin) + + + + try? container.encodeIfPresent(network, forKey: .network) + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + try? container.encodeIfPresent(cardId, forKey: .cardId) + + + } + + } +} diff --git a/Sources/code/application/Models/Cart/CartCheckoutDetailV2RequestCartAppModel.swift b/Sources/code/application/Models/Cart/CartCheckoutDetailV2CreationCartAppModel.swift similarity index 95% rename from Sources/code/application/Models/Cart/CartCheckoutDetailV2RequestCartAppModel.swift rename to Sources/code/application/Models/Cart/CartCheckoutDetailV2CreationCartAppModel.swift index 2205bba105..e6b170cceb 100644 --- a/Sources/code/application/Models/Cart/CartCheckoutDetailV2RequestCartAppModel.swift +++ b/Sources/code/application/Models/Cart/CartCheckoutDetailV2CreationCartAppModel.swift @@ -3,12 +3,12 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: CartCheckoutDetailV2Request + Model: CartCheckoutDetailV2Creation Used By: Cart */ - class CartCheckoutDetailV2Request: Codable { + class CartCheckoutDetailV2Creation: Codable { - public var customMeta: [String: Any]? + public var customMeta: [CartCheckoutCustomMeta]? public var customerDetails: CustomerDetails? @@ -113,7 +113,7 @@ public extension ApplicationClient.Cart { } - public init(addressId: String? = nil, aggregator: String? = nil, billingAddress: [String: Any]? = nil, billingAddressId: String? = nil, callbackUrl: String? = nil, cardId: String? = nil, cartId: String? = nil, customerDetails: CustomerDetails? = nil, customMeta: [String: Any]? = nil, deliveryAddress: [String: Any]? = nil, extraMeta: [String: Any]? = nil, id: String? = nil, iin: String? = nil, merchantCode: String? = nil, meta: [String: Any]? = nil, network: String? = nil, orderingStore: Int? = nil, orderType: String? = nil, paymentAutoConfirm: Bool? = nil, paymentIdentifier: String? = nil, paymentMethods: [PaymentMethod], paymentMode: String, paymentParams: [String: Any]? = nil, staff: StaffCheckout? = nil, type: String? = nil) { + public init(addressId: String? = nil, aggregator: String? = nil, billingAddress: [String: Any]? = nil, billingAddressId: String? = nil, callbackUrl: String? = nil, cardId: String? = nil, cartId: String? = nil, customerDetails: CustomerDetails? = nil, customMeta: [CartCheckoutCustomMeta]? = nil, deliveryAddress: [String: Any]? = nil, extraMeta: [String: Any]? = nil, id: String? = nil, iin: String? = nil, merchantCode: String? = nil, meta: [String: Any]? = nil, network: String? = nil, orderingStore: Int? = nil, orderType: String? = nil, paymentAutoConfirm: Bool? = nil, paymentIdentifier: String? = nil, paymentMethods: [PaymentMethod], paymentMode: String, paymentParams: [String: Any]? = nil, staff: StaffCheckout? = nil, type: String? = nil) { self.customMeta = customMeta @@ -172,7 +172,7 @@ public extension ApplicationClient.Cart { do { - customMeta = try container.decode([String: Any].self, forKey: .customMeta) + customMeta = try container.decode([CartCheckoutCustomMeta].self, forKey: .customMeta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Cart/CartCheckoutResponseCartAppModel.swift b/Sources/code/application/Models/Cart/CartCheckoutResultCartAppModel.swift similarity index 98% rename from Sources/code/application/Models/Cart/CartCheckoutResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/CartCheckoutResultCartAppModel.swift index eeb7474a16..c1be6f2c05 100644 --- a/Sources/code/application/Models/Cart/CartCheckoutResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/CartCheckoutResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: CartCheckoutResponse + Model: CartCheckoutResult Used By: Cart */ - class CartCheckoutResponse: Codable { + class CartCheckoutResult: Codable { public var paymentConfirmUrl: String? diff --git a/Sources/code/application/Models/Cart/CartDetailResponseCartAppModel.swift b/Sources/code/application/Models/Cart/CartDetailResultCartAppModel.swift similarity index 99% rename from Sources/code/application/Models/Cart/CartDetailResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/CartDetailResultCartAppModel.swift index 229f46b51a..3eb27f149e 100644 --- a/Sources/code/application/Models/Cart/CartDetailResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/CartDetailResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: CartDetailResponse + Model: CartDetailResult Used By: Cart */ - class CartDetailResponse: Codable { + class CartDetailResult: Codable { public var cartId: Int? diff --git a/Sources/code/application/Models/Cart/CartItemCountResponseCartAppModel.swift b/Sources/code/application/Models/Cart/CartItemCountResultCartAppModel.swift similarity index 94% rename from Sources/code/application/Models/Cart/CartItemCountResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/CartItemCountResultCartAppModel.swift index 53624a43c8..0dc57ab99c 100644 --- a/Sources/code/application/Models/Cart/CartItemCountResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/CartItemCountResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: CartItemCountResponse + Model: CartItemCountResult Used By: Cart */ - class CartItemCountResponse: Codable { + class CartItemCountResult: Codable { public var userCartItemsCount: Int? diff --git a/Sources/code/application/Models/Cart/CartMetaRequestCartAppModel.swift b/Sources/code/application/Models/Cart/CartMetaCreationCartAppModel.swift similarity index 98% rename from Sources/code/application/Models/Cart/CartMetaRequestCartAppModel.swift rename to Sources/code/application/Models/Cart/CartMetaCreationCartAppModel.swift index ecc2e91854..0ab3e2a519 100644 --- a/Sources/code/application/Models/Cart/CartMetaRequestCartAppModel.swift +++ b/Sources/code/application/Models/Cart/CartMetaCreationCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: CartMetaRequest + Model: CartMetaCreation Used By: Cart */ - class CartMetaRequest: Codable { + class CartMetaCreation: Codable { public var deliverySlots: [String: Any]? diff --git a/Sources/code/application/Models/Cart/CartMetaMissingResponseCartAppModel.swift b/Sources/code/application/Models/Cart/CartMetaMissingResultCartAppModel.swift similarity index 93% rename from Sources/code/application/Models/Cart/CartMetaMissingResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/CartMetaMissingResultCartAppModel.swift index 162b84bc10..0db15353ad 100644 --- a/Sources/code/application/Models/Cart/CartMetaMissingResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/CartMetaMissingResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: CartMetaMissingResponse + Model: CartMetaMissingResult Used By: Cart */ - class CartMetaMissingResponse: Codable { + class CartMetaMissingResult: Codable { public var errors: [String]? diff --git a/Sources/code/application/Models/Cart/CartMetaResponseCartAppModel.swift b/Sources/code/application/Models/Cart/CartMetaResultCartAppModel.swift similarity index 96% rename from Sources/code/application/Models/Cart/CartMetaResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/CartMetaResultCartAppModel.swift index b18ad9431f..89c8f4b384 100644 --- a/Sources/code/application/Models/Cart/CartMetaResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/CartMetaResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: CartMetaResponse + Model: CartMetaResult Used By: Cart */ - class CartMetaResponse: Codable { + class CartMetaResult: Codable { public var message: String? diff --git a/Sources/code/application/Models/Cart/CartShipmentsResponseCartAppModel.swift b/Sources/code/application/Models/Cart/CartShipmentsResultCartAppModel.swift similarity index 97% rename from Sources/code/application/Models/Cart/CartShipmentsResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/CartShipmentsResultCartAppModel.swift index 8a22110fdb..8b412aecb9 100644 --- a/Sources/code/application/Models/Cart/CartShipmentsResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/CartShipmentsResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: CartShipmentsResponse + Model: CartShipmentsResult Used By: Cart */ - class CartShipmentsResponse: Codable { + class CartShipmentsResult: Codable { public var deliveryChargeInfo: String? @@ -30,7 +30,7 @@ public extension ApplicationClient.Cart { public var id: String? - public var shipments: [ShipmentResponse]? + public var shipments: [ShipmentResult]? public var paymentSelectionLock: PaymentSelectionLock? @@ -93,7 +93,7 @@ public extension ApplicationClient.Cart { } - public init(breakupValues: CartBreakup? = nil, buyNow: Bool? = nil, cartId: Int? = nil, checkoutMode: String? = nil, comment: String? = nil, couponText: String? = nil, currency: CartCurrency? = nil, customCartMeta: [String: Any]? = nil, deliveryChargeInfo: String? = nil, deliveryPromise: ShipmentPromise? = nil, error: Bool? = nil, gstin: String? = nil, id: String? = nil, isValid: Bool? = nil, lastModified: String? = nil, message: String? = nil, paymentSelectionLock: PaymentSelectionLock? = nil, restrictCheckout: Bool? = nil, shipments: [ShipmentResponse]? = nil, uid: String? = nil) { + public init(breakupValues: CartBreakup? = nil, buyNow: Bool? = nil, cartId: Int? = nil, checkoutMode: String? = nil, comment: String? = nil, couponText: String? = nil, currency: CartCurrency? = nil, customCartMeta: [String: Any]? = nil, deliveryChargeInfo: String? = nil, deliveryPromise: ShipmentPromise? = nil, error: Bool? = nil, gstin: String? = nil, id: String? = nil, isValid: Bool? = nil, lastModified: String? = nil, message: String? = nil, paymentSelectionLock: PaymentSelectionLock? = nil, restrictCheckout: Bool? = nil, shipments: [ShipmentResult]? = nil, uid: String? = nil) { self.deliveryChargeInfo = deliveryChargeInfo @@ -274,7 +274,7 @@ public extension ApplicationClient.Cart { do { - shipments = try container.decode([ShipmentResponse].self, forKey: .shipments) + shipments = try container.decode([ShipmentResult].self, forKey: .shipments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Cart/CouponValidityCartAppModel.swift b/Sources/code/application/Models/Cart/CouponValidityCartAppModel.swift index 8c85745a4e..249acab5f1 100644 --- a/Sources/code/application/Models/Cart/CouponValidityCartAppModel.swift +++ b/Sources/code/application/Models/Cart/CouponValidityCartAppModel.swift @@ -20,6 +20,8 @@ public extension ApplicationClient.Cart { public var code: String? + public var errorEn: String? + public enum CodingKeys: String, CodingKey { @@ -35,9 +37,11 @@ public extension ApplicationClient.Cart { case code = "code" + case errorEn = "error_en" + } - public init(code: String? = nil, discount: Double? = nil, displayMessageEn: String? = nil, nextValidationRequired: Bool? = nil, title: String? = nil, valid: Bool? = nil) { + public init(code: String? = nil, discount: Double? = nil, displayMessageEn: String? = nil, errorEn: String? = nil, nextValidationRequired: Bool? = nil, title: String? = nil, valid: Bool? = nil) { self.title = title @@ -51,6 +55,8 @@ public extension ApplicationClient.Cart { self.code = code + self.errorEn = errorEn + } required public init(from decoder: Decoder) throws { @@ -128,6 +134,18 @@ public extension ApplicationClient.Cart { } + + do { + errorEn = try container.decode(String.self, forKey: .errorEn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -157,6 +175,10 @@ public extension ApplicationClient.Cart { try? container.encodeIfPresent(code, forKey: .code) + + try? container.encodeIfPresent(errorEn, forKey: .errorEn) + + } } diff --git a/Sources/code/application/Models/Cart/DeleteAddressResponseCartAppModel.swift b/Sources/code/application/Models/Cart/DeleteAddressResultCartAppModel.swift similarity index 95% rename from Sources/code/application/Models/Cart/DeleteAddressResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/DeleteAddressResultCartAppModel.swift index 9f15cd4b47..cadd592a3e 100644 --- a/Sources/code/application/Models/Cart/DeleteAddressResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/DeleteAddressResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: DeleteAddressResponse + Model: DeleteAddressResult Used By: Cart */ - class DeleteAddressResponse: Codable { + class DeleteAddressResult: Codable { public var id: String? diff --git a/Sources/code/application/Models/Cart/OperationErrorResponseCartAppModel.swift b/Sources/code/application/Models/Cart/DeleteCartDetailResultCartAppModel.swift similarity index 95% rename from Sources/code/application/Models/Cart/OperationErrorResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/DeleteCartDetailResultCartAppModel.swift index 1a125324e2..9ab731f074 100644 --- a/Sources/code/application/Models/Cart/OperationErrorResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/DeleteCartDetailResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: OperationErrorResponse + Model: DeleteCartDetailResult Used By: Cart */ - class OperationErrorResponse: Codable { + class DeleteCartDetailResult: Codable { public var message: String? diff --git a/Sources/code/application/Models/Cart/FreeGiftItemCartAppModel.swift b/Sources/code/application/Models/Cart/FreeGiftItemCartAppModel.swift new file mode 100644 index 0000000000..77839b0d4f --- /dev/null +++ b/Sources/code/application/Models/Cart/FreeGiftItemCartAppModel.swift @@ -0,0 +1,163 @@ + + +import Foundation +public extension ApplicationClient.Cart { + /* + Model: FreeGiftItem + Used By: Cart + */ + class FreeGiftItem: Codable { + + public var itemSlug: String? + + public var itemName: String? + + public var itemPriceDetails: [String: Any]? + + public var itemBrandName: String? + + public var itemId: Int? + + public var itemImagesUrl: [String]? + + + public enum CodingKeys: String, CodingKey { + + case itemSlug = "item_slug" + + case itemName = "item_name" + + case itemPriceDetails = "item_price_details" + + case itemBrandName = "item_brand_name" + + case itemId = "item_id" + + case itemImagesUrl = "item_images_url" + + } + + public init(itemBrandName: String? = nil, itemId: Int? = nil, itemImagesUrl: [String]? = nil, itemName: String? = nil, itemPriceDetails: [String: Any]? = nil, itemSlug: String? = nil) { + + self.itemSlug = itemSlug + + self.itemName = itemName + + self.itemPriceDetails = itemPriceDetails + + self.itemBrandName = itemBrandName + + self.itemId = itemId + + self.itemImagesUrl = itemImagesUrl + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + itemSlug = try container.decode(String.self, forKey: .itemSlug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemName = try container.decode(String.self, forKey: .itemName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemPriceDetails = try container.decode([String: Any].self, forKey: .itemPriceDetails) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemBrandName = try container.decode(String.self, forKey: .itemBrandName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemId = try container.decode(Int.self, forKey: .itemId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemImagesUrl = try container.decode([String].self, forKey: .itemImagesUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(itemSlug, forKey: .itemSlug) + + + + try? container.encodeIfPresent(itemName, forKey: .itemName) + + + + try? container.encodeIfPresent(itemPriceDetails, forKey: .itemPriceDetails) + + + + try? container.encodeIfPresent(itemBrandName, forKey: .itemBrandName) + + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + try? container.encodeIfPresent(itemImagesUrl, forKey: .itemImagesUrl) + + + } + + } +} diff --git a/Sources/code/application/Models/Cart/FreeGiftItemCreationCartAppModel.swift b/Sources/code/application/Models/Cart/FreeGiftItemCreationCartAppModel.swift new file mode 100644 index 0000000000..5de203d73c --- /dev/null +++ b/Sources/code/application/Models/Cart/FreeGiftItemCreationCartAppModel.swift @@ -0,0 +1,76 @@ + + +import Foundation +public extension ApplicationClient.Cart { + /* + Model: FreeGiftItemCreation + Used By: Cart + */ + class FreeGiftItemCreation: Codable { + + public var promotionId: String + + public var itemId: String + + public var itemSize: String + + + public enum CodingKeys: String, CodingKey { + + case promotionId = "promotion_id" + + case itemId = "item_id" + + case itemSize = "item_size" + + } + + public init(itemId: String, itemSize: String, promotionId: String) { + + self.promotionId = promotionId + + self.itemId = itemId + + self.itemSize = itemSize + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + promotionId = try container.decode(String.self, forKey: .promotionId) + + + + + itemId = try container.decode(String.self, forKey: .itemId) + + + + + itemSize = try container.decode(String.self, forKey: .itemSize) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(promotionId, forKey: .promotionId) + + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + try? container.encodeIfPresent(itemSize, forKey: .itemSize) + + + } + + } +} diff --git a/Sources/code/application/Models/Cart/FreeGiftItemsCartAppModel.swift b/Sources/code/application/Models/Cart/FreeGiftItemsCartAppModel.swift index dc520d2e54..3c2ab69406 100644 --- a/Sources/code/application/Models/Cart/FreeGiftItemsCartAppModel.swift +++ b/Sources/code/application/Models/Cart/FreeGiftItemsCartAppModel.swift @@ -14,10 +14,16 @@ public extension ApplicationClient.Cart { public var itemPriceDetails: ItemPriceDetails? + public var articlePrice: ArticlePriceDetails? + public var itemBrandName: String? public var itemId: Int? + public var availableSizes: [String]? + + public var size: String? + public var itemImagesUrl: [String]? @@ -29,15 +35,21 @@ public extension ApplicationClient.Cart { case itemPriceDetails = "item_price_details" + case articlePrice = "article_price" + case itemBrandName = "item_brand_name" case itemId = "item_id" + case availableSizes = "available_sizes" + + case size = "size" + case itemImagesUrl = "item_images_url" } - public init(itemBrandName: String? = nil, itemId: Int? = nil, itemImagesUrl: [String]? = nil, itemName: String? = nil, itemPriceDetails: ItemPriceDetails? = nil, itemSlug: String? = nil) { + public init(articlePrice: ArticlePriceDetails? = nil, availableSizes: [String]? = nil, itemBrandName: String? = nil, itemId: Int? = nil, itemImagesUrl: [String]? = nil, itemName: String? = nil, itemPriceDetails: ItemPriceDetails? = nil, itemSlug: String? = nil, size: String? = nil) { self.itemSlug = itemSlug @@ -45,10 +57,16 @@ public extension ApplicationClient.Cart { self.itemPriceDetails = itemPriceDetails + self.articlePrice = articlePrice + self.itemBrandName = itemBrandName self.itemId = itemId + self.availableSizes = availableSizes + + self.size = size + self.itemImagesUrl = itemImagesUrl } @@ -93,6 +111,18 @@ public extension ApplicationClient.Cart { + do { + articlePrice = try container.decode(ArticlePriceDetails.self, forKey: .articlePrice) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { itemBrandName = try container.decode(String.self, forKey: .itemBrandName) @@ -117,6 +147,30 @@ public extension ApplicationClient.Cart { + do { + availableSizes = try container.decode([String].self, forKey: .availableSizes) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + do { itemImagesUrl = try container.decode([String].self, forKey: .itemImagesUrl) @@ -146,6 +200,10 @@ public extension ApplicationClient.Cart { + try? container.encodeIfPresent(articlePrice, forKey: .articlePrice) + + + try? container.encodeIfPresent(itemBrandName, forKey: .itemBrandName) @@ -154,6 +212,14 @@ public extension ApplicationClient.Cart { + try? container.encodeIfPresent(availableSizes, forKey: .availableSizes) + + + + try? container.encodeIfPresent(size, forKey: .size) + + + try? container.encodeIfPresent(itemImagesUrl, forKey: .itemImagesUrl) diff --git a/Sources/code/application/Models/Cart/GetAddressesResponseCartAppModel.swift b/Sources/code/application/Models/Cart/GetAddressesResultCartAppModel.swift similarity index 68% rename from Sources/code/application/Models/Cart/GetAddressesResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/GetAddressesResultCartAppModel.swift index 7d8bdd2b47..90186b4c8a 100644 --- a/Sources/code/application/Models/Cart/GetAddressesResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/GetAddressesResultCartAppModel.swift @@ -3,15 +3,17 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: GetAddressesResponse + Model: GetAddressesResult Used By: Cart */ - class GetAddressesResponse: Codable { + class GetAddressesResult: Codable { public var piiMasking: Bool? public var address: [Address]? + public var validationConfig: ValidationConfig? + public enum CodingKeys: String, CodingKey { @@ -19,14 +21,18 @@ public extension ApplicationClient.Cart { case address = "address" + case validationConfig = "validation_config" + } - public init(address: [Address]? = nil, piiMasking: Bool? = nil) { + public init(address: [Address]? = nil, piiMasking: Bool? = nil, validationConfig: ValidationConfig? = nil) { self.piiMasking = piiMasking self.address = address + self.validationConfig = validationConfig + } required public init(from decoder: Decoder) throws { @@ -56,6 +62,18 @@ public extension ApplicationClient.Cart { } + + do { + validationConfig = try container.decode(ValidationConfig.self, forKey: .validationConfig) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -69,6 +87,10 @@ public extension ApplicationClient.Cart { try? container.encodeIfPresent(address, forKey: .address) + + try? container.encodeIfPresent(validationConfig, forKey: .validationConfig) + + } } diff --git a/Sources/code/application/Models/Cart/GetCouponResponseCartAppModel.swift b/Sources/code/application/Models/Cart/GetCouponResultCartAppModel.swift similarity index 96% rename from Sources/code/application/Models/Cart/GetCouponResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/GetCouponResultCartAppModel.swift index dfec7d50fc..8b71ac67e8 100644 --- a/Sources/code/application/Models/Cart/GetCouponResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/GetCouponResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: GetCouponResponse + Model: GetCouponResult Used By: Cart */ - class GetCouponResponse: Codable { + class GetCouponResult: Codable { public var page: PageCoupon? diff --git a/Sources/code/application/Models/Cart/GetShareCartLinkRequestCartAppModel.swift b/Sources/code/application/Models/Cart/GetShareCartLinkCreationCartAppModel.swift similarity index 95% rename from Sources/code/application/Models/Cart/GetShareCartLinkRequestCartAppModel.swift rename to Sources/code/application/Models/Cart/GetShareCartLinkCreationCartAppModel.swift index 1c77581c11..50da7d16d9 100644 --- a/Sources/code/application/Models/Cart/GetShareCartLinkRequestCartAppModel.swift +++ b/Sources/code/application/Models/Cart/GetShareCartLinkCreationCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: GetShareCartLinkRequest + Model: GetShareCartLinkCreation Used By: Cart */ - class GetShareCartLinkRequest: Codable { + class GetShareCartLinkCreation: Codable { public var id: String? diff --git a/Sources/code/application/Models/Cart/GetShareCartLinkResponseCartAppModel.swift b/Sources/code/application/Models/Cart/GetShareCartLinkResultCartAppModel.swift similarity index 95% rename from Sources/code/application/Models/Cart/GetShareCartLinkResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/GetShareCartLinkResultCartAppModel.swift index c9b97e778c..d455abf7fb 100644 --- a/Sources/code/application/Models/Cart/GetShareCartLinkResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/GetShareCartLinkResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: GetShareCartLinkResponse + Model: GetShareCartLinkResult Used By: Cart */ - class GetShareCartLinkResponse: Codable { + class GetShareCartLinkResult: Codable { public var token: String? diff --git a/Sources/code/application/Models/Cart/DeleteCartDetailResponseCartAppModel.swift b/Sources/code/application/Models/Cart/OperationErrorResultCartAppModel.swift similarity index 95% rename from Sources/code/application/Models/Cart/DeleteCartDetailResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/OperationErrorResultCartAppModel.swift index 97d3f794b5..c968e51514 100644 --- a/Sources/code/application/Models/Cart/DeleteCartDetailResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/OperationErrorResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: DeleteCartDetailResponse + Model: OperationErrorResult Used By: Cart */ - class DeleteCartDetailResponse: Codable { + class OperationErrorResult: Codable { public var message: String? diff --git a/Sources/code/application/Models/Cart/ProductActionCartAppModel.swift b/Sources/code/application/Models/Cart/ProductActionCartAppModel.swift index f0ac0f1639..185a9f57d6 100644 --- a/Sources/code/application/Models/Cart/ProductActionCartAppModel.swift +++ b/Sources/code/application/Models/Cart/ProductActionCartAppModel.swift @@ -14,6 +14,8 @@ public extension ApplicationClient.Cart { public var type: String? + public var page: ProductActionPage? + public enum CodingKeys: String, CodingKey { @@ -23,9 +25,11 @@ public extension ApplicationClient.Cart { case type = "type" + case page = "page" + } - public init(query: ActionQuery? = nil, type: String? = nil, url: String? = nil) { + public init(page: ProductActionPage? = nil, query: ActionQuery? = nil, type: String? = nil, url: String? = nil) { self.query = query @@ -33,6 +37,8 @@ public extension ApplicationClient.Cart { self.type = type + self.page = page + } required public init(from decoder: Decoder) throws { @@ -74,6 +80,18 @@ public extension ApplicationClient.Cart { } + + do { + page = try container.decode(ProductActionPage.self, forKey: .page) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -91,6 +109,10 @@ public extension ApplicationClient.Cart { try? container.encodeIfPresent(type, forKey: .type) + + try? container.encodeIfPresent(page, forKey: .page) + + } } diff --git a/Sources/code/application/Models/Cart/ProductActionPageCartAppModel.swift b/Sources/code/application/Models/Cart/ProductActionPageCartAppModel.swift new file mode 100644 index 0000000000..25ee81f711 --- /dev/null +++ b/Sources/code/application/Models/Cart/ProductActionPageCartAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Cart { + /* + Model: ProductActionPage + Used By: Cart + */ + class ProductActionPage: Codable { + + public var type: String? + + public var params: ProductActionParams? + + + public enum CodingKeys: String, CodingKey { + + case type = "type" + + case params = "params" + + } + + public init(params: ProductActionParams? = nil, type: String? = nil) { + + self.type = type + + 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) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + params = try container.decode(ProductActionParams.self, forKey: .params) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} diff --git a/Sources/code/application/Models/Cart/ProductActionParamsCartAppModel.swift b/Sources/code/application/Models/Cart/ProductActionParamsCartAppModel.swift new file mode 100644 index 0000000000..cfe2cd6957 --- /dev/null +++ b/Sources/code/application/Models/Cart/ProductActionParamsCartAppModel.swift @@ -0,0 +1,53 @@ + + +import Foundation +public extension ApplicationClient.Cart { + /* + Model: ProductActionParams + Used By: Cart + */ + class ProductActionParams: Codable { + + public var slug: [String]? + + + public enum CodingKeys: String, CodingKey { + + case slug = "slug" + + } + + public init(slug: [String]? = nil) { + + self.slug = slug + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + slug = try container.decode([String].self, forKey: .slug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(slug, forKey: .slug) + + + } + + } +} diff --git a/Sources/code/application/Models/Cart/PromotionOffersResponseCartAppModel.swift b/Sources/code/application/Models/Cart/PromotionOffersResultCartAppModel.swift similarity index 94% rename from Sources/code/application/Models/Cart/PromotionOffersResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/PromotionOffersResultCartAppModel.swift index 8c0db24ca1..d27a034511 100644 --- a/Sources/code/application/Models/Cart/PromotionOffersResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/PromotionOffersResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: PromotionOffersResponse + Model: PromotionOffersResult Used By: Cart */ - class PromotionOffersResponse: Codable { + class PromotionOffersResult: Codable { public var availablePromotions: [PromotionOffer]? diff --git a/Sources/code/application/Models/Cart/PromotionPaymentOffersResponseCartAppModel.swift b/Sources/code/application/Models/Cart/PromotionPaymentOffersResultCartAppModel.swift similarity index 95% rename from Sources/code/application/Models/Cart/PromotionPaymentOffersResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/PromotionPaymentOffersResultCartAppModel.swift index 6a1a4e41dd..7058ea1c72 100644 --- a/Sources/code/application/Models/Cart/PromotionPaymentOffersResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/PromotionPaymentOffersResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: PromotionPaymentOffersResponse + Model: PromotionPaymentOffersResult Used By: Cart */ - class PromotionPaymentOffersResponse: Codable { + class PromotionPaymentOffersResult: Codable { public var success: Bool? diff --git a/Sources/code/application/Models/Cart/RewardPointRequestCartAppModel.swift b/Sources/code/application/Models/Cart/RewardPointCreationCartAppModel.swift similarity index 92% rename from Sources/code/application/Models/Cart/RewardPointRequestCartAppModel.swift rename to Sources/code/application/Models/Cart/RewardPointCreationCartAppModel.swift index 9293af29a3..88ba0330ea 100644 --- a/Sources/code/application/Models/Cart/RewardPointRequestCartAppModel.swift +++ b/Sources/code/application/Models/Cart/RewardPointCreationCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: RewardPointRequest + Model: RewardPointCreation Used By: Cart */ - class RewardPointRequest: Codable { + class RewardPointCreation: Codable { public var points: Bool diff --git a/Sources/code/application/Models/Cart/SaveAddressResponseCartAppModel.swift b/Sources/code/application/Models/Cart/SaveAddressResultCartAppModel.swift similarity index 97% rename from Sources/code/application/Models/Cart/SaveAddressResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/SaveAddressResultCartAppModel.swift index 0459276c20..34d3a46052 100644 --- a/Sources/code/application/Models/Cart/SaveAddressResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/SaveAddressResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: SaveAddressResponse + Model: SaveAddressResult Used By: Cart */ - class SaveAddressResponse: Codable { + class SaveAddressResult: Codable { public var id: String? diff --git a/Sources/code/application/Models/Cart/SelectCartAddressRequestCartAppModel.swift b/Sources/code/application/Models/Cart/SelectCartAddressCreationCartAppModel.swift similarity index 96% rename from Sources/code/application/Models/Cart/SelectCartAddressRequestCartAppModel.swift rename to Sources/code/application/Models/Cart/SelectCartAddressCreationCartAppModel.swift index 87e53efa1e..7168040612 100644 --- a/Sources/code/application/Models/Cart/SelectCartAddressRequestCartAppModel.swift +++ b/Sources/code/application/Models/Cart/SelectCartAddressCreationCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: SelectCartAddressRequest + Model: SelectCartAddressCreation Used By: Cart */ - class SelectCartAddressRequest: Codable { + class SelectCartAddressCreation: Codable { public var id: String? diff --git a/Sources/code/application/Models/Cart/SharedCartResponseCartAppModel.swift b/Sources/code/application/Models/Cart/SharedCartResultCartAppModel.swift similarity index 96% rename from Sources/code/application/Models/Cart/SharedCartResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/SharedCartResultCartAppModel.swift index b3cdb36735..89e8022bee 100644 --- a/Sources/code/application/Models/Cart/SharedCartResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/SharedCartResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: SharedCartResponse + Model: SharedCartResult Used By: Cart */ - class SharedCartResponse: Codable { + class SharedCartResult: Codable { public var error: String? diff --git a/Sources/code/application/Models/Cart/ShipmentResponseCartAppModel.swift b/Sources/code/application/Models/Cart/ShipmentResultCartAppModel.swift similarity index 99% rename from Sources/code/application/Models/Cart/ShipmentResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/ShipmentResultCartAppModel.swift index 228cf4fb95..43d7c38afc 100644 --- a/Sources/code/application/Models/Cart/ShipmentResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/ShipmentResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: ShipmentResponse + Model: ShipmentResult Used By: Cart */ - class ShipmentResponse: Codable { + class ShipmentResult: Codable { public var shipments: Int? diff --git a/Sources/code/application/Models/Cart/UpdateAddressResponseCartAppModel.swift b/Sources/code/application/Models/Cart/UpdateAddressResultCartAppModel.swift similarity index 97% rename from Sources/code/application/Models/Cart/UpdateAddressResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/UpdateAddressResultCartAppModel.swift index 059258aadf..b12627172e 100644 --- a/Sources/code/application/Models/Cart/UpdateAddressResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/UpdateAddressResultCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: UpdateAddressResponse + Model: UpdateAddressResult Used By: Cart */ - class UpdateAddressResponse: Codable { + class UpdateAddressResult: Codable { public var isUpdated: Bool? diff --git a/Sources/code/application/Models/Cart/UpdateCartRequestCartAppModel.swift b/Sources/code/application/Models/Cart/UpdateCartCreationCartAppModel.swift similarity index 63% rename from Sources/code/application/Models/Cart/UpdateCartRequestCartAppModel.swift rename to Sources/code/application/Models/Cart/UpdateCartCreationCartAppModel.swift index 72ecd7ffba..3b296a3091 100644 --- a/Sources/code/application/Models/Cart/UpdateCartRequestCartAppModel.swift +++ b/Sources/code/application/Models/Cart/UpdateCartCreationCartAppModel.swift @@ -3,13 +3,15 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: UpdateCartRequest + Model: UpdateCartCreation Used By: Cart */ - class UpdateCartRequest: Codable { + class UpdateCartCreation: Codable { public var items: [UpdateProductCart]? + public var freeGiftItems: [FreeGiftItemCreation]? + public var operation: String @@ -17,14 +19,18 @@ public extension ApplicationClient.Cart { case items = "items" + case freeGiftItems = "free_gift_items" + case operation = "operation" } - public init(items: [UpdateProductCart]? = nil, operation: String) { + public init(freeGiftItems: [FreeGiftItemCreation]? = nil, items: [UpdateProductCart]? = nil, operation: String) { self.items = items + self.freeGiftItems = freeGiftItems + self.operation = operation } @@ -45,6 +51,18 @@ public extension ApplicationClient.Cart { + do { + freeGiftItems = try container.decode([FreeGiftItemCreation].self, forKey: .freeGiftItems) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + operation = try container.decode(String.self, forKey: .operation) @@ -59,6 +77,10 @@ public extension ApplicationClient.Cart { + try? container.encodeIfPresent(freeGiftItems, forKey: .freeGiftItems) + + + try? container.encodeIfPresent(operation, forKey: .operation) diff --git a/Sources/code/application/Models/Cart/UpdateCartDetailResponseCartAppModel.swift b/Sources/code/application/Models/Cart/UpdateCartDetailResultCartAppModel.swift similarity index 88% rename from Sources/code/application/Models/Cart/UpdateCartDetailResponseCartAppModel.swift rename to Sources/code/application/Models/Cart/UpdateCartDetailResultCartAppModel.swift index 35d4177761..2c3e28ce8e 100644 --- a/Sources/code/application/Models/Cart/UpdateCartDetailResponseCartAppModel.swift +++ b/Sources/code/application/Models/Cart/UpdateCartDetailResultCartAppModel.swift @@ -3,14 +3,14 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: UpdateCartDetailResponse + Model: UpdateCartDetailResult Used By: Cart */ - class UpdateCartDetailResponse: Codable { + class UpdateCartDetailResult: Codable { public var message: String? - public var cart: CartDetailResponse? + public var cart: CartDetailResult? public var success: Bool? @@ -25,7 +25,7 @@ public extension ApplicationClient.Cart { } - public init(cart: CartDetailResponse? = nil, message: String? = nil, success: Bool? = nil) { + public init(cart: CartDetailResult? = nil, message: String? = nil, success: Bool? = nil) { self.message = message @@ -52,7 +52,7 @@ public extension ApplicationClient.Cart { do { - cart = try container.decode(CartDetailResponse.self, forKey: .cart) + cart = try container.decode(CartDetailResult.self, forKey: .cart) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Cart/UpdateCartPaymentRequestCartAppModel.swift b/Sources/code/application/Models/Cart/UpdateCartPaymentCreationCartAppModel.swift similarity index 98% rename from Sources/code/application/Models/Cart/UpdateCartPaymentRequestCartAppModel.swift rename to Sources/code/application/Models/Cart/UpdateCartPaymentCreationCartAppModel.swift index 18ec46ec52..2b3509eff4 100644 --- a/Sources/code/application/Models/Cart/UpdateCartPaymentRequestCartAppModel.swift +++ b/Sources/code/application/Models/Cart/UpdateCartPaymentCreationCartAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Cart { /* - Model: UpdateCartPaymentRequest + Model: UpdateCartPaymentCreation Used By: Cart */ - class UpdateCartPaymentRequest: Codable { + class UpdateCartPaymentCreation: Codable { public var id: String? diff --git a/Sources/code/application/Models/Cart/ValidationConfigCartAppModel.swift b/Sources/code/application/Models/Cart/ValidationConfigCartAppModel.swift new file mode 100644 index 0000000000..80ea7c62a9 --- /dev/null +++ b/Sources/code/application/Models/Cart/ValidationConfigCartAppModel.swift @@ -0,0 +1,61 @@ + + +import Foundation +public extension ApplicationClient.Cart { + /* + Model: ValidationConfig + Used By: Cart + */ + class ValidationConfig: Codable { + + public var addressMaxLimit: Int + + public var userAddressCount: Int + + + public enum CodingKeys: String, CodingKey { + + case addressMaxLimit = "address_max_limit" + + case userAddressCount = "user_address_count" + + } + + public init(addressMaxLimit: Int, userAddressCount: Int) { + + self.addressMaxLimit = addressMaxLimit + + self.userAddressCount = userAddressCount + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + addressMaxLimit = try container.decode(Int.self, forKey: .addressMaxLimit) + + + + + userAddressCount = try container.decode(Int.self, forKey: .userAddressCount) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(addressMaxLimit, forKey: .addressMaxLimit) + + + + try? container.encodeIfPresent(userAddressCount, forKey: .userAddressCount) + + + } + + } +} diff --git a/Sources/code/application/Models/Cart/ValidationErrorCartAppModel.swift b/Sources/code/application/Models/Cart/ValidationErrorCartAppModel.swift new file mode 100644 index 0000000000..3ae4f8b69b --- /dev/null +++ b/Sources/code/application/Models/Cart/ValidationErrorCartAppModel.swift @@ -0,0 +1,61 @@ + + +import Foundation +public extension ApplicationClient.Cart { + /* + Model: ValidationError + Used By: Cart + */ + class ValidationError: Codable { + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(message, forKey: .message) + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} diff --git a/Sources/code/application/Models/Catalog/AppStoreCatalogAppModel.swift b/Sources/code/application/Models/Catalog/AppStoreCatalogAppModel.swift index 794329c02d..45a6ff3470 100644 --- a/Sources/code/application/Models/Catalog/AppStoreCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/AppStoreCatalogAppModel.swift @@ -14,11 +14,11 @@ public extension ApplicationClient.Catalog { public var company: CompanyStore? - public var manager: StoreManagerSerializer? + public var manager: StoreManagerSchema? public var storeCode: String? - public var address: StoreAddressSerializer? + public var address: StoreAddressSchema? public var name: String? @@ -45,7 +45,7 @@ public extension ApplicationClient.Catalog { } - public init(address: StoreAddressSerializer? = nil, company: CompanyStore? = nil, contactNumbers: [SellerPhoneNumber]? = nil, departments: [StoreDepartments]? = nil, manager: StoreManagerSerializer? = nil, name: String? = nil, storeCode: String? = nil, uid: Int? = nil) { + public init(address: StoreAddressSchema? = nil, company: CompanyStore? = nil, contactNumbers: [SellerPhoneNumber]? = nil, departments: [StoreDepartments]? = nil, manager: StoreManagerSchema? = nil, name: String? = nil, storeCode: String? = nil, uid: Int? = nil) { self.uid = uid @@ -106,7 +106,7 @@ public extension ApplicationClient.Catalog { do { - manager = try container.decode(StoreManagerSerializer.self, forKey: .manager) + manager = try container.decode(StoreManagerSchema.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,7 +130,7 @@ public extension ApplicationClient.Catalog { do { - address = try container.decode(StoreAddressSerializer.self, forKey: .address) + address = try container.decode(StoreAddressSchema.self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Catalog/AutoCompleteResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/AutoCompleteResponseSchemaCatalogAppModel.swift similarity index 93% rename from Sources/code/application/Models/Catalog/AutoCompleteResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/AutoCompleteResponseSchemaCatalogAppModel.swift index dca1f97c17..dde7da6d11 100644 --- a/Sources/code/application/Models/Catalog/AutoCompleteResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/AutoCompleteResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: AutoCompleteResponse + Model: AutoCompleteResponseSchema Used By: Catalog */ - class AutoCompleteResponse: Codable { + class AutoCompleteResponseSchema: Codable { public var items: [AutocompleteItem]? diff --git a/Sources/code/application/Models/Catalog/BrandDetailResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/BrandDetailResponseSchemaCatalogAppModel.swift similarity index 98% rename from Sources/code/application/Models/Catalog/BrandDetailResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/BrandDetailResponseSchemaCatalogAppModel.swift index c1b9edafd3..d5e0b2f464 100644 --- a/Sources/code/application/Models/Catalog/BrandDetailResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/BrandDetailResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: BrandDetailResponse + Model: BrandDetailResponseSchema Used By: Catalog */ - class BrandDetailResponse: Codable { + class BrandDetailResponseSchema: Codable { public var logo: Media? diff --git a/Sources/code/application/Models/Catalog/BrandListingResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/BrandListingResponseSchemaCatalogAppModel.swift similarity index 94% rename from Sources/code/application/Models/Catalog/BrandListingResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/BrandListingResponseSchemaCatalogAppModel.swift index 3385b9bfdb..820497818f 100644 --- a/Sources/code/application/Models/Catalog/BrandListingResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/BrandListingResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: BrandListingResponse + Model: BrandListingResponseSchema Used By: Catalog */ - class BrandListingResponse: Codable { + class BrandListingResponseSchema: Codable { public var items: [BrandItem]? diff --git a/Sources/code/application/Models/Catalog/CategoryListingResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/CategoryListingResponseSchemaCatalogAppModel.swift similarity index 95% rename from Sources/code/application/Models/Catalog/CategoryListingResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/CategoryListingResponseSchemaCatalogAppModel.swift index 915df531ab..b3efd65768 100644 --- a/Sources/code/application/Models/Catalog/CategoryListingResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/CategoryListingResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: CategoryListingResponse + Model: CategoryListingResponseSchema Used By: Catalog */ - class CategoryListingResponse: Codable { + class CategoryListingResponseSchema: Codable { public var data: [DepartmentCategoryTree]? diff --git a/Sources/code/application/Models/Catalog/CategoryMetaResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/CategoryMetaResponseSchemaCatalogAppModel.swift similarity index 97% rename from Sources/code/application/Models/Catalog/CategoryMetaResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/CategoryMetaResponseSchemaCatalogAppModel.swift index 19f4a61adc..b3aa2d6900 100644 --- a/Sources/code/application/Models/Catalog/CategoryMetaResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/CategoryMetaResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: CategoryMetaResponse + Model: CategoryMetaResponseSchema Used By: Catalog */ - class CategoryMetaResponse: Codable { + class CategoryMetaResponseSchema: Codable { public var logo: Media? diff --git a/Sources/code/application/Models/Catalog/CollectionDetailResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/CollectionDetailResponseSchemaCatalogAppModel.swift similarity index 99% rename from Sources/code/application/Models/Catalog/CollectionDetailResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/CollectionDetailResponseSchemaCatalogAppModel.swift index 3554ce7deb..2dfa7a792e 100644 --- a/Sources/code/application/Models/Catalog/CollectionDetailResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/CollectionDetailResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: CollectionDetailResponse + Model: CollectionDetailResponseSchema Used By: Catalog */ - class CollectionDetailResponse: Codable { + class CollectionDetailResponseSchema: Codable { public var isActive: Bool? diff --git a/Sources/code/application/Models/Catalog/DepartmentResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/DepartmentResponseSchemaCatalogAppModel.swift similarity index 93% rename from Sources/code/application/Models/Catalog/DepartmentResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/DepartmentResponseSchemaCatalogAppModel.swift index f3dd44944b..86c21d8fe0 100644 --- a/Sources/code/application/Models/Catalog/DepartmentResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/DepartmentResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: DepartmentResponse + Model: DepartmentResponseSchema Used By: Catalog */ - class DepartmentResponse: Codable { + class DepartmentResponseSchema: Codable { public var items: [Department]? diff --git a/Sources/code/application/Models/Catalog/ErrorResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ErrorResponseSchemaCatalogAppModel.swift similarity index 94% rename from Sources/code/application/Models/Catalog/ErrorResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/ErrorResponseSchemaCatalogAppModel.swift index 664a8469e0..4806074c85 100644 --- a/Sources/code/application/Models/Catalog/ErrorResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ErrorResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: ErrorResponse + Model: ErrorResponseSchema Used By: Catalog */ - class ErrorResponse: Codable { + class ErrorResponseSchema: Codable { public var error: String? diff --git a/Sources/code/application/Models/Catalog/FollowIdsResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/FollowIdsResponseSchemaCatalogAppModel.swift similarity index 93% rename from Sources/code/application/Models/Catalog/FollowIdsResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/FollowIdsResponseSchemaCatalogAppModel.swift index 1ba345d602..d8aa08a13c 100644 --- a/Sources/code/application/Models/Catalog/FollowIdsResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/FollowIdsResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: FollowIdsResponse + Model: FollowIdsResponseSchema Used By: Catalog */ - class FollowIdsResponse: Codable { + class FollowIdsResponseSchema: Codable { public var data: FollowIdsData? diff --git a/Sources/code/application/Models/Catalog/FollowPostResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/FollowPostResponseSchemaCatalogAppModel.swift similarity index 93% rename from Sources/code/application/Models/Catalog/FollowPostResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/FollowPostResponseSchemaCatalogAppModel.swift index 8f044b81e1..f524cabd6c 100644 --- a/Sources/code/application/Models/Catalog/FollowPostResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/FollowPostResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: FollowPostResponse + Model: FollowPostResponseSchema Used By: Catalog */ - class FollowPostResponse: Codable { + class FollowPostResponseSchema: Codable { public var message: String diff --git a/Sources/code/application/Models/Catalog/FollowerCountResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/FollowerCountResponseSchemaCatalogAppModel.swift similarity index 93% rename from Sources/code/application/Models/Catalog/FollowerCountResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/FollowerCountResponseSchemaCatalogAppModel.swift index ab867fd749..990e60d1b3 100644 --- a/Sources/code/application/Models/Catalog/FollowerCountResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/FollowerCountResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: FollowerCountResponse + Model: FollowerCountResponseSchema Used By: Catalog */ - class FollowerCountResponse: Codable { + class FollowerCountResponseSchema: Codable { public var count: Int? diff --git a/Sources/code/application/Models/Catalog/GetCollectionListingResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/GetCollectionListingResponseSchemaCatalogAppModel.swift similarity index 95% rename from Sources/code/application/Models/Catalog/GetCollectionListingResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/GetCollectionListingResponseSchemaCatalogAppModel.swift index f1cb2d8193..9e26f666c4 100644 --- a/Sources/code/application/Models/Catalog/GetCollectionListingResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/GetCollectionListingResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: GetCollectionListingResponse + Model: GetCollectionListingResponseSchema Used By: Catalog */ - class GetCollectionListingResponse: Codable { + class GetCollectionListingResponseSchema: Codable { public var items: [GetCollectionDetailNest]? diff --git a/Sources/code/application/Models/Catalog/GetFollowListingResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/GetFollowListingResponseSchemaCatalogAppModel.swift similarity index 93% rename from Sources/code/application/Models/Catalog/GetFollowListingResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/GetFollowListingResponseSchemaCatalogAppModel.swift index 70e43db47b..bc9f42acfa 100644 --- a/Sources/code/application/Models/Catalog/GetFollowListingResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/GetFollowListingResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: GetFollowListingResponse + Model: GetFollowListingResponseSchema Used By: Catalog */ - class GetFollowListingResponse: Codable { + class GetFollowListingResponseSchema: Codable { public var items: [ProductListingDetail] diff --git a/Sources/code/application/Models/Catalog/HomeListingResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/HomeListingResponseSchemaCatalogAppModel.swift similarity index 96% rename from Sources/code/application/Models/Catalog/HomeListingResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/HomeListingResponseSchemaCatalogAppModel.swift index c12bf300b5..26e2a062ba 100644 --- a/Sources/code/application/Models/Catalog/HomeListingResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/HomeListingResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: HomeListingResponse + Model: HomeListingResponseSchema Used By: Catalog */ - class HomeListingResponse: Codable { + class HomeListingResponseSchema: Codable { public var items: [ProductListingDetail]? diff --git a/Sources/code/application/Models/Catalog/IdentifierCatalogAppModel.swift b/Sources/code/application/Models/Catalog/IdentifierCatalogAppModel.swift new file mode 100644 index 0000000000..37c1b6672a --- /dev/null +++ b/Sources/code/application/Models/Catalog/IdentifierCatalogAppModel.swift @@ -0,0 +1,141 @@ + + +import Foundation +public extension ApplicationClient.Catalog { + /* + Model: Identifier + Used By: Catalog + */ + class Identifier: Codable { + + public var ean: String? + + public var skuCode: String? + + public var alu: String? + + public var upc: String? + + public var isbn: String? + + + public enum CodingKeys: String, CodingKey { + + case ean = "ean" + + case skuCode = "sku_code" + + case alu = "alu" + + case upc = "upc" + + case isbn = "isbn" + + } + + public init(alu: String? = nil, ean: String? = nil, isbn: String? = nil, skuCode: String? = nil, upc: String? = nil) { + + self.ean = ean + + self.skuCode = skuCode + + self.alu = alu + + self.upc = upc + + self.isbn = isbn + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + ean = try container.decode(String.self, forKey: .ean) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + skuCode = try container.decode(String.self, forKey: .skuCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + alu = try container.decode(String.self, forKey: .alu) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + upc = try container.decode(String.self, forKey: .upc) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + isbn = try container.decode(String.self, forKey: .isbn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(ean, forKey: .ean) + + + + try? container.encodeIfPresent(skuCode, forKey: .skuCode) + + + + try? container.encodeIfPresent(alu, forKey: .alu) + + + + try? container.encodeIfPresent(upc, forKey: .upc) + + + + try? container.encodeIfPresent(isbn, forKey: .isbn) + + + } + + } +} diff --git a/Sources/code/application/Models/Catalog/ProductCompareResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductCompareResponseSchemaCatalogAppModel.swift similarity index 97% rename from Sources/code/application/Models/Catalog/ProductCompareResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/ProductCompareResponseSchemaCatalogAppModel.swift index 56147ea84b..c5ed5927c6 100644 --- a/Sources/code/application/Models/Catalog/ProductCompareResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductCompareResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: ProductCompareResponse + Model: ProductCompareResponseSchema Used By: Catalog */ - class ProductCompareResponse: Codable { + class ProductCompareResponseSchema: Codable { public var title: String? diff --git a/Sources/code/application/Models/Catalog/ProductDetailsCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductDetailsCatalogAppModel.swift index 8e3920af01..4f233d239a 100644 --- a/Sources/code/application/Models/Catalog/ProductDetailsCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductDetailsCatalogAppModel.swift @@ -44,7 +44,7 @@ public extension ApplicationClient.Catalog { public var rating: Double? - public var identifier: [String: Any]? + public var identifier: Identifier? public var highlights: [[String: Any]]? @@ -97,7 +97,7 @@ public extension ApplicationClient.Catalog { } - public init(attributes: [String: Any]? = nil, brandUid: Int? = nil, countryOfOrigin: [String: Any]? = nil, description: [String: Any]? = nil, groupedAttributes: [String: Any]? = nil, hasVariant: Bool? = nil, highlights: [[String: Any]]? = nil, hsnCode: Int? = nil, identifier: [String: Any]? = nil, images: [[String: Any]]? = nil, imageNature: [String: Any]? = nil, isSet: Bool? = nil, itemCode: [String: Any]? = nil, media: [[String: Any]]? = nil, name: [String: Any]? = nil, outOfStock: Bool? = nil, rating: Double? = nil, ratingCount: Int? = nil, shortDescription: [String: Any]? = nil, slug: [String: Any]? = nil, templateTag: [String: Any]? = nil) { + public init(attributes: [String: Any]? = nil, brandUid: Int? = nil, countryOfOrigin: [String: Any]? = nil, description: [String: Any]? = nil, groupedAttributes: [String: Any]? = nil, hasVariant: Bool? = nil, highlights: [[String: Any]]? = nil, hsnCode: Int? = nil, identifier: Identifier? = nil, images: [[String: Any]]? = nil, imageNature: [String: Any]? = nil, isSet: Bool? = nil, itemCode: [String: Any]? = nil, media: [[String: Any]]? = nil, name: [String: Any]? = nil, outOfStock: Bool? = nil, rating: Double? = nil, ratingCount: Int? = nil, shortDescription: [String: Any]? = nil, slug: [String: Any]? = nil, templateTag: [String: Any]? = nil) { self.templateTag = templateTag @@ -364,7 +364,7 @@ public extension ApplicationClient.Catalog { do { - identifier = try container.decode([String: Any].self, forKey: .identifier) + identifier = try container.decode(Identifier.self, forKey: .identifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Catalog/ProductFrequentlyComparedSimilarResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductFrequentlyComparedSimilarResponseSchemaCatalogAppModel.swift similarity index 79% rename from Sources/code/application/Models/Catalog/ProductFrequentlyComparedSimilarResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/ProductFrequentlyComparedSimilarResponseSchemaCatalogAppModel.swift index 1a01f158c3..bc14177912 100644 --- a/Sources/code/application/Models/Catalog/ProductFrequentlyComparedSimilarResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductFrequentlyComparedSimilarResponseSchemaCatalogAppModel.swift @@ -3,12 +3,12 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: ProductFrequentlyComparedSimilarResponse + Model: ProductFrequentlyComparedSimilarResponseSchema Used By: Catalog */ - class ProductFrequentlyComparedSimilarResponse: Codable { + class ProductFrequentlyComparedSimilarResponseSchema: Codable { - public var similars: ProductCompareResponse? + public var similars: ProductCompareResponseSchema? public enum CodingKeys: String, CodingKey { @@ -17,7 +17,7 @@ public extension ApplicationClient.Catalog { } - public init(similars: ProductCompareResponse? = nil) { + public init(similars: ProductCompareResponseSchema? = nil) { self.similars = similars @@ -28,7 +28,7 @@ public extension ApplicationClient.Catalog { do { - similars = try container.decode(ProductCompareResponse.self, forKey: .similars) + similars = try container.decode(ProductCompareResponseSchema.self, forKey: .similars) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Catalog/ProductListingDetailCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductListingDetailCatalogAppModel.swift index 2f418bf016..a57a93f618 100644 --- a/Sources/code/application/Models/Catalog/ProductListingDetailCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductListingDetailCatalogAppModel.swift @@ -62,7 +62,7 @@ public extension ApplicationClient.Catalog { public var attributes: [String: Any]? - public var variants: [ProductVariantListingResponse]? + public var variants: [ProductVariantListingResponseSchema]? public var discount: String? @@ -173,7 +173,7 @@ public extension ApplicationClient.Catalog { } - public init(action: ProductListingAction? = nil, attributes: [String: Any]? = nil, brand: ProductBrand? = nil, categories: [ProductBrand]? = nil, categoryMap: ProductCategoryMap? = nil, color: String? = nil, customOrder: ProductDetailCustomOrder? = nil, description: String? = nil, discount: String? = nil, groupedAttributes: [ProductDetailGroupedAttribute]? = nil, hasVariant: Bool? = nil, highlights: [String]? = nil, identifiers: [String]? = nil, imageNature: String? = nil, isDependent: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, medias: [Media]? = nil, moq: ApplicationItemMOQ? = nil, name: String? = nil, netQuantity: NetQuantity? = nil, price: ProductListingPrice? = nil, productGroupTag: [String]? = nil, productOnlineDate: String? = nil, rating: Double? = nil, ratingCount: Int? = nil, sellable: Bool? = nil, seo: ApplicationItemSEO? = nil, shortDescription: String? = nil, similars: [String]? = nil, sizes: [String]? = nil, slug: String, tags: [String]? = nil, teaserTag: String? = nil, tryouts: [String]? = nil, type: String? = nil, uid: Int? = nil, variants: [ProductVariantListingResponse]? = nil, customJson: [String: Any]? = nil, customMeta: [CustomMetaFields]? = nil) { + public init(action: ProductListingAction? = nil, attributes: [String: Any]? = nil, brand: ProductBrand? = nil, categories: [ProductBrand]? = nil, categoryMap: ProductCategoryMap? = nil, color: String? = nil, customOrder: ProductDetailCustomOrder? = nil, description: String? = nil, discount: String? = nil, groupedAttributes: [ProductDetailGroupedAttribute]? = nil, hasVariant: Bool? = nil, highlights: [String]? = nil, identifiers: [String]? = nil, imageNature: String? = nil, isDependent: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, medias: [Media]? = nil, moq: ApplicationItemMOQ? = nil, name: String? = nil, netQuantity: NetQuantity? = nil, price: ProductListingPrice? = nil, productGroupTag: [String]? = nil, productOnlineDate: String? = nil, rating: Double? = nil, ratingCount: Int? = nil, sellable: Bool? = nil, seo: ApplicationItemSEO? = nil, shortDescription: String? = nil, similars: [String]? = nil, sizes: [String]? = nil, slug: String, tags: [String]? = nil, teaserTag: String? = nil, tryouts: [String]? = nil, type: String? = nil, uid: Int? = nil, variants: [ProductVariantListingResponseSchema]? = nil, customJson: [String: Any]? = nil, customMeta: [CustomMetaFields]? = nil) { self.uid = uid @@ -586,7 +586,7 @@ public extension ApplicationClient.Catalog { do { - variants = try container.decode([ProductVariantListingResponse].self, forKey: .variants) + variants = try container.decode([ProductVariantListingResponseSchema].self, forKey: .variants) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Catalog/ProductListingResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductListingResponseSchemaCatalogAppModel.swift similarity index 97% rename from Sources/code/application/Models/Catalog/ProductListingResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/ProductListingResponseSchemaCatalogAppModel.swift index b70168d172..dded566a0c 100644 --- a/Sources/code/application/Models/Catalog/ProductListingResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductListingResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: ProductListingResponse + Model: ProductListingResponseSchema Used By: Catalog */ - class ProductListingResponse: Codable { + class ProductListingResponseSchema: Codable { public var items: [ProductListingDetail]? diff --git a/Sources/code/application/Models/Catalog/ProductStockStatusItemCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductStockStatusItemCatalogAppModel.swift index f0067380d2..67ed6a25fb 100644 --- a/Sources/code/application/Models/Catalog/ProductStockStatusItemCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductStockStatusItemCatalogAppModel.swift @@ -24,7 +24,7 @@ public extension ApplicationClient.Catalog { public var seller: Seller? - public var identifier: [String: Any]? + public var identifier: Identifier? public enum CodingKeys: String, CodingKey { @@ -49,7 +49,7 @@ public extension ApplicationClient.Catalog { } - 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) { + public init(company: CompanyDetail? = nil, identifier: Identifier? = nil, itemId: Int? = nil, price: ProductStockPrice? = nil, quantity: Int? = nil, seller: Seller? = nil, size: String? = nil, store: StoreDetail? = nil, uid: String? = nil) { self.uid = uid @@ -172,7 +172,7 @@ public extension ApplicationClient.Catalog { do { - identifier = try container.decode([String: Any].self, forKey: .identifier) + identifier = try container.decode(Identifier.self, forKey: .identifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Catalog/ProductStockStatusResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductStockStatusResponseSchemaCatalogAppModel.swift similarity index 92% rename from Sources/code/application/Models/Catalog/ProductStockStatusResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/ProductStockStatusResponseSchemaCatalogAppModel.swift index 3a1138e969..140c072d04 100644 --- a/Sources/code/application/Models/Catalog/ProductStockStatusResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductStockStatusResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: ProductStockStatusResponse + Model: ProductStockStatusResponseSchema Used By: Catalog */ - class ProductStockStatusResponse: Codable { + class ProductStockStatusResponseSchema: Codable { public var items: [ProductStockStatusItem]? diff --git a/Sources/code/application/Models/Catalog/ProductVariantItemResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductVariantItemResponseSchemaCatalogAppModel.swift similarity index 98% rename from Sources/code/application/Models/Catalog/ProductVariantItemResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/ProductVariantItemResponseSchemaCatalogAppModel.swift index eda8000211..3dbb88fefd 100644 --- a/Sources/code/application/Models/Catalog/ProductVariantItemResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductVariantItemResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: ProductVariantItemResponse + Model: ProductVariantItemResponseSchema Used By: Catalog */ - class ProductVariantItemResponse: Codable { + class ProductVariantItemResponseSchema: Codable { public var uid: Int? diff --git a/Sources/code/application/Models/Catalog/ProductVariantListingResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductVariantListingResponseSchemaCatalogAppModel.swift similarity index 92% rename from Sources/code/application/Models/Catalog/ProductVariantListingResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/ProductVariantListingResponseSchemaCatalogAppModel.swift index e081bf5f0e..3aacd98c2a 100644 --- a/Sources/code/application/Models/Catalog/ProductVariantListingResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductVariantListingResponseSchemaCatalogAppModel.swift @@ -3,14 +3,14 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: ProductVariantListingResponse + Model: ProductVariantListingResponseSchema Used By: Catalog */ - class ProductVariantListingResponse: Codable { + class ProductVariantListingResponseSchema: Codable { public var header: String? - public var items: [ProductVariantItemResponse]? + public var items: [ProductVariantItemResponseSchema]? public var total: Int? @@ -33,7 +33,7 @@ public extension ApplicationClient.Catalog { } - public init(displayType: String? = nil, header: String? = nil, items: [ProductVariantItemResponse]? = nil, key: String? = nil, total: Int? = nil) { + public init(displayType: String? = nil, header: String? = nil, items: [ProductVariantItemResponseSchema]? = nil, key: String? = nil, total: Int? = nil) { self.header = header @@ -64,7 +64,7 @@ public extension ApplicationClient.Catalog { do { - items = try container.decode([ProductVariantItemResponse].self, forKey: .items) + items = try container.decode([ProductVariantItemResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Catalog/ProductVariantResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductVariantResponseSchemaCatalogAppModel.swift similarity index 94% rename from Sources/code/application/Models/Catalog/ProductVariantResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/ProductVariantResponseSchemaCatalogAppModel.swift index b0a9915000..5ac0f5156e 100644 --- a/Sources/code/application/Models/Catalog/ProductVariantResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductVariantResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: ProductVariantResponse + Model: ProductVariantResponseSchema Used By: Catalog */ - class ProductVariantResponse: Codable { + class ProductVariantResponseSchema: Codable { public var displayType: String? @@ -14,7 +14,7 @@ public extension ApplicationClient.Catalog { public var groupId: String? - public var items: [ProductVariantItemResponse]? + public var items: [ProductVariantItemResponseSchema]? public var key: String? @@ -37,7 +37,7 @@ public extension ApplicationClient.Catalog { } - public init(displayType: String? = nil, groupId: String? = nil, header: String? = nil, items: [ProductVariantItemResponse]? = nil, key: String? = nil, logo: String? = nil) { + public init(displayType: String? = nil, groupId: String? = nil, header: String? = nil, items: [ProductVariantItemResponseSchema]? = nil, key: String? = nil, logo: String? = nil) { self.displayType = displayType @@ -94,7 +94,7 @@ public extension ApplicationClient.Catalog { do { - items = try container.decode([ProductVariantItemResponse].self, forKey: .items) + items = try container.decode([ProductVariantItemResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Catalog/ProductVariantsResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductVariantsResponseSchemaCatalogAppModel.swift similarity index 81% rename from Sources/code/application/Models/Catalog/ProductVariantsResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/ProductVariantsResponseSchemaCatalogAppModel.swift index ed55445ff3..310576b7d9 100644 --- a/Sources/code/application/Models/Catalog/ProductVariantsResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductVariantsResponseSchemaCatalogAppModel.swift @@ -3,12 +3,12 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: ProductVariantsResponse + Model: ProductVariantsResponseSchema Used By: Catalog */ - class ProductVariantsResponse: Codable { + class ProductVariantsResponseSchema: Codable { - public var variants: [ProductVariantResponse]? + public var variants: [ProductVariantResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -17,7 +17,7 @@ public extension ApplicationClient.Catalog { } - public init(variants: [ProductVariantResponse]? = nil) { + public init(variants: [ProductVariantResponseSchema]? = nil) { self.variants = variants @@ -28,7 +28,7 @@ public extension ApplicationClient.Catalog { do { - variants = try container.decode([ProductVariantResponse].self, forKey: .variants) + variants = try container.decode([ProductVariantResponseSchema].self, forKey: .variants) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Catalog/ProductsComparisonResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/ProductsComparisonResponseSchemaCatalogAppModel.swift similarity index 95% rename from Sources/code/application/Models/Catalog/ProductsComparisonResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/ProductsComparisonResponseSchemaCatalogAppModel.swift index 07704a5b2c..21ce6a5e01 100644 --- a/Sources/code/application/Models/Catalog/ProductsComparisonResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/ProductsComparisonResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: ProductsComparisonResponse + Model: ProductsComparisonResponseSchema Used By: Catalog */ - class ProductsComparisonResponse: Codable { + class ProductsComparisonResponseSchema: Codable { public var items: [ProductDetail]? diff --git a/Sources/code/application/Models/Catalog/StoreAddressSerializerCatalogAppModel.swift b/Sources/code/application/Models/Catalog/StoreAddressSchemaCatalogAppModel.swift similarity index 98% rename from Sources/code/application/Models/Catalog/StoreAddressSerializerCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/StoreAddressSchemaCatalogAppModel.swift index 1b8e4f4b7f..e96e7894a8 100644 --- a/Sources/code/application/Models/Catalog/StoreAddressSerializerCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/StoreAddressSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: StoreAddressSerializer + Model: StoreAddressSchema Used By: Catalog */ - class StoreAddressSerializer: Codable { + class StoreAddressSchema: Codable { public var latitude: Double? diff --git a/Sources/code/application/Models/Catalog/StoreCatalogAppModel.swift b/Sources/code/application/Models/Catalog/StoreCatalogAppModel.swift index be98d04444..dae4891cac 100644 --- a/Sources/code/application/Models/Catalog/StoreCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/StoreCatalogAppModel.swift @@ -30,6 +30,8 @@ public extension ApplicationClient.Catalog { public var tags: [String]? + public var contacts: [StoreContact]? + public enum CodingKeys: String, CodingKey { @@ -55,9 +57,11 @@ public extension ApplicationClient.Catalog { case tags = "tags" + case contacts = "contacts" + } - 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, tags: [String]? = nil, uid: Int? = nil) { + public init(address: String? = nil, city: String? = nil, contacts: [StoreContact]? = nil, country: String? = nil, latLong: LatLong? = nil, name: String? = nil, pincode: Int? = nil, state: String? = nil, storeCode: String? = nil, storeEmail: String? = nil, tags: [String]? = nil, uid: Int? = nil) { self.uid = uid @@ -81,6 +85,8 @@ public extension ApplicationClient.Catalog { self.tags = tags + self.contacts = contacts + } required public init(from decoder: Decoder) throws { @@ -218,6 +224,18 @@ public extension ApplicationClient.Catalog { } + + do { + contacts = try container.decode([StoreContact].self, forKey: .contacts) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -267,6 +285,10 @@ public extension ApplicationClient.Catalog { try? container.encodeIfPresent(tags, forKey: .tags) + + try? container.encodeIfPresent(contacts, forKey: .contacts) + + } } diff --git a/Sources/code/application/Models/Catalog/StoreContactCatalogAppModel.swift b/Sources/code/application/Models/Catalog/StoreContactCatalogAppModel.swift new file mode 100644 index 0000000000..97b77e3dd0 --- /dev/null +++ b/Sources/code/application/Models/Catalog/StoreContactCatalogAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Catalog { + /* + Model: StoreContact + Used By: Catalog + */ + class StoreContact: Codable { + + public var number: String? + + public var countryCode: Int? + + + public enum CodingKeys: String, CodingKey { + + case number = "number" + + case countryCode = "country_code" + + } + + public init(countryCode: Int? = nil, number: String? = nil) { + + self.number = number + + self.countryCode = countryCode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + number = try container.decode(String.self, forKey: .number) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + countryCode = try container.decode(Int.self, forKey: .countryCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(number, forKey: .number) + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + } + + } +} diff --git a/Sources/code/application/Models/Catalog/StoreDetailsCatalogAppModel.swift b/Sources/code/application/Models/Catalog/StoreDetailsCatalogAppModel.swift index d636fde1b6..68de7b58ba 100644 --- a/Sources/code/application/Models/Catalog/StoreDetailsCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/StoreDetailsCatalogAppModel.swift @@ -14,13 +14,13 @@ public extension ApplicationClient.Catalog { public var company: CompanyStore? - public var manager: StoreManagerSerializer? + public var manager: StoreManagerSchema? public var storeCode: String? public var timing: [StoreTiming]? - public var address: StoreAddressSerializer? + public var address: StoreAddressSchema? public var customJson: [String: Any]? @@ -53,7 +53,7 @@ public extension ApplicationClient.Catalog { } - public init(address: StoreAddressSerializer? = nil, company: CompanyStore? = nil, contactNumbers: [SellerPhoneNumber]? = nil, departments: [StoreDepartments]? = nil, manager: StoreManagerSerializer? = nil, name: String? = nil, storeCode: String? = nil, timing: [StoreTiming]? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { + public init(address: StoreAddressSchema? = nil, company: CompanyStore? = nil, contactNumbers: [SellerPhoneNumber]? = nil, departments: [StoreDepartments]? = nil, manager: StoreManagerSchema? = nil, name: String? = nil, storeCode: String? = nil, timing: [StoreTiming]? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { self.uid = uid @@ -118,7 +118,7 @@ public extension ApplicationClient.Catalog { do { - manager = try container.decode(StoreManagerSerializer.self, forKey: .manager) + manager = try container.decode(StoreManagerSchema.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -154,7 +154,7 @@ public extension ApplicationClient.Catalog { do { - address = try container.decode(StoreAddressSerializer.self, forKey: .address) + address = try container.decode(StoreAddressSchema.self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Catalog/StoreListingResponseCatalogAppModel.swift b/Sources/code/application/Models/Catalog/StoreListingResponseSchemaCatalogAppModel.swift similarity index 93% rename from Sources/code/application/Models/Catalog/StoreListingResponseCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/StoreListingResponseSchemaCatalogAppModel.swift index 33881a5146..645c28f7ae 100644 --- a/Sources/code/application/Models/Catalog/StoreListingResponseCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/StoreListingResponseSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: StoreListingResponse + Model: StoreListingResponseSchema Used By: Catalog */ - class StoreListingResponse: Codable { + class StoreListingResponseSchema: Codable { public var items: [Store] diff --git a/Sources/code/application/Models/Catalog/StoreManagerSerializerCatalogAppModel.swift b/Sources/code/application/Models/Catalog/StoreManagerSchemaCatalogAppModel.swift similarity index 96% rename from Sources/code/application/Models/Catalog/StoreManagerSerializerCatalogAppModel.swift rename to Sources/code/application/Models/Catalog/StoreManagerSchemaCatalogAppModel.swift index f6059893f8..34610e0ffb 100644 --- a/Sources/code/application/Models/Catalog/StoreManagerSerializerCatalogAppModel.swift +++ b/Sources/code/application/Models/Catalog/StoreManagerSchemaCatalogAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Catalog { /* - Model: StoreManagerSerializer + Model: StoreManagerSchema Used By: Catalog */ - class StoreManagerSerializer: Codable { + class StoreManagerSchema: Codable { public var name: String? diff --git a/Sources/code/application/Models/Common/ApplicationResponseCommonAppModel.swift b/Sources/code/application/Models/Common/ApplicationResponseSchemaCommonAppModel.swift similarity index 93% rename from Sources/code/application/Models/Common/ApplicationResponseCommonAppModel.swift rename to Sources/code/application/Models/Common/ApplicationResponseSchemaCommonAppModel.swift index ab80d92f11..67fa5cb03d 100644 --- a/Sources/code/application/Models/Common/ApplicationResponseCommonAppModel.swift +++ b/Sources/code/application/Models/Common/ApplicationResponseSchemaCommonAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Common { /* - Model: ApplicationResponse + Model: ApplicationResponseSchema Used By: Common */ - class ApplicationResponse: Codable { + class ApplicationResponseSchema: Codable { public var application: Application? diff --git a/Sources/code/application/Models/Common/BadRequestCommonAppModel.swift b/Sources/code/application/Models/Common/BadRequestSchemaCommonAppModel.swift similarity index 94% rename from Sources/code/application/Models/Common/BadRequestCommonAppModel.swift rename to Sources/code/application/Models/Common/BadRequestSchemaCommonAppModel.swift index 2370b4fe8e..383e12b50c 100644 --- a/Sources/code/application/Models/Common/BadRequestCommonAppModel.swift +++ b/Sources/code/application/Models/Common/BadRequestSchemaCommonAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Common { /* - Model: BadRequest + Model: BadRequestSchema Used By: Common */ - class BadRequest: Codable { + class BadRequestSchema: Codable { public var message: String? diff --git a/Sources/code/application/Models/Configuration/AppCurrencyResponseConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/AppCurrencyResponseSchemaConfigurationAppModel.swift similarity index 98% rename from Sources/code/application/Models/Configuration/AppCurrencyResponseConfigurationAppModel.swift rename to Sources/code/application/Models/Configuration/AppCurrencyResponseSchemaConfigurationAppModel.swift index 8a0d5ef230..e3eca5e2bb 100644 --- a/Sources/code/application/Models/Configuration/AppCurrencyResponseConfigurationAppModel.swift +++ b/Sources/code/application/Models/Configuration/AppCurrencyResponseSchemaConfigurationAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Configuration { /* - Model: AppCurrencyResponse + Model: AppCurrencyResponseSchema Used By: Configuration */ - class AppCurrencyResponse: Codable { + class AppCurrencyResponseSchema: Codable { public var application: String? diff --git a/Sources/code/application/Models/Configuration/AppFeatureResponseConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/AppFeatureResponseSchemaConfigurationAppModel.swift similarity index 93% rename from Sources/code/application/Models/Configuration/AppFeatureResponseConfigurationAppModel.swift rename to Sources/code/application/Models/Configuration/AppFeatureResponseSchemaConfigurationAppModel.swift index 35e2cc6e5e..54b0682b46 100644 --- a/Sources/code/application/Models/Configuration/AppFeatureResponseConfigurationAppModel.swift +++ b/Sources/code/application/Models/Configuration/AppFeatureResponseSchemaConfigurationAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Configuration { /* - Model: AppFeatureResponse + Model: AppFeatureResponseSchema Used By: Configuration */ - class AppFeatureResponse: Codable { + class AppFeatureResponseSchema: Codable { public var feature: AppFeature? diff --git a/Sources/code/application/Models/Configuration/AppStaffListResponseConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/AppStaffListResponseSchemaConfigurationAppModel.swift similarity index 95% rename from Sources/code/application/Models/Configuration/AppStaffListResponseConfigurationAppModel.swift rename to Sources/code/application/Models/Configuration/AppStaffListResponseSchemaConfigurationAppModel.swift index d33b753aa4..3c57e034a8 100644 --- a/Sources/code/application/Models/Configuration/AppStaffListResponseConfigurationAppModel.swift +++ b/Sources/code/application/Models/Configuration/AppStaffListResponseSchemaConfigurationAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Configuration { /* - Model: AppStaffListResponse + Model: AppStaffListResponseSchema Used By: Configuration */ - class AppStaffListResponse: Codable { + class AppStaffListResponseSchema: Codable { public var page: Page? diff --git a/Sources/code/application/Models/Configuration/AppStaffResponseConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/AppStaffResponseSchemaConfigurationAppModel.swift similarity index 94% rename from Sources/code/application/Models/Configuration/AppStaffResponseConfigurationAppModel.swift rename to Sources/code/application/Models/Configuration/AppStaffResponseSchemaConfigurationAppModel.swift index 1769d6c7ea..ee664a2e6e 100644 --- a/Sources/code/application/Models/Configuration/AppStaffResponseConfigurationAppModel.swift +++ b/Sources/code/application/Models/Configuration/AppStaffResponseSchemaConfigurationAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Configuration { /* - Model: AppStaffResponse + Model: AppStaffResponseSchema Used By: Configuration */ - class AppStaffResponse: Codable { + class AppStaffResponseSchema: Codable { public var staffUsers: [AppStaff]? diff --git a/Sources/code/application/Models/Configuration/AppTokenResponseConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/AppTokenResponseSchemaConfigurationAppModel.swift similarity index 98% rename from Sources/code/application/Models/Configuration/AppTokenResponseConfigurationAppModel.swift rename to Sources/code/application/Models/Configuration/AppTokenResponseSchemaConfigurationAppModel.swift index cfd56fe364..c39af35524 100644 --- a/Sources/code/application/Models/Configuration/AppTokenResponseConfigurationAppModel.swift +++ b/Sources/code/application/Models/Configuration/AppTokenResponseSchemaConfigurationAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Configuration { /* - Model: AppTokenResponse + Model: AppTokenResponseSchema Used By: Configuration */ - class AppTokenResponse: Codable { + class AppTokenResponseSchema: Codable { public var tokens: Tokens? diff --git a/Sources/code/application/Models/Configuration/ApplicationAboutResponseConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/ApplicationAboutResponseSchemaConfigurationAppModel.swift similarity index 93% rename from Sources/code/application/Models/Configuration/ApplicationAboutResponseConfigurationAppModel.swift rename to Sources/code/application/Models/Configuration/ApplicationAboutResponseSchemaConfigurationAppModel.swift index 291ce32aca..4fba70836c 100644 --- a/Sources/code/application/Models/Configuration/ApplicationAboutResponseConfigurationAppModel.swift +++ b/Sources/code/application/Models/Configuration/ApplicationAboutResponseSchemaConfigurationAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Configuration { /* - Model: ApplicationAboutResponse + Model: ApplicationAboutResponseSchema Used By: Configuration */ - class ApplicationAboutResponse: Codable { + class ApplicationAboutResponseSchema: Codable { public var applicationInfo: ApplicationInfo? diff --git a/Sources/code/application/Models/Configuration/CurrenciesResponseConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/CurrenciesResponseSchemaConfigurationAppModel.swift similarity index 93% rename from Sources/code/application/Models/Configuration/CurrenciesResponseConfigurationAppModel.swift rename to Sources/code/application/Models/Configuration/CurrenciesResponseSchemaConfigurationAppModel.swift index 825f64372c..a24d203c3d 100644 --- a/Sources/code/application/Models/Configuration/CurrenciesResponseConfigurationAppModel.swift +++ b/Sources/code/application/Models/Configuration/CurrenciesResponseSchemaConfigurationAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Configuration { /* - Model: CurrenciesResponse + Model: CurrenciesResponseSchema Used By: Configuration */ - class CurrenciesResponse: Codable { + class CurrenciesResponseSchema: Codable { public var items: [Currency]? diff --git a/Sources/code/application/Models/Configuration/SuccessMessageResponseConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/InvalidPayloadRequestSchemaConfigurationAppModel.swift similarity index 93% rename from Sources/code/application/Models/Configuration/SuccessMessageResponseConfigurationAppModel.swift rename to Sources/code/application/Models/Configuration/InvalidPayloadRequestSchemaConfigurationAppModel.swift index 780ce7b3ac..05d9377556 100644 --- a/Sources/code/application/Models/Configuration/SuccessMessageResponseConfigurationAppModel.swift +++ b/Sources/code/application/Models/Configuration/InvalidPayloadRequestSchemaConfigurationAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Configuration { /* - Model: SuccessMessageResponse + Model: InvalidPayloadRequestSchema Used By: Configuration */ - class SuccessMessageResponse: Codable { + class InvalidPayloadRequestSchema: Codable { public var message: String? diff --git a/Sources/code/application/Models/Configuration/LanguageResponseConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/LanguageResponseSchemaConfigurationAppModel.swift similarity index 94% rename from Sources/code/application/Models/Configuration/LanguageResponseConfigurationAppModel.swift rename to Sources/code/application/Models/Configuration/LanguageResponseSchemaConfigurationAppModel.swift index fb86ef667d..080e0fde86 100644 --- a/Sources/code/application/Models/Configuration/LanguageResponseConfigurationAppModel.swift +++ b/Sources/code/application/Models/Configuration/LanguageResponseSchemaConfigurationAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Configuration { /* - Model: LanguageResponse + Model: LanguageResponseSchema Used By: Configuration */ - class LanguageResponse: Codable { + class LanguageResponseSchema: Codable { public var items: [SupportedLanguage]? diff --git a/Sources/code/application/Models/Configuration/OrderingStoreSelectRequestConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/OrderingStoreSelectRequestSchemaConfigurationAppModel.swift similarity index 91% rename from Sources/code/application/Models/Configuration/OrderingStoreSelectRequestConfigurationAppModel.swift rename to Sources/code/application/Models/Configuration/OrderingStoreSelectRequestSchemaConfigurationAppModel.swift index f05f838719..0baf262bba 100644 --- a/Sources/code/application/Models/Configuration/OrderingStoreSelectRequestConfigurationAppModel.swift +++ b/Sources/code/application/Models/Configuration/OrderingStoreSelectRequestSchemaConfigurationAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Configuration { /* - Model: OrderingStoreSelectRequest + Model: OrderingStoreSelectRequestSchema Used By: Configuration */ - class OrderingStoreSelectRequest: Codable { + class OrderingStoreSelectRequestSchema: Codable { public var orderingStore: OrderingStoreSelect diff --git a/Sources/code/application/Models/Configuration/InvalidPayloadRequestConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/SuccessMessageResponseSchemaConfigurationAppModel.swift similarity index 93% rename from Sources/code/application/Models/Configuration/InvalidPayloadRequestConfigurationAppModel.swift rename to Sources/code/application/Models/Configuration/SuccessMessageResponseSchemaConfigurationAppModel.swift index 6120918a7d..819ca72f92 100644 --- a/Sources/code/application/Models/Configuration/InvalidPayloadRequestConfigurationAppModel.swift +++ b/Sources/code/application/Models/Configuration/SuccessMessageResponseSchemaConfigurationAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Configuration { /* - Model: InvalidPayloadRequest + Model: SuccessMessageResponseSchema Used By: Configuration */ - class InvalidPayloadRequest: Codable { + class SuccessMessageResponseSchema: Codable { public var message: String? diff --git a/Sources/code/application/Models/Configuration/UnhandledErrorConfigurationAppModel.swift b/Sources/code/application/Models/Configuration/UnhandledErrorConfigurationAppModel.swift deleted file mode 100644 index 0c340be402..0000000000 --- a/Sources/code/application/Models/Configuration/UnhandledErrorConfigurationAppModel.swift +++ /dev/null @@ -1,53 +0,0 @@ - - -import Foundation -public extension ApplicationClient.Configuration { - /* - Model: UnhandledError - Used By: Configuration - */ - class UnhandledError: Codable { - - public var message: String? - - - public enum CodingKeys: String, CodingKey { - - case message = "message" - - } - - public init(message: String? = nil) { - - self.message = message - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - try? container.encodeIfPresent(message, forKey: .message) - - - } - - } -} diff --git a/Sources/code/application/Models/Content/BlogGetResponseContentAppModel.swift b/Sources/code/application/Models/Content/BlogGetDetailsContentAppModel.swift similarity index 97% rename from Sources/code/application/Models/Content/BlogGetResponseContentAppModel.swift rename to Sources/code/application/Models/Content/BlogGetDetailsContentAppModel.swift index 099f23c4fb..b62547ed8f 100644 --- a/Sources/code/application/Models/Content/BlogGetResponseContentAppModel.swift +++ b/Sources/code/application/Models/Content/BlogGetDetailsContentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Content { /* - Model: BlogGetResponse + Model: BlogGetDetails Used By: Content */ - class BlogGetResponse: Codable { + class BlogGetDetails: Codable { public var items: [BlogSchema]? diff --git a/Sources/code/application/Models/Content/CustomFieldSchemaContentAppModel.swift b/Sources/code/application/Models/Content/CustomFieldSchemaContentAppModel.swift index 4ad4eb2d8c..69e45c54f7 100644 --- a/Sources/code/application/Models/Content/CustomFieldSchemaContentAppModel.swift +++ b/Sources/code/application/Models/Content/CustomFieldSchemaContentAppModel.swift @@ -12,12 +12,10 @@ public extension ApplicationClient.Content { public var namespace: String? - public var key: String? + public var slug: String? public var resource: String? - public var creator: String? - public var value: [CustomFieldValue]? public var resourceId: String? @@ -36,8 +34,6 @@ public extension ApplicationClient.Content { public var invalidValueErrors: [[String: Any]]? - public var createdBy: String? - public var isDeleted: Bool? public var createdAt: String? @@ -51,12 +47,10 @@ public extension ApplicationClient.Content { case namespace = "namespace" - case key = "key" + case slug = "slug" case resource = "resource" - case creator = "creator" - case value = "value" case resourceId = "resource_id" @@ -75,8 +69,6 @@ public extension ApplicationClient.Content { case invalidValueErrors = "invalid_value_errors" - case createdBy = "created_by" - case isDeleted = "is_deleted" case createdAt = "created_at" @@ -85,18 +77,16 @@ public extension ApplicationClient.Content { } - public init(applicationId: String? = nil, companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, creator: String? = nil, definitionId: String? = nil, hasInvalidValues: Bool? = nil, invalidValueErrors: [[String: Any]]? = nil, isDeleted: Bool? = nil, key: String? = nil, multiValue: Bool? = nil, namespace: String? = nil, resource: String? = nil, resourceId: String? = nil, type: String? = nil, updatedAt: String? = nil, value: [CustomFieldValue]? = nil, id: String? = nil) { + public init(applicationId: String? = nil, companyId: String? = nil, createdAt: String? = nil, definitionId: String? = nil, hasInvalidValues: Bool? = nil, invalidValueErrors: [[String: Any]]? = nil, isDeleted: Bool? = nil, multiValue: Bool? = nil, namespace: String? = nil, resource: String? = nil, resourceId: String? = nil, slug: String? = nil, type: String? = nil, updatedAt: String? = nil, value: [CustomFieldValue]? = nil, id: String? = nil) { self.id = id self.namespace = namespace - self.key = key + self.slug = slug self.resource = resource - self.creator = creator - self.value = value self.resourceId = resourceId @@ -115,8 +105,6 @@ public extension ApplicationClient.Content { self.invalidValueErrors = invalidValueErrors - self.createdBy = createdBy - self.isDeleted = isDeleted self.createdAt = createdAt @@ -154,7 +142,7 @@ public extension ApplicationClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -177,18 +165,6 @@ public extension ApplicationClient.Content { - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { value = try container.decode([CustomFieldValue].self, forKey: .value) @@ -297,18 +273,6 @@ public extension ApplicationClient.Content { - do { - createdBy = try container.decode(String.self, forKey: .createdBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { isDeleted = try container.decode(Bool.self, forKey: .isDeleted) @@ -358,7 +322,7 @@ public extension ApplicationClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -366,10 +330,6 @@ public extension ApplicationClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - try? container.encodeIfPresent(value, forKey: .value) @@ -406,10 +366,6 @@ public extension ApplicationClient.Content { - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - - try? container.encodeIfPresent(isDeleted, forKey: .isDeleted) diff --git a/Sources/code/application/Models/Content/CustomObjectByIdSchemaContentAppModel.swift b/Sources/code/application/Models/Content/CustomObjectByIdSchemaContentAppModel.swift index bcca131c99..846362a63f 100644 --- a/Sources/code/application/Models/Content/CustomObjectByIdSchemaContentAppModel.swift +++ b/Sources/code/application/Models/Content/CustomObjectByIdSchemaContentAppModel.swift @@ -23,7 +23,7 @@ public extension ApplicationClient.Content { public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case status = "status" @@ -37,7 +37,7 @@ public extension ApplicationClient.Content { } - public init(definition: CustomObjectListItemDefinationSchema? = nil, displayName: String? = nil, fields: [CustomObjectFieldSchema]? = nil, references: [[String: Any]]? = nil, status: String? = nil, id: String? = nil) { + public init(definition: CustomObjectListItemDefinationSchema? = nil, displayName: String? = nil, fields: [CustomObjectFieldSchema]? = nil, id: String? = nil, references: [[String: Any]]? = nil, status: String? = nil) { self.id = id diff --git a/Sources/code/application/Models/Content/CustomObjectFieldSchemaContentAppModel.swift b/Sources/code/application/Models/Content/CustomObjectFieldSchemaContentAppModel.swift index 759038748f..5361bed707 100644 --- a/Sources/code/application/Models/Content/CustomObjectFieldSchemaContentAppModel.swift +++ b/Sources/code/application/Models/Content/CustomObjectFieldSchemaContentAppModel.swift @@ -10,7 +10,7 @@ public extension ApplicationClient.Content { public var id: String? - public var key: String? + public var slug: String? public var value: [CustomObjectFieldValue]? @@ -23,7 +23,7 @@ public extension ApplicationClient.Content { case id = "_id" - case key = "key" + case slug = "slug" case value = "value" @@ -33,11 +33,11 @@ public extension ApplicationClient.Content { } - public init(definitionId: String? = nil, key: String? = nil, type: String? = nil, value: [CustomObjectFieldValue]? = nil, id: String? = nil) { + public init(definitionId: String? = nil, slug: String? = nil, type: String? = nil, value: [CustomObjectFieldValue]? = nil, id: String? = nil) { self.id = id - self.key = key + self.slug = slug self.value = value @@ -64,7 +64,7 @@ public extension ApplicationClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -120,7 +120,7 @@ public extension ApplicationClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) diff --git a/Sources/code/application/Models/Content/CustomObjectListItemSchemaContentAppModel.swift b/Sources/code/application/Models/Content/CustomObjectListItemSchemaContentAppModel.swift new file mode 100644 index 0000000000..00ec78136e --- /dev/null +++ b/Sources/code/application/Models/Content/CustomObjectListItemSchemaContentAppModel.swift @@ -0,0 +1,185 @@ + + +import Foundation +public extension ApplicationClient.Content { + /* + Model: CustomObjectListItemSchema + Used By: Content + */ + class CustomObjectListItemSchema: Codable { + + public var id: String? + + public var definitionId: String? + + public var status: String? + + public var updatedAt: String? + + public var displayName: String? + + public var definition: CustomObjectListItemDefinationSchema? + + public var references: Int? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case definitionId = "definition_id" + + case status = "status" + + case updatedAt = "updated_at" + + case displayName = "display_name" + + case definition = "definition" + + case references = "references" + + } + + public init(definition: CustomObjectListItemDefinationSchema? = nil, definitionId: String? = nil, displayName: String? = nil, references: Int? = nil, status: String? = nil, updatedAt: String? = nil, id: String? = nil) { + + self.id = id + + self.definitionId = definitionId + + self.status = status + + self.updatedAt = updatedAt + + self.displayName = displayName + + self.definition = definition + + self.references = references + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + definitionId = try container.decode(String.self, forKey: .definitionId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + updatedAt = try container.decode(String.self, forKey: .updatedAt) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + displayName = try container.decode(String.self, forKey: .displayName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + definition = try container.decode(CustomObjectListItemDefinationSchema.self, forKey: .definition) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + references = try container.decode(Int.self, forKey: .references) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(id, forKey: .id) + + + + try? container.encodeIfPresent(definitionId, forKey: .definitionId) + + + + try? container.encodeIfPresent(status, forKey: .status) + + + + try? container.encodeIfPresent(updatedAt, forKey: .updatedAt) + + + + try? container.encodeIfPresent(displayName, forKey: .displayName) + + + + try? container.encodeIfPresent(definition, forKey: .definition) + + + + try? container.encodeIfPresent(references, forKey: .references) + + + } + + } +} diff --git a/Sources/code/application/Models/Content/CustomObjectsSchemaContentAppModel.swift b/Sources/code/application/Models/Content/CustomObjectsSchemaContentAppModel.swift new file mode 100644 index 0000000000..c7257fcd89 --- /dev/null +++ b/Sources/code/application/Models/Content/CustomObjectsSchemaContentAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Content { + /* + Model: CustomObjectsSchema + Used By: Content + */ + class CustomObjectsSchema: Codable { + + public var items: [CustomObjectListItemSchema]? + + public var page: Page? + + + public enum CodingKeys: String, CodingKey { + + case items = "items" + + case page = "page" + + } + + public init(items: [CustomObjectListItemSchema]? = nil, page: Page? = nil) { + + self.items = items + + self.page = page + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + items = try container.decode([CustomObjectListItemSchema].self, forKey: .items) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + page = try container.decode(Page.self, forKey: .page) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} diff --git a/Sources/code/application/Models/Content/NavigationGetResponseContentAppModel.swift b/Sources/code/application/Models/Content/NavigationGetDetailsContentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Content/NavigationGetResponseContentAppModel.swift rename to Sources/code/application/Models/Content/NavigationGetDetailsContentAppModel.swift index 1063cf5cb3..ba8b0a4c5a 100644 --- a/Sources/code/application/Models/Content/NavigationGetResponseContentAppModel.swift +++ b/Sources/code/application/Models/Content/NavigationGetDetailsContentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Content { /* - Model: NavigationGetResponse + Model: NavigationGetDetails Used By: Content */ - class NavigationGetResponse: Codable { + class NavigationGetDetails: Codable { public var items: [NavigationSchema]? diff --git a/Sources/code/application/Models/Content/PageGetResponseContentAppModel.swift b/Sources/code/application/Models/Content/PageGetDetailsContentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Content/PageGetResponseContentAppModel.swift rename to Sources/code/application/Models/Content/PageGetDetailsContentAppModel.swift index 31e13ead25..60b52402bf 100644 --- a/Sources/code/application/Models/Content/PageGetResponseContentAppModel.swift +++ b/Sources/code/application/Models/Content/PageGetDetailsContentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Content { /* - Model: PageGetResponse + Model: PageGetDetails Used By: Content */ - class PageGetResponse: Codable { + class PageGetDetails: Codable { public var items: [PageSchema]? diff --git a/Sources/code/application/Models/Content/SlideshowGetResponseContentAppModel.swift b/Sources/code/application/Models/Content/SlideshowGetDetailsContentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Content/SlideshowGetResponseContentAppModel.swift rename to Sources/code/application/Models/Content/SlideshowGetDetailsContentAppModel.swift index 2db2d98169..d6f336e90d 100644 --- a/Sources/code/application/Models/Content/SlideshowGetResponseContentAppModel.swift +++ b/Sources/code/application/Models/Content/SlideshowGetDetailsContentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Content { /* - Model: SlideshowGetResponse + Model: SlideshowGetDetails Used By: Content */ - class SlideshowGetResponse: Codable { + class SlideshowGetDetails: Codable { public var items: [SlideshowSchema]? diff --git a/Sources/code/application/Models/Content/ValidationErrorContentAppModel.swift b/Sources/code/application/Models/Content/ValidationErrorContentAppModel.swift new file mode 100644 index 0000000000..88ed91fce2 --- /dev/null +++ b/Sources/code/application/Models/Content/ValidationErrorContentAppModel.swift @@ -0,0 +1,61 @@ + + +import Foundation +public extension ApplicationClient.Content { + /* + Model: ValidationError + Used By: Content + */ + class ValidationError: Codable { + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(message, forKey: .message) + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} diff --git a/Sources/code/application/Models/FileStorage/CompleteResponseFileStorageAppModel.swift b/Sources/code/application/Models/FileStorage/FileUploadCompleteFileStorageAppModel.swift similarity index 98% rename from Sources/code/application/Models/FileStorage/CompleteResponseFileStorageAppModel.swift rename to Sources/code/application/Models/FileStorage/FileUploadCompleteFileStorageAppModel.swift index 17c2f6ecf4..4bc766a11d 100644 --- a/Sources/code/application/Models/FileStorage/CompleteResponseFileStorageAppModel.swift +++ b/Sources/code/application/Models/FileStorage/FileUploadCompleteFileStorageAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.FileStorage { /* - Model: CompleteResponse + Model: FileUploadComplete Used By: FileStorage */ - class CompleteResponse: Codable { + class FileUploadComplete: Codable { public var id: String diff --git a/Sources/code/application/Models/FileStorage/StartResponseFileStorageAppModel.swift b/Sources/code/application/Models/FileStorage/FileUploadFileStorageAppModel.swift similarity index 88% rename from Sources/code/application/Models/FileStorage/StartResponseFileStorageAppModel.swift rename to Sources/code/application/Models/FileStorage/FileUploadFileStorageAppModel.swift index 066382622e..1c0b8f1a4f 100644 --- a/Sources/code/application/Models/FileStorage/StartResponseFileStorageAppModel.swift +++ b/Sources/code/application/Models/FileStorage/FileUploadFileStorageAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.FileStorage { /* - Model: StartResponse + Model: FileUpload Used By: FileStorage */ - class StartResponse: Codable { + class FileUpload: Codable { public var fileName: String @@ -24,8 +24,6 @@ public extension ApplicationClient.FileStorage { public var upload: Upload - public var cdn: CDN - public var tags: [String]? @@ -47,13 +45,11 @@ public extension ApplicationClient.FileStorage { case upload = "upload" - case cdn = "cdn" - case tags = "tags" } - public init(cdn: CDN, contentType: String, fileName: String, filePath: String, method: String? = nil, namespace: String, operation: String, size: Int, tags: [String]? = nil, upload: Upload) { + public init(contentType: String, fileName: String, filePath: String, method: String? = nil, namespace: String, operation: String, size: Int, tags: [String]? = nil, upload: Upload) { self.fileName = fileName @@ -71,8 +67,6 @@ public extension ApplicationClient.FileStorage { self.upload = upload - self.cdn = cdn - self.tags = tags } @@ -128,11 +122,6 @@ public extension ApplicationClient.FileStorage { - cdn = try container.decode(CDN.self, forKey: .cdn) - - - - do { tags = try container.decode([String].self, forKey: .tags) @@ -182,10 +171,6 @@ public extension ApplicationClient.FileStorage { - try? container.encodeIfPresent(cdn, forKey: .cdn) - - - try? container.encodeIfPresent(tags, forKey: .tags) diff --git a/Sources/code/application/Models/FileStorage/StartRequestFileStorageAppModel.swift b/Sources/code/application/Models/FileStorage/FileUploadStartFileStorageAppModel.swift similarity index 97% rename from Sources/code/application/Models/FileStorage/StartRequestFileStorageAppModel.swift rename to Sources/code/application/Models/FileStorage/FileUploadStartFileStorageAppModel.swift index c98bb8f06e..f63d777cc6 100644 --- a/Sources/code/application/Models/FileStorage/StartRequestFileStorageAppModel.swift +++ b/Sources/code/application/Models/FileStorage/FileUploadStartFileStorageAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.FileStorage { /* - Model: StartRequest + Model: FileUploadStart Used By: FileStorage */ - class StartRequest: Codable { + class FileUploadStart: Codable { public var fileName: String diff --git a/Sources/code/application/Models/FileStorage/SignUrlRequestFileStorageAppModel.swift b/Sources/code/application/Models/FileStorage/SignUrlFileStorageAppModel.swift similarity index 95% rename from Sources/code/application/Models/FileStorage/SignUrlRequestFileStorageAppModel.swift rename to Sources/code/application/Models/FileStorage/SignUrlFileStorageAppModel.swift index 2e8282e1c3..7f87bf5d0c 100644 --- a/Sources/code/application/Models/FileStorage/SignUrlRequestFileStorageAppModel.swift +++ b/Sources/code/application/Models/FileStorage/SignUrlFileStorageAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.FileStorage { /* - Model: SignUrlRequest + Model: SignUrl Used By: FileStorage */ - class SignUrlRequest: Codable { + class SignUrl: Codable { public var expiry: Int diff --git a/Sources/code/application/Models/FileStorage/SignUrlResponseFileStorageAppModel.swift b/Sources/code/application/Models/FileStorage/SignUrlResultFileStorageAppModel.swift similarity index 93% rename from Sources/code/application/Models/FileStorage/SignUrlResponseFileStorageAppModel.swift rename to Sources/code/application/Models/FileStorage/SignUrlResultFileStorageAppModel.swift index 391677f1be..ca803187a8 100644 --- a/Sources/code/application/Models/FileStorage/SignUrlResponseFileStorageAppModel.swift +++ b/Sources/code/application/Models/FileStorage/SignUrlResultFileStorageAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.FileStorage { /* - Model: SignUrlResponse + Model: SignUrlResult Used By: FileStorage */ - class SignUrlResponse: Codable { + class SignUrlResult: Codable { public var urls: [Urls] diff --git a/Sources/code/application/Models/Finance/CustomerCreditBalanceReqDataFinanceAppModel.swift b/Sources/code/application/Models/Finance/CustomerCreditBalanceReqDataFinanceAppModel.swift new file mode 100644 index 0000000000..17fb3d8a98 --- /dev/null +++ b/Sources/code/application/Models/Finance/CustomerCreditBalanceReqDataFinanceAppModel.swift @@ -0,0 +1,105 @@ + + +import Foundation +public extension ApplicationClient.Finance { + /* + Model: CustomerCreditBalanceReqData + Used By: Finance + */ + class CustomerCreditBalanceReqData: Codable { + + public var sellerId: Int + + public var affiliateId: String + + public var customerMobileNumber: String? + + public var customerEmail: String? + + + public enum CodingKeys: String, CodingKey { + + case sellerId = "seller_id" + + case affiliateId = "affiliate_id" + + case customerMobileNumber = "customer_mobile_number" + + case customerEmail = "customer_email" + + } + + public init(affiliateId: String, customerEmail: String? = nil, customerMobileNumber: String? = nil, sellerId: Int) { + + self.sellerId = sellerId + + self.affiliateId = affiliateId + + self.customerMobileNumber = customerMobileNumber + + self.customerEmail = customerEmail + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + sellerId = try container.decode(Int.self, forKey: .sellerId) + + + + + affiliateId = try container.decode(String.self, forKey: .affiliateId) + + + + + do { + customerMobileNumber = try container.decode(String.self, forKey: .customerMobileNumber) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + customerEmail = try container.decode(String.self, forKey: .customerEmail) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(sellerId, forKey: .sellerId) + + + + try? container.encodeIfPresent(affiliateId, forKey: .affiliateId) + + + + try? container.encodeIfPresent(customerMobileNumber, forKey: .customerMobileNumber) + + + + try? container.encodeIfPresent(customerEmail, forKey: .customerEmail) + + + } + + } +} diff --git a/Sources/code/application/Models/Finance/CustomerCreditBalanceRequestSchemaFinanceAppModel.swift b/Sources/code/application/Models/Finance/CustomerCreditBalanceRequestSchemaFinanceAppModel.swift new file mode 100644 index 0000000000..df12e3cd1b --- /dev/null +++ b/Sources/code/application/Models/Finance/CustomerCreditBalanceRequestSchemaFinanceAppModel.swift @@ -0,0 +1,53 @@ + + +import Foundation +public extension ApplicationClient.Finance { + /* + Model: CustomerCreditBalanceRequestSchema + Used By: Finance + */ + class CustomerCreditBalanceRequestSchema: Codable { + + public var data: CustomerCreditBalanceReqData? + + + public enum CodingKeys: String, CodingKey { + + case data = "data" + + } + + public init(data: CustomerCreditBalanceReqData? = nil) { + + self.data = data + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + data = try container.decode(CustomerCreditBalanceReqData.self, forKey: .data) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(data, forKey: .data) + + + } + + } +} diff --git a/Sources/code/application/Models/Finance/CustomerCreditBalanceResDataFinanceAppModel.swift b/Sources/code/application/Models/Finance/CustomerCreditBalanceResDataFinanceAppModel.swift new file mode 100644 index 0000000000..9f6acf9fbc --- /dev/null +++ b/Sources/code/application/Models/Finance/CustomerCreditBalanceResDataFinanceAppModel.swift @@ -0,0 +1,141 @@ + + +import Foundation +public extension ApplicationClient.Finance { + /* + Model: CustomerCreditBalanceResData + Used By: Finance + */ + class CustomerCreditBalanceResData: Codable { + + public var customerMobileNumber: String? + + public var customerEmail: String? + + public var totalCreditedBalance: Double? + + public var totalLockedAmount: Double? + + public var allowedRedemptionAmount: Double? + + + public enum CodingKeys: String, CodingKey { + + case customerMobileNumber = "customer_mobile_number" + + case customerEmail = "customer_email" + + case totalCreditedBalance = "total_credited_balance" + + case totalLockedAmount = "total_locked_amount" + + case allowedRedemptionAmount = "allowed_redemption_amount" + + } + + public init(allowedRedemptionAmount: Double? = nil, customerEmail: String? = nil, customerMobileNumber: String? = nil, totalCreditedBalance: Double? = nil, totalLockedAmount: Double? = nil) { + + self.customerMobileNumber = customerMobileNumber + + self.customerEmail = customerEmail + + self.totalCreditedBalance = totalCreditedBalance + + self.totalLockedAmount = totalLockedAmount + + self.allowedRedemptionAmount = allowedRedemptionAmount + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + customerMobileNumber = try container.decode(String.self, forKey: .customerMobileNumber) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + customerEmail = try container.decode(String.self, forKey: .customerEmail) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + totalCreditedBalance = try container.decode(Double.self, forKey: .totalCreditedBalance) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + totalLockedAmount = try container.decode(Double.self, forKey: .totalLockedAmount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + allowedRedemptionAmount = try container.decode(Double.self, forKey: .allowedRedemptionAmount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(customerMobileNumber, forKey: .customerMobileNumber) + + + + try? container.encodeIfPresent(customerEmail, forKey: .customerEmail) + + + + try? container.encodeIfPresent(totalCreditedBalance, forKey: .totalCreditedBalance) + + + + try? container.encodeIfPresent(totalLockedAmount, forKey: .totalLockedAmount) + + + + try? container.encodeIfPresent(allowedRedemptionAmount, forKey: .allowedRedemptionAmount) + + + } + + } +} diff --git a/Sources/code/application/Models/Finance/CustomerCreditBalanceResponseSchemaFinanceAppModel.swift b/Sources/code/application/Models/Finance/CustomerCreditBalanceResponseSchemaFinanceAppModel.swift new file mode 100644 index 0000000000..9a01f2cc70 --- /dev/null +++ b/Sources/code/application/Models/Finance/CustomerCreditBalanceResponseSchemaFinanceAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Finance { + /* + Model: CustomerCreditBalanceResponseSchema + Used By: Finance + */ + class CustomerCreditBalanceResponseSchema: Codable { + + public var success: Bool? + + public var data: CustomerCreditBalanceResData? + + + public enum CodingKeys: String, CodingKey { + + case success = "success" + + case data = "data" + + } + + public init(data: CustomerCreditBalanceResData? = nil, success: Bool? = nil) { + + self.success = success + + self.data = data + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + data = try container.decode(CustomerCreditBalanceResData.self, forKey: .data) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} diff --git a/Sources/code/application/Models/Finance/ErrorFinanceAppModel.swift b/Sources/code/application/Models/Finance/ErrorFinanceAppModel.swift new file mode 100644 index 0000000000..6951b2e973 --- /dev/null +++ b/Sources/code/application/Models/Finance/ErrorFinanceAppModel.swift @@ -0,0 +1,251 @@ + + +import Foundation +public extension ApplicationClient.Finance { + /* + Model: Error + Used By: Finance + */ + class Error: Codable { + + public var status: Int? + + public var reason: String? + + public var success: Bool? + + public var message: String? + + public var code: String? + + public var exception: String? + + public var info: String? + + public var requestId: String? + + public var stackTrace: String? + + public var meta: ErrorMeta? + + + public enum CodingKeys: String, CodingKey { + + case status = "status" + + case reason = "reason" + + case success = "success" + + case message = "message" + + case code = "code" + + case exception = "exception" + + case info = "info" + + case requestId = "request_id" + + case stackTrace = "stack_trace" + + case meta = "meta" + + } + + public init(code: String? = nil, exception: String? = nil, info: String? = nil, message: String? = nil, meta: ErrorMeta? = nil, reason: String? = nil, requestId: String? = nil, stackTrace: String? = nil, status: Int? = nil, success: Bool? = nil) { + + self.status = status + + self.reason = reason + + self.success = success + + self.message = message + + self.code = code + + self.exception = exception + + self.info = info + + self.requestId = requestId + + self.stackTrace = stackTrace + + self.meta = meta + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + status = try container.decode(Int.self, forKey: .status) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + reason = try container.decode(String.self, forKey: .reason) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + message = try container.decode(String.self, forKey: .message) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + code = try container.decode(String.self, forKey: .code) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + exception = try container.decode(String.self, forKey: .exception) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + info = try container.decode(String.self, forKey: .info) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + stackTrace = try container.decode(String.self, forKey: .stackTrace) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + meta = try container.decode(ErrorMeta.self, forKey: .meta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(status, forKey: .status) + + + + try? container.encodeIfPresent(reason, forKey: .reason) + + + + try? container.encodeIfPresent(success, forKey: .success) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + try? container.encodeIfPresent(code, forKey: .code) + + + + try? container.encodeIfPresent(exception, forKey: .exception) + + + + try? container.encodeIfPresent(info, forKey: .info) + + + + try? container.encodeIfPresent(requestId, forKey: .requestId) + + + + try? container.encodeIfPresent(stackTrace, forKey: .stackTrace) + + + + try? container.encodeIfPresent(meta, forKey: .meta) + + + } + + } +} diff --git a/Sources/code/platform/Models/Finance/ErrorMetaFinancePlatformModel.swift b/Sources/code/application/Models/Finance/ErrorMetaFinanceAppModel.swift similarity index 67% rename from Sources/code/platform/Models/Finance/ErrorMetaFinancePlatformModel.swift rename to Sources/code/application/Models/Finance/ErrorMetaFinanceAppModel.swift index 2106821ca4..545f263910 100644 --- a/Sources/code/platform/Models/Finance/ErrorMetaFinancePlatformModel.swift +++ b/Sources/code/application/Models/Finance/ErrorMetaFinanceAppModel.swift @@ -1,17 +1,13 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension ApplicationClient.Finance { /* Model: ErrorMeta Used By: Finance */ - class ErrorMeta: Codable { - public var columnsErrors: [ErrorMetaItems]? @@ -31,16 +27,16 @@ public extension PlatformClient.Finance { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - columnsErrors = try container.decode([ErrorMetaItems].self, forKey: .columnsErrors) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } + do { + columnsErrors = try container.decode([ErrorMetaItems].self, forKey: .columnsErrors) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + } + } @@ -48,7 +44,6 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(columnsErrors, forKey: .columnsErrors) @@ -56,7 +51,3 @@ public extension PlatformClient.Finance { } } - - - - diff --git a/Sources/code/application/Models/Finance/ErrorMetaItemsFinanceAppModel.swift b/Sources/code/application/Models/Finance/ErrorMetaItemsFinanceAppModel.swift new file mode 100644 index 0000000000..21a4f2621f --- /dev/null +++ b/Sources/code/application/Models/Finance/ErrorMetaItemsFinanceAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Finance { + /* + Model: ErrorMetaItems + Used By: Finance + */ + class ErrorMetaItems: Codable { + + public var code: Int? + + public var message: String? + + + public enum CodingKeys: String, CodingKey { + + case code = "code" + + case message = "message" + + } + + public init(code: Int? = nil, message: String? = nil) { + + self.code = code + + self.message = message + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + code = try container.decode(Int.self, forKey: .code) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + message = try container.decode(String.self, forKey: .message) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(code, forKey: .code) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + } + + } +} diff --git a/Sources/code/application/Models/Finance/LockUnlockRequestDataFinanceAppModel.swift b/Sources/code/application/Models/Finance/LockUnlockRequestDataFinanceAppModel.swift new file mode 100644 index 0000000000..60e4279868 --- /dev/null +++ b/Sources/code/application/Models/Finance/LockUnlockRequestDataFinanceAppModel.swift @@ -0,0 +1,136 @@ + + +import Foundation +public extension ApplicationClient.Finance { + /* + Model: LockUnlockRequestData + Used By: Finance + */ + class LockUnlockRequestData: Codable { + + public var sellerId: Int + + public var affiliateId: String + + public var orderingChannel: String + + public var creditNoteNumber: String + + public var amount: Double + + public var requestType: String + + public var orderId: String + + + public enum CodingKeys: String, CodingKey { + + case sellerId = "seller_id" + + case affiliateId = "affiliate_id" + + case orderingChannel = "ordering_channel" + + case creditNoteNumber = "credit_note_number" + + case amount = "amount" + + case requestType = "request_type" + + case orderId = "order_id" + + } + + public init(affiliateId: String, amount: Double, creditNoteNumber: String, orderingChannel: String, orderId: String, requestType: String, sellerId: Int) { + + self.sellerId = sellerId + + self.affiliateId = affiliateId + + self.orderingChannel = orderingChannel + + self.creditNoteNumber = creditNoteNumber + + self.amount = amount + + self.requestType = requestType + + self.orderId = orderId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + sellerId = try container.decode(Int.self, forKey: .sellerId) + + + + + affiliateId = try container.decode(String.self, forKey: .affiliateId) + + + + + orderingChannel = try container.decode(String.self, forKey: .orderingChannel) + + + + + creditNoteNumber = try container.decode(String.self, forKey: .creditNoteNumber) + + + + + amount = try container.decode(Double.self, forKey: .amount) + + + + + requestType = try container.decode(String.self, forKey: .requestType) + + + + + 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(sellerId, forKey: .sellerId) + + + + try? container.encodeIfPresent(affiliateId, forKey: .affiliateId) + + + + try? container.encodeIfPresent(orderingChannel, forKey: .orderingChannel) + + + + try? container.encodeIfPresent(creditNoteNumber, forKey: .creditNoteNumber) + + + + try? container.encodeIfPresent(amount, forKey: .amount) + + + + try? container.encodeIfPresent(requestType, forKey: .requestType) + + + + try? container.encodeIfPresent(orderId, forKey: .orderId) + + + } + + } +} diff --git a/Sources/code/application/Models/Finance/LockUnlockRequestSchemaFinanceAppModel.swift b/Sources/code/application/Models/Finance/LockUnlockRequestSchemaFinanceAppModel.swift new file mode 100644 index 0000000000..603d0c5f6f --- /dev/null +++ b/Sources/code/application/Models/Finance/LockUnlockRequestSchemaFinanceAppModel.swift @@ -0,0 +1,53 @@ + + +import Foundation +public extension ApplicationClient.Finance { + /* + Model: LockUnlockRequestSchema + Used By: Finance + */ + class LockUnlockRequestSchema: Codable { + + public var data: LockUnlockRequestData? + + + public enum CodingKeys: String, CodingKey { + + case data = "data" + + } + + public init(data: LockUnlockRequestData? = nil) { + + self.data = data + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + data = try container.decode(LockUnlockRequestData.self, forKey: .data) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(data, forKey: .data) + + + } + + } +} diff --git a/Sources/code/application/Models/Finance/LockUnlockResponseDataFinanceAppModel.swift b/Sources/code/application/Models/Finance/LockUnlockResponseDataFinanceAppModel.swift new file mode 100644 index 0000000000..2940d95abe --- /dev/null +++ b/Sources/code/application/Models/Finance/LockUnlockResponseDataFinanceAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Finance { + /* + Model: LockUnlockResponseData + Used By: Finance + */ + class LockUnlockResponseData: Codable { + + public var creditNoteNumber: String? + + public var amount: Double? + + + public enum CodingKeys: String, CodingKey { + + case creditNoteNumber = "credit_note_number" + + case amount = "amount" + + } + + public init(amount: Double? = nil, creditNoteNumber: String? = nil) { + + self.creditNoteNumber = creditNoteNumber + + self.amount = amount + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + creditNoteNumber = try container.decode(String.self, forKey: .creditNoteNumber) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + amount = try container.decode(Double.self, forKey: .amount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(creditNoteNumber, forKey: .creditNoteNumber) + + + + try? container.encodeIfPresent(amount, forKey: .amount) + + + } + + } +} diff --git a/Sources/code/application/Models/Finance/LockUnlockResponseSchemaFinanceAppModel.swift b/Sources/code/application/Models/Finance/LockUnlockResponseSchemaFinanceAppModel.swift new file mode 100644 index 0000000000..b9723e92d6 --- /dev/null +++ b/Sources/code/application/Models/Finance/LockUnlockResponseSchemaFinanceAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Finance { + /* + Model: LockUnlockResponseSchema + Used By: Finance + */ + class LockUnlockResponseSchema: Codable { + + public var success: Bool? + + public var data: LockUnlockResponseData? + + + public enum CodingKeys: String, CodingKey { + + case success = "success" + + case data = "data" + + } + + public init(data: LockUnlockResponseData? = nil, success: Bool? = nil) { + + self.success = success + + self.data = data + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + data = try container.decode(LockUnlockResponseData.self, forKey: .data) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} diff --git a/Sources/code/application/Models/Lead/FormFieldResponseLeadAppModel.swift b/Sources/code/application/Models/Lead/FormFieldDetailsLeadAppModel.swift similarity index 98% rename from Sources/code/application/Models/Lead/FormFieldResponseLeadAppModel.swift rename to Sources/code/application/Models/Lead/FormFieldDetailsLeadAppModel.swift index 18e42ba6bf..48f8695e14 100644 --- a/Sources/code/application/Models/Lead/FormFieldResponseLeadAppModel.swift +++ b/Sources/code/application/Models/Lead/FormFieldDetailsLeadAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Lead { /* - Model: FormFieldResponse + Model: FormFieldDetails Used By: Lead */ - class FormFieldResponse: Codable { + class FormFieldDetails: Codable { public var id: String? diff --git a/Sources/code/application/Models/Lead/SubmitCustomFormResponseLeadAppModel.swift b/Sources/code/application/Models/Lead/SubmitCustomFormDetailsLeadAppModel.swift similarity index 86% rename from Sources/code/application/Models/Lead/SubmitCustomFormResponseLeadAppModel.swift rename to Sources/code/application/Models/Lead/SubmitCustomFormDetailsLeadAppModel.swift index 434065957b..3a58cd7de6 100644 --- a/Sources/code/application/Models/Lead/SubmitCustomFormResponseLeadAppModel.swift +++ b/Sources/code/application/Models/Lead/SubmitCustomFormDetailsLeadAppModel.swift @@ -3,16 +3,16 @@ import Foundation public extension ApplicationClient.Lead { /* - Model: SubmitCustomFormResponse + Model: SubmitCustomFormDetails Used By: Lead */ - class SubmitCustomFormResponse: Codable { + class SubmitCustomFormDetails: Codable { public var message: String public var ticket: Ticket? - public var response: FormFieldResponse? + public var response: FormFieldDetails? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension ApplicationClient.Lead { } - public init(message: String, response: FormFieldResponse? = nil, ticket: Ticket? = nil) { + public init(message: String, response: FormFieldDetails? = nil, ticket: Ticket? = nil) { self.message = message @@ -57,7 +57,7 @@ public extension ApplicationClient.Lead { do { - response = try container.decode(FormFieldResponse.self, forKey: .response) + response = try container.decode(FormFieldDetails.self, forKey: .response) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/CountryEntityResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/CountryEntityResultLogisticAppModel.swift similarity index 92% rename from Sources/code/application/Models/Logistic/CountryEntityResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/CountryEntityResultLogisticAppModel.swift index 208e013870..f88f1ea48a 100644 --- a/Sources/code/application/Models/Logistic/CountryEntityResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/CountryEntityResultLogisticAppModel.swift @@ -3,14 +3,14 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: CountryEntityResponse + Model: CountryEntityResult Used By: Logistic */ - class CountryEntityResponse: Codable { + class CountryEntityResult: Codable { - public var meta: CountryMetaResponse? + public var meta: CountryMetaResult? - public var logistics: LogisticsResponse? + public var logistics: LogisticsResult? public var displayName: String? @@ -49,7 +49,7 @@ public extension ApplicationClient.Logistic { } - public init(displayName: String? = nil, isActive: Bool? = nil, logistics: LogisticsResponse? = nil, meta: CountryMetaResponse? = nil, name: String? = nil, parentId: String? = nil, subType: String? = nil, type: String? = nil, uid: String? = nil) { + public init(displayName: String? = nil, isActive: Bool? = nil, logistics: LogisticsResult? = nil, meta: CountryMetaResult? = nil, name: String? = nil, parentId: String? = nil, subType: String? = nil, type: String? = nil, uid: String? = nil) { self.meta = meta @@ -76,7 +76,7 @@ public extension ApplicationClient.Logistic { do { - meta = try container.decode(CountryMetaResponse.self, forKey: .meta) + meta = try container.decode(CountryMetaResult.self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -88,7 +88,7 @@ public extension ApplicationClient.Logistic { do { - logistics = try container.decode(LogisticsResponse.self, forKey: .logistics) + logistics = try container.decode(LogisticsResult.self, forKey: .logistics) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/CountryListResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/CountryListResultLogisticAppModel.swift similarity index 83% rename from Sources/code/application/Models/Logistic/CountryListResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/CountryListResultLogisticAppModel.swift index 46c23331bf..b96b1048a1 100644 --- a/Sources/code/application/Models/Logistic/CountryListResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/CountryListResultLogisticAppModel.swift @@ -3,12 +3,12 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: CountryListResponse + Model: CountryListResult Used By: Logistic */ - class CountryListResponse: Codable { + class CountryListResult: Codable { - public var results: [CountryEntityResponse]? + public var results: [CountryEntityResult]? public enum CodingKeys: String, CodingKey { @@ -17,7 +17,7 @@ public extension ApplicationClient.Logistic { } - public init(results: [CountryEntityResponse]? = nil) { + public init(results: [CountryEntityResult]? = nil) { self.results = results @@ -28,7 +28,7 @@ public extension ApplicationClient.Logistic { do { - results = try container.decode([CountryEntityResponse].self, forKey: .results) + results = try container.decode([CountryEntityResult].self, forKey: .results) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/CountryMetaResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/CountryMetaResultLogisticAppModel.swift similarity index 96% rename from Sources/code/application/Models/Logistic/CountryMetaResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/CountryMetaResultLogisticAppModel.swift index 61a4db8b80..cfef24b8d6 100644 --- a/Sources/code/application/Models/Logistic/CountryMetaResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/CountryMetaResultLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: CountryMetaResponse + Model: CountryMetaResult Used By: Logistic */ - class CountryMetaResponse: Codable { + class CountryMetaResult: Codable { public var countryCode: String? diff --git a/Sources/code/application/Models/Logistic/CourierPartnerPromiseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/CourierPartnerPromiseLogisticAppModel.swift new file mode 100644 index 0000000000..cdd9f6ca59 --- /dev/null +++ b/Sources/code/application/Models/Logistic/CourierPartnerPromiseLogisticAppModel.swift @@ -0,0 +1,61 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: CourierPartnerPromise + Used By: Logistic + */ + class CourierPartnerPromise: Codable { + + public var min: String + + public var max: String + + + public enum CodingKeys: String, CodingKey { + + case min = "min" + + case max = "max" + + } + + public init(max: String, min: String) { + + self.min = min + + self.max = max + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + min = try container.decode(String.self, forKey: .min) + + + + + max = try container.decode(String.self, forKey: .max) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(min, forKey: .min) + + + + try? container.encodeIfPresent(max, forKey: .max) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/CourierPartnersLogisticAppModel.swift b/Sources/code/application/Models/Logistic/CourierPartnersLogisticAppModel.swift new file mode 100644 index 0000000000..ea70d37eed --- /dev/null +++ b/Sources/code/application/Models/Logistic/CourierPartnersLogisticAppModel.swift @@ -0,0 +1,119 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: CourierPartners + Used By: Logistic + */ + class CourierPartners: Codable { + + public var extensionId: String? + + public var schemeId: String? + + public var name: String? + + public var deliveryPromise: CourierPartnerPromise? + + + public enum CodingKeys: String, CodingKey { + + case extensionId = "extension_id" + + case schemeId = "scheme_id" + + case name = "name" + + case deliveryPromise = "delivery_promise" + + } + + public init(deliveryPromise: CourierPartnerPromise? = nil, extensionId: String? = nil, name: String? = nil, schemeId: String? = nil) { + + self.extensionId = extensionId + + self.schemeId = schemeId + + self.name = name + + self.deliveryPromise = deliveryPromise + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + extensionId = try container.decode(String.self, forKey: .extensionId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + schemeId = try container.decode(String.self, forKey: .schemeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + deliveryPromise = try container.decode(CourierPartnerPromise.self, forKey: .deliveryPromise) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(extensionId, forKey: .extensionId) + + + + try? container.encodeIfPresent(schemeId, forKey: .schemeId) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + try? container.encodeIfPresent(deliveryPromise, forKey: .deliveryPromise) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/ErrorResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ErrorResultLogisticAppModel.swift similarity index 96% rename from Sources/code/application/Models/Logistic/ErrorResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/ErrorResultLogisticAppModel.swift index ad49488e7e..9d0c11510a 100644 --- a/Sources/code/application/Models/Logistic/ErrorResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/ErrorResultLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: ErrorResponse + Model: ErrorResult Used By: Logistic */ - class ErrorResponse: Codable { + class ErrorResult: Codable { public var error: String? diff --git a/Sources/code/application/Models/Logistic/GetLocalityLogisticAppModel.swift b/Sources/code/application/Models/Logistic/GetLocalityLogisticAppModel.swift index 6067c50485..eecddf714b 100644 --- a/Sources/code/application/Models/Logistic/GetLocalityLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/GetLocalityLogisticAppModel.swift @@ -14,6 +14,10 @@ public extension ApplicationClient.Logistic { public var displayName: String? + public var code: String? + + public var customMeta: [String: Any]? + public var parentIds: [String]? public var type: String? @@ -29,6 +33,10 @@ public extension ApplicationClient.Logistic { case displayName = "display_name" + case code = "code" + + case customMeta = "custom_meta" + case parentIds = "parent_ids" case type = "type" @@ -37,7 +45,7 @@ public extension ApplicationClient.Logistic { } - public init(displayName: String? = nil, id: String? = nil, localities: [LocalityParent]? = nil, name: String? = nil, parentIds: [String]? = nil, type: String? = nil) { + public init(code: String? = nil, customMeta: [String: Any]? = nil, displayName: String? = nil, id: String? = nil, localities: [LocalityParent]? = nil, name: String? = nil, parentIds: [String]? = nil, type: String? = nil) { self.id = id @@ -45,6 +53,10 @@ public extension ApplicationClient.Logistic { self.displayName = displayName + self.code = code + + self.customMeta = customMeta + self.parentIds = parentIds self.type = type @@ -93,6 +105,30 @@ public extension ApplicationClient.Logistic { + do { + code = try container.decode(String.self, forKey: .code) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + customMeta = try container.decode([String: Any].self, forKey: .customMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { parentIds = try container.decode([String].self, forKey: .parentIds) @@ -146,6 +182,14 @@ public extension ApplicationClient.Logistic { + try? container.encodeIfPresent(code, forKey: .code) + + + + try? container.encodeIfPresent(customMeta, forKey: .customMeta) + + + try? container.encodeIfPresent(parentIds, forKey: .parentIds) diff --git a/Sources/code/application/Models/Logistic/GetPromiseDetailsLogisticAppModel.swift b/Sources/code/application/Models/Logistic/GetPromiseDetailsLogisticAppModel.swift new file mode 100644 index 0000000000..0691141d2e --- /dev/null +++ b/Sources/code/application/Models/Logistic/GetPromiseDetailsLogisticAppModel.swift @@ -0,0 +1,97 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: GetPromiseDetails + Used By: Logistic + */ + class GetPromiseDetails: Codable { + + public var items: [StorePromise]? + + public var deliveryPromise: Promise? + + public var page: Page? + + + public enum CodingKeys: String, CodingKey { + + case items = "items" + + case deliveryPromise = "delivery_promise" + + case page = "page" + + } + + public init(deliveryPromise: Promise? = nil, items: [StorePromise]? = nil, page: Page? = nil) { + + self.items = items + + self.deliveryPromise = deliveryPromise + + self.page = page + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + items = try container.decode([StorePromise].self, forKey: .items) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + deliveryPromise = try container.decode(Promise.self, forKey: .deliveryPromise) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + page = try container.decode(Page.self, forKey: .page) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(items, forKey: .items) + + + + try? container.encodeIfPresent(deliveryPromise, forKey: .deliveryPromise) + + + + try? container.encodeIfPresent(page, forKey: .page) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/GetStoreResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/GetStoreResultLogisticAppModel.swift similarity index 85% rename from Sources/code/application/Models/Logistic/GetStoreResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/GetStoreResultLogisticAppModel.swift index d7183631bc..25e304428b 100644 --- a/Sources/code/application/Models/Logistic/GetStoreResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/GetStoreResultLogisticAppModel.swift @@ -3,12 +3,12 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: GetStoreResponse + Model: GetStoreResult Used By: Logistic */ - class GetStoreResponse: Codable { + class GetStoreResult: Codable { - public var items: [StoreItemResponse]? + public var items: [StoreItemResult]? public var page: Page? @@ -21,7 +21,7 @@ public extension ApplicationClient.Logistic { } - public init(items: [StoreItemResponse]? = nil, page: Page? = nil) { + public init(items: [StoreItemResult]? = nil, page: Page? = nil) { self.items = items @@ -34,7 +34,7 @@ public extension ApplicationClient.Logistic { do { - items = try container.decode([StoreItemResponse].self, forKey: .items) + items = try container.decode([StoreItemResult].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/GetZoneFromPincodeViewRequestLogisticAppModel.swift b/Sources/code/application/Models/Logistic/GetZoneFromPincodeViewDetailsLogisticAppModel.swift similarity index 93% rename from Sources/code/application/Models/Logistic/GetZoneFromPincodeViewRequestLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/GetZoneFromPincodeViewDetailsLogisticAppModel.swift index 144e9c0611..310da27f96 100644 --- a/Sources/code/application/Models/Logistic/GetZoneFromPincodeViewRequestLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/GetZoneFromPincodeViewDetailsLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: GetZoneFromPincodeViewRequest + Model: GetZoneFromPincodeViewDetails Used By: Logistic */ - class GetZoneFromPincodeViewRequest: Codable { + class GetZoneFromPincodeViewDetails: Codable { public var pincode: String diff --git a/Sources/code/application/Models/Logistic/GetZoneFromPincodeViewResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/GetZoneFromPincodeViewResultLogisticAppModel.swift similarity index 93% rename from Sources/code/application/Models/Logistic/GetZoneFromPincodeViewResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/GetZoneFromPincodeViewResultLogisticAppModel.swift index 2d18def7e5..c35bd0a1bb 100644 --- a/Sources/code/application/Models/Logistic/GetZoneFromPincodeViewResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/GetZoneFromPincodeViewResultLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: GetZoneFromPincodeViewResponse + Model: GetZoneFromPincodeViewResult Used By: Logistic */ - class GetZoneFromPincodeViewResponse: Codable { + class GetZoneFromPincodeViewResult: Codable { public var serviceabilityType: String diff --git a/Sources/code/application/Models/Logistic/LocalitiesLogisticAppModel.swift b/Sources/code/application/Models/Logistic/LocalitiesLogisticAppModel.swift index 0d3909b095..569be4941c 100644 --- a/Sources/code/application/Models/Logistic/LocalitiesLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/LocalitiesLogisticAppModel.swift @@ -12,6 +12,8 @@ public extension ApplicationClient.Logistic { public var name: String? + public var customMeta: [String: Any]? + public var displayName: String? public var parentIds: [String]? @@ -27,6 +29,8 @@ public extension ApplicationClient.Logistic { case name = "name" + case customMeta = "custom_meta" + case displayName = "display_name" case parentIds = "parent_ids" @@ -37,12 +41,14 @@ public extension ApplicationClient.Logistic { } - public init(displayName: String? = nil, id: String? = nil, localities: [LocalityParent]? = nil, name: String? = nil, parentIds: [String]? = nil, type: String? = nil) { + public init(customMeta: [String: Any]? = nil, displayName: String? = nil, id: String? = nil, localities: [LocalityParent]? = nil, name: String? = nil, parentIds: [String]? = nil, type: String? = nil) { self.id = id self.name = name + self.customMeta = customMeta + self.displayName = displayName self.parentIds = parentIds @@ -81,6 +87,18 @@ public extension ApplicationClient.Logistic { + do { + customMeta = try container.decode([String: Any].self, forKey: .customMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { displayName = try container.decode(String.self, forKey: .displayName) @@ -142,6 +160,10 @@ public extension ApplicationClient.Logistic { + try? container.encodeIfPresent(customMeta, forKey: .customMeta) + + + try? container.encodeIfPresent(displayName, forKey: .displayName) diff --git a/Sources/code/application/Models/Logistic/LocalityParentLogisticAppModel.swift b/Sources/code/application/Models/Logistic/LocalityParentLogisticAppModel.swift index 9b8d3f5ccb..cd133d60a9 100644 --- a/Sources/code/application/Models/Logistic/LocalityParentLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/LocalityParentLogisticAppModel.swift @@ -14,6 +14,10 @@ public extension ApplicationClient.Logistic { public var displayName: String? + public var code: String? + + public var customMeta: [String: Any]? + public var parentIds: [String]? public var type: String? @@ -27,13 +31,17 @@ public extension ApplicationClient.Logistic { case displayName = "display_name" + case code = "code" + + case customMeta = "custom_meta" + case parentIds = "parent_ids" case type = "type" } - public init(displayName: String? = nil, id: String? = nil, name: String? = nil, parentIds: [String]? = nil, type: String? = nil) { + public init(code: String? = nil, customMeta: [String: Any]? = nil, displayName: String? = nil, id: String? = nil, name: String? = nil, parentIds: [String]? = nil, type: String? = nil) { self.id = id @@ -41,6 +49,10 @@ public extension ApplicationClient.Logistic { self.displayName = displayName + self.code = code + + self.customMeta = customMeta + self.parentIds = parentIds self.type = type @@ -87,6 +99,30 @@ public extension ApplicationClient.Logistic { + do { + code = try container.decode(String.self, forKey: .code) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + customMeta = try container.decode([String: Any].self, forKey: .customMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { parentIds = try container.decode([String].self, forKey: .parentIds) @@ -128,6 +164,14 @@ public extension ApplicationClient.Logistic { + try? container.encodeIfPresent(code, forKey: .code) + + + + try? container.encodeIfPresent(customMeta, forKey: .customMeta) + + + try? container.encodeIfPresent(parentIds, forKey: .parentIds) diff --git a/Sources/code/application/Models/Logistic/LogisticsResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/LogisticsResultLogisticAppModel.swift similarity index 82% rename from Sources/code/application/Models/Logistic/LogisticsResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/LogisticsResultLogisticAppModel.swift index 74766b62ee..67e7046afe 100644 --- a/Sources/code/application/Models/Logistic/LogisticsResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/LogisticsResultLogisticAppModel.swift @@ -3,12 +3,12 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: LogisticsResponse + Model: LogisticsResult Used By: Logistic */ - class LogisticsResponse: Codable { + class LogisticsResult: Codable { - public var dp: [String: DP]? + public var dp: DP? public enum CodingKeys: String, CodingKey { @@ -17,7 +17,7 @@ public extension ApplicationClient.Logistic { } - public init(dp: [String: DP]? = nil) { + public init(dp: DP? = nil) { self.dp = dp @@ -28,7 +28,7 @@ public extension ApplicationClient.Logistic { do { - dp = try container.decode([String: DP].self, forKey: .dp) + dp = try container.decode(DP.self, forKey: .dp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/PincodeDataResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/PincodeDataResultLogisticAppModel.swift similarity index 87% rename from Sources/code/application/Models/Logistic/PincodeDataResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/PincodeDataResultLogisticAppModel.swift index de2628f1a1..cb03ec2e7f 100644 --- a/Sources/code/application/Models/Logistic/PincodeDataResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/PincodeDataResultLogisticAppModel.swift @@ -3,20 +3,20 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: PincodeDataResponse + Model: PincodeDataResult Used By: Logistic */ - class PincodeDataResponse: Codable { + class PincodeDataResult: Codable { - public var parents: [PincodeParentsResponse]? + public var parents: [PincodeParentsResult]? - public var meta: PincodeMetaResponse? + public var meta: PincodeMetaResult? public var displayName: String? - public var error: PincodeErrorSchemaResponse + public var error: PincodeErrorSchemaResult - public var metaCode: CountryMetaResponse? + public var metaCode: CountryMetaResult? public var latLong: PincodeLatLongData? @@ -49,7 +49,7 @@ public extension ApplicationClient.Logistic { } - public init(displayName: String? = nil, error: PincodeErrorSchemaResponse, latLong: PincodeLatLongData? = nil, meta: PincodeMetaResponse? = nil, metaCode: CountryMetaResponse? = nil, name: String? = nil, parents: [PincodeParentsResponse]? = nil, subType: String? = nil, uid: String? = nil) { + public init(displayName: String? = nil, error: PincodeErrorSchemaResult, latLong: PincodeLatLongData? = nil, meta: PincodeMetaResult? = nil, metaCode: CountryMetaResult? = nil, name: String? = nil, parents: [PincodeParentsResult]? = nil, subType: String? = nil, uid: String? = nil) { self.parents = parents @@ -76,7 +76,7 @@ public extension ApplicationClient.Logistic { do { - parents = try container.decode([PincodeParentsResponse].self, forKey: .parents) + parents = try container.decode([PincodeParentsResult].self, forKey: .parents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -88,7 +88,7 @@ public extension ApplicationClient.Logistic { do { - meta = try container.decode(PincodeMetaResponse.self, forKey: .meta) + meta = try container.decode(PincodeMetaResult.self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -111,13 +111,13 @@ public extension ApplicationClient.Logistic { - error = try container.decode(PincodeErrorSchemaResponse.self, forKey: .error) + error = try container.decode(PincodeErrorSchemaResult.self, forKey: .error) do { - metaCode = try container.decode(CountryMetaResponse.self, forKey: .metaCode) + metaCode = try container.decode(CountryMetaResult.self, forKey: .metaCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/PincodeApiResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/PincodeDetailsLogisticAppModel.swift similarity index 78% rename from Sources/code/application/Models/Logistic/PincodeApiResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/PincodeDetailsLogisticAppModel.swift index 0b1964ff2c..5943f5f7a9 100644 --- a/Sources/code/application/Models/Logistic/PincodeApiResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/PincodeDetailsLogisticAppModel.swift @@ -3,16 +3,16 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: PincodeApiResponse + Model: PincodeDetails Used By: Logistic */ - class PincodeApiResponse: Codable { + class PincodeDetails: Codable { public var success: Bool - public var data: [PincodeDataResponse]? + public var data: [PincodeDataResult]? - public var error: PincodeErrorSchemaResponse + public var error: PincodeErrorSchemaResult public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension ApplicationClient.Logistic { } - public init(data: [PincodeDataResponse]? = nil, error: PincodeErrorSchemaResponse, success: Bool) { + public init(data: [PincodeDataResult]? = nil, error: PincodeErrorSchemaResult, success: Bool) { self.success = success @@ -45,7 +45,7 @@ public extension ApplicationClient.Logistic { do { - data = try container.decode([PincodeDataResponse].self, forKey: .data) + data = try container.decode([PincodeDataResult].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension ApplicationClient.Logistic { - error = try container.decode(PincodeErrorSchemaResponse.self, forKey: .error) + error = try container.decode(PincodeErrorSchemaResult.self, forKey: .error) diff --git a/Sources/code/application/Models/Logistic/PincodeErrorSchemaResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/PincodeErrorSchemaResultLogisticAppModel.swift similarity index 96% rename from Sources/code/application/Models/Logistic/PincodeErrorSchemaResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/PincodeErrorSchemaResultLogisticAppModel.swift index 39952a5af8..e757e2588f 100644 --- a/Sources/code/application/Models/Logistic/PincodeErrorSchemaResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/PincodeErrorSchemaResultLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: PincodeErrorSchemaResponse + Model: PincodeErrorSchemaResult Used By: Logistic */ - class PincodeErrorSchemaResponse: Codable { + class PincodeErrorSchemaResult: Codable { public var message: String? diff --git a/Sources/code/application/Models/Logistic/PincodeMetaResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/PincodeMetaResultLogisticAppModel.swift similarity index 96% rename from Sources/code/application/Models/Logistic/PincodeMetaResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/PincodeMetaResultLogisticAppModel.swift index 9d65502394..4d8ebe551f 100644 --- a/Sources/code/application/Models/Logistic/PincodeMetaResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/PincodeMetaResultLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: PincodeMetaResponse + Model: PincodeMetaResult Used By: Logistic */ - class PincodeMetaResponse: Codable { + class PincodeMetaResult: Codable { public var zone: String? diff --git a/Sources/code/application/Models/Logistic/PincodeParentsResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/PincodeParentsResultLogisticAppModel.swift similarity index 97% rename from Sources/code/application/Models/Logistic/PincodeParentsResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/PincodeParentsResultLogisticAppModel.swift index 4c9ce091db..ed995b7056 100644 --- a/Sources/code/application/Models/Logistic/PincodeParentsResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/PincodeParentsResultLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: PincodeParentsResponse + Model: PincodeParentsResult Used By: Logistic */ - class PincodeParentsResponse: Codable { + class PincodeParentsResult: Codable { public var subType: String? diff --git a/Sources/code/application/Models/Logistic/TATFormattedResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/PromiseLogisticAppModel.swift similarity index 95% rename from Sources/code/application/Models/Logistic/TATFormattedResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/PromiseLogisticAppModel.swift index b9a5c7bce5..25feb69412 100644 --- a/Sources/code/application/Models/Logistic/TATFormattedResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/PromiseLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: TATFormattedResponse + Model: Promise Used By: Logistic */ - class TATFormattedResponse: Codable { + class Promise: Codable { public var min: String? diff --git a/Sources/code/application/Models/Logistic/ReAssignStoreRequestLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ReAssignStoreDetailsLogisticAppModel.swift similarity index 97% rename from Sources/code/application/Models/Logistic/ReAssignStoreRequestLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/ReAssignStoreDetailsLogisticAppModel.swift index db9d854f13..fc3a56a1d7 100644 --- a/Sources/code/application/Models/Logistic/ReAssignStoreRequestLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/ReAssignStoreDetailsLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: ReAssignStoreRequest + Model: ReAssignStoreDetails Used By: Logistic */ - class ReAssignStoreRequest: Codable { + class ReAssignStoreDetails: Codable { public var configuration: [String: Any] diff --git a/Sources/code/application/Models/Logistic/ReAssignStoreResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ReAssignStoreResultLogisticAppModel.swift similarity index 97% rename from Sources/code/application/Models/Logistic/ReAssignStoreResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/ReAssignStoreResultLogisticAppModel.swift index dec4333797..23799d5855 100644 --- a/Sources/code/application/Models/Logistic/ReAssignStoreResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/ReAssignStoreResultLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: ReAssignStoreResponse + Model: ReAssignStoreResult Used By: Logistic */ - class ReAssignStoreResponse: Codable { + class ReAssignStoreResult: Codable { public var toPincode: String diff --git a/Sources/code/application/Models/Logistic/ServiceabilityLocationLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ServiceabilityLocationLogisticAppModel.swift new file mode 100644 index 0000000000..97d35999dc --- /dev/null +++ b/Sources/code/application/Models/Logistic/ServiceabilityLocationLogisticAppModel.swift @@ -0,0 +1,61 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: ServiceabilityLocation + Used By: Logistic + */ + class ServiceabilityLocation: Codable { + + public var longitude: String + + public var latitude: String + + + public enum CodingKeys: String, CodingKey { + + case longitude = "longitude" + + case latitude = "latitude" + + } + + public init(latitude: String, longitude: String) { + + self.longitude = longitude + + self.latitude = latitude + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + longitude = try container.decode(String.self, forKey: .longitude) + + + + + latitude = try container.decode(String.self, forKey: .latitude) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(longitude, forKey: .longitude) + + + + try? container.encodeIfPresent(latitude, forKey: .latitude) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/ShipmentCourierPartnerDetailsLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ShipmentCourierPartnerDetailsLogisticAppModel.swift new file mode 100644 index 0000000000..0a15b2fbbb --- /dev/null +++ b/Sources/code/application/Models/Logistic/ShipmentCourierPartnerDetailsLogisticAppModel.swift @@ -0,0 +1,127 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: ShipmentCourierPartnerDetails + Used By: Logistic + */ + class ShipmentCourierPartnerDetails: Codable { + + public var fromLocation: ShipmentsCourierPartnersServiceability + + public var toLocation: ShipmentsCourierPartnersServiceability + + public var shipments: [Shipments]? + + public var journey: String? + + public var paymentMode: String? + + + public enum CodingKeys: String, CodingKey { + + case fromLocation = "from_location" + + case toLocation = "to_location" + + case shipments = "shipments" + + case journey = "journey" + + case paymentMode = "payment_mode" + + } + + public init(fromLocation: ShipmentsCourierPartnersServiceability, journey: String? = nil, paymentMode: String? = nil, shipments: [Shipments]? = nil, toLocation: ShipmentsCourierPartnersServiceability) { + + self.fromLocation = fromLocation + + self.toLocation = toLocation + + self.shipments = shipments + + self.journey = journey + + self.paymentMode = paymentMode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + fromLocation = try container.decode(ShipmentsCourierPartnersServiceability.self, forKey: .fromLocation) + + + + + toLocation = try container.decode(ShipmentsCourierPartnersServiceability.self, forKey: .toLocation) + + + + + do { + shipments = try container.decode([Shipments].self, forKey: .shipments) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + journey = try container.decode(String.self, forKey: .journey) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentMode = try container.decode(String.self, forKey: .paymentMode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(fromLocation, forKey: .fromLocation) + + + + try? container.encodeIfPresent(toLocation, forKey: .toLocation) + + + + try? container.encodeIfPresent(shipments, forKey: .shipments) + + + + try? container.encodeIfPresent(journey, forKey: .journey) + + + + try? container.encodeIfPresent(paymentMode, forKey: .paymentMode) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/ShipmentCourierPartnerResultLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ShipmentCourierPartnerResultLogisticAppModel.swift new file mode 100644 index 0000000000..197a1601c7 --- /dev/null +++ b/Sources/code/application/Models/Logistic/ShipmentCourierPartnerResultLogisticAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: ShipmentCourierPartnerResult + Used By: Logistic + */ + class ShipmentCourierPartnerResult: Codable { + + public var courierPartners: [CourierPartners]? + + public var shipments: [ShipmentCourierPartners]? + + + public enum CodingKeys: String, CodingKey { + + case courierPartners = "courier_partners" + + case shipments = "shipments" + + } + + public init(courierPartners: [CourierPartners]? = nil, shipments: [ShipmentCourierPartners]? = nil) { + + self.courierPartners = courierPartners + + self.shipments = shipments + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + courierPartners = try container.decode([CourierPartners].self, forKey: .courierPartners) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipments = try container.decode([ShipmentCourierPartners].self, forKey: .shipments) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(courierPartners, forKey: .courierPartners) + + + + try? container.encodeIfPresent(shipments, forKey: .shipments) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/ShipmentCourierPartnersLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ShipmentCourierPartnersLogisticAppModel.swift new file mode 100644 index 0000000000..3e0adfa8ee --- /dev/null +++ b/Sources/code/application/Models/Logistic/ShipmentCourierPartnersLogisticAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: ShipmentCourierPartners + Used By: Logistic + */ + class ShipmentCourierPartners: Codable { + + public var id: String? + + public var courierPartners: [CourierPartners]? + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case courierPartners = "courier_partners" + + } + + public init(courierPartners: [CourierPartners]? = nil, id: String? = nil) { + + self.id = id + + self.courierPartners = courierPartners + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + courierPartners = try container.decode([CourierPartners].self, forKey: .courierPartners) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(id, forKey: .id) + + + + try? container.encodeIfPresent(courierPartners, forKey: .courierPartners) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/ShipmentDimensionLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ShipmentDimensionLogisticAppModel.swift new file mode 100644 index 0000000000..5a64db1a27 --- /dev/null +++ b/Sources/code/application/Models/Logistic/ShipmentDimensionLogisticAppModel.swift @@ -0,0 +1,76 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: ShipmentDimension + Used By: Logistic + */ + class ShipmentDimension: Codable { + + public var height: Double + + public var length: Double + + public var width: Double + + + public enum CodingKeys: String, CodingKey { + + case height = "height" + + case length = "length" + + case width = "width" + + } + + public init(height: Double, length: Double, width: Double) { + + self.height = height + + self.length = length + + self.width = width + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + height = try container.decode(Double.self, forKey: .height) + + + + + length = try container.decode(Double.self, forKey: .length) + + + + + width = try container.decode(Double.self, forKey: .width) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(height, forKey: .height) + + + + try? container.encodeIfPresent(length, forKey: .length) + + + + try? container.encodeIfPresent(width, forKey: .width) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/ShipmentsArticlesLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ShipmentsArticlesLogisticAppModel.swift new file mode 100644 index 0000000000..09e0f3fe2c --- /dev/null +++ b/Sources/code/application/Models/Logistic/ShipmentsArticlesLogisticAppModel.swift @@ -0,0 +1,141 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: ShipmentsArticles + Used By: Logistic + */ + class ShipmentsArticles: Codable { + + public var itemId: Int? + + public var categoryId: Int? + + public var brandId: Int? + + public var departmentId: Int? + + public var tags: [String]? + + + public enum CodingKeys: String, CodingKey { + + case itemId = "item_id" + + case categoryId = "category_id" + + case brandId = "brand_id" + + case departmentId = "department_id" + + case tags = "tags" + + } + + public init(brandId: Int? = nil, categoryId: Int? = nil, departmentId: Int? = nil, itemId: Int? = nil, tags: [String]? = nil) { + + self.itemId = itemId + + self.categoryId = categoryId + + self.brandId = brandId + + self.departmentId = departmentId + + self.tags = tags + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + itemId = try container.decode(Int.self, forKey: .itemId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + categoryId = try container.decode(Int.self, forKey: .categoryId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + brandId = try container.decode(Int.self, forKey: .brandId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + departmentId = try container.decode(Int.self, forKey: .departmentId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + try? container.encodeIfPresent(categoryId, forKey: .categoryId) + + + + try? container.encodeIfPresent(brandId, forKey: .brandId) + + + + try? container.encodeIfPresent(departmentId, forKey: .departmentId) + + + + try? container.encodeIfPresent(tags, forKey: .tags) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/ShipmentsCourierPartnersServiceabilityLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ShipmentsCourierPartnersServiceabilityLogisticAppModel.swift new file mode 100644 index 0000000000..a8f4f9f5a5 --- /dev/null +++ b/Sources/code/application/Models/Logistic/ShipmentsCourierPartnersServiceabilityLogisticAppModel.swift @@ -0,0 +1,134 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: ShipmentsCourierPartnersServiceability + Used By: Logistic + */ + class ShipmentsCourierPartnersServiceability: Codable { + + public var pincode: String? + + public var sectorCode: String? + + public var stateCode: String? + + public var cityCode: String? + + public var countryCode: String + + + public enum CodingKeys: String, CodingKey { + + case pincode = "pincode" + + case sectorCode = "sector_code" + + case stateCode = "state_code" + + case cityCode = "city_code" + + case countryCode = "country_code" + + } + + public init(cityCode: String? = nil, countryCode: String, pincode: String? = nil, sectorCode: String? = nil, stateCode: String? = nil) { + + self.pincode = pincode + + self.sectorCode = sectorCode + + self.stateCode = stateCode + + self.cityCode = cityCode + + self.countryCode = countryCode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pincode = try container.decode(String.self, forKey: .pincode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + sectorCode = try container.decode(String.self, forKey: .sectorCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + stateCode = try container.decode(String.self, forKey: .stateCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + cityCode = try container.decode(String.self, forKey: .cityCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + countryCode = try container.decode(String.self, forKey: .countryCode) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(pincode, forKey: .pincode) + + + + try? container.encodeIfPresent(sectorCode, forKey: .sectorCode) + + + + try? container.encodeIfPresent(stateCode, forKey: .stateCode) + + + + try? container.encodeIfPresent(cityCode, forKey: .cityCode) + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/ShipmentsLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ShipmentsLogisticAppModel.swift new file mode 100644 index 0000000000..44c20559a2 --- /dev/null +++ b/Sources/code/application/Models/Logistic/ShipmentsLogisticAppModel.swift @@ -0,0 +1,229 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: Shipments + Used By: Logistic + */ + class Shipments: Codable { + + public var id: String? + + public var locationId: Double? + + public var locationTags: [String]? + + public var shipmentWeight: Double? + + public var shipmentVolumetricWeight: Double? + + public var shipmentCost: Double? + + public var shipmentDimension: ShipmentDimension? + + public var courierPartnerSchemes: [String]? + + public var articles: [ShipmentsArticles]? + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case locationId = "location_id" + + case locationTags = "location_tags" + + case shipmentWeight = "shipment_weight" + + case shipmentVolumetricWeight = "shipment_volumetric_weight" + + case shipmentCost = "shipment_cost" + + case shipmentDimension = "shipment_dimension" + + case courierPartnerSchemes = "courier_partner_schemes" + + case articles = "articles" + + } + + public init(articles: [ShipmentsArticles]? = nil, courierPartnerSchemes: [String]? = nil, id: String? = nil, locationId: Double? = nil, locationTags: [String]? = nil, shipmentCost: Double? = nil, shipmentDimension: ShipmentDimension? = nil, shipmentVolumetricWeight: Double? = nil, shipmentWeight: Double? = nil) { + + self.id = id + + self.locationId = locationId + + self.locationTags = locationTags + + self.shipmentWeight = shipmentWeight + + self.shipmentVolumetricWeight = shipmentVolumetricWeight + + self.shipmentCost = shipmentCost + + self.shipmentDimension = shipmentDimension + + self.courierPartnerSchemes = courierPartnerSchemes + + self.articles = articles + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + locationId = try container.decode(Double.self, forKey: .locationId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + locationTags = try container.decode([String].self, forKey: .locationTags) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentWeight = try container.decode(Double.self, forKey: .shipmentWeight) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentVolumetricWeight = try container.decode(Double.self, forKey: .shipmentVolumetricWeight) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentCost = try container.decode(Double.self, forKey: .shipmentCost) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentDimension = try container.decode(ShipmentDimension.self, forKey: .shipmentDimension) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + courierPartnerSchemes = try container.decode([String].self, forKey: .courierPartnerSchemes) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + articles = try container.decode([ShipmentsArticles].self, forKey: .articles) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(id, forKey: .id) + + + + try? container.encodeIfPresent(locationId, forKey: .locationId) + + + + try? container.encodeIfPresent(locationTags, forKey: .locationTags) + + + + try? container.encodeIfPresent(shipmentWeight, forKey: .shipmentWeight) + + + + try? container.encodeIfPresent(shipmentVolumetricWeight, forKey: .shipmentVolumetricWeight) + + + + try? container.encodeIfPresent(shipmentCost, forKey: .shipmentCost) + + + + try? container.encodeIfPresent(shipmentDimension, forKey: .shipmentDimension) + + + + try? container.encodeIfPresent(courierPartnerSchemes, forKey: .courierPartnerSchemes) + + + + try? container.encodeIfPresent(articles, forKey: .articles) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/StandardErrorLogisticAppModel.swift b/Sources/code/application/Models/Logistic/StandardErrorLogisticAppModel.swift new file mode 100644 index 0000000000..968ad92e1f --- /dev/null +++ b/Sources/code/application/Models/Logistic/StandardErrorLogisticAppModel.swift @@ -0,0 +1,46 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: StandardError + Used By: Logistic + */ + class StandardError: Codable { + + public var message: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + } + + public init(message: String) { + + self.message = message + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + 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(message, forKey: .message) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/StoreItemResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/StoreItemResultLogisticAppModel.swift similarity index 98% rename from Sources/code/application/Models/Logistic/StoreItemResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/StoreItemResultLogisticAppModel.swift index f60412990d..416ccb5aa7 100644 --- a/Sources/code/application/Models/Logistic/StoreItemResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/StoreItemResultLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: StoreItemResponse + Model: StoreItemResult Used By: Logistic */ - class StoreItemResponse: Codable { + class StoreItemResult: Codable { public var id: Int? diff --git a/Sources/code/application/Models/Logistic/StorePromiseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/StorePromiseLogisticAppModel.swift new file mode 100644 index 0000000000..1bd17990d2 --- /dev/null +++ b/Sources/code/application/Models/Logistic/StorePromiseLogisticAppModel.swift @@ -0,0 +1,119 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: StorePromise + Used By: Logistic + */ + class StorePromise: Codable { + + public var uid: Int? + + public var code: String? + + public var name: String? + + public var deliveryPromise: Promise? + + + public enum CodingKeys: String, CodingKey { + + case uid = "uid" + + case code = "code" + + case name = "name" + + case deliveryPromise = "delivery_promise" + + } + + public init(code: String? = nil, deliveryPromise: Promise? = nil, name: String? = nil, uid: Int? = nil) { + + self.uid = uid + + self.code = code + + self.name = name + + self.deliveryPromise = deliveryPromise + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + code = try container.decode(String.self, forKey: .code) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + deliveryPromise = try container.decode(Promise.self, forKey: .deliveryPromise) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(uid, forKey: .uid) + + + + try? container.encodeIfPresent(code, forKey: .code) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + try? container.encodeIfPresent(deliveryPromise, forKey: .deliveryPromise) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/TATArticlesRequestLogisticAppModel.swift b/Sources/code/application/Models/Logistic/TATArticlesDetailsLogisticAppModel.swift similarity index 90% rename from Sources/code/application/Models/Logistic/TATArticlesRequestLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/TATArticlesDetailsLogisticAppModel.swift index 5078609765..343d5bde80 100644 --- a/Sources/code/application/Models/Logistic/TATArticlesRequestLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/TATArticlesDetailsLogisticAppModel.swift @@ -3,12 +3,12 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: TATArticlesRequest + Model: TATArticlesDetails Used By: Logistic */ - class TATArticlesRequest: Codable { + class TATArticlesDetails: Codable { - public var category: TATCategoryRequest? + public var category: TATCategoryDetails? public var manufacturingTimeUnit: String? @@ -25,7 +25,7 @@ public extension ApplicationClient.Logistic { } - public init(category: TATCategoryRequest? = nil, manufacturingTime: Int? = nil, manufacturingTimeUnit: String? = nil) { + public init(category: TATCategoryDetails? = nil, manufacturingTime: Int? = nil, manufacturingTimeUnit: String? = nil) { self.category = category @@ -40,7 +40,7 @@ public extension ApplicationClient.Logistic { do { - category = try container.decode(TATCategoryRequest.self, forKey: .category) + category = try container.decode(TATCategoryDetails.self, forKey: .category) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/TATArticlesResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/TATArticlesResultLogisticAppModel.swift similarity index 87% rename from Sources/code/application/Models/Logistic/TATArticlesResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/TATArticlesResultLogisticAppModel.swift index f3a7480c8d..593a277667 100644 --- a/Sources/code/application/Models/Logistic/TATArticlesResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/TATArticlesResultLogisticAppModel.swift @@ -3,22 +3,22 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: TATArticlesResponse + Model: TATArticlesResult Used By: Logistic */ - class TATArticlesResponse: Codable { + class TATArticlesResult: Codable { public var manufacturingTimeUnit: String? - public var error: TATErrorSchemaResponse? + public var error: TATErrorSchemaResult? public var isCodAvailable: Bool? - public var promise: TATPromiseResponse? + public var promise: TATPromiseResult? public var manufacturingTime: Int? - public var category: TATCategoryRequest? + public var category: TATCategoryDetails? public var manufacturingTimeSeconds: Int? @@ -41,7 +41,7 @@ public extension ApplicationClient.Logistic { } - public init(category: TATCategoryRequest? = nil, error: TATErrorSchemaResponse? = nil, isCodAvailable: Bool? = nil, manufacturingTime: Int? = nil, manufacturingTimeUnit: String? = nil, promise: TATPromiseResponse? = nil, manufacturingTimeSeconds: Int? = nil) { + public init(category: TATCategoryDetails? = nil, error: TATErrorSchemaResult? = nil, isCodAvailable: Bool? = nil, manufacturingTime: Int? = nil, manufacturingTimeUnit: String? = nil, promise: TATPromiseResult? = nil, manufacturingTimeSeconds: Int? = nil) { self.manufacturingTimeUnit = manufacturingTimeUnit @@ -76,7 +76,7 @@ public extension ApplicationClient.Logistic { do { - error = try container.decode(TATErrorSchemaResponse.self, forKey: .error) + error = try container.decode(TATErrorSchemaResult.self, forKey: .error) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -100,7 +100,7 @@ public extension ApplicationClient.Logistic { do { - promise = try container.decode(TATPromiseResponse.self, forKey: .promise) + promise = try container.decode(TATPromiseResult.self, forKey: .promise) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -124,7 +124,7 @@ public extension ApplicationClient.Logistic { do { - category = try container.decode(TATCategoryRequest.self, forKey: .category) + category = try container.decode(TATCategoryDetails.self, forKey: .category) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/TATCategoryRequestLogisticAppModel.swift b/Sources/code/application/Models/Logistic/TATCategoryDetailsLogisticAppModel.swift similarity index 96% rename from Sources/code/application/Models/Logistic/TATCategoryRequestLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/TATCategoryDetailsLogisticAppModel.swift index 6cdbd51f13..7d4158b226 100644 --- a/Sources/code/application/Models/Logistic/TATCategoryRequestLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/TATCategoryDetailsLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: TATCategoryRequest + Model: TATCategoryDetails Used By: Logistic */ - class TATCategoryRequest: Codable { + class TATCategoryDetails: Codable { public var level: String? diff --git a/Sources/code/application/Models/Logistic/TATErrorSchemaResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/TATErrorSchemaResultLogisticAppModel.swift similarity index 96% rename from Sources/code/application/Models/Logistic/TATErrorSchemaResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/TATErrorSchemaResultLogisticAppModel.swift index c0e5dbebf0..7b09a8cdc8 100644 --- a/Sources/code/application/Models/Logistic/TATErrorSchemaResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/TATErrorSchemaResultLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: TATErrorSchemaResponse + Model: TATErrorSchemaResult Used By: Logistic */ - class TATErrorSchemaResponse: Codable { + class TATErrorSchemaResult: Codable { public var message: String? diff --git a/Sources/code/application/Models/Logistic/TATFormattedResultLogisticAppModel.swift b/Sources/code/application/Models/Logistic/TATFormattedResultLogisticAppModel.swift new file mode 100644 index 0000000000..2c5a60a5ad --- /dev/null +++ b/Sources/code/application/Models/Logistic/TATFormattedResultLogisticAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: TATFormattedResult + Used By: Logistic + */ + class TATFormattedResult: Codable { + + public var min: String? + + public var max: String? + + + public enum CodingKeys: String, CodingKey { + + case min = "min" + + case max = "max" + + } + + public init(max: String? = nil, min: String? = nil) { + + self.min = min + + self.max = max + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + min = try container.decode(String.self, forKey: .min) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + max = try container.decode(String.self, forKey: .max) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(min, forKey: .min) + + + + try? container.encodeIfPresent(max, forKey: .max) + + + } + + } +} diff --git a/Sources/code/application/Models/Logistic/TATLocationDetailsRequestLogisticAppModel.swift b/Sources/code/application/Models/Logistic/TATLocationDetailsDetailsLogisticAppModel.swift similarity index 89% rename from Sources/code/application/Models/Logistic/TATLocationDetailsRequestLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/TATLocationDetailsDetailsLogisticAppModel.swift index 6a8495c33f..339003eb32 100644 --- a/Sources/code/application/Models/Logistic/TATLocationDetailsRequestLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/TATLocationDetailsDetailsLogisticAppModel.swift @@ -3,16 +3,16 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: TATLocationDetailsRequest + Model: TATLocationDetailsDetails Used By: Logistic */ - class TATLocationDetailsRequest: Codable { + class TATLocationDetailsDetails: Codable { public var fulfillmentId: Int? public var fromPincode: String? - public var articles: [TATArticlesRequest]? + public var articles: [TATArticlesDetails]? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension ApplicationClient.Logistic { } - public init(articles: [TATArticlesRequest]? = nil, fromPincode: String? = nil, fulfillmentId: Int? = nil) { + public init(articles: [TATArticlesDetails]? = nil, fromPincode: String? = nil, fulfillmentId: Int? = nil) { self.fulfillmentId = fulfillmentId @@ -64,7 +64,7 @@ public extension ApplicationClient.Logistic { do { - articles = try container.decode([TATArticlesRequest].self, forKey: .articles) + articles = try container.decode([TATArticlesDetails].self, forKey: .articles) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/TATLocationDetailsResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/TATLocationDetailsResultLogisticAppModel.swift similarity index 87% rename from Sources/code/application/Models/Logistic/TATLocationDetailsResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/TATLocationDetailsResultLogisticAppModel.swift index dc95bd81c3..3624444ffe 100644 --- a/Sources/code/application/Models/Logistic/TATLocationDetailsResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/TATLocationDetailsResultLogisticAppModel.swift @@ -3,16 +3,16 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: TATLocationDetailsResponse + Model: TATLocationDetailsResult Used By: Logistic */ - class TATLocationDetailsResponse: Codable { + class TATLocationDetailsResult: Codable { public var fulfillmentId: Int? public var fromPincode: String? - public var articles: [TATArticlesResponse]? + public var articles: [TATArticlesResult]? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension ApplicationClient.Logistic { } - public init(articles: [TATArticlesResponse]? = nil, fromPincode: String? = nil, fulfillmentId: Int? = nil) { + public init(articles: [TATArticlesResult]? = nil, fromPincode: String? = nil, fulfillmentId: Int? = nil) { self.fulfillmentId = fulfillmentId @@ -64,7 +64,7 @@ public extension ApplicationClient.Logistic { do { - articles = try container.decode([TATArticlesResponse].self, forKey: .articles) + articles = try container.decode([TATArticlesResult].self, forKey: .articles) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/TATPromiseResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/TATPromiseResultLogisticAppModel.swift similarity index 83% rename from Sources/code/application/Models/Logistic/TATPromiseResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/TATPromiseResultLogisticAppModel.swift index c7aadcbc66..762270111d 100644 --- a/Sources/code/application/Models/Logistic/TATPromiseResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/TATPromiseResultLogisticAppModel.swift @@ -3,14 +3,14 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: TATPromiseResponse + Model: TATPromiseResult Used By: Logistic */ - class TATPromiseResponse: Codable { + class TATPromiseResult: Codable { - public var timestamp: TATTimestampResponse? + public var timestamp: TATTimestampResult? - public var formatted: TATFormattedResponse? + public var formatted: TATFormattedResult? public enum CodingKeys: String, CodingKey { @@ -21,7 +21,7 @@ public extension ApplicationClient.Logistic { } - public init(formatted: TATFormattedResponse? = nil, timestamp: TATTimestampResponse? = nil) { + public init(formatted: TATFormattedResult? = nil, timestamp: TATTimestampResult? = nil) { self.timestamp = timestamp @@ -34,7 +34,7 @@ public extension ApplicationClient.Logistic { do { - timestamp = try container.decode(TATTimestampResponse.self, forKey: .timestamp) + timestamp = try container.decode(TATTimestampResult.self, forKey: .timestamp) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,7 +46,7 @@ public extension ApplicationClient.Logistic { do { - formatted = try container.decode(TATFormattedResponse.self, forKey: .formatted) + formatted = try container.decode(TATFormattedResult.self, forKey: .formatted) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/TATTimestampResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/TATTimestampResultLogisticAppModel.swift similarity index 95% rename from Sources/code/application/Models/Logistic/TATTimestampResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/TATTimestampResultLogisticAppModel.swift index caeb8854e3..39f211081c 100644 --- a/Sources/code/application/Models/Logistic/TATTimestampResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/TATTimestampResultLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: TATTimestampResponse + Model: TATTimestampResult Used By: Logistic */ - class TATTimestampResponse: Codable { + class TATTimestampResult: Codable { public var min: Int? diff --git a/Sources/code/application/Models/Logistic/TATViewRequestLogisticAppModel.swift b/Sources/code/application/Models/Logistic/TATViewDetailsLogisticAppModel.swift similarity index 95% rename from Sources/code/application/Models/Logistic/TATViewRequestLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/TATViewDetailsLogisticAppModel.swift index 1f6681c55c..2334831e64 100644 --- a/Sources/code/application/Models/Logistic/TATViewRequestLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/TATViewDetailsLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: TATViewRequest + Model: TATViewDetails Used By: Logistic */ - class TATViewRequest: Codable { + class TATViewDetails: Codable { public var toPincode: String? @@ -16,7 +16,7 @@ public extension ApplicationClient.Logistic { public var identifier: String? - public var locationDetails: [TATLocationDetailsRequest]? + public var locationDetails: [TATLocationDetailsDetails]? public var journey: String? @@ -37,7 +37,7 @@ public extension ApplicationClient.Logistic { } - public init(action: String? = nil, identifier: String? = nil, journey: String? = nil, locationDetails: [TATLocationDetailsRequest]? = nil, source: String? = nil, toPincode: String? = nil) { + public init(action: String? = nil, identifier: String? = nil, journey: String? = nil, locationDetails: [TATLocationDetailsDetails]? = nil, source: String? = nil, toPincode: String? = nil) { self.toPincode = toPincode @@ -106,7 +106,7 @@ public extension ApplicationClient.Logistic { do { - locationDetails = try container.decode([TATLocationDetailsRequest].self, forKey: .locationDetails) + locationDetails = try container.decode([TATLocationDetailsDetails].self, forKey: .locationDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/TATViewResponseLogisticAppModel.swift b/Sources/code/application/Models/Logistic/TATViewResultLogisticAppModel.swift similarity index 93% rename from Sources/code/application/Models/Logistic/TATViewResponseLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/TATViewResultLogisticAppModel.swift index c1570046e5..0fa6c74f98 100644 --- a/Sources/code/application/Models/Logistic/TATViewResponseLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/TATViewResultLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: TATViewResponse + Model: TATViewResult Used By: Logistic */ - class TATViewResponse: Codable { + class TATViewResult: Codable { public var toPincode: String? @@ -16,7 +16,7 @@ public extension ApplicationClient.Logistic { public var success: Bool? - public var error: TATErrorSchemaResponse? + public var error: TATErrorSchemaResult? public var isCodAvailable: Bool? @@ -30,7 +30,7 @@ public extension ApplicationClient.Logistic { public var identifier: String? - public var locationDetails: [TATLocationDetailsResponse]? + public var locationDetails: [TATLocationDetailsResult]? public var journey: String? @@ -65,7 +65,7 @@ public extension ApplicationClient.Logistic { } - public init(action: String? = nil, error: TATErrorSchemaResponse? = nil, identifier: String? = nil, isCodAvailable: Bool? = nil, journey: String? = nil, locationDetails: [TATLocationDetailsResponse]? = nil, paymentMode: String? = nil, requestUuid: String? = nil, source: String? = nil, stormbreakerUuid: String? = nil, success: Bool? = nil, toCity: String? = nil, toPincode: String? = nil) { + public init(action: String? = nil, error: TATErrorSchemaResult? = nil, identifier: String? = nil, isCodAvailable: Bool? = nil, journey: String? = nil, locationDetails: [TATLocationDetailsResult]? = nil, paymentMode: String? = nil, requestUuid: String? = nil, source: String? = nil, stormbreakerUuid: String? = nil, success: Bool? = nil, toCity: String? = nil, toPincode: String? = nil) { self.toPincode = toPincode @@ -148,7 +148,7 @@ public extension ApplicationClient.Logistic { do { - error = try container.decode(TATErrorSchemaResponse.self, forKey: .error) + error = try container.decode(TATErrorSchemaResult.self, forKey: .error) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -232,7 +232,7 @@ public extension ApplicationClient.Logistic { do { - locationDetails = try container.decode([TATLocationDetailsResponse].self, forKey: .locationDetails) + locationDetails = try container.decode([TATLocationDetailsResult].self, forKey: .locationDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Logistic/ValidateAddressRequestLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ValidateAddressDetailsLogisticAppModel.swift similarity index 99% rename from Sources/code/application/Models/Logistic/ValidateAddressRequestLogisticAppModel.swift rename to Sources/code/application/Models/Logistic/ValidateAddressDetailsLogisticAppModel.swift index 355903acdc..3fb4bb4c72 100644 --- a/Sources/code/application/Models/Logistic/ValidateAddressRequestLogisticAppModel.swift +++ b/Sources/code/application/Models/Logistic/ValidateAddressDetailsLogisticAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Logistic { /* - Model: ValidateAddressRequest + Model: ValidateAddressDetails Used By: Logistic */ - class ValidateAddressRequest: Codable { + class ValidateAddressDetails: Codable { public var address: String? diff --git a/Sources/code/application/Models/Logistic/ValidationErrorLogisticAppModel.swift b/Sources/code/application/Models/Logistic/ValidationErrorLogisticAppModel.swift new file mode 100644 index 0000000000..b982e39332 --- /dev/null +++ b/Sources/code/application/Models/Logistic/ValidationErrorLogisticAppModel.swift @@ -0,0 +1,61 @@ + + +import Foundation +public extension ApplicationClient.Logistic { + /* + Model: ValidationError + Used By: Logistic + */ + class ValidationError: Codable { + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(message, forKey: .message) + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} diff --git a/Sources/code/application/Models/Order/BagsOrderAppModel.swift b/Sources/code/application/Models/Order/BagsOrderAppModel.swift index ba272eee1d..9bb96d276b 100644 --- a/Sources/code/application/Models/Order/BagsOrderAppModel.swift +++ b/Sources/code/application/Models/Order/BagsOrderAppModel.swift @@ -44,6 +44,8 @@ public extension ApplicationClient.Order { public var article: Article? + public var charges: [PriceAdjustmentCharge]? + public enum CodingKeys: String, CodingKey { @@ -83,9 +85,11 @@ public extension ApplicationClient.Order { case article = "article" + case charges = "charges" + } - public init(appliedPromos: [AppliedPromos]? = nil, article: Article? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, currencyCode: String? = nil, currencySymbol: String? = nil, currentStatus: CurrentStatus? = nil, deliveryDate: String? = nil, financialBreakup: [FinancialBreakup]? = nil, id: Int? = nil, item: Item? = nil, lineNumber: Int? = nil, meta: [String: Any]? = nil, parentPromoBags: [String: Any]? = nil, prices: Prices? = nil, quantity: Int? = nil, returnableDate: String? = nil, sellerIdentifier: String? = nil) { + public init(appliedPromos: [AppliedPromos]? = nil, article: Article? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, charges: [PriceAdjustmentCharge]? = nil, currencyCode: String? = nil, currencySymbol: String? = nil, currentStatus: CurrentStatus? = nil, deliveryDate: String? = nil, financialBreakup: [FinancialBreakup]? = nil, id: Int? = nil, item: Item? = nil, lineNumber: Int? = nil, meta: [String: Any]? = nil, parentPromoBags: [String: Any]? = nil, prices: Prices? = nil, quantity: Int? = nil, returnableDate: String? = nil, sellerIdentifier: String? = nil) { self.deliveryDate = deliveryDate @@ -123,6 +127,8 @@ public extension ApplicationClient.Order { self.article = article + self.charges = charges + } required public init(from decoder: Decoder) throws { @@ -344,6 +350,18 @@ public extension ApplicationClient.Order { } + + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -421,6 +439,10 @@ public extension ApplicationClient.Order { try? container.encodeIfPresent(article, forKey: .article) + + try? container.encodeIfPresent(charges, forKey: .charges) + + } } diff --git a/Sources/code/application/Models/Order/ChargeAmountCurrencyOrderAppModel.swift b/Sources/code/application/Models/Order/ChargeAmountCurrencyOrderAppModel.swift new file mode 100644 index 0000000000..448834809d --- /dev/null +++ b/Sources/code/application/Models/Order/ChargeAmountCurrencyOrderAppModel.swift @@ -0,0 +1,61 @@ + + +import Foundation +public extension ApplicationClient.Order { + /* + Model: ChargeAmountCurrency + Used By: Order + */ + class ChargeAmountCurrency: Codable { + + public var value: Double + + public var currency: String + + + public enum CodingKeys: String, CodingKey { + + case value = "value" + + case currency = "currency" + + } + + public init(currency: String, value: Double) { + + self.value = value + + self.currency = currency + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + value = try container.decode(Double.self, forKey: .value) + + + + + currency = try container.decode(String.self, forKey: .currency) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(value, forKey: .value) + + + + try? container.encodeIfPresent(currency, forKey: .currency) + + + } + + } +} diff --git a/Sources/code/application/Models/Order/ChargeAmountOrderAppModel.swift b/Sources/code/application/Models/Order/ChargeAmountOrderAppModel.swift new file mode 100644 index 0000000000..c0ab643e67 --- /dev/null +++ b/Sources/code/application/Models/Order/ChargeAmountOrderAppModel.swift @@ -0,0 +1,61 @@ + + +import Foundation +public extension ApplicationClient.Order { + /* + Model: ChargeAmount + Used By: Order + */ + class ChargeAmount: Codable { + + public var baseCurrency: ChargeAmountCurrency + + public var orderingCurrency: ChargeAmountCurrency + + + public enum CodingKeys: String, CodingKey { + + case baseCurrency = "base_currency" + + case orderingCurrency = "ordering_currency" + + } + + public init(baseCurrency: ChargeAmountCurrency, orderingCurrency: ChargeAmountCurrency) { + + self.baseCurrency = baseCurrency + + self.orderingCurrency = orderingCurrency + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + baseCurrency = try container.decode(ChargeAmountCurrency.self, forKey: .baseCurrency) + + + + + orderingCurrency = try container.decode(ChargeAmountCurrency.self, forKey: .orderingCurrency) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(baseCurrency, forKey: .baseCurrency) + + + + try? container.encodeIfPresent(orderingCurrency, forKey: .orderingCurrency) + + + } + + } +} diff --git a/Sources/code/application/Models/Order/ChargeDistributionLogicOrderAppModel.swift b/Sources/code/application/Models/Order/ChargeDistributionLogicOrderAppModel.swift new file mode 100644 index 0000000000..51e708a233 --- /dev/null +++ b/Sources/code/application/Models/Order/ChargeDistributionLogicOrderAppModel.swift @@ -0,0 +1,61 @@ + + +import Foundation +public extension ApplicationClient.Order { + /* + Model: ChargeDistributionLogic + Used By: Order + */ + class ChargeDistributionLogic: Codable { + + public var distribution: ChargeDistributionSchema + + public var distributionLevel: String + + + public enum CodingKeys: String, CodingKey { + + case distribution = "distribution" + + case distributionLevel = "distribution_level" + + } + + public init(distribution: ChargeDistributionSchema, distributionLevel: String) { + + self.distribution = distribution + + self.distributionLevel = distributionLevel + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + distribution = try container.decode(ChargeDistributionSchema.self, forKey: .distribution) + + + + + distributionLevel = try container.decode(String.self, forKey: .distributionLevel) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(distribution, forKey: .distribution) + + + + try? container.encodeIfPresent(distributionLevel, forKey: .distributionLevel) + + + } + + } +} diff --git a/Sources/code/application/Models/Order/ChargeDistributionSchemaOrderAppModel.swift b/Sources/code/application/Models/Order/ChargeDistributionSchemaOrderAppModel.swift new file mode 100644 index 0000000000..d56e59436a --- /dev/null +++ b/Sources/code/application/Models/Order/ChargeDistributionSchemaOrderAppModel.swift @@ -0,0 +1,61 @@ + + +import Foundation +public extension ApplicationClient.Order { + /* + Model: ChargeDistributionSchema + Used By: Order + */ + class ChargeDistributionSchema: Codable { + + public var type: String + + public var logic: String + + + public enum CodingKeys: String, CodingKey { + + case type = "type" + + case logic = "logic" + + } + + public init(logic: String, type: String) { + + self.type = type + + self.logic = logic + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + type = try container.decode(String.self, forKey: .type) + + + + + logic = try container.decode(String.self, forKey: .logic) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(type, forKey: .type) + + + + try? container.encodeIfPresent(logic, forKey: .logic) + + + } + + } +} diff --git a/Sources/code/application/Models/Order/CustomerDetailsResponseOrderAppModel.swift b/Sources/code/application/Models/Order/CustomerDetailsResponseSchemaOrderAppModel.swift similarity index 97% rename from Sources/code/application/Models/Order/CustomerDetailsResponseOrderAppModel.swift rename to Sources/code/application/Models/Order/CustomerDetailsResponseSchemaOrderAppModel.swift index dbabbfe79e..ce7bdb310b 100644 --- a/Sources/code/application/Models/Order/CustomerDetailsResponseOrderAppModel.swift +++ b/Sources/code/application/Models/Order/CustomerDetailsResponseSchemaOrderAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Order { /* - Model: CustomerDetailsResponse + Model: CustomerDetailsResponseSchema Used By: Order */ - class CustomerDetailsResponse: Codable { + class CustomerDetailsResponseSchema: Codable { public var phone: String? diff --git a/Sources/code/application/Models/Order/ErrorResponseOrderAppModel.swift b/Sources/code/application/Models/Order/ErrorResponseSchemaOrderAppModel.swift similarity index 98% rename from Sources/code/application/Models/Order/ErrorResponseOrderAppModel.swift rename to Sources/code/application/Models/Order/ErrorResponseSchemaOrderAppModel.swift index d82859ce1d..35bab883bc 100644 --- a/Sources/code/application/Models/Order/ErrorResponseOrderAppModel.swift +++ b/Sources/code/application/Models/Order/ErrorResponseSchemaOrderAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Order { /* - Model: ErrorResponse + Model: ErrorResponseSchema Used By: Order */ - class ErrorResponse: Codable { + class ErrorResponseSchema: Codable { public var code: String? diff --git a/Sources/code/application/Models/Order/OrderRequestOrderAppModel.swift b/Sources/code/application/Models/Order/OrderRequestSchemaOrderAppModel.swift similarity index 94% rename from Sources/code/application/Models/Order/OrderRequestOrderAppModel.swift rename to Sources/code/application/Models/Order/OrderRequestSchemaOrderAppModel.swift index 794cafdf2d..9427fc7498 100644 --- a/Sources/code/application/Models/Order/OrderRequestOrderAppModel.swift +++ b/Sources/code/application/Models/Order/OrderRequestSchemaOrderAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Order { /* - Model: OrderRequest + Model: OrderRequestSchema Used By: Order */ - class OrderRequest: Codable { + class OrderRequestSchema: Codable { public var meta: [String: Any]? diff --git a/Sources/code/application/Models/Order/OrderSchemaOrderAppModel.swift b/Sources/code/application/Models/Order/OrderSchemaOrderAppModel.swift index 5d95107e07..13a0c92087 100644 --- a/Sources/code/application/Models/Order/OrderSchemaOrderAppModel.swift +++ b/Sources/code/application/Models/Order/OrderSchemaOrderAppModel.swift @@ -26,6 +26,8 @@ public extension ApplicationClient.Order { public var bagsForReorder: [BagsForReorder]? + public var charges: [PriceAdjustmentCharge]? + public var meta: [String: Any]? @@ -49,11 +51,13 @@ public extension ApplicationClient.Order { case bagsForReorder = "bags_for_reorder" + case charges = "charges" + case meta = "meta" } - public init(bagsForReorder: [BagsForReorder]? = nil, breakupValues: [BreakupValues]? = nil, gstinCode: String? = nil, meta: [String: Any]? = nil, orderCreatedTime: String? = nil, orderCreatedTs: String? = nil, orderId: String? = nil, shipments: [Shipments]? = nil, totalShipmentsInOrder: Int? = nil, userInfo: UserInfo? = nil) { + public init(bagsForReorder: [BagsForReorder]? = nil, breakupValues: [BreakupValues]? = nil, charges: [PriceAdjustmentCharge]? = nil, gstinCode: String? = nil, meta: [String: Any]? = nil, orderCreatedTime: String? = nil, orderCreatedTs: String? = nil, orderId: String? = nil, shipments: [Shipments]? = nil, totalShipmentsInOrder: Int? = nil, userInfo: UserInfo? = nil) { self.totalShipmentsInOrder = totalShipmentsInOrder @@ -73,6 +77,8 @@ public extension ApplicationClient.Order { self.bagsForReorder = bagsForReorder + self.charges = charges + self.meta = meta } @@ -189,6 +195,18 @@ public extension ApplicationClient.Order { + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { meta = try container.decode([String: Any].self, forKey: .meta) @@ -242,6 +260,10 @@ public extension ApplicationClient.Order { + try? container.encodeIfPresent(charges, forKey: .charges) + + + try? container.encodeIfPresent(meta, forKey: .meta) diff --git a/Sources/code/application/Models/Order/PriceAdjustmentChargeOrderAppModel.swift b/Sources/code/application/Models/Order/PriceAdjustmentChargeOrderAppModel.swift new file mode 100644 index 0000000000..fd7cc118d5 --- /dev/null +++ b/Sources/code/application/Models/Order/PriceAdjustmentChargeOrderAppModel.swift @@ -0,0 +1,120 @@ + + +import Foundation +public extension ApplicationClient.Order { + /* + Model: PriceAdjustmentCharge + Used By: Order + */ + class PriceAdjustmentCharge: Codable { + + public var code: String? + + public var name: String + + public var type: String? + + public var amount: ChargeAmount + + public var distributionLogic: ChargeDistributionLogic + + + public enum CodingKeys: String, CodingKey { + + case code = "code" + + case name = "name" + + case type = "type" + + case amount = "amount" + + case distributionLogic = "distribution_logic" + + } + + public init(amount: ChargeAmount, code: String? = nil, distributionLogic: ChargeDistributionLogic, name: String, type: String? = nil) { + + self.code = code + + self.name = name + + self.type = type + + self.amount = amount + + self.distributionLogic = distributionLogic + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + code = try container.decode(String.self, forKey: .code) + + } 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 { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + amount = try container.decode(ChargeAmount.self, forKey: .amount) + + + + + distributionLogic = try container.decode(ChargeDistributionLogic.self, forKey: .distributionLogic) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(code, forKey: .code) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + try? container.encodeIfPresent(amount, forKey: .amount) + + + + try? container.encodeIfPresent(distributionLogic, forKey: .distributionLogic) + + + } + + } +} diff --git a/Sources/code/application/Models/Order/ProductsDataUpdatesFiltersOrderAppModel.swift b/Sources/code/application/Models/Order/ProductsDataUpdatesFiltersOrderAppModel.swift index bfe61c7c26..43003092ff 100644 --- a/Sources/code/application/Models/Order/ProductsDataUpdatesFiltersOrderAppModel.swift +++ b/Sources/code/application/Models/Order/ProductsDataUpdatesFiltersOrderAppModel.swift @@ -12,6 +12,8 @@ public extension ApplicationClient.Order { public var identifier: String? + public var quantity: Int? + public enum CodingKeys: String, CodingKey { @@ -19,14 +21,18 @@ public extension ApplicationClient.Order { case identifier = "identifier" + case quantity = "quantity" + } - public init(identifier: String? = nil, lineNumber: Int? = nil) { + public init(identifier: String? = nil, lineNumber: Int? = nil, quantity: Int? = nil) { self.lineNumber = lineNumber self.identifier = identifier + self.quantity = quantity + } required public init(from decoder: Decoder) throws { @@ -56,6 +62,18 @@ public extension ApplicationClient.Order { } + + do { + quantity = try container.decode(Int.self, forKey: .quantity) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -69,6 +87,10 @@ public extension ApplicationClient.Order { try? container.encodeIfPresent(identifier, forKey: .identifier) + + try? container.encodeIfPresent(quantity, forKey: .quantity) + + } } diff --git a/Sources/code/application/Models/Order/SendOtpToCustomerResponseOrderAppModel.swift b/Sources/code/application/Models/Order/SendOtpToCustomerResponseSchemaOrderAppModel.swift similarity index 97% rename from Sources/code/application/Models/Order/SendOtpToCustomerResponseOrderAppModel.swift rename to Sources/code/application/Models/Order/SendOtpToCustomerResponseSchemaOrderAppModel.swift index 06c5fed6ea..b5994107d6 100644 --- a/Sources/code/application/Models/Order/SendOtpToCustomerResponseOrderAppModel.swift +++ b/Sources/code/application/Models/Order/SendOtpToCustomerResponseSchemaOrderAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Order { /* - Model: SendOtpToCustomerResponse + Model: SendOtpToCustomerResponseSchema Used By: Order */ - class SendOtpToCustomerResponse: Codable { + class SendOtpToCustomerResponseSchema: Codable { public var requestId: String? diff --git a/Sources/code/application/Models/Order/ShipmentApplicationStatusResponseOrderAppModel.swift b/Sources/code/application/Models/Order/ShipmentApplicationStatusResponseSchemaOrderAppModel.swift similarity index 80% rename from Sources/code/application/Models/Order/ShipmentApplicationStatusResponseOrderAppModel.swift rename to Sources/code/application/Models/Order/ShipmentApplicationStatusResponseSchemaOrderAppModel.swift index a9a1d4fc22..cf74d6997f 100644 --- a/Sources/code/application/Models/Order/ShipmentApplicationStatusResponseOrderAppModel.swift +++ b/Sources/code/application/Models/Order/ShipmentApplicationStatusResponseSchemaOrderAppModel.swift @@ -3,12 +3,12 @@ import Foundation public extension ApplicationClient.Order { /* - Model: ShipmentApplicationStatusResponse + Model: ShipmentApplicationStatusResponseSchema Used By: Order */ - class ShipmentApplicationStatusResponse: Codable { + class ShipmentApplicationStatusResponseSchema: Codable { - public var statuses: [StatusesBodyResponse]? + public var statuses: [StatusesBodyResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -17,7 +17,7 @@ public extension ApplicationClient.Order { } - public init(statuses: [StatusesBodyResponse]? = nil) { + public init(statuses: [StatusesBodyResponseSchema]? = nil) { self.statuses = statuses @@ -28,7 +28,7 @@ public extension ApplicationClient.Order { do { - statuses = try container.decode([StatusesBodyResponse].self, forKey: .statuses) + statuses = try container.decode([StatusesBodyResponseSchema].self, forKey: .statuses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Order/ShipmentBagReasonsOrderAppModel.swift b/Sources/code/application/Models/Order/ShipmentBagReasonsOrderAppModel.swift index 870cd1066a..4e8640d69d 100644 --- a/Sources/code/application/Models/Order/ShipmentBagReasonsOrderAppModel.swift +++ b/Sources/code/application/Models/Order/ShipmentBagReasonsOrderAppModel.swift @@ -12,6 +12,8 @@ public extension ApplicationClient.Order { public var success: Bool? + public var ruleId: Int? + public enum CodingKeys: String, CodingKey { @@ -19,14 +21,18 @@ public extension ApplicationClient.Order { case success = "success" + case ruleId = "rule_id" + } - public init(reasons: [BagReasons]? = nil, success: Bool? = nil) { + public init(reasons: [BagReasons]? = nil, ruleId: Int? = nil, success: Bool? = nil) { self.reasons = reasons self.success = success + self.ruleId = ruleId + } required public init(from decoder: Decoder) throws { @@ -56,6 +62,18 @@ public extension ApplicationClient.Order { } + + do { + ruleId = try container.decode(Int.self, forKey: .ruleId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -69,6 +87,10 @@ public extension ApplicationClient.Order { try? container.encodeIfPresent(success, forKey: .success) + + try? container.encodeIfPresent(ruleId, forKey: .ruleId) + + } } diff --git a/Sources/code/application/Models/Order/ShipmentsOrderAppModel.swift b/Sources/code/application/Models/Order/ShipmentsOrderAppModel.swift index 48178a3c01..914f303869 100644 --- a/Sources/code/application/Models/Order/ShipmentsOrderAppModel.swift +++ b/Sources/code/application/Models/Order/ShipmentsOrderAppModel.swift @@ -88,7 +88,9 @@ public extension ApplicationClient.Order { public var deliveryDate: String? - public var order: OrderRequest? + public var order: OrderRequestSchema? + + public var charges: [PriceAdjustmentCharge]? public enum CodingKeys: String, CodingKey { @@ -175,9 +177,11 @@ public extension ApplicationClient.Order { case order = "order" + case charges = "charges" + } - public init(awbNo: String? = nil, bags: [Bags]? = nil, beneficiaryDetails: Bool? = nil, billingAddress: Address? = nil, breakupValues: [BreakupValues]? = nil, canBreak: [String: Any]? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, comment: String? = nil, customMeta: [[String: Any]]? = nil, deliveryAddress: Address? = nil, deliveryDate: String? = nil, dpName: String? = nil, fulfillingCompany: FulfillingCompany? = nil, fulfillingStore: FulfillingStore? = nil, gstinCode: String? = nil, invoice: Invoice? = nil, needHelpUrl: String? = nil, order: OrderRequest? = nil, orderId: String? = nil, orderType: String? = nil, payment: ShipmentPayment? = nil, paymentInfo: [ShipmentPaymentInfo]? = nil, prices: Prices? = nil, promise: Promise? = nil, refundDetails: [String: Any]? = nil, returnableDate: String? = nil, returnMeta: [String: Any]? = nil, shipmentCreatedAt: String? = nil, shipmentCreatedTs: String? = nil, shipmentId: String? = nil, shipmentStatus: ShipmentStatus? = nil, showDownloadInvoice: Bool? = nil, showTrackLink: Bool? = nil, sizeInfo: [String: Any]? = nil, totalBags: Int? = nil, totalDetails: ShipmentTotalDetails? = nil, trackingDetails: [TrackingDetails]? = nil, trackUrl: String? = nil, trakingNo: String? = nil, userInfo: ShipmentUserInfo? = nil) { + public init(awbNo: String? = nil, bags: [Bags]? = nil, beneficiaryDetails: Bool? = nil, billingAddress: Address? = nil, breakupValues: [BreakupValues]? = nil, canBreak: [String: Any]? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, charges: [PriceAdjustmentCharge]? = nil, comment: String? = nil, customMeta: [[String: Any]]? = nil, deliveryAddress: Address? = nil, deliveryDate: String? = nil, dpName: String? = nil, fulfillingCompany: FulfillingCompany? = nil, fulfillingStore: FulfillingStore? = nil, gstinCode: String? = nil, invoice: Invoice? = nil, needHelpUrl: String? = nil, order: OrderRequestSchema? = nil, orderId: String? = nil, orderType: String? = nil, payment: ShipmentPayment? = nil, paymentInfo: [ShipmentPaymentInfo]? = nil, prices: Prices? = nil, promise: Promise? = nil, refundDetails: [String: Any]? = nil, returnableDate: String? = nil, returnMeta: [String: Any]? = nil, shipmentCreatedAt: String? = nil, shipmentCreatedTs: String? = nil, shipmentId: String? = nil, shipmentStatus: ShipmentStatus? = nil, showDownloadInvoice: Bool? = nil, showTrackLink: Bool? = nil, sizeInfo: [String: Any]? = nil, totalBags: Int? = nil, totalDetails: ShipmentTotalDetails? = nil, trackingDetails: [TrackingDetails]? = nil, trackUrl: String? = nil, trakingNo: String? = nil, userInfo: ShipmentUserInfo? = nil) { self.payment = payment @@ -261,6 +265,8 @@ public extension ApplicationClient.Order { self.order = order + self.charges = charges + } required public init(from decoder: Decoder) throws { @@ -748,7 +754,19 @@ public extension ApplicationClient.Order { do { - order = try container.decode(OrderRequest.self, forKey: .order) + order = try container.decode(OrderRequestSchema.self, forKey: .order) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -927,6 +945,10 @@ public extension ApplicationClient.Order { try? container.encodeIfPresent(order, forKey: .order) + + try? container.encodeIfPresent(charges, forKey: .charges) + + } } diff --git a/Sources/code/application/Models/Order/ShipmentsRequestOrderAppModel.swift b/Sources/code/application/Models/Order/ShipmentsRequestSchemaOrderAppModel.swift similarity index 97% rename from Sources/code/application/Models/Order/ShipmentsRequestOrderAppModel.swift rename to Sources/code/application/Models/Order/ShipmentsRequestSchemaOrderAppModel.swift index bd3114f77b..cbb715588b 100644 --- a/Sources/code/application/Models/Order/ShipmentsRequestOrderAppModel.swift +++ b/Sources/code/application/Models/Order/ShipmentsRequestSchemaOrderAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Order { /* - Model: ShipmentsRequest + Model: ShipmentsRequestSchema Used By: Order */ - class ShipmentsRequest: Codable { + class ShipmentsRequestSchema: Codable { public var reasons: ReasonsData? diff --git a/Sources/code/application/Models/Order/StatuesRequestOrderAppModel.swift b/Sources/code/application/Models/Order/StatuesRequestSchemaOrderAppModel.swift similarity index 91% rename from Sources/code/application/Models/Order/StatuesRequestOrderAppModel.swift rename to Sources/code/application/Models/Order/StatuesRequestSchemaOrderAppModel.swift index 6ea61b9e26..ed8c700218 100644 --- a/Sources/code/application/Models/Order/StatuesRequestOrderAppModel.swift +++ b/Sources/code/application/Models/Order/StatuesRequestSchemaOrderAppModel.swift @@ -3,12 +3,12 @@ import Foundation public extension ApplicationClient.Order { /* - Model: StatuesRequest + Model: StatuesRequestSchema Used By: Order */ - class StatuesRequest: Codable { + class StatuesRequestSchema: Codable { - public var shipments: [ShipmentsRequest]? + public var shipments: [ShipmentsRequestSchema]? public var excludeBagsNextState: String? @@ -25,7 +25,7 @@ public extension ApplicationClient.Order { } - public init(excludeBagsNextState: String? = nil, shipments: [ShipmentsRequest]? = nil, status: String? = nil) { + public init(excludeBagsNextState: String? = nil, shipments: [ShipmentsRequestSchema]? = nil, status: String? = nil) { self.shipments = shipments @@ -40,7 +40,7 @@ public extension ApplicationClient.Order { do { - shipments = try container.decode([ShipmentsRequest].self, forKey: .shipments) + shipments = try container.decode([ShipmentsRequestSchema].self, forKey: .shipments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Order/StatusesBodyResponseOrderAppModel.swift b/Sources/code/application/Models/Order/StatusesBodyResponseSchemaOrderAppModel.swift similarity index 93% rename from Sources/code/application/Models/Order/StatusesBodyResponseOrderAppModel.swift rename to Sources/code/application/Models/Order/StatusesBodyResponseSchemaOrderAppModel.swift index 9958e283aa..ff0bd6008e 100644 --- a/Sources/code/application/Models/Order/StatusesBodyResponseOrderAppModel.swift +++ b/Sources/code/application/Models/Order/StatusesBodyResponseSchemaOrderAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Order { /* - Model: StatusesBodyResponse + Model: StatusesBodyResponseSchema Used By: Order */ - class StatusesBodyResponse: Codable { + class StatusesBodyResponseSchema: Codable { public var shipments: [[String: Any]]? diff --git a/Sources/code/application/Models/Order/UpdateShipmentStatusRequestOrderAppModel.swift b/Sources/code/application/Models/Order/UpdateShipmentStatusRequestSchemaOrderAppModel.swift similarity index 91% rename from Sources/code/application/Models/Order/UpdateShipmentStatusRequestOrderAppModel.swift rename to Sources/code/application/Models/Order/UpdateShipmentStatusRequestSchemaOrderAppModel.swift index 1d10fe4509..763a7f203c 100644 --- a/Sources/code/application/Models/Order/UpdateShipmentStatusRequestOrderAppModel.swift +++ b/Sources/code/application/Models/Order/UpdateShipmentStatusRequestSchemaOrderAppModel.swift @@ -3,12 +3,12 @@ import Foundation public extension ApplicationClient.Order { /* - Model: UpdateShipmentStatusRequest + Model: UpdateShipmentStatusRequestSchema Used By: Order */ - class UpdateShipmentStatusRequest: Codable { + class UpdateShipmentStatusRequestSchema: Codable { - public var statuses: [StatuesRequest]? + public var statuses: [StatuesRequestSchema]? public var task: Bool? @@ -33,7 +33,7 @@ public extension ApplicationClient.Order { } - public init(forceTransition: Bool? = nil, lockAfterTransition: Bool? = nil, statuses: [StatuesRequest]? = nil, task: Bool? = nil, unlockBeforeTransition: Bool? = nil) { + public init(forceTransition: Bool? = nil, lockAfterTransition: Bool? = nil, statuses: [StatuesRequestSchema]? = nil, task: Bool? = nil, unlockBeforeTransition: Bool? = nil) { self.statuses = statuses @@ -52,7 +52,7 @@ public extension ApplicationClient.Order { do { - statuses = try container.decode([StatuesRequest].self, forKey: .statuses) + statuses = try container.decode([StatuesRequestSchema].self, forKey: .statuses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/application/Models/Order/VerifyOtpResponseOrderAppModel.swift b/Sources/code/application/Models/Order/VerifyOtpResponseSchemaOrderAppModel.swift similarity index 93% rename from Sources/code/application/Models/Order/VerifyOtpResponseOrderAppModel.swift rename to Sources/code/application/Models/Order/VerifyOtpResponseSchemaOrderAppModel.swift index d96c173dc8..63f70def3d 100644 --- a/Sources/code/application/Models/Order/VerifyOtpResponseOrderAppModel.swift +++ b/Sources/code/application/Models/Order/VerifyOtpResponseSchemaOrderAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Order { /* - Model: VerifyOtpResponse + Model: VerifyOtpResponseSchema Used By: Order */ - class VerifyOtpResponse: Codable { + class VerifyOtpResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/application/Models/Payment/ActiveCardPaymentGatewayResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/ActiveCardPaymentGatewayDetailsPaymentAppModel.swift similarity index 94% rename from Sources/code/application/Models/Payment/ActiveCardPaymentGatewayResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/ActiveCardPaymentGatewayDetailsPaymentAppModel.swift index 6cce929bdd..2e377b0e94 100644 --- a/Sources/code/application/Models/Payment/ActiveCardPaymentGatewayResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ActiveCardPaymentGatewayDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ActiveCardPaymentGatewayResponse + Model: ActiveCardPaymentGatewayDetails Used By: Payment */ - class ActiveCardPaymentGatewayResponse: Codable { + class ActiveCardPaymentGatewayDetails: Codable { public var cards: CardPaymentGateway diff --git a/Sources/code/application/Models/Payment/AddBeneficiaryDetailsOTPRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/AddBeneficiaryDetailsOTPPaymentAppModel.swift similarity index 93% rename from Sources/code/application/Models/Payment/AddBeneficiaryDetailsOTPRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/AddBeneficiaryDetailsOTPPaymentAppModel.swift index b390c62fd9..f192a342d6 100644 --- a/Sources/code/application/Models/Payment/AddBeneficiaryDetailsOTPRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/AddBeneficiaryDetailsOTPPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: AddBeneficiaryDetailsOTPRequest + Model: AddBeneficiaryDetailsOTP Used By: Payment */ - class AddBeneficiaryDetailsOTPRequest: Codable { + class AddBeneficiaryDetailsOTP: Codable { public var orderId: String diff --git a/Sources/code/application/Models/Payment/AddBeneficiaryDetailsRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/AddBeneficiaryDetailsPaymentAppModel.swift similarity index 97% rename from Sources/code/application/Models/Payment/AddBeneficiaryDetailsRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/AddBeneficiaryDetailsPaymentAppModel.swift index b4b95e9a08..2413e8bf33 100644 --- a/Sources/code/application/Models/Payment/AddBeneficiaryDetailsRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/AddBeneficiaryDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: AddBeneficiaryDetailsRequest + Model: AddBeneficiaryDetails Used By: Payment */ - class AddBeneficiaryDetailsRequest: Codable { + class AddBeneficiaryDetails: Codable { public var delights: Bool diff --git a/Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationDetailsPaymentAppModel.swift similarity index 93% rename from Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationDetailsPaymentAppModel.swift index 9e583d74b4..279128991b 100644 --- a/Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: AddBeneficiaryViaOtpVerificationResponse + Model: AddBeneficiaryViaOtpVerificationDetails Used By: Payment */ - class AddBeneficiaryViaOtpVerificationResponse: Codable { + class AddBeneficiaryViaOtpVerificationDetails: Codable { public var success: Bool? diff --git a/Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationPaymentAppModel.swift similarity index 93% rename from Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationPaymentAppModel.swift index 45ce48c1f5..008037a3ef 100644 --- a/Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/AddBeneficiaryViaOtpVerificationPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: AddBeneficiaryViaOtpVerificationRequest + Model: AddBeneficiaryViaOtpVerification Used By: Payment */ - class AddBeneficiaryViaOtpVerificationRequest: Codable { + class AddBeneficiaryViaOtpVerification: Codable { public var requestId: String diff --git a/Sources/code/application/Models/Payment/AggregatorsConfigDetailResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/AggregatorsConfigDetailPaymentAppModel.swift similarity index 98% rename from Sources/code/application/Models/Payment/AggregatorsConfigDetailResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/AggregatorsConfigDetailPaymentAppModel.swift index aefcb6712e..9c56e82c72 100644 --- a/Sources/code/application/Models/Payment/AggregatorsConfigDetailResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/AggregatorsConfigDetailPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: AggregatorsConfigDetailResponse + Model: AggregatorsConfigDetail Used By: Payment */ - class AggregatorsConfigDetailResponse: Codable { + class AggregatorsConfigDetail: Codable { public var success: Bool diff --git a/Sources/code/application/Models/Payment/AttachCardRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/AttachCardPaymentAppModel.swift similarity index 97% rename from Sources/code/application/Models/Payment/AttachCardRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/AttachCardPaymentAppModel.swift index 9773749579..a9461f4c72 100644 --- a/Sources/code/application/Models/Payment/AttachCardRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/AttachCardPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: AttachCardRequest + Model: AttachCard Used By: Payment */ - class AttachCardRequest: Codable { + class AttachCard: Codable { public var nickname: String? diff --git a/Sources/code/application/Models/Payment/AttachCardsResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/AttachCardsDetailsPaymentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Payment/AttachCardsResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/AttachCardsDetailsPaymentAppModel.swift index 062b65e728..665014fb76 100644 --- a/Sources/code/application/Models/Payment/AttachCardsResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/AttachCardsDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: AttachCardsResponse + Model: AttachCardsDetails Used By: Payment */ - class AttachCardsResponse: Codable { + class AttachCardsDetails: Codable { public var data: [String: Any] diff --git a/Sources/code/application/Models/Payment/CancelOrResendPaymentLinkRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/CancelOrResendPaymentLinkPaymentAppModel.swift similarity index 90% rename from Sources/code/application/Models/Payment/CancelOrResendPaymentLinkRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/CancelOrResendPaymentLinkPaymentAppModel.swift index 06d30f465a..6f8be452e0 100644 --- a/Sources/code/application/Models/Payment/CancelOrResendPaymentLinkRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/CancelOrResendPaymentLinkPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: CancelOrResendPaymentLinkRequest + Model: CancelOrResendPaymentLink Used By: Payment */ - class CancelOrResendPaymentLinkRequest: Codable { + class CancelOrResendPaymentLink: Codable { public var paymentLinkId: String diff --git a/Sources/code/application/Models/Payment/CancelPaymentLinkResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/CancelPaymentLinkDetailsPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/CancelPaymentLinkResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/CancelPaymentLinkDetailsPaymentAppModel.swift index 55a6213e92..18af862f3b 100644 --- a/Sources/code/application/Models/Payment/CancelPaymentLinkResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/CancelPaymentLinkDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: CancelPaymentLinkResponse + Model: CancelPaymentLinkDetails Used By: Payment */ - class CancelPaymentLinkResponse: Codable { + class CancelPaymentLinkDetails: Codable { public var statusCode: Int diff --git a/Sources/code/application/Models/Payment/CardDetailsResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/CardDetailsFetchedDetailsPaymentAppModel.swift similarity index 93% rename from Sources/code/application/Models/Payment/CardDetailsResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/CardDetailsFetchedDetailsPaymentAppModel.swift index 96465296cd..db32708d1e 100644 --- a/Sources/code/application/Models/Payment/CardDetailsResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/CardDetailsFetchedDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: CardDetailsResponse + Model: CardDetailsFetchedDetails Used By: Payment */ - class CardDetailsResponse: Codable { + class CardDetailsFetchedDetails: Codable { public var data: CardDetails diff --git a/Sources/code/application/Models/Payment/ChargeCustomerResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/ChargeCustomerDetailsPaymentAppModel.swift similarity index 97% rename from Sources/code/application/Models/Payment/ChargeCustomerResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/ChargeCustomerDetailsPaymentAppModel.swift index 06c70f9072..a5ce37bec7 100644 --- a/Sources/code/application/Models/Payment/ChargeCustomerResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ChargeCustomerDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ChargeCustomerResponse + Model: ChargeCustomerDetails Used By: Payment */ - class ChargeCustomerResponse: Codable { + class ChargeCustomerDetails: Codable { public var status: String diff --git a/Sources/code/application/Models/Payment/ChargeCustomerRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/ChargeCustomerPaymentAppModel.swift similarity index 97% rename from Sources/code/application/Models/Payment/ChargeCustomerRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/ChargeCustomerPaymentAppModel.swift index 6b0eec18f0..05d8d48fa6 100644 --- a/Sources/code/application/Models/Payment/ChargeCustomerRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ChargeCustomerPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ChargeCustomerRequest + Model: ChargeCustomer Used By: Payment */ - class ChargeCustomerRequest: Codable { + class ChargeCustomer: Codable { public var verified: Bool? diff --git a/Sources/code/application/Models/Payment/CheckCreditResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/CheckCreditDetailsPaymentAppModel.swift similarity index 94% rename from Sources/code/application/Models/Payment/CheckCreditResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/CheckCreditDetailsPaymentAppModel.swift index af97a6d2ec..09cc110da8 100644 --- a/Sources/code/application/Models/Payment/CheckCreditResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/CheckCreditDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: CheckCreditResponse + Model: CheckCreditDetails Used By: Payment */ - class CheckCreditResponse: Codable { + class CheckCreditDetails: Codable { public var data: CreditDetail diff --git a/Sources/code/application/Models/Payment/CreateOrderUserResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/CreateOrderUserDetailsPaymentAppModel.swift similarity index 98% rename from Sources/code/application/Models/Payment/CreateOrderUserResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/CreateOrderUserDetailsPaymentAppModel.swift index c714ef02d1..a0d0fa3eb9 100644 --- a/Sources/code/application/Models/Payment/CreateOrderUserResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/CreateOrderUserDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: CreateOrderUserResponse + Model: CreateOrderUserDetails Used By: Payment */ - class CreateOrderUserResponse: Codable { + class CreateOrderUserDetails: Codable { public var statusCode: Int diff --git a/Sources/code/application/Models/Payment/CreateOrderUserRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/CreateOrderUserPaymentAppModel.swift similarity index 67% rename from Sources/code/application/Models/Payment/CreateOrderUserRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/CreateOrderUserPaymentAppModel.swift index 6e3380d71a..dbc8b037f0 100644 --- a/Sources/code/application/Models/Payment/CreateOrderUserRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/CreateOrderUserPaymentAppModel.swift @@ -3,12 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: CreateOrderUserRequest + Model: CreateOrderUser Used By: Payment */ - class CreateOrderUserRequest: Codable { - - public var failureCallbackUrl: String + class CreateOrderUser: Codable { public var currency: String @@ -16,30 +14,22 @@ public extension ApplicationClient.Payment { public var paymentMethods: CreateOrderUserPaymentMethods - public var successCallbackUrl: String - public var meta: [String: Any]? public enum CodingKeys: String, CodingKey { - case failureCallbackUrl = "failure_callback_url" - case currency = "currency" case paymentLinkId = "payment_link_id" case paymentMethods = "payment_methods" - case successCallbackUrl = "success_callback_url" - case meta = "meta" } - public init(currency: String, failureCallbackUrl: String, meta: [String: Any]? = nil, paymentLinkId: String, paymentMethods: CreateOrderUserPaymentMethods, successCallbackUrl: String) { - - self.failureCallbackUrl = failureCallbackUrl + public init(currency: String, meta: [String: Any]? = nil, paymentLinkId: String, paymentMethods: CreateOrderUserPaymentMethods) { self.currency = currency @@ -47,8 +37,6 @@ public extension ApplicationClient.Payment { self.paymentMethods = paymentMethods - self.successCallbackUrl = successCallbackUrl - self.meta = meta } @@ -57,11 +45,6 @@ public extension ApplicationClient.Payment { let container = try decoder.container(keyedBy: CodingKeys.self) - failureCallbackUrl = try container.decode(String.self, forKey: .failureCallbackUrl) - - - - currency = try container.decode(String.self, forKey: .currency) @@ -77,11 +60,6 @@ public extension ApplicationClient.Payment { - successCallbackUrl = try container.decode(String.self, forKey: .successCallbackUrl) - - - - do { meta = try container.decode([String: Any].self, forKey: .meta) @@ -99,10 +77,6 @@ public extension ApplicationClient.Payment { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(failureCallbackUrl, forKey: .failureCallbackUrl) - - - try? container.encodeIfPresent(currency, forKey: .currency) @@ -115,10 +89,6 @@ public extension ApplicationClient.Payment { - try? container.encodeIfPresent(successCallbackUrl, forKey: .successCallbackUrl) - - - try? container.encodeIfPresent(meta, forKey: .meta) diff --git a/Sources/code/application/Models/Payment/CreatePaymentLinkResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/CreatePaymentLinkDetailsPaymentAppModel.swift similarity index 97% rename from Sources/code/application/Models/Payment/CreatePaymentLinkResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/CreatePaymentLinkDetailsPaymentAppModel.swift index 41df903c2a..80859ae792 100644 --- a/Sources/code/application/Models/Payment/CreatePaymentLinkResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/CreatePaymentLinkDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: CreatePaymentLinkResponse + Model: CreatePaymentLinkDetails Used By: Payment */ - class CreatePaymentLinkResponse: Codable { + class CreatePaymentLinkDetails: Codable { public var statusCode: Int diff --git a/Sources/code/application/Models/Payment/CreatePaymentLinkRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/CreatePaymentLinkPaymentAppModel.swift similarity index 64% rename from Sources/code/application/Models/Payment/CreatePaymentLinkRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/CreatePaymentLinkPaymentAppModel.swift index 9fd5b1e337..bcba8bec72 100644 --- a/Sources/code/application/Models/Payment/CreatePaymentLinkRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/CreatePaymentLinkPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: CreatePaymentLinkRequest + Model: CreatePaymentLink Used By: Payment */ - class CreatePaymentLinkRequest: Codable { + class CreatePaymentLink: Codable { public var description: String? @@ -20,6 +20,10 @@ public extension ApplicationClient.Payment { public var email: String + public var successRedirectionUrl: String? + + public var failureRedirectionUrl: String? + public enum CodingKeys: String, CodingKey { @@ -35,9 +39,13 @@ public extension ApplicationClient.Payment { case email = "email" + case successRedirectionUrl = "success_redirection_url" + + case failureRedirectionUrl = "failure_redirection_url" + } - public init(amount: Double, description: String? = nil, email: String, externalOrderId: String, meta: CreatePaymentLinkMeta, mobileNumber: String) { + public init(amount: Double, description: String? = nil, email: String, externalOrderId: String, failureRedirectionUrl: String? = nil, meta: CreatePaymentLinkMeta, mobileNumber: String, successRedirectionUrl: String? = nil) { self.description = description @@ -51,6 +59,10 @@ public extension ApplicationClient.Payment { self.email = email + self.successRedirectionUrl = successRedirectionUrl + + self.failureRedirectionUrl = failureRedirectionUrl + } required public init(from decoder: Decoder) throws { @@ -93,6 +105,30 @@ public extension ApplicationClient.Payment { + + do { + successRedirectionUrl = try container.decode(String.self, forKey: .successRedirectionUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + failureRedirectionUrl = try container.decode(String.self, forKey: .failureRedirectionUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -122,6 +158,14 @@ public extension ApplicationClient.Payment { try? container.encodeIfPresent(email, forKey: .email) + + try? container.encodeIfPresent(successRedirectionUrl, forKey: .successRedirectionUrl) + + + + try? container.encodeIfPresent(failureRedirectionUrl, forKey: .failureRedirectionUrl) + + } } diff --git a/Sources/code/application/Models/Payment/CustomerCreditSummaryResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/CustomerCreditSummaryDetailsPaymentAppModel.swift similarity index 94% rename from Sources/code/application/Models/Payment/CustomerCreditSummaryResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/CustomerCreditSummaryDetailsPaymentAppModel.swift index 84db373e07..cbc14b4d69 100644 --- a/Sources/code/application/Models/Payment/CustomerCreditSummaryResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/CustomerCreditSummaryDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: CustomerCreditSummaryResponse + Model: CustomerCreditSummaryDetails Used By: Payment */ - class CustomerCreditSummaryResponse: Codable { + class CustomerCreditSummaryDetails: Codable { public var data: CreditSummary? diff --git a/Sources/code/application/Models/Payment/CustomerOnboardingResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/CustomerOnboardingDetailsPaymentAppModel.swift similarity index 93% rename from Sources/code/application/Models/Payment/CustomerOnboardingResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/CustomerOnboardingDetailsPaymentAppModel.swift index 359c7ce28d..809f05842d 100644 --- a/Sources/code/application/Models/Payment/CustomerOnboardingResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/CustomerOnboardingDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: CustomerOnboardingResponse + Model: CustomerOnboardingDetails Used By: Payment */ - class CustomerOnboardingResponse: Codable { + class CustomerOnboardingDetails: Codable { public var data: OnboardSummary diff --git a/Sources/code/application/Models/Payment/CustomerOnboardingRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/CustomerOnboardingPaymentAppModel.swift similarity index 98% rename from Sources/code/application/Models/Payment/CustomerOnboardingRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/CustomerOnboardingPaymentAppModel.swift index e6103b22fb..8c0800fb60 100644 --- a/Sources/code/application/Models/Payment/CustomerOnboardingRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/CustomerOnboardingPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: CustomerOnboardingRequest + Model: CustomerOnboarding Used By: Payment */ - class CustomerOnboardingRequest: Codable { + class CustomerOnboarding: Codable { public var personalInfo: UserPersonalInfoInDetails? diff --git a/Sources/code/application/Models/Payment/DeletehCardRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/DeleteCardPaymentAppModel.swift similarity index 92% rename from Sources/code/application/Models/Payment/DeletehCardRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/DeleteCardPaymentAppModel.swift index 1cb4fb2843..9ae784e94b 100644 --- a/Sources/code/application/Models/Payment/DeletehCardRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/DeleteCardPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: DeletehCardRequest + Model: DeleteCard Used By: Payment */ - class DeletehCardRequest: Codable { + class DeleteCard: Codable { public var cardId: String diff --git a/Sources/code/application/Models/Payment/DeleteCardsResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/DeleteCardsDetailsPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/DeleteCardsResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/DeleteCardsDetailsPaymentAppModel.swift index c8a0930dc9..933b2d1ec5 100644 --- a/Sources/code/application/Models/Payment/DeleteCardsResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/DeleteCardsDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: DeleteCardsResponse + Model: DeleteCardsDetails Used By: Payment */ - class DeleteCardsResponse: Codable { + class DeleteCardsDetails: Codable { public var success: Bool diff --git a/Sources/code/application/Models/Payment/DeleteRefundAccountResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/DeleteRefundAccountDetailsPaymentAppModel.swift similarity index 93% rename from Sources/code/application/Models/Payment/DeleteRefundAccountResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/DeleteRefundAccountDetailsPaymentAppModel.swift index 99e7c3610a..ee478290fe 100644 --- a/Sources/code/application/Models/Payment/DeleteRefundAccountResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/DeleteRefundAccountDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: DeleteRefundAccountResponse + Model: DeleteRefundAccountDetails Used By: Payment */ - class DeleteRefundAccountResponse: Codable { + class DeleteRefundAccountDetails: Codable { public var success: Bool diff --git a/Sources/code/application/Models/Payment/EpaylaterBannerResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/EpaylaterBannerDetailsPaymentAppModel.swift similarity index 94% rename from Sources/code/application/Models/Payment/EpaylaterBannerResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/EpaylaterBannerDetailsPaymentAppModel.swift index af70ab99f8..1c80c0a332 100644 --- a/Sources/code/application/Models/Payment/EpaylaterBannerResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/EpaylaterBannerDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: EpaylaterBannerResponse + Model: EpaylaterBannerDetails Used By: Payment */ - class EpaylaterBannerResponse: Codable { + class EpaylaterBannerDetails: Codable { public var data: EpaylaterBannerData diff --git a/Sources/code/application/Models/Payment/ErrorResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/ErrorDetailsPaymentAppModel.swift similarity index 97% rename from Sources/code/application/Models/Payment/ErrorResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/ErrorDetailsPaymentAppModel.swift index e3e8f45381..a09e47ea96 100644 --- a/Sources/code/application/Models/Payment/ErrorResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ErrorDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ErrorResponse + Model: ErrorDetails Used By: Payment */ - class ErrorResponse: Codable { + class ErrorDetails: Codable { public var statusCode: Int diff --git a/Sources/code/application/Models/Payment/GetPaymentLinkResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/GetPaymentLinkDetailsPaymentAppModel.swift similarity index 98% rename from Sources/code/application/Models/Payment/GetPaymentLinkResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/GetPaymentLinkDetailsPaymentAppModel.swift index 5fad931fae..86c218db39 100644 --- a/Sources/code/application/Models/Payment/GetPaymentLinkResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/GetPaymentLinkDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: GetPaymentLinkResponse + Model: GetPaymentLinkDetails Used By: Payment */ - class GetPaymentLinkResponse: Codable { + class GetPaymentLinkDetails: Codable { public var statusCode: Int diff --git a/Sources/code/application/Models/Payment/HttpErrorCodeAndResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/HttpErrorCodeDetailsPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/HttpErrorCodeAndResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/HttpErrorCodeDetailsPaymentAppModel.swift index f4230fa9c8..820853caca 100644 --- a/Sources/code/application/Models/Payment/HttpErrorCodeAndResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/HttpErrorCodeDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: HttpErrorCodeAndResponse + Model: HttpErrorCodeDetails Used By: Payment */ - class HttpErrorCodeAndResponse: Codable { + class HttpErrorCodeDetails: Codable { public var error: ErrorCodeAndDescription? diff --git a/Sources/code/application/Models/Payment/IfscCodeResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/IfscCodeDetailsPaymentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Payment/IfscCodeResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/IfscCodeDetailsPaymentAppModel.swift index 768f8e6f33..db9cd4fab4 100644 --- a/Sources/code/application/Models/Payment/IfscCodeResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/IfscCodeDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: IfscCodeResponse + Model: IfscCodeDetails Used By: Payment */ - class IfscCodeResponse: Codable { + class IfscCodeDetails: Codable { public var branchName: String diff --git a/Sources/code/application/Models/Payment/ListCardsResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/ListCardsDetailsPaymentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Payment/ListCardsResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/ListCardsDetailsPaymentAppModel.swift index f7d88ead9c..4c334cce47 100644 --- a/Sources/code/application/Models/Payment/ListCardsResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ListCardsDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ListCardsResponse + Model: ListCardsDetails Used By: Payment */ - class ListCardsResponse: Codable { + class ListCardsDetails: Codable { public var data: [Card]? diff --git a/Sources/code/application/Models/Payment/OrderBeneficiaryResponseSchemaV2PaymentAppModel.swift b/Sources/code/application/Models/Payment/OrderBeneficiaryDetailsSchemaV2PaymentAppModel.swift similarity index 94% rename from Sources/code/application/Models/Payment/OrderBeneficiaryResponseSchemaV2PaymentAppModel.swift rename to Sources/code/application/Models/Payment/OrderBeneficiaryDetailsSchemaV2PaymentAppModel.swift index c34bbbf9c2..7cb015f140 100644 --- a/Sources/code/application/Models/Payment/OrderBeneficiaryResponseSchemaV2PaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/OrderBeneficiaryDetailsSchemaV2PaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: OrderBeneficiaryResponseSchemaV2 + Model: OrderBeneficiaryDetailsSchemaV2 Used By: Payment */ - class OrderBeneficiaryResponseSchemaV2: Codable { + class OrderBeneficiaryDetailsSchemaV2: Codable { public var showBeneficiaryDetails: Bool diff --git a/Sources/code/application/Models/Payment/OrderBeneficiaryResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/OrderBeneficiaryFetchDetailsPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/OrderBeneficiaryResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/OrderBeneficiaryFetchDetailsPaymentAppModel.swift index 617892c634..470439f92d 100644 --- a/Sources/code/application/Models/Payment/OrderBeneficiaryResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/OrderBeneficiaryFetchDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: OrderBeneficiaryResponse + Model: OrderBeneficiaryFetchDetails Used By: Payment */ - class OrderBeneficiaryResponse: Codable { + class OrderBeneficiaryFetchDetails: Codable { public var showBeneficiaryDetails: Bool? diff --git a/Sources/code/application/Models/Payment/PaidOrderDetailsResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/OutstandingOrderDetailsPaymentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Payment/PaidOrderDetailsResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/OutstandingOrderDetailsPaymentAppModel.swift index ab6d8b7d13..c7a2678b21 100644 --- a/Sources/code/application/Models/Payment/PaidOrderDetailsResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/OutstandingOrderDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: PaidOrderDetailsResponse + Model: OutstandingOrderDetails Used By: Payment */ - class PaidOrderDetailsResponse: Codable { + class OutstandingOrderDetails: Codable { public var statusCode: Int diff --git a/Sources/code/application/Models/Payment/OutstandingOrderDetailsResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/PaidOrderDetailsPaymentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Payment/OutstandingOrderDetailsResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/PaidOrderDetailsPaymentAppModel.swift index 6111f65491..e7ad0b4954 100644 --- a/Sources/code/application/Models/Payment/OutstandingOrderDetailsResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/PaidOrderDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: OutstandingOrderDetailsResponse + Model: PaidOrderDetails Used By: Payment */ - class OutstandingOrderDetailsResponse: Codable { + class PaidOrderDetails: Codable { public var statusCode: Int diff --git a/Sources/code/application/Models/Payment/PaymentInitializationResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/PaymentInitializationDetailsPaymentAppModel.swift similarity index 99% rename from Sources/code/application/Models/Payment/PaymentInitializationResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/PaymentInitializationDetailsPaymentAppModel.swift index 07c5ac3d54..2ea1175c1a 100644 --- a/Sources/code/application/Models/Payment/PaymentInitializationResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/PaymentInitializationDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: PaymentInitializationResponse + Model: PaymentInitializationDetails Used By: Payment */ - class PaymentInitializationResponse: Codable { + class PaymentInitializationDetails: Codable { public var status: String? diff --git a/Sources/code/application/Models/Payment/PaymentInitializationRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/PaymentInitializationPaymentAppModel.swift similarity index 98% rename from Sources/code/application/Models/Payment/PaymentInitializationRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/PaymentInitializationPaymentAppModel.swift index f78d01977b..eeeb107e70 100644 --- a/Sources/code/application/Models/Payment/PaymentInitializationRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/PaymentInitializationPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: PaymentInitializationRequest + Model: PaymentInitialization Used By: Payment */ - class PaymentInitializationRequest: Codable { + class PaymentInitialization: Codable { public var razorpayPaymentId: String? diff --git a/Sources/code/application/Models/Payment/PaymentModeRouteResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/PaymentModeRouteDetailsPaymentAppModel.swift similarity index 97% rename from Sources/code/application/Models/Payment/PaymentModeRouteResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/PaymentModeRouteDetailsPaymentAppModel.swift index b1da570162..0873fad8e9 100644 --- a/Sources/code/application/Models/Payment/PaymentModeRouteResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/PaymentModeRouteDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: PaymentModeRouteResponse + Model: PaymentModeRouteDetails Used By: Payment */ - class PaymentModeRouteResponse: Codable { + class PaymentModeRouteDetails: Codable { public var paymentOptions: PaymentOptionAndFlow diff --git a/Sources/code/application/Models/Payment/PaymentOrderResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/PaymentOrderDetailsPaymentAppModel.swift similarity index 98% rename from Sources/code/application/Models/Payment/PaymentOrderResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/PaymentOrderDetailsPaymentAppModel.swift index a65a508d27..e82711bab1 100644 --- a/Sources/code/application/Models/Payment/PaymentOrderResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/PaymentOrderDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: PaymentOrderResponse + Model: PaymentOrderDetails Used By: Payment */ - class PaymentOrderResponse: Codable { + class PaymentOrderDetails: Codable { public var paymentConfirmUrl: String? diff --git a/Sources/code/application/Models/Payment/PaymentOrderRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/PaymentOrderPaymentAppModel.swift similarity index 97% rename from Sources/code/application/Models/Payment/PaymentOrderRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/PaymentOrderPaymentAppModel.swift index c24aed1db9..d98ba9f806 100644 --- a/Sources/code/application/Models/Payment/PaymentOrderRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/PaymentOrderPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: PaymentOrderRequest + Model: PaymentOrder Used By: Payment */ - class PaymentOrderRequest: Codable { + class PaymentOrder: Codable { public var paymentMethods: [PaymentOrderMethods]? diff --git a/Sources/code/application/Models/Payment/PaymentStatusUpdateResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/PaymentStatusUpdateDetailsPaymentAppModel.swift similarity index 97% rename from Sources/code/application/Models/Payment/PaymentStatusUpdateResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/PaymentStatusUpdateDetailsPaymentAppModel.swift index e46812c8f8..eed9f4827c 100644 --- a/Sources/code/application/Models/Payment/PaymentStatusUpdateResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/PaymentStatusUpdateDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: PaymentStatusUpdateResponse + Model: PaymentStatusUpdateDetails Used By: Payment */ - class PaymentStatusUpdateResponse: Codable { + class PaymentStatusUpdateDetails: Codable { public var status: String diff --git a/Sources/code/application/Models/Payment/PaymentStatusUpdateRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/PaymentStatusUpdatePaymentAppModel.swift similarity index 89% rename from Sources/code/application/Models/Payment/PaymentStatusUpdateRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/PaymentStatusUpdatePaymentAppModel.swift index 680a074119..d4cbdb5c89 100644 --- a/Sources/code/application/Models/Payment/PaymentStatusUpdateRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/PaymentStatusUpdatePaymentAppModel.swift @@ -3,12 +3,12 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: PaymentStatusUpdateRequest + Model: PaymentStatusUpdate Used By: Payment */ - class PaymentStatusUpdateRequest: Codable { + class PaymentStatusUpdate: Codable { - public var status: String? + public var status: String public var merchantTransactionId: String? @@ -26,7 +26,7 @@ public extension ApplicationClient.Payment { public var vpa: String? - public var orderId: String? + public var orderId: String public var currency: String? @@ -65,7 +65,7 @@ public extension ApplicationClient.Payment { } - public init(aggregator: String, amount: Int? = nil, contact: String? = nil, currency: String? = nil, customerId: String? = nil, deviceId: String? = nil, email: String? = nil, merchantOrderId: String, merchantTransactionId: String? = nil, method: String, orderId: String? = nil, status: String? = nil, vpa: String? = nil) { + public init(aggregator: String, amount: Int? = nil, contact: String? = nil, currency: String? = nil, customerId: String? = nil, deviceId: String? = nil, email: String? = nil, merchantOrderId: String, merchantTransactionId: String? = nil, method: String, orderId: String, status: String, vpa: String? = nil) { self.status = status @@ -99,15 +99,8 @@ public extension ApplicationClient.Payment { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - status = try container.decode(String.self, forKey: .status) + 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 { - - } @@ -186,15 +179,8 @@ public extension ApplicationClient.Payment { - do { - orderId = try container.decode(String.self, forKey: .orderId) + orderId = try container.decode(String.self, forKey: .orderId) - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } diff --git a/Sources/code/application/Models/Payment/PollingPaymentLinkResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/PollingPaymentLinkDetailsPaymentAppModel.swift similarity index 98% rename from Sources/code/application/Models/Payment/PollingPaymentLinkResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/PollingPaymentLinkDetailsPaymentAppModel.swift index db73931974..044dc5a123 100644 --- a/Sources/code/application/Models/Payment/PollingPaymentLinkResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/PollingPaymentLinkDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: PollingPaymentLinkResponse + Model: PollingPaymentLinkDetails Used By: Payment */ - class PollingPaymentLinkResponse: Codable { + class PollingPaymentLinkDetails: Codable { public var status: String? diff --git a/Sources/code/application/Models/Payment/RedirectToAggregatorResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/RedirectToAggregatorDetailsPaymentAppModel.swift similarity index 93% rename from Sources/code/application/Models/Payment/RedirectToAggregatorResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/RedirectToAggregatorDetailsPaymentAppModel.swift index bc2231af16..be68e24d98 100644 --- a/Sources/code/application/Models/Payment/RedirectToAggregatorResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/RedirectToAggregatorDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: RedirectToAggregatorResponse + Model: RedirectToAggregatorDetails Used By: Payment */ - class RedirectToAggregatorResponse: Codable { + class RedirectToAggregatorDetails: Codable { public var data: RedirectURL diff --git a/Sources/code/application/Models/Payment/RefundAccountResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/RefundAccountDetailsPaymentAppModel.swift similarity index 97% rename from Sources/code/application/Models/Payment/RefundAccountResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/RefundAccountDetailsPaymentAppModel.swift index c34c06a78e..68c5a7ea3a 100644 --- a/Sources/code/application/Models/Payment/RefundAccountResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/RefundAccountDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: RefundAccountResponse + Model: RefundAccountDetails Used By: Payment */ - class RefundAccountResponse: Codable { + class RefundAccountDetails: Codable { public var isVerifiedFlag: Bool? diff --git a/Sources/code/application/Models/Payment/RefundOptionResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/RefundOptionDetailsPaymentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Payment/RefundOptionResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/RefundOptionDetailsPaymentAppModel.swift index b9677fe6f5..7be9f81ca2 100644 --- a/Sources/code/application/Models/Payment/RefundOptionResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/RefundOptionDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: RefundOptionResponse + Model: RefundOptionDetails Used By: Payment */ - class RefundOptionResponse: Codable { + class RefundOptionDetails: Codable { public var offlineRefundOptions: OfflineRefundOptions diff --git a/Sources/code/application/Models/Payment/UpdateRefundTransferModeResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/RefundTransferModeUpdateDetailsPaymentAppModel.swift similarity index 92% rename from Sources/code/application/Models/Payment/UpdateRefundTransferModeResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/RefundTransferModeUpdateDetailsPaymentAppModel.swift index bc21fdc967..ed744f8d12 100644 --- a/Sources/code/application/Models/Payment/UpdateRefundTransferModeResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/RefundTransferModeUpdateDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: UpdateRefundTransferModeResponse + Model: RefundTransferModeUpdateDetails Used By: Payment */ - class UpdateRefundTransferModeResponse: Codable { + class RefundTransferModeUpdateDetails: Codable { public var success: Bool? diff --git a/Sources/code/application/Models/Payment/renderHTMLResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/RenderHTMLDetailsPaymentAppModel.swift similarity index 92% rename from Sources/code/application/Models/Payment/renderHTMLResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/RenderHTMLDetailsPaymentAppModel.swift index 61e87c4a78..8f2ef3504c 100644 --- a/Sources/code/application/Models/Payment/renderHTMLResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/RenderHTMLDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: renderHTMLResponse + Model: RenderHTMLDetails Used By: Payment */ - class renderHTMLResponse: Codable { + class RenderHTMLDetails: Codable { public var html: String diff --git a/Sources/code/application/Models/Payment/renderHTMLRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/RenderHTMLPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/renderHTMLRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/RenderHTMLPaymentAppModel.swift index 7a19a1608c..f49a035918 100644 --- a/Sources/code/application/Models/Payment/renderHTMLRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/RenderHTMLPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: renderHTMLRequest + Model: RenderHTML Used By: Payment */ - class renderHTMLRequest: Codable { + class RenderHTML: Codable { public var returntype: String? diff --git a/Sources/code/application/Models/Payment/ResendOrCancelPaymentResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/ResendOrCancelPaymentDetailsPaymentAppModel.swift similarity index 93% rename from Sources/code/application/Models/Payment/ResendOrCancelPaymentResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/ResendOrCancelPaymentDetailsPaymentAppModel.swift index 8913c07d9a..67cc227c33 100644 --- a/Sources/code/application/Models/Payment/ResendOrCancelPaymentResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ResendOrCancelPaymentDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ResendOrCancelPaymentResponse + Model: ResendOrCancelPaymentDetails Used By: Payment */ - class ResendOrCancelPaymentResponse: Codable { + class ResendOrCancelPaymentDetails: Codable { public var data: LinkStatus diff --git a/Sources/code/application/Models/Payment/ResendOrCancelPaymentRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/ResendOrCancelPaymentPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/ResendOrCancelPaymentRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/ResendOrCancelPaymentPaymentAppModel.swift index 956e1ec6fc..7b141d8162 100644 --- a/Sources/code/application/Models/Payment/ResendOrCancelPaymentRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ResendOrCancelPaymentPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ResendOrCancelPaymentRequest + Model: ResendOrCancelPayment Used By: Payment */ - class ResendOrCancelPaymentRequest: Codable { + class ResendOrCancelPayment: Codable { public var orderId: String diff --git a/Sources/code/application/Models/Payment/ResendPaymentLinkResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/ResendPaymentLinkDetailsPaymentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Payment/ResendPaymentLinkResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/ResendPaymentLinkDetailsPaymentAppModel.swift index b49f63be6c..8008924ade 100644 --- a/Sources/code/application/Models/Payment/ResendPaymentLinkResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ResendPaymentLinkDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ResendPaymentLinkResponse + Model: ResendPaymentLinkDetails Used By: Payment */ - class ResendPaymentLinkResponse: Codable { + class ResendPaymentLinkDetails: Codable { public var statusCode: Int diff --git a/Sources/code/application/Models/Payment/RupifiBannerResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/RupifiBannerDetailsPaymentAppModel.swift similarity index 94% rename from Sources/code/application/Models/Payment/RupifiBannerResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/RupifiBannerDetailsPaymentAppModel.swift index 4cf5bfcd7f..48da83b03c 100644 --- a/Sources/code/application/Models/Payment/RupifiBannerResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/RupifiBannerDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: RupifiBannerResponse + Model: RupifiBannerDetails Used By: Payment */ - class RupifiBannerResponse: Codable { + class RupifiBannerDetails: Codable { public var data: RupifiBannerData diff --git a/Sources/code/application/Models/Payment/SelectedRefundOptionResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/SelectedRefundOptionDetailsPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/SelectedRefundOptionResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/SelectedRefundOptionDetailsPaymentAppModel.swift index f75d0c30da..f0eaae55a9 100644 --- a/Sources/code/application/Models/Payment/SelectedRefundOptionResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/SelectedRefundOptionDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: SelectedRefundOptionResponse + Model: SelectedRefundOptionDetails Used By: Payment */ - class SelectedRefundOptionResponse: Codable { + class SelectedRefundOptionDetails: Codable { public var transferMode: [String: Any] diff --git a/Sources/code/application/Models/Payment/SetDefaultBeneficiaryResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/SetDefaultBeneficiaryDetailsPaymentAppModel.swift similarity index 94% rename from Sources/code/application/Models/Payment/SetDefaultBeneficiaryResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/SetDefaultBeneficiaryDetailsPaymentAppModel.swift index 31227f8f52..35d6c2d778 100644 --- a/Sources/code/application/Models/Payment/SetDefaultBeneficiaryResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/SetDefaultBeneficiaryDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: SetDefaultBeneficiaryResponse + Model: SetDefaultBeneficiaryDetails Used By: Payment */ - class SetDefaultBeneficiaryResponse: Codable { + class SetDefaultBeneficiaryDetails: Codable { public var isBeneficiarySet: Bool diff --git a/Sources/code/application/Models/Payment/SetDefaultBeneficiaryRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/SetDefaultBeneficiaryPaymentAppModel.swift similarity index 93% rename from Sources/code/application/Models/Payment/SetDefaultBeneficiaryRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/SetDefaultBeneficiaryPaymentAppModel.swift index ee738d8151..6635b4a9f9 100644 --- a/Sources/code/application/Models/Payment/SetDefaultBeneficiaryRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/SetDefaultBeneficiaryPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: SetDefaultBeneficiaryRequest + Model: SetDefaultBeneficiary Used By: Payment */ - class SetDefaultBeneficiaryRequest: Codable { + class SetDefaultBeneficiary: Codable { public var orderId: String diff --git a/Sources/code/application/Models/Payment/ShipmentRefundResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/ShipmentRefundDetailsPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/ShipmentRefundResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/ShipmentRefundDetailsPaymentAppModel.swift index b4fa2f7a7b..835b0de362 100644 --- a/Sources/code/application/Models/Payment/ShipmentRefundResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ShipmentRefundDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ShipmentRefundResponse + Model: ShipmentRefundDetails Used By: Payment */ - class ShipmentRefundResponse: Codable { + class ShipmentRefundDetails: Codable { public var data: ShipmentRefundDetail diff --git a/Sources/code/application/Models/Payment/ShipmentRefundRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/ShipmentRefundPaymentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Payment/ShipmentRefundRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/ShipmentRefundPaymentAppModel.swift index 28bd85da37..6a1c2ee5cf 100644 --- a/Sources/code/application/Models/Payment/ShipmentRefundRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ShipmentRefundPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ShipmentRefundRequest + Model: ShipmentRefund Used By: Payment */ - class ShipmentRefundRequest: Codable { + class ShipmentRefund: Codable { public var shipmentId: String diff --git a/Sources/code/application/Models/Payment/TransferModeResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/TransferModeFetchDetailsPaymentAppModel.swift similarity index 91% rename from Sources/code/application/Models/Payment/TransferModeResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/TransferModeFetchDetailsPaymentAppModel.swift index e243ea137f..67d948a36f 100644 --- a/Sources/code/application/Models/Payment/TransferModeResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/TransferModeFetchDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: TransferModeResponse + Model: TransferModeFetchDetails Used By: Payment */ - class TransferModeResponse: Codable { + class TransferModeFetchDetails: Codable { public var data: [TransferModeDetails] diff --git a/Sources/code/application/Models/Payment/UpdateRefundTransferModeRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/UpdateRefundTransferModePaymentAppModel.swift similarity index 93% rename from Sources/code/application/Models/Payment/UpdateRefundTransferModeRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/UpdateRefundTransferModePaymentAppModel.swift index 00dd3b0d6b..6bbeb6c502 100644 --- a/Sources/code/application/Models/Payment/UpdateRefundTransferModeRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/UpdateRefundTransferModePaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: UpdateRefundTransferModeRequest + Model: UpdateRefundTransferMode Used By: Payment */ - class UpdateRefundTransferModeRequest: Codable { + class UpdateRefundTransferMode: Codable { public var enable: Bool diff --git a/Sources/code/application/Models/Payment/ValidateCustomerResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/ValidateCustomerDetailsPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/ValidateCustomerResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/ValidateCustomerDetailsPaymentAppModel.swift index 91d7d72dfd..d4511b705b 100644 --- a/Sources/code/application/Models/Payment/ValidateCustomerResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ValidateCustomerDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ValidateCustomerResponse + Model: ValidateCustomerDetails Used By: Payment */ - class ValidateCustomerResponse: Codable { + class ValidateCustomerDetails: Codable { public var data: [String: Any]? diff --git a/Sources/code/application/Models/Payment/ValidateCustomerRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/ValidateCustomerPaymentAppModel.swift similarity index 98% rename from Sources/code/application/Models/Payment/ValidateCustomerRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/ValidateCustomerPaymentAppModel.swift index a97438d6ef..265cfdc3e7 100644 --- a/Sources/code/application/Models/Payment/ValidateCustomerRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ValidateCustomerPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ValidateCustomerRequest + Model: ValidateCustomer Used By: Payment */ - class ValidateCustomerRequest: Codable { + class ValidateCustomer: Codable { public var aggregator: String diff --git a/Sources/code/application/Models/Payment/ValidateVPAResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/ValidateVPADetailsPaymentAppModel.swift similarity index 94% rename from Sources/code/application/Models/Payment/ValidateVPAResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/ValidateVPADetailsPaymentAppModel.swift index fbcd82ec5f..d87a331bed 100644 --- a/Sources/code/application/Models/Payment/ValidateVPAResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ValidateVPADetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ValidateVPAResponse + Model: ValidateVPADetails Used By: Payment */ - class ValidateVPAResponse: Codable { + class ValidateVPADetails: Codable { public var data: ValidateUPI diff --git a/Sources/code/application/Models/Payment/ValidateVPARequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/ValidateVPAPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/ValidateVPARequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/ValidateVPAPaymentAppModel.swift index e80791c4a0..5be2ea0b46 100644 --- a/Sources/code/application/Models/Payment/ValidateVPARequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ValidateVPAPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ValidateVPARequest + Model: ValidateVPA Used By: Payment */ - class ValidateVPARequest: Codable { + class ValidateVPA: Codable { public var upiVpa: String diff --git a/Sources/code/application/Models/Payment/ValidateValidateAddressResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/ValidateValidateAddressDetailsPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/ValidateValidateAddressResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/ValidateValidateAddressDetailsPaymentAppModel.swift index acd0fea8fa..c0f745917f 100644 --- a/Sources/code/application/Models/Payment/ValidateValidateAddressResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ValidateValidateAddressDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ValidateValidateAddressResponse + Model: ValidateValidateAddressDetails Used By: Payment */ - class ValidateValidateAddressResponse: Codable { + class ValidateValidateAddressDetails: Codable { public var upi: VPADetails? diff --git a/Sources/code/application/Models/Payment/ValidateValidateAddressRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/ValidateValidateAddressPaymentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Payment/ValidateValidateAddressRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/ValidateValidateAddressPaymentAppModel.swift index 63446763a7..33046d9715 100644 --- a/Sources/code/application/Models/Payment/ValidateValidateAddressRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/ValidateValidateAddressPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: ValidateValidateAddressRequest + Model: ValidateValidateAddress Used By: Payment */ - class ValidateValidateAddressRequest: Codable { + class ValidateValidateAddress: Codable { public var ifscCode: String? diff --git a/Sources/code/application/Models/Payment/WalletOtpResponsePaymentAppModel.swift b/Sources/code/application/Models/Payment/WalletOtpDetailsPaymentAppModel.swift similarity index 96% rename from Sources/code/application/Models/Payment/WalletOtpResponsePaymentAppModel.swift rename to Sources/code/application/Models/Payment/WalletOtpDetailsPaymentAppModel.swift index b3d66f3f9e..ad0cdf3400 100644 --- a/Sources/code/application/Models/Payment/WalletOtpResponsePaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/WalletOtpDetailsPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: WalletOtpResponse + Model: WalletOtpDetails Used By: Payment */ - class WalletOtpResponse: Codable { + class WalletOtpDetails: Codable { public var requestId: String diff --git a/Sources/code/application/Models/Payment/WalletOtpRequestPaymentAppModel.swift b/Sources/code/application/Models/Payment/WalletOtpPaymentAppModel.swift similarity index 95% rename from Sources/code/application/Models/Payment/WalletOtpRequestPaymentAppModel.swift rename to Sources/code/application/Models/Payment/WalletOtpPaymentAppModel.swift index 8877276fb7..41df99f1e4 100644 --- a/Sources/code/application/Models/Payment/WalletOtpRequestPaymentAppModel.swift +++ b/Sources/code/application/Models/Payment/WalletOtpPaymentAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Payment { /* - Model: WalletOtpRequest + Model: WalletOtp Used By: Payment */ - class WalletOtpRequest: Codable { + class WalletOtp: Codable { public var countryCode: String diff --git a/Sources/code/application/Models/Rewards/CatalogueOrderResponseRewardsAppModel.swift b/Sources/code/application/Models/Rewards/CatalogueOrderCreationRewardsAppModel.swift similarity index 94% rename from Sources/code/application/Models/Rewards/CatalogueOrderResponseRewardsAppModel.swift rename to Sources/code/application/Models/Rewards/CatalogueOrderCreationRewardsAppModel.swift index 1d1071a123..20c95373df 100644 --- a/Sources/code/application/Models/Rewards/CatalogueOrderResponseRewardsAppModel.swift +++ b/Sources/code/application/Models/Rewards/CatalogueOrderCreationRewardsAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Rewards { /* - Model: CatalogueOrderResponse + Model: CatalogueOrderCreation Used By: Rewards */ - class CatalogueOrderResponse: Codable { + class CatalogueOrderCreation: Codable { public var articles: [RewardsArticle]? diff --git a/Sources/code/application/Models/Rewards/CatalogueOrderRequestRewardsAppModel.swift b/Sources/code/application/Models/Rewards/CatalogueOrderDetailsRewardsAppModel.swift similarity index 94% rename from Sources/code/application/Models/Rewards/CatalogueOrderRequestRewardsAppModel.swift rename to Sources/code/application/Models/Rewards/CatalogueOrderDetailsRewardsAppModel.swift index 2b50ddaa1b..b7c57dcf25 100644 --- a/Sources/code/application/Models/Rewards/CatalogueOrderRequestRewardsAppModel.swift +++ b/Sources/code/application/Models/Rewards/CatalogueOrderDetailsRewardsAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Rewards { /* - Model: CatalogueOrderRequest + Model: CatalogueOrderDetails Used By: Rewards */ - class CatalogueOrderRequest: Codable { + class CatalogueOrderDetails: Codable { public var articles: [RewardsArticle]? diff --git a/Sources/code/application/Models/Rewards/OrderDiscountResponseRewardsAppModel.swift b/Sources/code/application/Models/Rewards/OrderDiscountDetailsRewardsAppModel.swift similarity index 98% rename from Sources/code/application/Models/Rewards/OrderDiscountResponseRewardsAppModel.swift rename to Sources/code/application/Models/Rewards/OrderDiscountDetailsRewardsAppModel.swift index d53d173c70..d36dd062de 100644 --- a/Sources/code/application/Models/Rewards/OrderDiscountResponseRewardsAppModel.swift +++ b/Sources/code/application/Models/Rewards/OrderDiscountDetailsRewardsAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Rewards { /* - Model: OrderDiscountResponse + Model: OrderDiscountDetails Used By: Rewards */ - class OrderDiscountResponse: Codable { + class OrderDiscountDetails: Codable { public var orderAmount: Double? diff --git a/Sources/code/application/Models/Rewards/PointsResponseRewardsAppModel.swift b/Sources/code/application/Models/Rewards/PointsDetailsRewardsAppModel.swift similarity index 94% rename from Sources/code/application/Models/Rewards/PointsResponseRewardsAppModel.swift rename to Sources/code/application/Models/Rewards/PointsDetailsRewardsAppModel.swift index b287bf11ce..5ebbe3e6c4 100644 --- a/Sources/code/application/Models/Rewards/PointsResponseRewardsAppModel.swift +++ b/Sources/code/application/Models/Rewards/PointsDetailsRewardsAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Rewards { /* - Model: PointsResponse + Model: PointsDetails Used By: Rewards */ - class PointsResponse: Codable { + class PointsDetails: Codable { public var points: Double? diff --git a/Sources/code/application/Models/Rewards/PointsHistoryResponseRewardsAppModel.swift b/Sources/code/application/Models/Rewards/PointsHistoryDetailsRewardsAppModel.swift similarity index 95% rename from Sources/code/application/Models/Rewards/PointsHistoryResponseRewardsAppModel.swift rename to Sources/code/application/Models/Rewards/PointsHistoryDetailsRewardsAppModel.swift index 7c51a0e2d8..352c78b66b 100644 --- a/Sources/code/application/Models/Rewards/PointsHistoryResponseRewardsAppModel.swift +++ b/Sources/code/application/Models/Rewards/PointsHistoryDetailsRewardsAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Rewards { /* - Model: PointsHistoryResponse + Model: PointsHistoryDetails Used By: Rewards */ - class PointsHistoryResponse: Codable { + class PointsHistoryDetails: Codable { public var items: [PointsHistory]? diff --git a/Sources/code/application/Models/Rewards/RedeemReferralCodeResponseRewardsAppModel.swift b/Sources/code/application/Models/Rewards/RedeemReferralCodeDetailsRewardsAppModel.swift similarity index 97% rename from Sources/code/application/Models/Rewards/RedeemReferralCodeResponseRewardsAppModel.swift rename to Sources/code/application/Models/Rewards/RedeemReferralCodeDetailsRewardsAppModel.swift index b8fb90d083..e087b93a7c 100644 --- a/Sources/code/application/Models/Rewards/RedeemReferralCodeResponseRewardsAppModel.swift +++ b/Sources/code/application/Models/Rewards/RedeemReferralCodeDetailsRewardsAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Rewards { /* - Model: RedeemReferralCodeResponse + Model: RedeemReferralCodeDetails Used By: Rewards */ - class RedeemReferralCodeResponse: Codable { + class RedeemReferralCodeDetails: Codable { public var redeemed: Bool? diff --git a/Sources/code/application/Models/Rewards/RedeemReferralCodeRequestRewardsAppModel.swift b/Sources/code/application/Models/Rewards/RedeemReferralCodeRewardsAppModel.swift similarity index 95% rename from Sources/code/application/Models/Rewards/RedeemReferralCodeRequestRewardsAppModel.swift rename to Sources/code/application/Models/Rewards/RedeemReferralCodeRewardsAppModel.swift index ec7c560893..00bbfe40bc 100644 --- a/Sources/code/application/Models/Rewards/RedeemReferralCodeRequestRewardsAppModel.swift +++ b/Sources/code/application/Models/Rewards/RedeemReferralCodeRewardsAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Rewards { /* - Model: RedeemReferralCodeRequest + Model: RedeemReferralCode Used By: Rewards */ - class RedeemReferralCodeRequest: Codable { + class RedeemReferralCode: Codable { public var deviceId: String? diff --git a/Sources/code/application/Models/Rewards/ReferralDetailsResponseRewardsAppModel.swift b/Sources/code/application/Models/Rewards/ReferralDetailsRewardsAppModel.swift similarity index 98% rename from Sources/code/application/Models/Rewards/ReferralDetailsResponseRewardsAppModel.swift rename to Sources/code/application/Models/Rewards/ReferralDetailsRewardsAppModel.swift index 47c6265802..54d95cbb8f 100644 --- a/Sources/code/application/Models/Rewards/ReferralDetailsResponseRewardsAppModel.swift +++ b/Sources/code/application/Models/Rewards/ReferralDetailsRewardsAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Rewards { /* - Model: ReferralDetailsResponse + Model: ReferralDetails Used By: Rewards */ - class ReferralDetailsResponse: Codable { + class ReferralDetails: Codable { public var referral: Offer? diff --git a/Sources/code/application/Models/Rewards/OrderDiscountRequestRewardsAppModel.swift b/Sources/code/application/Models/Rewards/RetrieveOrderDiscountRewardsAppModel.swift similarity index 95% rename from Sources/code/application/Models/Rewards/OrderDiscountRequestRewardsAppModel.swift rename to Sources/code/application/Models/Rewards/RetrieveOrderDiscountRewardsAppModel.swift index 83d4704423..6cd72359e4 100644 --- a/Sources/code/application/Models/Rewards/OrderDiscountRequestRewardsAppModel.swift +++ b/Sources/code/application/Models/Rewards/RetrieveOrderDiscountRewardsAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Rewards { /* - Model: OrderDiscountRequest + Model: RetrieveOrderDiscount Used By: Rewards */ - class OrderDiscountRequest: Codable { + class RetrieveOrderDiscount: Codable { public var orderAmount: Double diff --git a/Sources/code/application/Models/Theme/AvailablePageSchemaSectionsThemeAppModel.swift b/Sources/code/application/Models/Theme/AvailablePageSchemaSectionsThemeAppModel.swift index d87056c377..c21bd0bf88 100644 --- a/Sources/code/application/Models/Theme/AvailablePageSchemaSectionsThemeAppModel.swift +++ b/Sources/code/application/Models/Theme/AvailablePageSchemaSectionsThemeAppModel.swift @@ -12,8 +12,6 @@ public extension ApplicationClient.Theme { public var label: String? - public var source: String? - public var props: [String: Any]? public var blocks: [[String: Any]]? @@ -22,6 +20,10 @@ public extension ApplicationClient.Theme { public var predicate: AvailablePagePredicate? + public var source: SectionSource? + + public var assets: SectionAssets? + public enum CodingKeys: String, CodingKey { @@ -29,8 +31,6 @@ public extension ApplicationClient.Theme { case label = "label" - case source = "source" - case props = "props" case blocks = "blocks" @@ -39,16 +39,18 @@ public extension ApplicationClient.Theme { case predicate = "predicate" + case source = "__source" + + case assets = "assets" + } - public init(blocks: [[String: Any]]? = nil, label: String? = nil, name: String? = nil, predicate: AvailablePagePredicate? = nil, preset: [String: Any]? = nil, props: [String: Any]? = nil, source: String? = nil) { + public init(assets: SectionAssets? = nil, blocks: [[String: Any]]? = nil, label: String? = nil, name: String? = nil, predicate: AvailablePagePredicate? = nil, preset: [String: Any]? = nil, props: [String: Any]? = nil, source: SectionSource? = nil) { self.name = name self.label = label - self.source = source - self.props = props self.blocks = blocks @@ -57,6 +59,10 @@ public extension ApplicationClient.Theme { self.predicate = predicate + self.source = source + + self.assets = assets + } required public init(from decoder: Decoder) throws { @@ -88,7 +94,7 @@ public extension ApplicationClient.Theme { do { - source = try container.decode(String.self, forKey: .source) + props = try container.decode([String: Any].self, forKey: .props) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -100,7 +106,7 @@ public extension ApplicationClient.Theme { do { - props = try container.decode([String: Any].self, forKey: .props) + blocks = try container.decode([[String: Any]].self, forKey: .blocks) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -112,7 +118,7 @@ public extension ApplicationClient.Theme { do { - blocks = try container.decode([[String: Any]].self, forKey: .blocks) + preset = try container.decode([String: Any].self, forKey: .preset) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -124,7 +130,7 @@ public extension ApplicationClient.Theme { do { - preset = try container.decode([String: Any].self, forKey: .preset) + predicate = try container.decode(AvailablePagePredicate.self, forKey: .predicate) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -136,7 +142,19 @@ public extension ApplicationClient.Theme { do { - predicate = try container.decode(AvailablePagePredicate.self, forKey: .predicate) + source = try container.decode(SectionSource.self, forKey: .source) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + assets = try container.decode(SectionAssets.self, forKey: .assets) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -160,10 +178,6 @@ public extension ApplicationClient.Theme { - try? container.encodeIfPresent(source, forKey: .source) - - - try? container.encodeIfPresent(props, forKey: .props) @@ -179,6 +193,14 @@ public extension ApplicationClient.Theme { try? container.encodeIfPresent(predicate, forKey: .predicate) + + try? container.encodeIfPresent(source, forKey: .source) + + + + try? container.encodeIfPresent(assets, forKey: .assets) + + } } diff --git a/Sources/code/application/Models/Theme/GlobalConfigThemeAppModel.swift b/Sources/code/application/Models/Theme/SectionAssetsThemeAppModel.swift similarity index 66% rename from Sources/code/application/Models/Theme/GlobalConfigThemeAppModel.swift rename to Sources/code/application/Models/Theme/SectionAssetsThemeAppModel.swift index 41c312a136..ca9a58fe17 100644 --- a/Sources/code/application/Models/Theme/GlobalConfigThemeAppModel.swift +++ b/Sources/code/application/Models/Theme/SectionAssetsThemeAppModel.swift @@ -3,29 +3,29 @@ import Foundation public extension ApplicationClient.Theme { /* - Model: GlobalConfig + Model: SectionAssets Used By: Theme */ - class GlobalConfig: Codable { + class SectionAssets: Codable { - public var statics: StaticConfig? + public var js: String? - public var custom: CustomConfig? + public var css: String? public enum CodingKeys: String, CodingKey { - case statics = "statics" + case js = "js" - case custom = "custom" + case css = "css" } - public init(custom: CustomConfig? = nil, statics: StaticConfig? = nil) { + public init(css: String? = nil, js: String? = nil) { - self.statics = statics + self.js = js - self.custom = custom + self.css = css } @@ -34,7 +34,7 @@ public extension ApplicationClient.Theme { do { - statics = try container.decode(StaticConfig.self, forKey: .statics) + js = try container.decode(String.self, forKey: .js) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -46,7 +46,7 @@ public extension ApplicationClient.Theme { do { - custom = try container.decode(CustomConfig.self, forKey: .custom) + css = try container.decode(String.self, forKey: .css) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,11 +62,11 @@ public extension ApplicationClient.Theme { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(statics, forKey: .statics) + try? container.encodeIfPresent(js, forKey: .js) - try? container.encodeIfPresent(custom, forKey: .custom) + try? container.encodeIfPresent(css, forKey: .css) } diff --git a/Sources/code/application/Models/Theme/SectionSourceThemeAppModel.swift b/Sources/code/application/Models/Theme/SectionSourceThemeAppModel.swift new file mode 100644 index 0000000000..e8b9cab12d --- /dev/null +++ b/Sources/code/application/Models/Theme/SectionSourceThemeAppModel.swift @@ -0,0 +1,97 @@ + + +import Foundation +public extension ApplicationClient.Theme { + /* + Model: SectionSource + Used By: Theme + */ + class SectionSource: Codable { + + public var id: String? + + public var bundleName: String? + + public var type: String? + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case bundleName = "bundle_name" + + case type = "type" + + } + + public init(bundleName: String? = nil, id: String? = nil, type: String? = nil) { + + self.id = id + + self.bundleName = bundleName + + self.type = type + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + bundleName = try container.decode(String.self, forKey: .bundleName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(id, forKey: .id) + + + + try? container.encodeIfPresent(bundleName, forKey: .bundleName) + + + + try? container.encodeIfPresent(type, forKey: .type) + + + } + + } +} diff --git a/Sources/code/application/Models/User/OtpSuccessUserAppModel.swift b/Sources/code/application/Models/User/SendOtpSuccessUserAppModel.swift similarity index 98% rename from Sources/code/application/Models/User/OtpSuccessUserAppModel.swift rename to Sources/code/application/Models/User/SendOtpSuccessUserAppModel.swift index 1134fff060..b2103d2337 100644 --- a/Sources/code/application/Models/User/OtpSuccessUserAppModel.swift +++ b/Sources/code/application/Models/User/SendOtpSuccessUserAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.User { /* - Model: OtpSuccess + Model: SendOtpSuccess Used By: User */ - class OtpSuccess: Codable { + class SendOtpSuccess: Codable { public var resendTimer: Int? diff --git a/Sources/code/application/Models/User/SendOtpResponseUserAppModel.swift b/Sources/code/application/Models/User/SendOtpUserAppModel.swift similarity index 99% rename from Sources/code/application/Models/User/SendOtpResponseUserAppModel.swift rename to Sources/code/application/Models/User/SendOtpUserAppModel.swift index f9053aef79..d6a5f8410e 100644 --- a/Sources/code/application/Models/User/SendOtpResponseUserAppModel.swift +++ b/Sources/code/application/Models/User/SendOtpUserAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.User { /* - Model: SendOtpResponse + Model: SendOtp Used By: User */ - class SendOtpResponse: Codable { + class SendOtp: Codable { public var resendTimer: Int? diff --git a/Sources/code/application/Models/User/UpdateUserAttributesRequestUserAppModel.swift b/Sources/code/application/Models/User/UpdateUserAttributesUserAppModel.swift similarity index 93% rename from Sources/code/application/Models/User/UpdateUserAttributesRequestUserAppModel.swift rename to Sources/code/application/Models/User/UpdateUserAttributesUserAppModel.swift index 4bb98348fa..416ccb36be 100644 --- a/Sources/code/application/Models/User/UpdateUserAttributesRequestUserAppModel.swift +++ b/Sources/code/application/Models/User/UpdateUserAttributesUserAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.User { /* - Model: UpdateUserAttributesRequest + Model: UpdateUserAttributes Used By: User */ - class UpdateUserAttributesRequest: Codable { + class UpdateUserAttributes: Codable { public var attributes: [String: Any]? diff --git a/Sources/code/application/Models/User/UserExistsResponseUserAppModel.swift b/Sources/code/application/Models/User/UserExistsDetailsUserAppModel.swift similarity index 94% rename from Sources/code/application/Models/User/UserExistsResponseUserAppModel.swift rename to Sources/code/application/Models/User/UserExistsDetailsUserAppModel.swift index 55e5a023a8..c28372f699 100644 --- a/Sources/code/application/Models/User/UserExistsResponseUserAppModel.swift +++ b/Sources/code/application/Models/User/UserExistsDetailsUserAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.User { /* - Model: UserExistsResponse + Model: UserExistsDetails Used By: User */ - class UserExistsResponse: Codable { + class UserExistsDetails: Codable { public var userExists: Bool? diff --git a/Sources/code/application/Models/Webhook/ClickEventResponseWebhookAppModel.swift b/Sources/code/application/Models/Webhook/ClickEventDetailsWebhookAppModel.swift similarity index 97% rename from Sources/code/application/Models/Webhook/ClickEventResponseWebhookAppModel.swift rename to Sources/code/application/Models/Webhook/ClickEventDetailsWebhookAppModel.swift index 68eed62bd2..f2472d03cd 100644 --- a/Sources/code/application/Models/Webhook/ClickEventResponseWebhookAppModel.swift +++ b/Sources/code/application/Models/Webhook/ClickEventDetailsWebhookAppModel.swift @@ -3,10 +3,10 @@ import Foundation public extension ApplicationClient.Webhook { /* - Model: ClickEventResponse + Model: ClickEventDetails Used By: Webhook */ - class ClickEventResponse: Codable { + class ClickEventDetails: Codable { public var successCount: Int? diff --git a/Sources/code/application/Models/Webhook/ClickEventPayloadWebhookAppModel.swift b/Sources/code/application/Models/Webhook/ClickEventPayloadWebhookAppModel.swift new file mode 100644 index 0000000000..9f9fbdd5c6 --- /dev/null +++ b/Sources/code/application/Models/Webhook/ClickEventPayloadWebhookAppModel.swift @@ -0,0 +1,75 @@ + + +import Foundation +public extension ApplicationClient.Webhook { + /* + Model: ClickEventPayload + Used By: Webhook + */ + class ClickEventPayload: Codable { + + public var batch: [ClickEventBatch]? + + public var sentAt: String? + + + public enum CodingKeys: String, CodingKey { + + case batch = "batch" + + case sentAt = "sent_at" + + } + + public init(batch: [ClickEventBatch]? = nil, sentAt: String? = nil) { + + self.batch = batch + + self.sentAt = sentAt + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + batch = try container.decode([ClickEventBatch].self, forKey: .batch) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + sentAt = try container.decode(String.self, forKey: .sentAt) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(batch, forKey: .batch) + + + + try? container.encodeIfPresent(sentAt, forKey: .sentAt) + + + } + + } +} diff --git a/Sources/code/application/Models/Webhook/ClickEventRequestWebhookAppModel.swift b/Sources/code/application/Models/Webhook/ClickEventRequestWebhookAppModel.swift deleted file mode 100644 index d3626f8d18..0000000000 --- a/Sources/code/application/Models/Webhook/ClickEventRequestWebhookAppModel.swift +++ /dev/null @@ -1,53 +0,0 @@ - - -import Foundation -public extension ApplicationClient.Webhook { - /* - Model: ClickEventRequest - Used By: Webhook - */ - class ClickEventRequest: Codable { - - public var batch: [ClickEventBatch]? - - - public enum CodingKeys: String, CodingKey { - - case batch = "batch" - - } - - public init(batch: [ClickEventBatch]? = nil) { - - self.batch = batch - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - batch = try container.decode([ClickEventBatch].self, forKey: .batch) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - try? container.encodeIfPresent(batch, forKey: .batch) - - - } - - } -} diff --git a/Sources/code/platform/Client/AuditTrailPlatformClient.swift b/Sources/code/platform/Client/AuditTrailPlatformClient.swift index e9f80c59c6..03830c8d5a 100644 --- a/Sources/code/platform/Client/AuditTrailPlatformClient.swift +++ b/Sources/code/platform/Client/AuditTrailPlatformClient.swift @@ -14,68 +14,6 @@ extension PlatformClient { - /** - * - * Summary: Get audit logs - * Description: Retrieve audit logs for system events and actions. - **/ - public func getAuditLogs( - qs: String, - limit: Int?, - sort: [String: Any]?, - - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: LogSchemaResponse?, _ error: FDKError?) -> Void - ) { - - var xQuery: [String: Any] = [:] - xQuery["qs"] = qs - - if let value = limit { - xQuery["limit"] = value - } - - if let value = sort { - xQuery["sort"] = value - } - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "GET", - url: "/service/platform/audit-trail/v1.0/company/\(companyId)/logs", - query: xQuery, - body: nil, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(LogSchemaResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - /** * * Summary: Create an audit log @@ -84,7 +22,7 @@ extension PlatformClient { public func createAuditLog( body: RequestBodyAuditLog, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreateLogResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreateLogResp?, _ error: FDKError?) -> Void ) { @@ -98,7 +36,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/audit-trail/v1.0/company/\(companyId)/logs", + url: "/service/platform/webhook/v1.0/company/\(companyId)/audit/logs/create", query: nil, body: body.dictionary, headers: xHeaders, @@ -112,108 +50,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CreateLogResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get an audit log - * Description: Retrieve a specific audit log entry. - **/ - public func getAuditLog( - id: String, - - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: LogSchemaResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "GET", - url: "/service/platform/audit-trail/v1.0/company/\(companyId)/logs/\(id)", - query: nil, - body: nil, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(LogSchemaResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: List entity types - * Description: List of entity types that can be audited within the platform. - **/ - public func getEntityTypes( - - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EntityTypesResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "GET", - url: "/service/platform/audit-trail/v1.0/company/\(companyId)/entity-types", - query: nil, - body: nil, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(EntityTypesResponse.self, from: data) + let response = Utility.decode(CreateLogResp.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Client/BillingPlatformClient.swift b/Sources/code/platform/Client/BillingPlatformClient.swift index f703c3329c..bf256dc832 100644 --- a/Sources/code/platform/Client/BillingPlatformClient.swift +++ b/Sources/code/platform/Client/BillingPlatformClient.swift @@ -16,7 +16,7 @@ extension PlatformClient { /** * - * Summary: Obtain charge details. + * Summary: Obtain charge details * Description: Retrieve comprehensive details about a specific billing charge. **/ public func getChargeDetails( @@ -68,7 +68,7 @@ extension PlatformClient { /** * - * Summary: Retrieve subscription charge details. + * Summary: Retrieve subscription charge details * Description: Retrieve detailed information about subscription charges using this API. **/ public func getSubscriptionCharge( @@ -120,8 +120,8 @@ extension PlatformClient { /** * - * Summary: Cancel a subscription charge. - * Description: Cancel an ongoing subscription charge for a customer. + * Summary: Cancel the extension subscription + * Description: Cancel an ongoing extension subscription for the company. **/ public func cancelSubscriptionCharge( extensionId: String, @@ -172,14 +172,14 @@ extension PlatformClient { /** * - * Summary: Generate a one-time charge. + * Summary: Generate a one-time charge * Description: Generate a one-time charge for specific services or products. **/ public func createOneTimeCharge( extensionId: String, body: CreateOneTimeCharge, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreateOneTimeChargeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreateOneTimeChargeResponseSchemas?, _ error: FDKError?) -> Void ) { @@ -207,7 +207,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CreateOneTimeChargeResponse.self, from: data) + let response = Utility.decode(CreateOneTimeChargeResponseSchemas.self, from: data) onResponse(response, nil) } else { @@ -224,13 +224,13 @@ extension PlatformClient { /** * * Summary: Initiate subscription billing - * Description: Register a subscription charge for a seller using your extension. + * Description: Initiates and registers a subscription charge for a specific extension for a given company. **/ public func createSubscriptionCharge( extensionId: String, body: CreateSubscriptionCharge, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreateSubscriptionResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreateSubscription?, _ error: FDKError?) -> Void ) { @@ -258,7 +258,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CreateSubscriptionResponse.self, from: data) + let response = Utility.decode(CreateSubscription.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Client/CatalogPlatformClient.swift b/Sources/code/platform/Client/CatalogPlatformClient.swift index d7dcbd0584..45f00ee209 100644 --- a/Sources/code/platform/Client/CatalogPlatformClient.swift +++ b/Sources/code/platform/Client/CatalogPlatformClient.swift @@ -84,7 +84,7 @@ extension PlatformClient { slug: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CategoryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CategoryResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -140,7 +140,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CategoryResponse.self, from: data) + let response = Utility.decode(CategoryResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -177,9 +177,9 @@ extension PlatformClient { uids: [Int]?, slug: String?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.listCategories( level: level, @@ -214,7 +214,7 @@ extension PlatformClient { uid: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SingleCategoryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SingleCategoryResponseSchema?, _ error: FDKError?) -> Void ) { @@ -242,7 +242,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SingleCategoryResponse.self, from: data) + let response = Utility.decode(SingleCategoryResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -265,7 +265,7 @@ extension PlatformClient { sellerAppId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CrossSellingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CrossSellingResponseSchema?, _ error: FDKError?) -> Void ) { @@ -293,7 +293,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CrossSellingResponse.self, from: data) + let response = Utility.decode(CrossSellingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -322,7 +322,7 @@ extension PlatformClient { slug: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DepartmentsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DepartmentsResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -378,7 +378,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DepartmentsResponse.self, from: data) + let response = Utility.decode(DepartmentsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -415,9 +415,9 @@ extension PlatformClient { isActive: Bool?, slug: String?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.listDepartmentsData( pageNo: paginator.pageNo, @@ -452,7 +452,7 @@ extension PlatformClient { uid: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DepartmentsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DepartmentsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -480,7 +480,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DepartmentsResponse.self, from: data) + let response = Utility.decode(DepartmentsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -564,7 +564,7 @@ extension PlatformClient { public func bulkHsnCode( body: BulkHsnUpsert, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkHsnResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkHsnResponseSchema?, _ error: FDKError?) -> Void ) { @@ -592,7 +592,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkHsnResponse.self, from: data) + let response = Utility.decode(BulkHsnResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -733,7 +733,7 @@ extension PlatformClient { sizeIdentifier: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetInventoriesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetInventoriesResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -829,7 +829,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetInventoriesResponse.self, from: data) + let response = Utility.decode(GetInventoriesResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -894,9 +894,9 @@ extension PlatformClient { toDate: String?, sizeIdentifier: String?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "cursor") + let paginator = Paginator(pageSize: pageSize, type: "cursor") paginator.onPage = { self.getInventories( itemId: itemId, @@ -1041,7 +1041,7 @@ extension PlatformClient { public func createBulkInventoryJob( body: BulkJob, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1069,7 +1069,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkResponse.self, from: data) + let response = Utility.decode(BulkResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1092,7 +1092,7 @@ extension PlatformClient { batchId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1120,7 +1120,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1141,9 +1141,9 @@ extension PlatformClient { **/ public func createBulkInventory( batchId: String, - body: InventoryBulkRequest, + body: InventoryBulkRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1171,7 +1171,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1241,9 +1241,9 @@ extension PlatformClient { * Description: Helps to create a Inventory export job. **/ public func createInventoryExportJob( - body: InventoryExportRequest, + body: InventoryExportRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InventoryExportResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: InventoryExportResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1271,7 +1271,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(InventoryExportResponse.self, from: data) + let response = Utility.decode(InventoryExportResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1401,7 +1401,7 @@ extension PlatformClient { itemType: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InventoryValidationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: InventoryValidationResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1430,7 +1430,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(InventoryValidationResponse.self, from: data) + let response = Utility.decode(InventoryValidationResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1452,7 +1452,7 @@ extension PlatformClient { public func getOptimalLocations( body: AssignStore, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: StoreAssignResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: StoreAssignResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1480,7 +1480,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(StoreAssignResponse.self, from: data) + let response = Utility.decode(StoreAssignResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1829,7 +1829,7 @@ extension PlatformClient { filter: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductAttributesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductAttributesResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1862,7 +1862,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductAttributesResponse.self, from: data) + let response = Utility.decode(ProductAttributesResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1937,7 +1937,7 @@ extension PlatformClient { slug: [String]?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetProductBundleListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetProductBundleListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1973,7 +1973,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetProductBundleListingResponse.self, from: data) + let response = Utility.decode(GetProductBundleListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1993,9 +1993,9 @@ extension PlatformClient { * Description: Create product bundle in the catalog associated to a specific company **/ public func createProductBundle( - body: ProductBundleRequest, + body: ProductBundleRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetProductBundleCreateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetProductBundleCreateResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2023,7 +2023,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetProductBundleCreateResponse.self, from: data) + let response = Utility.decode(GetProductBundleCreateResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2046,7 +2046,7 @@ extension PlatformClient { id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetProductBundleResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetProductBundleResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2074,7 +2074,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetProductBundleResponse.self, from: data) + let response = Utility.decode(GetProductBundleResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2095,9 +2095,9 @@ extension PlatformClient { **/ public func updateProductBundle( id: String, - body: ProductBundleUpdateRequest, + body: ProductBundleUpdateRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetProductBundleCreateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetProductBundleCreateResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2125,7 +2125,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetProductBundleCreateResponse.self, from: data) + let response = Utility.decode(GetProductBundleCreateResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2149,7 +2149,7 @@ extension PlatformClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkAssetResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkAssetResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2185,7 +2185,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkAssetResponse.self, from: data) + let response = Utility.decode(BulkAssetResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2207,9 +2207,9 @@ extension PlatformClient { public func getProductAssetsInBulkPaginator( pageSize: Int?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getProductAssetsInBulk( pageNo: paginator.pageNo, @@ -2238,7 +2238,7 @@ extension PlatformClient { public func createProductAssetsInBulk( body: ProductBulkAssets, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2266,7 +2266,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2388,7 +2388,7 @@ extension PlatformClient { public func createBulkProductUploadJob( body: BulkJob, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2416,7 +2416,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkResponse.self, from: data) + let response = Utility.decode(BulkResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2439,7 +2439,7 @@ extension PlatformClient { batchId: Int, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2467,7 +2467,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2488,9 +2488,9 @@ extension PlatformClient { **/ public func createProductsInBulk( batchId: String, - body: BulkProductRequest, + body: BulkProductRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2518,7 +2518,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2540,7 +2540,7 @@ extension PlatformClient { public func listProductTemplateExportDetails( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductDownloadsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductDownloadsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2568,7 +2568,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductDownloadsResponse.self, from: data) + let response = Utility.decode(ProductDownloadsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2590,7 +2590,7 @@ extension PlatformClient { public func listHSNCodes( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: HSNCodesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: HSNCodesResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2618,7 +2618,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(HSNCodesResponse.self, from: data) + let response = Utility.decode(HSNCodesResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2640,7 +2640,7 @@ extension PlatformClient { public func getProductTags( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductTagsViewResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductTagsViewResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2668,7 +2668,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductTagsViewResponse.self, from: data) + let response = Utility.decode(ProductTagsViewResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2691,7 +2691,7 @@ extension PlatformClient { department: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: TemplatesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: TemplatesResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2720,7 +2720,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(TemplatesResponse.self, from: data) + let response = Utility.decode(TemplatesResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2744,7 +2744,7 @@ extension PlatformClient { itemType: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProdcutTemplateCategoriesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProdcutTemplateCategoriesResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2774,7 +2774,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProdcutTemplateCategoriesResponse.self, from: data) + let response = Utility.decode(ProdcutTemplateCategoriesResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2860,7 +2860,7 @@ extension PlatformClient { bulk: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: TemplatesValidationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: TemplatesValidationResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2896,7 +2896,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(TemplatesValidationResponse.self, from: data) + let response = Utility.decode(TemplatesValidationResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3091,7 +3091,7 @@ extension PlatformClient { uid: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3131,7 +3131,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductListingResponse.self, from: data) + let response = Utility.decode(ProductListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3155,7 +3155,7 @@ extension PlatformClient { size: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductSizeDeleteResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductSizeDeleteResponseSchema?, _ error: FDKError?) -> Void ) { @@ -3183,7 +3183,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductSizeDeleteResponse.self, from: data) + let response = Utility.decode(ProductSizeDeleteResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3324,9 +3324,9 @@ extension PlatformClient { public func addInventory( itemId: Int, size: String, - body: InventoryRequest, + body: InventoryRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -3354,7 +3354,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3380,7 +3380,7 @@ extension PlatformClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductVariantsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductVariantsResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3416,7 +3416,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductVariantsResponse.self, from: data) + let response = Utility.decode(ProductVariantsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3444,9 +3444,9 @@ extension PlatformClient { variantType: String, pageSize: Int?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getVariantsOfProducts( itemId: itemId, @@ -3557,7 +3557,7 @@ extension PlatformClient { public func createSizeGuide( body: ValidateSizeGuide, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -3585,7 +3585,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3608,7 +3608,7 @@ extension PlatformClient { id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SizeGuideResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SizeGuideResponseSchema?, _ error: FDKError?) -> Void ) { @@ -3636,7 +3636,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SizeGuideResponse.self, from: data) + let response = Utility.decode(SizeGuideResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3659,7 +3659,7 @@ extension PlatformClient { id: String, body: ValidateSizeGuide, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -3687,7 +3687,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3841,7 +3841,7 @@ extension PlatformClient { public func updateInventories( body: InventoryRequestSchemaV2, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InventoryUpdateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: InventoryUpdateResponseSchema?, _ error: FDKError?) -> Void ) { @@ -3869,7 +3869,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(InventoryUpdateResponse.self, from: data) + let response = Utility.decode(InventoryUpdateResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3897,7 +3897,7 @@ extension PlatformClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InventoryExportJobListResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: InventoryExportJobListResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3949,7 +3949,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(InventoryExportJobListResponse.self, from: data) + let response = Utility.decode(InventoryExportJobListResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3969,9 +3969,9 @@ extension PlatformClient { * Description: creates export job for inventory data associated with a company **/ public func createInventoryExport( - body: InventoryCreateRequest, + body: InventoryCreateRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InventoryExportResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: InventoryExportResponseSchema?, _ error: FDKError?) -> Void ) { @@ -3999,7 +3999,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(InventoryExportResponse.self, from: data) + let response = Utility.decode(InventoryExportResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4228,7 +4228,7 @@ extension PlatformClient { public func createProduct( body: ProductCreateUpdateSchemaV2, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponseObject?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponse1?, _ error: FDKError?) -> Void ) { @@ -4256,7 +4256,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponseObject.self, from: data) + let response = Utility.decode(SuccessResponse1.self, from: data) onResponse(response, nil) } else { @@ -4280,7 +4280,7 @@ extension PlatformClient { productType: String, body: BulkProductJob, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -4310,7 +4310,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkResponse.self, from: data) + let response = Utility.decode(BulkResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4338,7 +4338,7 @@ extension PlatformClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductDownloadsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductDownloadsResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -4390,7 +4390,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductDownloadsResponse.self, from: data) + let response = Utility.decode(ProductDownloadsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4412,7 +4412,7 @@ extension PlatformClient { public func createProductExportJob( body: ProductTemplateDownloadsExport, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProductDownloadsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProductDownloadsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -4440,7 +4440,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProductDownloadsResponse.self, from: data) + let response = Utility.decode(ProductDownloadsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4463,7 +4463,7 @@ extension PlatformClient { itemId: Int, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -4491,7 +4491,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4516,7 +4516,7 @@ extension PlatformClient { itemCode: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SingleProductResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SingleProductResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -4552,7 +4552,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SingleProductResponse.self, from: data) + let response = Utility.decode(SingleProductResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4575,7 +4575,7 @@ extension PlatformClient { itemId: Int, body: ProductCreateUpdateSchemaV2, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -4603,7 +4603,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4678,7 +4678,7 @@ extension PlatformClient { sellerIdentifier: String, body: InventoryRequestSchemaV2, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InventoryUpdateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: InventoryUpdateResponseSchema?, _ error: FDKError?) -> Void ) { @@ -4706,7 +4706,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(InventoryUpdateResponse.self, from: data) + let response = Utility.decode(InventoryUpdateResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4730,7 +4730,7 @@ extension PlatformClient { sellerIdentifier: String, body: InventoryRequestSchemaV2, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InventoryUpdateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: InventoryUpdateResponseSchema?, _ error: FDKError?) -> Void ) { @@ -4758,7 +4758,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(InventoryUpdateResponse.self, from: data) + let response = Utility.decode(InventoryUpdateResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4829,9 +4829,9 @@ extension PlatformClient { **/ public func updateMarketplaceOptin( marketplaceSlug: String, - body: UpdateMarketplaceOptinRequest, + body: UpdateMarketplaceOptinRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdateMarketplaceOptinResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UpdateMarketplaceOptinResponseSchema?, _ error: FDKError?) -> Void ) { @@ -4859,7 +4859,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdateMarketplaceOptinResponse.self, from: data) + let response = Utility.decode(UpdateMarketplaceOptinResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4880,9 +4880,9 @@ extension PlatformClient { **/ public func createMarketplaceOptin( marketplaceSlug: String, - body: OptInPostRequest, + body: OptInPostRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreateMarketplaceOptinResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreateMarketplaceOptinResponseSchema?, _ error: FDKError?) -> Void ) { @@ -4910,7 +4910,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CreateMarketplaceOptinResponse.self, from: data) + let response = Utility.decode(CreateMarketplaceOptinResponseSchema.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Client/CommonPlatformClient.swift b/Sources/code/platform/Client/CommonPlatformClient.swift index bfc184ed74..8cb289a8cf 100644 --- a/Sources/code/platform/Client/CommonPlatformClient.swift +++ b/Sources/code/platform/Client/CommonPlatformClient.swift @@ -24,7 +24,7 @@ extension PlatformClient { query: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ApplicationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ApplicationResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -60,7 +60,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ApplicationResponse.self, from: data) + let response = Utility.decode(ApplicationResponseSchema.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Client/CompanyProfilePlatformClient.swift b/Sources/code/platform/Client/CompanyProfilePlatformClient.swift index 8b2182eaf4..6451fe807e 100644 --- a/Sources/code/platform/Client/CompanyProfilePlatformClient.swift +++ b/Sources/code/platform/Client/CompanyProfilePlatformClient.swift @@ -22,7 +22,7 @@ extension PlatformClient { public func cbsOnboardGet( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetCompanyProfileSerializerResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetCompanyProfileSerializerResponseSchema?, _ error: FDKError?) -> Void ) { @@ -50,7 +50,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetCompanyProfileSerializerResponse.self, from: data) + let response = Utility.decode(GetCompanyProfileSerializerResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -72,7 +72,7 @@ extension PlatformClient { public func updateCompany( body: UpdateCompany, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProfileSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProfileSuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -100,7 +100,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProfileSuccessResponse.self, from: data) + let response = Utility.decode(ProfileSuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -122,7 +122,7 @@ extension PlatformClient { public func getCompanyMetrics( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: MetricsSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: MetricsSchema?, _ error: FDKError?) -> Void ) { @@ -150,7 +150,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(MetricsSerializer.self, from: data) + let response = Utility.decode(MetricsSchema.self, from: data) onResponse(response, nil) } else { @@ -173,7 +173,7 @@ extension PlatformClient { brandId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetBrandResponseSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetBrandResponseSchema?, _ error: FDKError?) -> Void ) { @@ -201,7 +201,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetBrandResponseSerializer.self, from: data) + let response = Utility.decode(GetBrandResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -222,9 +222,9 @@ extension PlatformClient { **/ public func editBrand( brandId: String, - body: UpdateBrandRequestSerializer, + body: UpdateBrandRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProfileSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProfileSuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -252,7 +252,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProfileSuccessResponse.self, from: data) + let response = Utility.decode(ProfileSuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -272,9 +272,9 @@ extension PlatformClient { * Description: Allows to create a brand associated to a company. **/ public func createBrand( - body: CreateBrandRequestSerializer, + body: CreateBrandRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProfileSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProfileSuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -302,7 +302,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProfileSuccessResponse.self, from: data) + let response = Utility.decode(ProfileSuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -327,7 +327,7 @@ extension PlatformClient { q: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CompanyBrandListSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CompanyBrandListSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -367,7 +367,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CompanyBrandListSerializer.self, from: data) + let response = Utility.decode(CompanyBrandListSchema.self, from: data) onResponse(response, nil) } else { @@ -392,9 +392,9 @@ extension PlatformClient { pageSize: Int?, q: String?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getBrands( pageNo: paginator.pageNo, @@ -422,9 +422,9 @@ extension PlatformClient { * Description: Establish a mapping between a company and a brand. **/ public func createCompanyBrandMapping( - body: CompanyBrandPostRequestSerializer, + body: CompanyBrandPostRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProfileSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProfileSuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -452,7 +452,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProfileSuccessResponse.self, from: data) + let response = Utility.decode(ProfileSuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -482,7 +482,7 @@ extension PlatformClient { tags: [String]?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: LocationListSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: LocationListSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -542,7 +542,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(LocationListSerializer.self, from: data) + let response = Utility.decode(LocationListSchema.self, from: data) onResponse(response, nil) } else { @@ -582,9 +582,9 @@ extension PlatformClient { types: [String]?, tags: [String]?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getLocations( storeType: storeType, @@ -617,9 +617,9 @@ extension PlatformClient { * Description: Create a new location associated to a company. **/ public func createLocation( - body: LocationSerializer, + body: LocationSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProfileSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProfileSuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -647,7 +647,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProfileSuccessResponse.self, from: data) + let response = Utility.decode(ProfileSuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -670,7 +670,7 @@ extension PlatformClient { locationId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetLocationSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetLocationSchema?, _ error: FDKError?) -> Void ) { @@ -698,7 +698,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetLocationSerializer.self, from: data) + let response = Utility.decode(GetLocationSchema.self, from: data) onResponse(response, nil) } else { @@ -719,9 +719,9 @@ extension PlatformClient { **/ public func updateLocation( locationId: String, - body: LocationSerializer, + body: LocationSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProfileSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProfileSuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -749,7 +749,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProfileSuccessResponse.self, from: data) + let response = Utility.decode(ProfileSuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -769,9 +769,9 @@ extension PlatformClient { * Description: Allows to create locations in bulk at once associated to a company **/ public func createLocationBulk( - body: BulkLocationSerializer, + body: BulkLocationSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProfileSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProfileSuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -799,7 +799,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProfileSuccessResponse.self, from: data) + let response = Utility.decode(ProfileSuccessResponseSchema.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Client/ConfigurationPlatformClient.swift b/Sources/code/platform/Client/ConfigurationPlatformClient.swift index ae0aba7600..93d0baaded 100644 --- a/Sources/code/platform/Client/ConfigurationPlatformClient.swift +++ b/Sources/code/platform/Client/ConfigurationPlatformClient.swift @@ -51,9 +51,9 @@ extension PlatformClient { * Description: Generate and add a new sales channel. sales channels are sales channel websites which can be configured, personalized and customized. Use this API to create a new sales channel in the current company. **/ public func createApplication( - body: CreateApplicationRequest, + body: CreateApplicationRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreateAppResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreateAppResponseSchema?, _ error: FDKError?) -> Void ) { @@ -81,7 +81,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CreateAppResponse.self, from: data) + let response = Utility.decode(CreateAppResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -106,7 +106,7 @@ extension PlatformClient { q: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ApplicationsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ApplicationsResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -146,7 +146,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ApplicationsResponse.self, from: data) + let response = Utility.decode(ApplicationsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -169,7 +169,7 @@ extension PlatformClient { public func getCurrencies( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CurrenciesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CurrenciesResponseSchema?, _ error: FDKError?) -> Void ) { @@ -197,7 +197,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CurrenciesResponse.self, from: data) + let response = Utility.decode(CurrenciesResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -217,9 +217,9 @@ extension PlatformClient { * Description: Check the availability of a specific domain. Use this API to check the domain availability before linking it to sales channel. Also sends domain suggestions that are similar to the queried domain. Note - Custom domain search is currently powered by GoDaddy provider. **/ public func getDomainAvailibility( - body: DomainSuggestionsRequest, + body: DomainSuggestionsRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DomainSuggestionsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DomainSuggestionsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -247,7 +247,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DomainSuggestionsResponse.self, from: data) + let response = Utility.decode(DomainSuggestionsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -270,7 +270,7 @@ extension PlatformClient { q: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BrandsByCompanyResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BrandsByCompanyResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -302,7 +302,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BrandsByCompanyResponse.self, from: data) + let response = Utility.decode(BrandsByCompanyResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -324,9 +324,9 @@ extension PlatformClient { public func getCompanyByBrands( pageNo: Int?, pageSize: Int?, - body: CompanyByBrandsRequest, + body: CompanyByBrandsRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CompanyByBrandsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CompanyByBrandsResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -362,7 +362,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CompanyByBrandsResponse.self, from: data) + let response = Utility.decode(CompanyByBrandsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -384,9 +384,9 @@ extension PlatformClient { public func getStoreByBrands( pageNo: Int?, pageSize: Int?, - body: StoreByBrandsRequest, + body: StoreByBrandsRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: StoreByBrandsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: StoreByBrandsResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -422,7 +422,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(StoreByBrandsResponse.self, from: data) + let response = Utility.decode(StoreByBrandsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -505,7 +505,7 @@ extension PlatformClient { id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OptedApplicationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OptedApplicationResponseSchema?, _ error: FDKError?) -> Void ) { @@ -533,7 +533,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OptedApplicationResponse.self, from: data) + let response = Utility.decode(OptedApplicationResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -556,7 +556,7 @@ extension PlatformClient { id: String, body: OptOutInventory, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessMessageResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessMessageResponseSchema?, _ error: FDKError?) -> Void ) { @@ -584,7 +584,72 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessMessageResponse.self, from: data) + let response = Utility.decode(SuccessMessageResponseSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: Get currency exchange rates + * Description: Retrieve a list of currency exchange rates, relative to a provided currency. + **/ + public func getCurrencyExchangeRates( + currencyCode: String?, + exchangeCurrencyCode: String?, + exchangeCountryCode: String?, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: CurrencyExchangeResponseV2?, _ error: FDKError?) -> Void + ) { + + var xQuery: [String: Any] = [:] + + if let value = currencyCode { + xQuery["currency_code"] = value + } + + if let value = exchangeCurrencyCode { + xQuery["exchange_currency_code"] = value + } + + if let value = exchangeCountryCode { + xQuery["exchange_country_code"] = value + } + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "GET", + url: "/service/platform/configuration/v2.0/company/\(companyId)/currency-exchange", + query: xQuery, + body: nil, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(CurrencyExchangeResponseV2.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Client/ContentPlatformClient.swift b/Sources/code/platform/Client/ContentPlatformClient.swift index da807b5886..e2f4bb5c77 100644 --- a/Sources/code/platform/Client/ContentPlatformClient.swift +++ b/Sources/code/platform/Client/ContentPlatformClient.swift @@ -97,7 +97,7 @@ extension PlatformClient { public func getCustomFieldTypes( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectByIdSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: MetafieldTypesSchema?, _ error: FDKError?) -> Void ) { @@ -125,7 +125,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectByIdSchema.self, from: data) + let response = Utility.decode(MetafieldTypesSchema.self, from: data) onResponse(response, nil) } else { @@ -142,7 +142,7 @@ extension PlatformClient { /** * * Summary: Get resources - * Description: Each custom fields is assosiated with a resource such as product, promotion, coupon, selling location etc, This will gives list of supported resource list. + * Description: Use this API to retrieve the resources, such as products, collections, customers, selling locations, etc. **/ public func getResources( @@ -197,9 +197,11 @@ extension PlatformClient { public func getCustomFieldDefinitions( pageNo: String, pageSize: String, - resource: String?, - type: String?, + resources: String?, + types: String?, search: String?, + slugs: String?, + namespaces: String?, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomFieldDefinitionsSchema?, _ error: FDKError?) -> Void @@ -209,18 +211,26 @@ extension PlatformClient { xQuery["page_no"] = pageNo xQuery["page_size"] = pageSize - if let value = resource { - xQuery["resource"] = value + if let value = resources { + xQuery["resources"] = value } - if let value = type { - xQuery["type"] = value + if let value = types { + xQuery["types"] = value } if let value = search { xQuery["search"] = value } + if let value = slugs { + xQuery["slugs"] = value + } + + if let value = namespaces { + xQuery["namespaces"] = value + } + var xHeaders: [(key: String, value: String)] = [] @@ -230,7 +240,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/metafields/definitions", + url: "/service/platform/content/v2.0/company/\(companyId)/customfields/definition", query: xQuery, body: nil, headers: xHeaders, @@ -260,10 +270,86 @@ extension PlatformClient { /** * - * Summary: Create custom field definition + * Summary: Get custom fields definitions for a given resource type + * Description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. + **/ + public func getCustomFieldDefinitionByResource( + pageNo: String, + pageSize: String, + resource: String, + types: String?, + search: String?, + slugs: String?, + namespaces: String?, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: CustomFieldDefinitionsSchema?, _ error: FDKError?) -> Void + ) { + + var xQuery: [String: Any] = [:] + xQuery["page_no"] = pageNo + xQuery["page_size"] = pageSize + + if let value = types { + xQuery["types"] = value + } + + if let value = search { + xQuery["search"] = value + } + + if let value = slugs { + xQuery["slugs"] = value + } + + if let value = namespaces { + xQuery["namespaces"] = value + } + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "GET", + url: "/service/platform/content/v2.0/company/\(companyId)/customfields/resource/\(resource)/definition", + query: xQuery, + body: nil, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(CustomFieldDefinitionsSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: Create custom field definition for a given resource type * Description: You can create custom fields definition to any resource so you can extend property of resource. **/ public func createCustomFieldDefinition( + resource: String, body: CustomFieldDefinitionRequestSchema, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomFieldDefinitionDetailResSchema?, _ error: FDKError?) -> Void @@ -280,7 +366,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/content/v1.0/company/\(companyId)/metafields/definitions", + url: "/service/platform/content/v2.0/company/\(companyId)/customfields/resource/\(resource)/definition", query: nil, body: body.dictionary, headers: xHeaders, @@ -310,14 +396,16 @@ extension PlatformClient { /** * - * Summary: Get custom fields definition - * Description: Custom field definitions can be fetch using definition id. + * Summary: Get custom fields definition by resource, slug and namespace + * Description: Custom field definitions can be retrived from this using its slug, namespace and resource **/ - public func getCustomFieldDefinition( - definitionId: String, + public func getCustomFieldDefinitionBySlug( + slug: String, + resource: String, + namespace: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomFieldDefinitionDetailResSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: MetaFieldDefinitionDetailResSchema?, _ error: FDKError?) -> Void ) { @@ -331,7 +419,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/metafields/definitions/\(definitionId)", + url: "/service/platform/content/v2.0/company/\(companyId)/customfields/resource/\(resource)/namespace/\(namespace)/definition/\(slug)", query: nil, body: nil, headers: xHeaders, @@ -345,7 +433,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomFieldDefinitionDetailResSchema.self, from: data) + let response = Utility.decode(MetaFieldDefinitionDetailResSchema.self, from: data) onResponse(response, nil) } else { @@ -364,8 +452,10 @@ extension PlatformClient { * Summary: Update custom field definition * Description: Custom fields definition can be update using this api, You can update custom field definition name and description. **/ - public func updateCustomFieldDefinition( - definitionId: String, + public func updateCustomFieldDefinitionBySlug( + slug: String, + resource: String, + namespace: String, body: CustomFieldDefinitionRequestSchema, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomFieldDefinitionDetailResSchema?, _ error: FDKError?) -> Void @@ -382,7 +472,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "PUT", - url: "/service/platform/content/v1.0/company/\(companyId)/metafields/definitions/\(definitionId)", + url: "/service/platform/content/v2.0/company/\(companyId)/customfields/resource/\(resource)/namespace/\(namespace)/definition/\(slug)", query: nil, body: body.dictionary, headers: xHeaders, @@ -415,8 +505,10 @@ extension PlatformClient { * Summary: Delete custom fields definition * Description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. **/ - public func deleteCustomFieldDefinition( - definitionId: String, + public func deleteCustomFieldDefinitionBySlug( + slug: String, + resource: String, + namespace: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomDataDeleteSchema?, _ error: FDKError?) -> Void @@ -433,7 +525,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "DELETE", - url: "/service/platform/content/v1.0/company/\(companyId)/metafields/definitions/\(definitionId)", + url: "/service/platform/content/v2.0/company/\(companyId)/customfields/resource/\(resource)/namespace/\(namespace)/definition/\(slug)", query: nil, body: nil, headers: xHeaders, @@ -463,14 +555,15 @@ extension PlatformClient { /** * - * Summary: Get list of custom fields of given resource - * Description: Retrieves a list of custom fields attached to a particular resource by using the resource. + * Summary: Get list of custom fields of given resource and resource slug + * Description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. **/ - public func getCustomFields( + public func getCustomFieldsByResourceSlug( resource: String, + resourceSlug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomFieldsResponseSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomFieldsResponseByResourceIdSchema?, _ error: FDKError?) -> Void ) { @@ -484,7 +577,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/metafields/\(resource)", + url: "/service/platform/content/v2.0/company/\(companyId)/customfields/resource/\(resource)/\(resourceSlug)", query: nil, body: nil, headers: xHeaders, @@ -498,7 +591,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomFieldsResponseSchema.self, from: data) + let response = Utility.decode(CustomFieldsResponseByResourceIdSchema.self, from: data) onResponse(response, nil) } else { @@ -514,13 +607,13 @@ extension PlatformClient { /** * - * Summary: Get list of custom fields of given resource and resource id - * Description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource id. + * Summary: Update custom field entries for gives resource and resource slug + * Description: You can add a custom field using this endpoint to any resource by providing the resource slug. **/ - public func getCustomFieldsByResourceId( + public func updateCustomFieldByResourceSlug( resource: String, - resourceId: String, - + resourceSlug: String, + body: CustomFieldRequestSchema, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomFieldsResponseByResourceIdSchema?, _ error: FDKError?) -> Void ) { @@ -535,10 +628,10 @@ extension PlatformClient { } PlatformAPIClient.execute( config: config, - method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/metafields/\(resource)/\(resourceId)", + method: "PUT", + url: "/service/platform/content/v2.0/company/\(companyId)/customfields/resource/\(resource)/\(resourceSlug)", query: nil, - body: nil, + body: body.dictionary, headers: xHeaders, responseType: "application/json", onResponse: { (responseData, error, responseCode) in @@ -566,18 +659,20 @@ extension PlatformClient { /** * - * Summary: Create custom field entries for gives resource and resource_id - * Description: You can add a custom field using this endpoint to any resource by providing the resource ID. + * Summary: delete custom fields of given resource and resource slug + * Description: Use this API to delete the custom fields for given resource in param. **/ - public func createCustomFieldByResourceId( + public func deleteCustomFieldsByResourceSlug( resource: String, - resourceId: String, - body: CustomFieldRequestSchema, + resourceSlug: String, + ids: String, + headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomFieldsResponseByResourceIdSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomFieldsDeleteSchema?, _ error: FDKError?) -> Void ) { - + var xQuery: [String: Any] = [:] + xQuery["ids"] = ids var xHeaders: [(key: String, value: String)] = [] @@ -587,10 +682,10 @@ extension PlatformClient { } PlatformAPIClient.execute( config: config, - method: "PUT", - url: "/service/platform/content/v1.0/company/\(companyId)/metafields/\(resource)/\(resourceId)", - query: nil, - body: body.dictionary, + method: "DELETE", + url: "/service/platform/content/v2.0/company/\(companyId)/customfields/resource/\(resource)/\(resourceSlug)", + query: xQuery, + body: nil, headers: xHeaders, responseType: "application/json", onResponse: { (responseData, error, responseCode) in @@ -602,7 +697,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomFieldsResponseByResourceIdSchema.self, from: data) + let response = Utility.decode(CustomFieldsDeleteSchema.self, from: data) onResponse(response, nil) } else { @@ -624,7 +719,7 @@ extension PlatformClient { public func createCustomObjectDefinition( body: CustomObjectDefinitionRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectDefinitionSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectDefinitionSlugSchema?, _ error: FDKError?) -> Void ) { @@ -638,7 +733,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects/definitions", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition", query: nil, body: body.dictionary, headers: xHeaders, @@ -652,7 +747,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectDefinitionSchema.self, from: data) + let response = Utility.decode(CustomObjectDefinitionSlugSchema.self, from: data) onResponse(response, nil) } else { @@ -697,7 +792,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects/definitions", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition", query: xQuery, body: nil, headers: xHeaders, @@ -728,13 +823,13 @@ extension PlatformClient { /** * * Summary: Get custom object definition - * Description: Custom object definitions can be fetched using their definition ID. + * Description: Custom object definitions can be fetched using their custom object definition slug. **/ - public func getCustomObjectDefinition( - definitionId: String, + public func getCustomObjectDefinitionBySlug( + slug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectDefinitionSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectDefinitionSlugSchema?, _ error: FDKError?) -> Void ) { @@ -748,7 +843,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects/definitions/\(definitionId)", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition/\(slug)", query: nil, body: nil, headers: xHeaders, @@ -762,7 +857,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectDefinitionSchema.self, from: data) + let response = Utility.decode(CustomObjectDefinitionSlugSchema.self, from: data) onResponse(response, nil) } else { @@ -781,11 +876,11 @@ extension PlatformClient { * Summary: Update custom object definition * Description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. **/ - public func updateCustomObjectDefinition( - definitionId: String, + public func updateCustomObjectDefinitionBySlug( + slug: String, body: CustomObjectDefinitionUpdateRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectDefinitionSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectDefinitionSlugSchema?, _ error: FDKError?) -> Void ) { @@ -799,7 +894,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "PUT", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects/definitions/\(definitionId)", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition/\(slug)", query: nil, body: body.dictionary, headers: xHeaders, @@ -813,7 +908,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectDefinitionSchema.self, from: data) + let response = Utility.decode(CustomObjectDefinitionSlugSchema.self, from: data) onResponse(response, nil) } else { @@ -829,11 +924,11 @@ extension PlatformClient { /** * - * Summary: delete custom object definition + * Summary: Delete custom object definition * Description: Custom object definitions can be deleted using this endpoint by providing the definition ID. **/ - public func deleteCustomObjectDefinition( - definitionId: String, + public func deleteCustomObjectDefinitionBySlug( + slug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomObjectDefinitionDeleteResponseSchema?, _ error: FDKError?) -> Void @@ -850,7 +945,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "DELETE", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects/definitions/\(definitionId)", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition/\(slug)", query: nil, body: nil, headers: xHeaders, @@ -880,23 +975,19 @@ extension PlatformClient { /** * - * Summary: Get list of custom objects + * Summary: Get list of custom objects under a certain custom object definition * Description: Custom object entries can fetch using this endpoint. **/ - public func getCustomObjects( - definitionId: String?, + public func getCustomObjectsBySlug( pageNo: String, pageSize: String, + definitionSlug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomObjectsSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] - - if let value = definitionId { - xQuery["definition_id"] = value - } xQuery["page_no"] = pageNo xQuery["page_size"] = pageSize @@ -909,7 +1000,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition/\(definitionSlug)/entries", query: xQuery, body: nil, headers: xHeaders, @@ -942,8 +1033,9 @@ extension PlatformClient { * Summary: Create custom object entries * Description: Custom object entries against the custom object definition can be added using this API. **/ - public func createCustomObject( - body: CustomObjectRequestSchema, + public func createCustomObjectBySlug( + definitionSlug: String, + body: CustomObjectRequestSchemaWithoutId, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomObjectSchema?, _ error: FDKError?) -> Void ) { @@ -959,7 +1051,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition/\(definitionSlug)/entries", query: nil, body: body.dictionary, headers: xHeaders, @@ -990,13 +1082,14 @@ extension PlatformClient { /** * * Summary: Get custom object details - * Description: Details of custom objects, their field details, definitions, and references can be obtained using this endpoint. + * Description: Details of a custom object entry can be obtained using this endpoint. **/ - public func getCustomObject( - metaobjectId: String, + public func getCustomObjectBySlug( + definitionSlug: String, + slug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectByIdSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectBySlugSchema?, _ error: FDKError?) -> Void ) { @@ -1010,7 +1103,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects/\(metaobjectId)", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition/\(definitionSlug)/entries/\(slug)", query: nil, body: nil, headers: xHeaders, @@ -1024,7 +1117,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectByIdSchema.self, from: data) + let response = Utility.decode(CustomObjectBySlugSchema.self, from: data) onResponse(response, nil) } else { @@ -1043,8 +1136,9 @@ extension PlatformClient { * Summary: Delete custom object * Description: Custom object entries can be deleted by providing the delete ID using this endpoint. **/ - public func deleteCustomObject( - metaobjectId: String, + public func deleteCustomObjectBySlug( + definitionSlug: String, + slug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomDataDeleteSchema?, _ error: FDKError?) -> Void @@ -1061,7 +1155,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "DELETE", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects/\(metaobjectId)", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition/\(definitionSlug)/entries/\(slug)", query: nil, body: nil, headers: xHeaders, @@ -1094,11 +1188,12 @@ extension PlatformClient { * Summary: Update custom object details * Description: Custom object entries can be updated using this endpoint. **/ - public func updateCustomObject( - metaobjectId: String, - body: CustomObjectRequestSchema, + public func updateCustomObjectBySlug( + definitionSlug: String, + slug: String, + body: CustomObjectRequestSchemaWithoutId, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectByIdSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectBySlugSchema?, _ error: FDKError?) -> Void ) { @@ -1112,7 +1207,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "PUT", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects/\(metaobjectId)", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition/\(definitionSlug)/entries/\(slug)", query: nil, body: body.dictionary, headers: xHeaders, @@ -1126,7 +1221,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectByIdSchema.self, from: data) + let response = Utility.decode(CustomObjectBySlugSchema.self, from: data) onResponse(response, nil) } else { @@ -1201,11 +1296,11 @@ extension PlatformClient { * Summary: Bulk custom object entries upload * Description: Custom object bulk import of bulk entries can be performed using this endpoint. **/ - public func importCustomObjectEntries( - definitionId: String, + public func importCustomObjectEntriesBySlug( + slug: String, body: CustomObjectBulkSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectEntryBulkUploadResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectEntryBulkUploadDetails?, _ error: FDKError?) -> Void ) { @@ -1219,7 +1314,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects/bulk/\(definitionId)/upload", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition/\(slug)/bulk/upload", query: nil, body: body.dictionary, headers: xHeaders, @@ -1233,7 +1328,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectEntryBulkUploadResponse.self, from: data) + let response = Utility.decode(CustomObjectEntryBulkUploadDetails.self, from: data) onResponse(response, nil) } else { @@ -1252,8 +1347,8 @@ extension PlatformClient { * Summary: Initiate download for bulk custom object entries * Description: Custom object bulk export of bulk entries can be perform using this endpoint. **/ - public func exportCustomObjectEntries( - definitionId: String, + public func exportCustomObjectEntriesBySlug( + slug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomObjectBulkEntryInitiateDownload?, _ error: FDKError?) -> Void @@ -1270,7 +1365,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects/bulk/\(definitionId)/download", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition/\(slug)/bulk/download", query: nil, body: nil, headers: xHeaders, @@ -1303,8 +1398,8 @@ extension PlatformClient { * Summary: Download sample for custom object bulk entry * Description: Sample files for custom object bulk import can be obtained from this endpoint. **/ - public func sampleCustomObjectBulkEntry( - definitionId: String, + public func sampleCustomObjectBulkEntryBySlug( + slug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: String?, _ error: FDKError?) -> Void @@ -1321,7 +1416,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/metaobjects/bulk/\(definitionId)/sample", + url: "/service/platform/content/v2.0/company/\(companyId)/customobjects/definition/\(slug)/bulk/sample", query: nil, body: nil, headers: xHeaders, diff --git a/Sources/code/platform/Client/DiscountPlatformClient.swift b/Sources/code/platform/Client/DiscountPlatformClient.swift index db2b14b00a..a35f3991ca 100644 --- a/Sources/code/platform/Client/DiscountPlatformClient.swift +++ b/Sources/code/platform/Client/DiscountPlatformClient.swift @@ -319,9 +319,9 @@ extension PlatformClient { **/ public func validateDiscountFile( discount: String?, - body: FileJobRequest, + body: FileJobRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: FileJobResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileJobResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -353,7 +353,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(FileJobResponse.self, from: data) + let response = Utility.decode(FileJobResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -376,7 +376,7 @@ extension PlatformClient { type: String, body: DownloadFileJob, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: FileJobResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileJobResponseSchema?, _ error: FDKError?) -> Void ) { @@ -404,7 +404,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(FileJobResponse.self, from: data) + let response = Utility.decode(FileJobResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -427,7 +427,7 @@ extension PlatformClient { id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: FileJobResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileJobResponseSchema?, _ error: FDKError?) -> Void ) { @@ -455,7 +455,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(FileJobResponse.self, from: data) + let response = Utility.decode(FileJobResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -478,7 +478,7 @@ extension PlatformClient { id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CancelJobResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CancelJobResponseSchema?, _ error: FDKError?) -> Void ) { @@ -506,7 +506,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CancelJobResponse.self, from: data) + let response = Utility.decode(CancelJobResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -529,7 +529,7 @@ extension PlatformClient { id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: FileJobResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileJobResponseSchema?, _ error: FDKError?) -> Void ) { @@ -557,7 +557,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(FileJobResponse.self, from: data) + let response = Utility.decode(FileJobResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -580,7 +580,7 @@ extension PlatformClient { id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CancelJobResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CancelJobResponseSchema?, _ error: FDKError?) -> Void ) { @@ -608,7 +608,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CancelJobResponse.self, from: data) + let response = Utility.decode(CancelJobResponseSchema.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Client/FileStoragePlatformClient.swift b/Sources/code/platform/Client/FileStoragePlatformClient.swift index a57d298c4e..e16ee33ef2 100644 --- a/Sources/code/platform/Client/FileStoragePlatformClient.swift +++ b/Sources/code/platform/Client/FileStoragePlatformClient.swift @@ -16,14 +16,14 @@ extension PlatformClient { /** * - * Summary: Start file upload - * Description: Inititates the process of uploading a file to storage location, and returns a storage link in response at platform level. Please refer group description for more details. + * Summary: Start file upload. + * Description: Inititates the process of uploading a file to storage location, and returns a storage link in response. **/ public func startUpload( namespace: String, - body: StartRequest, + body: FileUploadStart, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: StartResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileUpload?, _ error: FDKError?) -> Void ) { @@ -37,7 +37,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/assets/v1.0/company/\(companyId)/namespaces/\(namespace)/upload/start", + url: "/service/platform/assets/v2.0/company/\(companyId)/namespaces/\(namespace)/upload/start", query: nil, body: body.dictionary, headers: xHeaders, @@ -51,7 +51,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(StartResponse.self, from: data) + let response = Utility.decode(FileUpload.self, from: data) onResponse(response, nil) } else { @@ -67,14 +67,14 @@ extension PlatformClient { /** * - * Summary: Complete file upload - * Description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database at platform level + * Summary: Complete file upload. + * Description: Starts the process of uploading a file to storage location, and returns a storage link in response. **/ public func completeUpload( namespace: String, - body: StartResponse, + body: FileUpload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CompleteResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileUploadComplete?, _ error: FDKError?) -> Void ) { @@ -88,7 +88,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/assets/v1.0/company/\(companyId)/namespaces/\(namespace)/upload/complete", + url: "/service/platform/assets/v2.0/company/\(companyId)/namespaces/\(namespace)/upload/complete", query: nil, body: body.dictionary, headers: xHeaders, @@ -102,7 +102,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CompleteResponse.self, from: data) + let response = Utility.decode(FileUploadComplete.self, from: data) onResponse(response, nil) } else { @@ -120,13 +120,13 @@ extension PlatformClient { /** * - * Summary: Get signed URLs - * Description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored resources inside private bucket. + * Summary: Get signed URLs. + * Description: Retrieve signed URLs for file access. **/ public func getSignUrls( - body: SignUrlRequest, + body: SignUrl, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SignUrlResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SignUrlResult?, _ error: FDKError?) -> Void ) { @@ -154,7 +154,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SignUrlResponse.self, from: data) + let response = Utility.decode(SignUrlResult.self, from: data) onResponse(response, nil) } else { @@ -170,8 +170,8 @@ extension PlatformClient { /** * - * Summary: Copy files - * Description: Handle multiple file uploads, updating progress and providing detailed status reports. + * Summary: Copy files. + * Description: Duplicate files to another location. **/ public func copyFiles( sync: Bool?, @@ -226,7 +226,7 @@ extension PlatformClient { /** * - * Summary: Browse files + * Summary: Browse files. * Description: View and navigate through available files. **/ public func browse( @@ -287,16 +287,28 @@ extension PlatformClient { + + + + + + + + + + + + /** * - * Summary: Access files through a proxy - * Description: It enables the communication between two entities by directing client requests to the correct server and sending responses back to the client. Please refer group description for more details. + * Summary: Proxy file access. + * Description: Access files through a proxy. **/ public func proxy( url: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ProxyResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProxyFileAccess?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -325,7 +337,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ProxyResponse.self, from: data) + let response = Utility.decode(ProxyFileAccess.self, from: data) onResponse(response, nil) } else { @@ -336,12 +348,5 @@ extension PlatformClient { } }); } - - - - - - - } } \ No newline at end of file diff --git a/Sources/code/platform/Client/FinancePlatformClient.swift b/Sources/code/platform/Client/FinancePlatformClient.swift deleted file mode 100644 index d5d03db65c..0000000000 --- a/Sources/code/platform/Client/FinancePlatformClient.swift +++ /dev/null @@ -1,1476 +0,0 @@ -import Foundation - -extension PlatformClient { - - public class Finance { - var config: PlatformConfig - var companyId: String - - init(config: PlatformConfig) { - self.config = config - self.companyId = config.companyId - } - - - - - /** - * - * Summary: Generate financial report - * Description: Create a financial report with relevant data. - **/ - public func generateReport( - body: GenerateReportReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GenerateReportJson?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/generate-report", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(GenerateReportJson.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Download financial report - * Description: Retrieve and save a financial report. - **/ - public func downloadReport( - body: DownloadReport, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DownloadReportList?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/download-report", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(DownloadReportList.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get financial data - * Description: Retrieve financial data for analysis. - **/ - public func getData( - body: GetEngineReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetEngineResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/get-data", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(GetEngineResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get transaction reason - * Description: Retrieve the reason behind a transaction. - **/ - public func getReason( - body: GetReasonReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetReasonResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/get-reason", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(GetReasonResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get report list - * Description: Retrieve a list of available financial reports. - **/ - public func getReportList( - body: GetReportListReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetReportListResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/get-report-list", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(GetReportListResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get affiliate details - * Description: Retrieve information about an affiliate. - **/ - public func getAffiliate( - body: GetAffiliate, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetAffiliateResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/get-affiliate-list", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(GetAffiliateResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Download credit/debit note - * Description: Retrieve and save credit/debit notes. - **/ - public func downloadCreditDebitNote( - body: DownloadCreditDebitNoteReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DownloadCreditDebitNoteResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/download-credit-debit-note", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(DownloadCreditDebitNoteResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Process payments - * Description: Initiate and manage payment processes. - **/ - public func paymentProcess( - body: PaymentProcessReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentProcessResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/payment-process", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(PaymentProcessResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Access credit line data platform - * Description: Connect to the credit line data platform. - **/ - public func creditlineDataplatform( - body: CreditlineDataPlatformReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreditlineDataPlatformResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/credit-line-data", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(CreditlineDataPlatformResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Check credit line platform status - * Description: Determine if the credit line platform is operational. - **/ - public func isCreditlinePlatform( - body: IsCreditlinePlatformReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: IsCreditlinePlatformResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/creditline-opted", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(IsCreditlinePlatformResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get invoice types - * Description: Retrieve a list of available invoice types. - **/ - public func invoiceType( - body: InvoiceTypeReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InvoiceTypeResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/invoice-type", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(InvoiceTypeResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: List invoices - * Description: Provides list of invoices generated for a company. - **/ - public func invoiceListing( - body: InvoiceListingReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InvoiceListingResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/invoice/listing", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(InvoiceListingResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get invoice PDF - * Description: Retrieve the PDF version of an invoice. - **/ - public func invoicePDF( - body: InvoicePdfReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InvoicePdfResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/invoice/pdf-view", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(InvoicePdfResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Check refund method - * Description: Verify the refund method for credit notes. - **/ - public func isCnRefundMethod( - body: IsCnRefundMethodReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: IsCnRefundMethodResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/cn-as-refund-method", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(IsCnRefundMethodResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Create seller credit note config - * Description: Set up configuration for seller credit notes. - **/ - public func createSellerCreditNoteConfig( - body: CreateSellerCreditNoteConfigReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreateSellerCreditNoteConfigResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/create-update-credit-note-config", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(CreateSellerCreditNoteConfigResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Deletes credit note config - * Description: Deletes credit note config. - **/ - public func deleteConfig( - body: DeleteConfigReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DeleteConfigResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/delete-seller-config", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(DeleteConfigResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get channel display name - * Description: Retrieve the display name for a channel. - **/ - public func channelDisplayName( - filterKey: String, - - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ChannelDisplayNameResponse?, _ error: FDKError?) -> Void - ) { - - var xQuery: [String: Any] = [:] - xQuery["filter_key"] = filterKey - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "GET", - url: "/service/platform/finance/v1.0/company/\(companyId)/channel-display-names", - query: xQuery, - body: nil, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(ChannelDisplayNameResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get PDF URL view - * Description: Retrieve a URL to view a PDF document. - **/ - public func getPdfUrlView( - body: GetPdfUrlViewReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetPdfUrlViewResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/get-cn-pdf-link", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(GetPdfUrlViewResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get credit note details - * Description: Retrieve detailed information about a credit note. - **/ - public func creditNoteDetails( - body: CreditNoteDetailsReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreditNoteDetailsResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/credit-note-details", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(CreditNoteDetailsResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get customer credit balance - * Description: Retrieve the credit balance of a customer. - **/ - public func getCustomerCreditBalance( - body: GetCustomerCreditBalanceReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetCustomerCreditBalanceResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/customer-credit-balance", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(GetCustomerCreditBalanceResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get credit note configuration - * Description: Retrieve configuration settings for credit notes. - **/ - public func getCnConfig( - body: GetCnConfigReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetCnConfigResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/get-seller-cn-config", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(GetCnConfigResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Generate customer credit note report - * Description: Create a report specifically for customer credit notes. - **/ - public func generateReportCustomerCn( - body: GenerateReportCustomerCnReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GenerateReportCustomerCnResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/generate-report-customer-cn", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(GenerateReportCustomerCnResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Download customer credit note report - * Description: Retrieve and save a report for customer credit notes. - **/ - public func downloadReportCustomerCn( - body: DownloadReportCustomerCnReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DownloadReportCustomerCnResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/download-report-customer-cn", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(DownloadReportCustomerCnResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get reporting filters - * Description: Retrieve available filters for financial reporting. - **/ - public func getReportingFilters( - filterKey: String, - affiliateId: String?, - - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetReportingFiltersResponse?, _ error: FDKError?) -> Void - ) { - - var xQuery: [String: Any] = [:] - xQuery["filter_key"] = filterKey - - if let value = affiliateId { - xQuery["affiliate_id"] = value - } - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "GET", - url: "/service/platform/finance/v1.0/company/\(companyId)/reporting-filters", - query: xQuery, - body: nil, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(GetReportingFiltersResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Display all payment options for invoice. - * Description: Display all payment options for invoice. - **/ - public func invoicePaymentOptions( - body: InvoicePaymentOptionsReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InvoicePaymentOptionsResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/invoice-payment-options", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(InvoicePaymentOptionsResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Display payment details of an invoice - * Description: Display payment details of invoice. - **/ - public func invoicePaymentDetails( - invoiceNumber: String, - - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InvoicePaymentDetailsResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "GET", - url: "/service/platform/finance/v1.0/company/\(companyId)/invoice/\(invoiceNumber)/payment", - query: nil, - body: nil, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(InvoicePaymentDetailsResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Display activity log details of an invoice - * Description: Display activity log details of invoice. - **/ - public func invoiceActivityLogs( - invoiceNumber: String, - - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InvoiceActivityLogsResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "GET", - url: "/service/platform/finance/v1.0/company/\(companyId)/invoice/\(invoiceNumber)/activity", - query: nil, - body: nil, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(InvoiceActivityLogsResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Unlock credit notes - * Description: Used to unlock all request credit notes. - **/ - public func unlockCreditNote( - body: UnlockCreditNoteReq, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UnlockCreditNoteResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/finance/v1.0/company/\(companyId)/credit-notes/unlock", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(UnlockCreditNoteResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get status of oms freeze. - * Description: Used to get status of oms freeze. - **/ - public func orderFreeze( - - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OrederFreezeResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "GET", - url: "/service/platform/finance/v1.0/company/\(companyId)/order/freeze", - query: nil, - body: nil, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(OrederFreezeResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - } -} \ No newline at end of file diff --git a/Sources/code/platform/Client/LeadPlatformClient.swift b/Sources/code/platform/Client/LeadPlatformClient.swift index 122d712ea0..4c662d0e17 100644 --- a/Sources/code/platform/Client/LeadPlatformClient.swift +++ b/Sources/code/platform/Client/LeadPlatformClient.swift @@ -478,7 +478,7 @@ extension PlatformClient { public func getGeneralConfig( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GeneralConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GeneralConfigDetails?, _ error: FDKError?) -> Void ) { @@ -506,7 +506,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GeneralConfigResponse.self, from: data) + let response = Utility.decode(GeneralConfigDetails.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Client/OrderPlatformClient.swift b/Sources/code/platform/Client/OrderPlatformClient.swift index 12ab70f866..7377f6e98a 100644 --- a/Sources/code/platform/Client/OrderPlatformClient.swift +++ b/Sources/code/platform/Client/OrderPlatformClient.swift @@ -22,7 +22,7 @@ extension PlatformClient { public func invalidateShipmentCache( body: InvalidateShipmentCachePayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InvalidateShipmentCacheResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: InvalidateShipmentCacheResponseSchema?, _ error: FDKError?) -> Void ) { @@ -50,7 +50,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(InvalidateShipmentCacheResponse.self, from: data) + let response = Utility.decode(InvalidateShipmentCacheResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -72,7 +72,7 @@ extension PlatformClient { public func reassignLocation( body: StoreReassign, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: StoreReassignResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: StoreReassignResponseSchema?, _ error: FDKError?) -> Void ) { @@ -100,7 +100,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(StoreReassignResponse.self, from: data) + let response = Utility.decode(StoreReassignResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -117,12 +117,12 @@ extension PlatformClient { /** * * Summary: Update a shipment lock - * Description: Modify shipment/bag lock status and update lock/unlock messages. + * Description: Modify shipment/bag lock and check status. **/ public func updateShipmentLock( body: UpdateShipmentLockPayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdateShipmentLockResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UpdateShipmentLockResponseSchema?, _ error: FDKError?) -> Void ) { @@ -150,7 +150,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdateShipmentLockResponse.self, from: data) + let response = Utility.decode(UpdateShipmentLockResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -173,7 +173,7 @@ extension PlatformClient { date: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AnnouncementsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AnnouncementsResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -205,7 +205,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AnnouncementsResponse.self, from: data) + let response = Utility.decode(AnnouncementsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -221,70 +221,17 @@ extension PlatformClient { /** * - * Summary: Update shipment address - * Description: Modify the address details of an existing shipment + * Summary: Update the address details of an existing shipment based on the provided address_category. This operation allows the modification of critical shipment details, potentially affecting delivery/billing accuracy and customer communication. + * Description: Update the address details of an existing shipment on basis of address_category **/ public func updateAddress( shipmentId: String, - name: String?, - address: String?, - addressType: String?, - pincode: String?, - phone: String?, - email: String?, - landmark: String?, - addressCategory: String, - city: String?, - state: String?, - country: String?, - + body: UpdateAddressRequestBody, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BaseResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BaseResponseSchema?, _ error: FDKError?) -> Void ) { - var xQuery: [String: Any] = [:] - xQuery["shipment_id"] = shipmentId - - if let value = name { - xQuery["name"] = value - } - - if let value = address { - xQuery["address"] = value - } - - if let value = addressType { - xQuery["address_type"] = value - } - - if let value = pincode { - xQuery["pincode"] = value - } - - if let value = phone { - xQuery["phone"] = value - } - - if let value = email { - xQuery["email"] = value - } - - if let value = landmark { - xQuery["landmark"] = value - } - xQuery["address_category"] = addressCategory - - if let value = city { - xQuery["city"] = value - } - - if let value = state { - xQuery["state"] = value - } - - if let value = country { - xQuery["country"] = value - } + var xHeaders: [(key: String, value: String)] = [] @@ -294,10 +241,10 @@ extension PlatformClient { } PlatformAPIClient.execute( config: config, - method: "POST", - url: "/service/platform/order-manage/v1.0/company/\(companyId)/delight/update-address", - query: xQuery, - body: nil, + method: "PUT", + url: "/service/platform/order-manage/v1.0/company/\(companyId)/shipment/\(shipmentId)/address", + query: nil, + body: body.dictionary, headers: xHeaders, responseType: "application/json", onResponse: { (responseData, error, responseCode) in @@ -309,7 +256,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BaseResponse.self, from: data) + let response = Utility.decode(BaseResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -381,7 +328,7 @@ extension PlatformClient { public func getRoleBasedActions( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetActionsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetActionsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -409,7 +356,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetActionsResponse.self, from: data) + let response = Utility.decode(GetActionsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -433,7 +380,7 @@ extension PlatformClient { bagId: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ShipmentHistoryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ShipmentHistoryResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -469,7 +416,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ShipmentHistoryResponse.self, from: data) + let response = Utility.decode(ShipmentHistoryResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -491,7 +438,7 @@ extension PlatformClient { public func postShipmentHistory( body: PostShipmentHistory, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ShipmentHistoryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ShipmentHistoryResponseSchema?, _ error: FDKError?) -> Void ) { @@ -519,7 +466,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ShipmentHistoryResponse.self, from: data) + let response = Utility.decode(ShipmentHistoryResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -541,7 +488,7 @@ extension PlatformClient { public func sendSmsNinja( body: SendSmsPayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BaseResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SendSmsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -569,7 +516,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BaseResponse.self, from: data) + let response = Utility.decode(SendSmsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -591,7 +538,7 @@ extension PlatformClient { public func updatePackagingDimensions( body: UpdatePackagingDimensionsPayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdatePackagingDimensionsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UpdatePackagingDimensionsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -619,7 +566,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdatePackagingDimensionsResponse.self, from: data) + let response = Utility.decode(UpdatePackagingDimensionsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -641,7 +588,7 @@ extension PlatformClient { public func createOrder( body: CreateOrderAPI, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreateOrderResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreateOrderResponseSchema?, _ error: FDKError?) -> Void ) { @@ -669,7 +616,107 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CreateOrderResponse.self, from: data) + let response = Utility.decode(CreateOrderResponseSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: Get channel configuration + * Description: Retrieve configuration settings specific to orders for a channel + **/ + public func getChannelConfig( + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: CreateChannelConfigData?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "GET", + url: "/service/platform/order-manage/v1.0/company/\(companyId)/order-config", + query: nil, + body: nil, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(CreateChannelConfigData.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: Create channel configuration + * Description: Set up configuration for a channel specific to orders which has implications over how the order fulfilment happens in a channel + **/ + public func createChannelConfig( + body: CreateChannelConfigData, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: CreateChannelConfigResponseSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "POST", + url: "/service/platform/order-manage/v1.0/company/\(companyId)/order-config", + query: nil, + body: body.dictionary, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(CreateChannelConfigResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -887,6 +934,56 @@ extension PlatformClient { + /** + * + * Summary: Get credit balance detail + * Description: Retrieve details about credit balance on the basis of customer mobile number + **/ + public func fetchCreditBalanceDetail( + body: FetchCreditBalanceRequestPayload, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: FetchCreditBalanceResponsePayload?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "POST", + url: "/service/platform/order-manage/v1.0/company/\(companyId)/customer-credit-balance", + query: nil, + body: body.dictionary, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(FetchCreditBalanceResponsePayload.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** * * Summary: List refund modes @@ -945,7 +1042,7 @@ extension PlatformClient { public func attachOrderUser( body: AttachOrderUser, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AttachOrderUserResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AttachOrderUserResponseSchema?, _ error: FDKError?) -> Void ) { @@ -973,7 +1070,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AttachOrderUserResponse.self, from: data) + let response = Utility.decode(AttachOrderUserResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -995,7 +1092,7 @@ extension PlatformClient { public func sendUserMobileOTP( body: SendUserMobileOTP, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SendUserMobileOtpResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SendUserMobileOtpResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1023,7 +1120,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SendUserMobileOtpResponse.self, from: data) + let response = Utility.decode(SendUserMobileOtpResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1045,7 +1142,7 @@ extension PlatformClient { public func verifyMobileOTP( body: VerifyMobileOTP, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: VerifyOtpResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: VerifyOtpResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1073,7 +1170,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(VerifyOtpResponse.self, from: data) + let response = Utility.decode(VerifyOtpResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1093,9 +1190,9 @@ extension PlatformClient { * Description: Downloads shipments/orders present in the provided lane **/ public func downloadLanesReport( - body: BulkReportsDownloadRequest, + body: BulkReportsDownloadRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkReportsDownloadResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkReportsDownloadResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1123,7 +1220,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkReportsDownloadResponse.self, from: data) + let response = Utility.decode(BulkReportsDownloadResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1145,7 +1242,7 @@ extension PlatformClient { public func bulkStateTransistion( body: BulkStateTransistionRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkStateTransistionResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkStateTransistionResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1173,7 +1270,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkStateTransistionResponse.self, from: data) + let response = Utility.decode(BulkStateTransistionResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1202,7 +1299,7 @@ extension PlatformClient { searchKey: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1246,7 +1343,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkListingResponse.self, from: data) + let response = Utility.decode(BulkListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1269,7 +1366,7 @@ extension PlatformClient { batchId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: JobDetailsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: JobDetailsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1297,7 +1394,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(JobDetailsResponse.self, from: data) + let response = Utility.decode(JobDetailsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1323,7 +1420,7 @@ extension PlatformClient { reportType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: JobFailedResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: JobFailedResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1357,7 +1454,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(JobFailedResponse.self, from: data) + let response = Utility.decode(JobFailedResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1526,7 +1623,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/order-manage/v1.0/company/\(companyId)/manifest/listing", + url: "/service/platform/order-manage/v1.0/company/\(companyId)/manifests", query: xQuery, body: nil, headers: xHeaders, @@ -1556,13 +1653,13 @@ extension PlatformClient { /** * - * Summary: Process Order Manifest - * Description: Endpoint to save and process order manifests. + * Summary: Generate manifest + * Description: Generate manifest Id and PDF and tags the shipments with that manifest Id **/ - public func generateProcessManifest( - body: ProcessManifestRequest, + public func processManifests( + body: ProcessManifest, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ManifestResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ProcessManifestItemResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1576,7 +1673,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/order-manage/v1.0/company/\(companyId)/process-manifest", + url: "/service/platform/order-manage/v1.0/company/\(companyId)/manifests", query: nil, body: body.dictionary, headers: xHeaders, @@ -1590,7 +1687,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ManifestResponse.self, from: data) + let response = Utility.decode(ProcessManifestItemResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1611,38 +1708,12 @@ extension PlatformClient { **/ public func getManifestDetails( manifestId: String, - dpIds: String?, - endDate: String?, - startDate: String?, - pageNo: Int?, - pageSize: Int?, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: ManifestDetails?, _ error: FDKError?) -> Void ) { - var xQuery: [String: Any] = [:] - xQuery["manifest_id"] = manifestId - - if let value = dpIds { - xQuery["dp_ids"] = value - } - - if let value = endDate { - xQuery["end_date"] = value - } - - if let value = startDate { - xQuery["start_date"] = value - } - - if let value = pageNo { - xQuery["page_no"] = value - } - - if let value = pageSize { - xQuery["page_size"] = value - } + var xHeaders: [(key: String, value: String)] = [] @@ -1653,8 +1724,8 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/order-manage/v1.0/company/\(companyId)/manifest/details", - query: xQuery, + url: "/service/platform/order-manage/v1.0/company/\(companyId)/manifests/\(manifestId)", + query: nil, body: nil, headers: xHeaders, responseType: "application/json", @@ -1689,7 +1760,7 @@ extension PlatformClient { public func dispatchManifests( body: DispatchManifest, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1717,7 +1788,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1737,9 +1808,10 @@ extension PlatformClient { * Description: Uploads the consent signed by courier partner and seller to keep records **/ public func uploadConsents( - body: UploadManifestConsent, + manifestId: String, + body: UploadConsent, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1753,7 +1825,7 @@ extension PlatformClient { PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/order-manage/v1.0/company/\(companyId)/manifest/uploadConsent", + url: "/service/platform/order-manage/v1.0/company/\(companyId)/manifest/\(manifestId)/upload-consent", query: nil, body: body.dictionary, headers: xHeaders, @@ -1767,7 +1839,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1790,7 +1862,7 @@ extension PlatformClient { view: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ManifestFiltersResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ManifestFiltersResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1819,7 +1891,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ManifestFiltersResponse.self, from: data) + let response = Utility.decode(ManifestFiltersResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1841,7 +1913,7 @@ extension PlatformClient { public func eInvoiceRetry( body: EInvoiceRetry, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EInvoiceRetryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EInvoiceRetryResponseSchema?, _ error: FDKError?) -> Void ) { @@ -1869,7 +1941,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EInvoiceRetryResponse.self, from: data) + let response = Utility.decode(EInvoiceRetryResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -1895,7 +1967,7 @@ extension PlatformClient { pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CourierPartnerTrackingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CourierPartnerTrackingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1939,7 +2011,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CourierPartnerTrackingResponse.self, from: data) + let response = Utility.decode(CourierPartnerTrackingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2087,7 +2159,7 @@ extension PlatformClient { invoiceType: String, body: GenerateInvoiceIDRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GenerateInvoiceIDResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GenerateInvoiceIDResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2115,7 +2187,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GenerateInvoiceIDResponse.self, from: data) + let response = Utility.decode(GenerateInvoiceIDResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2180,6 +2252,56 @@ extension PlatformClient { + /** + * + * Summary: Process Order Manifest + * Description: Endpoint to save and process order manifests. + **/ + public func generateProcessManifest( + body: ProcessManifestRequestSchema, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: ManifestResponseSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "POST", + url: "/service/platform/order-manage/v1.0/company/\(companyId)/process-manifest", + query: nil, + body: body.dictionary, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(ManifestResponseSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** * * Summary: Allows esm config updation @@ -2188,7 +2310,7 @@ extension PlatformClient { public func addStateManagerConfig( body: TransitionConfigPayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ConfigUpdatedResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ConfigUpdatedResponseSchema?, _ error: FDKError?) -> Void ) { @@ -2216,7 +2338,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ConfigUpdatedResponse.self, from: data) + let response = Utility.decode(ConfigUpdatedResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2298,6 +2420,57 @@ The ESM config stores order processing configuration. Each document in the ESM c + /** + * + * Summary: Update payment details for an order, its shipments and its bags. + * Description: Updates the payment mode for an order, its shipments and its bags. This endpoint allows for modifying payment methods, and associated details but not amount. + **/ + public func updatePaymentInfo( + body: UpdateShipmentPaymentMode, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: [String: Any]?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "PUT", + url: "/service/platform/order-manage/v1.0/company/\(companyId)/payment/update", + query: nil, + body: body.dictionary, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = data.dictionary + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** * * Summary: List shipments @@ -2335,9 +2508,10 @@ The ESM config stores order processing configuration. Each document in the ESM c tags: String?, customerId: String?, orderType: String?, + groupEntity: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ShipmentInternalPlatformViewResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ShipmentInternalPlatformViewResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2466,6 +2640,10 @@ The ESM config stores order processing configuration. Each document in the ESM c xQuery["order_type"] = value } + if let value = groupEntity { + xQuery["group_entity"] = value + } + var xHeaders: [(key: String, value: String)] = [] @@ -2489,7 +2667,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ShipmentInternalPlatformViewResponse.self, from: data) + let response = Utility.decode(ShipmentInternalPlatformViewResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2515,7 +2693,7 @@ The ESM config stores order processing configuration. Each document in the ESM c allowInactive: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ShipmentInfoResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ShipmentInfoResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2559,7 +2737,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ShipmentInfoResponse.self, from: data) + let response = Utility.decode(ShipmentInfoResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2584,7 +2762,7 @@ The ESM config stores order processing configuration. Each document in the ESM c allowInactive: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OrderDetailsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OrderDetailsResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2621,7 +2799,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OrderDetailsResponse.self, from: data) + let response = Utility.decode(OrderDetailsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2662,7 +2840,7 @@ The ESM config stores order processing configuration. Each document in the ESM c orderType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: LaneConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: LaneConfigResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2766,7 +2944,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(LaneConfigResponse.self, from: data) + let response = Utility.decode(LaneConfigResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2809,9 +2987,10 @@ The ESM config stores order processing configuration. Each document in the ESM c customerId: String?, orderType: String?, allowInactive: Bool?, + groupEntity: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OrderListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OrderListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2908,6 +3087,10 @@ The ESM config stores order processing configuration. Each document in the ESM c xQuery["allow_inactive"] = value } + if let value = groupEntity { + xQuery["group_entity"] = value + } + var xHeaders: [(key: String, value: String)] = [] @@ -2931,7 +3114,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OrderListingResponse.self, from: data) + let response = Utility.decode(OrderListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -2957,7 +3140,7 @@ The ESM config stores order processing configuration. Each document in the ESM c groupEntity: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: FiltersResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FiltersResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2990,7 +3173,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(FiltersResponse.self, from: data) + let response = Utility.decode(FiltersResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3024,7 +3207,7 @@ The ESM config stores order processing configuration. Each document in the ESM c pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: FileResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3100,7 +3283,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(FileResponse.self, from: data) + let response = Utility.decode(FileResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3122,7 +3305,7 @@ The ESM config stores order processing configuration. Each document in the ESM c public func getBulkActionTemplate( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkActionTemplateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkActionTemplateResponseSchema?, _ error: FDKError?) -> Void ) { @@ -3150,7 +3333,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkActionTemplateResponse.self, from: data) + let response = Utility.decode(BulkActionTemplateResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3173,7 +3356,7 @@ The ESM config stores order processing configuration. Each document in the ESM c templateSlug: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: FileResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3205,7 +3388,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(FileResponse.self, from: data) + let response = Utility.decode(FileResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3230,7 +3413,7 @@ The ESM config stores order processing configuration. Each document in the ESM c state: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformShipmentReasonsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformShipmentReasonsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -3258,7 +3441,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformShipmentReasonsResponse.self, from: data) + let response = Utility.decode(PlatformShipmentReasonsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3284,7 +3467,7 @@ The ESM config stores order processing configuration. Each document in the ESM c channelId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BagDetailsPlatformResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BagDetailsPlatformResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3324,7 +3507,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BagDetailsPlatformResponse.self, from: data) + let response = Utility.decode(BagDetailsPlatformResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3355,7 +3538,7 @@ The ESM config stores order processing configuration. Each document in the ESM c pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetBagsPlatformResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetBagsPlatformResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3419,7 +3602,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetBagsPlatformResponse.self, from: data) + let response = Utility.decode(GetBagsPlatformResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3444,7 +3627,7 @@ The ESM config stores order processing configuration. Each document in the ESM c documentType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GeneratePosOrderReceiptResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GeneratePosOrderReceiptResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3480,7 +3663,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GeneratePosOrderReceiptResponse.self, from: data) + let response = Utility.decode(GeneratePosOrderReceiptResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3502,7 +3685,7 @@ The ESM config stores order processing configuration. Each document in the ESM c public func getAllowedTemplatesForBulk( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AllowedTemplatesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AllowedTemplatesResponseSchema?, _ error: FDKError?) -> Void ) { @@ -3530,7 +3713,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AllowedTemplatesResponse.self, from: data) + let response = Utility.decode(AllowedTemplatesResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -3553,7 +3736,7 @@ The ESM config stores order processing configuration. Each document in the ESM c templateName: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: TemplateDownloadResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: TemplateDownloadResponseSchema?, _ error: FDKError?) -> Void ) { @@ -3581,7 +3764,7 @@ The ESM config stores order processing configuration. Each document in the ESM c onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(TemplateDownloadResponse.self, from: data) + let response = Utility.decode(TemplateDownloadResponseSchema.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Client/PaymentPlatformClient.swift b/Sources/code/platform/Client/PaymentPlatformClient.swift index 4e4d51ea3d..75adbedf33 100644 --- a/Sources/code/platform/Client/PaymentPlatformClient.swift +++ b/Sources/code/platform/Client/PaymentPlatformClient.swift @@ -26,7 +26,7 @@ extension PlatformClient { uniqueExternalId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PayoutsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PayoutsDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -58,7 +58,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PayoutsResponse.self, from: data) + let response = Utility.decode(PayoutsDetails.self, from: data) onResponse(response, nil) } else { @@ -78,9 +78,9 @@ extension PlatformClient { * Description: Store and process a payout transaction. **/ public func savePayout( - body: PayoutRequest, + body: PayoutCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PayoutResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PayoutDetails?, _ error: FDKError?) -> Void ) { @@ -108,7 +108,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PayoutResponse.self, from: data) + let response = Utility.decode(PayoutDetails.self, from: data) onResponse(response, nil) } else { @@ -129,9 +129,9 @@ extension PlatformClient { **/ public func updatePayout( uniqueTransferNo: String, - body: PayoutRequest, + body: PayoutCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdatePayoutResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UpdatePayoutDetails?, _ error: FDKError?) -> Void ) { @@ -159,7 +159,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdatePayoutResponse.self, from: data) + let response = Utility.decode(UpdatePayoutDetails.self, from: data) onResponse(response, nil) } else { @@ -180,9 +180,9 @@ extension PlatformClient { **/ public func activateAndDectivatePayout( uniqueTransferNo: String, - body: UpdatePayoutRequest, + body: UpdatePayoutCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdatePayoutResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UpdatePayoutDetails?, _ error: FDKError?) -> Void ) { @@ -210,7 +210,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdatePayoutResponse.self, from: data) + let response = Utility.decode(UpdatePayoutDetails.self, from: data) onResponse(response, nil) } else { @@ -233,7 +233,7 @@ extension PlatformClient { uniqueTransferNo: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DeletePayoutResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DeletePayoutDetails?, _ error: FDKError?) -> Void ) { @@ -261,7 +261,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeletePayoutResponse.self, from: data) + let response = Utility.decode(DeletePayoutDetails.self, from: data) onResponse(response, nil) } else { @@ -284,7 +284,7 @@ extension PlatformClient { uniqueExternalId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SubscriptionPaymentMethodResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SubscriptionPaymentMethodDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -316,7 +316,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SubscriptionPaymentMethodResponse.self, from: data) + let response = Utility.decode(SubscriptionPaymentMethodDetails.self, from: data) onResponse(response, nil) } else { @@ -340,7 +340,7 @@ extension PlatformClient { paymentMethodId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DeleteSubscriptionPaymentMethodResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DeleteSubscriptionPaymentMethodDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -370,7 +370,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteSubscriptionPaymentMethodResponse.self, from: data) + let response = Utility.decode(DeleteSubscriptionPaymentMethodDetails.self, from: data) onResponse(response, nil) } else { @@ -392,7 +392,7 @@ extension PlatformClient { public func getSubscriptionConfig( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SubscriptionConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SubscriptionConfigDetails?, _ error: FDKError?) -> Void ) { @@ -420,7 +420,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SubscriptionConfigResponse.self, from: data) + let response = Utility.decode(SubscriptionConfigDetails.self, from: data) onResponse(response, nil) } else { @@ -440,9 +440,9 @@ extension PlatformClient { * Description: Store and process setup intent for subscriptions. **/ public func saveSubscriptionSetupIntent( - body: SaveSubscriptionSetupIntentRequest, + body: SaveSubscriptionSetupIntentCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SaveSubscriptionSetupIntentResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SaveSubscriptionSetupIntentDetails?, _ error: FDKError?) -> Void ) { @@ -470,7 +470,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SaveSubscriptionSetupIntentResponse.self, from: data) + let response = Utility.decode(SaveSubscriptionSetupIntentDetails.self, from: data) onResponse(response, nil) } else { @@ -495,7 +495,7 @@ extension PlatformClient { ifscCode: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: IfscCodeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: IfscCodeDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -527,7 +527,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(IfscCodeResponse.self, from: data) + let response = Utility.decode(IfscCodeDetails.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Client/ServiceabilityPlatformClient.swift b/Sources/code/platform/Client/ServiceabilityPlatformClient.swift index 02b77fe3ad..f5b9c627aa 100644 --- a/Sources/code/platform/Client/ServiceabilityPlatformClient.swift +++ b/Sources/code/platform/Client/ServiceabilityPlatformClient.swift @@ -32,7 +32,7 @@ extension PlatformClient { sector: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ListViewResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ListViewResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -100,7 +100,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ListViewResponse.self, from: data) + let response = Utility.decode(ListViewResult.self, from: data) onResponse(response, nil) } else { @@ -122,7 +122,7 @@ extension PlatformClient { public func createZone( body: CreateZoneData, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ZoneResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ZoneResult?, _ error: FDKError?) -> Void ) { @@ -150,7 +150,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ZoneResponse.self, from: data) + let response = Utility.decode(ZoneResult.self, from: data) onResponse(response, nil) } else { @@ -173,7 +173,7 @@ extension PlatformClient { zoneId: String, body: UpdateZoneData, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ZoneSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ZoneSuccessResult?, _ error: FDKError?) -> Void ) { @@ -201,7 +201,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ZoneSuccessResponse.self, from: data) + let response = Utility.decode(ZoneSuccessResult.self, from: data) onResponse(response, nil) } else { @@ -274,7 +274,7 @@ extension PlatformClient { public func getAllStores( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetStoresViewResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetStoresViewResult?, _ error: FDKError?) -> Void ) { @@ -302,7 +302,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetStoresViewResponse.self, from: data) + let response = Utility.decode(GetStoresViewResult.self, from: data) onResponse(response, nil) } else { @@ -326,7 +326,7 @@ extension PlatformClient { * Description: Creates a courier partner account. **/ public func createCourierPartnerAccount( - body: CourierAccountRequestBody, + body: CourierAccountDetailsBody, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CourierAccount?, _ error: FDKError?) -> Void ) { @@ -383,7 +383,7 @@ extension PlatformClient { transportType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CompanyCourierPartnerAccountListResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CompanyCourierPartnerAccountListResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -431,7 +431,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CompanyCourierPartnerAccountListResponse.self, from: data) + let response = Utility.decode(CompanyCourierPartnerAccountListResult.self, from: data) onResponse(response, nil) } else { @@ -454,7 +454,7 @@ extension PlatformClient { accountId: String, body: CourierAccount, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CourierAccountResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CourierAccountResult?, _ error: FDKError?) -> Void ) { @@ -482,7 +482,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CourierAccountResponse.self, from: data) + let response = Utility.decode(CourierAccountResult.self, from: data) onResponse(response, nil) } else { @@ -505,7 +505,7 @@ extension PlatformClient { accountId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CourierAccountResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CourierAccountResult?, _ error: FDKError?) -> Void ) { @@ -533,7 +533,7 @@ extension PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CourierAccountResponse.self, from: data) + let response = Utility.decode(CourierAccountResult.self, from: data) onResponse(response, nil) } else { @@ -551,6 +551,7 @@ extension PlatformClient { + /** * * Summary: Update delivery configuration @@ -662,9 +663,9 @@ Export locality wise CSV files. public func bulkTat( extensionId: String, schemeId: String, - body: BulkRegionJobSerializer, + body: BulkRegionJobDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkRegionResponseItemData?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkRegionResultItemData?, _ error: FDKError?) -> Void ) { @@ -692,7 +693,7 @@ Export locality wise CSV files. onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkRegionResponseItemData.self, from: data) + let response = Utility.decode(BulkRegionResultItemData.self, from: data) onResponse(response, nil) } else { @@ -725,7 +726,7 @@ Export locality wise CSV files. endDate: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkRegionResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkRegionResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -789,7 +790,7 @@ Export locality wise CSV files. onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkRegionResponse.self, from: data) + let response = Utility.decode(BulkRegionResult.self, from: data) onResponse(response, nil) } else { @@ -820,9 +821,9 @@ Export locality wise CSV files. public func bulkServiceability( extensionId: String, schemeId: String, - body: BulkRegionJobSerializer, + body: BulkRegionJobDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkRegionResponseItemData?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkRegionResultItemData?, _ error: FDKError?) -> Void ) { @@ -850,7 +851,7 @@ Export locality wise CSV files. onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkRegionResponseItemData.self, from: data) + let response = Utility.decode(BulkRegionResultItemData.self, from: data) onResponse(response, nil) } else { @@ -883,7 +884,7 @@ Export locality wise CSV files. endDate: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BulkRegionResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BulkRegionResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -947,7 +948,7 @@ Export locality wise CSV files. onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BulkRegionResponse.self, from: data) + let response = Utility.decode(BulkRegionResult.self, from: data) onResponse(response, nil) } else { @@ -1075,7 +1076,7 @@ Export locality wise CSV files. public func createPackageMaterial( body: PackageMaterial, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PackageMaterialResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PackageMaterialResult?, _ error: FDKError?) -> Void ) { @@ -1103,7 +1104,7 @@ Export locality wise CSV files. onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PackageMaterialResponse.self, from: data) + let response = Utility.decode(PackageMaterialResult.self, from: data) onResponse(response, nil) } else { @@ -1200,7 +1201,7 @@ Export locality wise CSV files. public func createPackageMaterialRule( body: PackageRule, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PackageRuleResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PackageRuleResult?, _ error: FDKError?) -> Void ) { @@ -1228,7 +1229,7 @@ Export locality wise CSV files. onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PackageRuleResponse.self, from: data) + let response = Utility.decode(PackageRuleResult.self, from: data) onResponse(response, nil) } else { @@ -1316,7 +1317,7 @@ Export locality wise CSV files. ruleId: String, body: PackageRule, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PackageRuleResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PackageRuleResult?, _ error: FDKError?) -> Void ) { @@ -1344,7 +1345,7 @@ Export locality wise CSV files. onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PackageRuleResponse.self, from: data) + let response = Utility.decode(PackageRuleResult.self, from: data) onResponse(response, nil) } else { @@ -1367,7 +1368,7 @@ Export locality wise CSV files. ruleId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PackageRuleResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PackageRuleResult?, _ error: FDKError?) -> Void ) { @@ -1395,7 +1396,7 @@ Export locality wise CSV files. onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PackageRuleResponse.self, from: data) + let response = Utility.decode(PackageRuleResult.self, from: data) onResponse(response, nil) } else { @@ -1418,7 +1419,7 @@ Export locality wise CSV files. packageMaterialId: String, body: PackageMaterial, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PackageMaterialResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PackageMaterialResult?, _ error: FDKError?) -> Void ) { @@ -1446,7 +1447,7 @@ Export locality wise CSV files. onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PackageMaterialResponse.self, from: data) + let response = Utility.decode(PackageMaterialResult.self, from: data) onResponse(response, nil) } else { @@ -1469,7 +1470,7 @@ Export locality wise CSV files. packageMaterialId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PackageMaterialResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PackageMaterialResult?, _ error: FDKError?) -> Void ) { @@ -1497,7 +1498,7 @@ Export locality wise CSV files. onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PackageMaterialResponse.self, from: data) + let response = Utility.decode(PackageMaterialResult.self, from: data) onResponse(response, nil) } else { @@ -1518,9 +1519,9 @@ Export locality wise CSV files. * Description: Retrieves a list selling locations which are best suited to fullfil an order for a customer. **/ public func getOptimalLocations( - body: OptimlLocationsRequestSchema, + body: OptimlLocationsDetailsSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OptimalLocationsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OptimalLocationsResult?, _ error: FDKError?) -> Void ) { @@ -1548,7 +1549,7 @@ Export locality wise CSV files. onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OptimalLocationsResponse.self, from: data) + let response = Utility.decode(OptimalLocationsResult.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Client/WebhookPlatformClient.swift b/Sources/code/platform/Client/WebhookPlatformClient.swift index 3a478c7bb0..628b149007 100644 --- a/Sources/code/platform/Client/WebhookPlatformClient.swift +++ b/Sources/code/platform/Client/WebhookPlatformClient.swift @@ -14,308 +14,6 @@ extension PlatformClient { - /** - * - * Summary: Download delivery report - * Description: Download detailed delivery reports for events. - **/ - public func downloadDeliveryReport( - body: EventProcessRequest, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DownloadReportResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/webhook/v1.0/company/\(companyId)/reports/download", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(DownloadReportResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Ping webhook - * Description: Send a test ping to a webhook for verification. - **/ - public func pingWebhook( - body: PingWebhook, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PingWebhookResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/webhook/v1.0/company/\(companyId)/subscriber/ping", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(PingWebhookResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get report filters - * Description: Retrieve filters used for generating reports. - **/ - public func getReportFilters( - body: ReportFiltersPayload, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: [ReportFilterResponse]?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/webhook/v1.0/company/\(companyId)/filters", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode([ReportFilterResponse].self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get historical reports - * Description: Retrieve historical reports of webhook events. - **/ - public func getHistoricalReports( - body: HistoryPayload, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: HistoryResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/webhook/v1.0/company/\(companyId)/reports/history", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(HistoryResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Cancel job by name - * Description: It will cancel export job triggerd by user in order to fetch -historical delivery summery - **/ - public func cancelJobByName( - filename: String, - - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CancelResponse?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "GET", - url: "/service/platform/webhook/v1.0/company/\(companyId)/reports/cancel/file/\(filename)", - query: nil, - body: nil, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(CancelResponse.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - - /** - * - * Summary: Get delivery reports - * Description: Retrieve reports on the delivery status of events. - **/ - public func getDeliveryReports( - body: EventProcessRequest, - headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EventProcessReports?, _ error: FDKError?) -> Void - ) { - - - - var xHeaders: [(key: String, value: String)] = [] - - - if let headers = headers { - xHeaders.append(contentsOf: headers) - } - PlatformAPIClient.execute( - config: config, - method: "POST", - url: "/service/platform/webhook/v1.0/company/\(companyId)/reports/event_processed", - query: nil, - body: body.dictionary, - headers: xHeaders, - responseType: "application/json", - onResponse: { (responseData, error, responseCode) in - if let _ = error, let data = responseData { - var err = Utility.decode(FDKError.self, from: data) - if err?.status == nil { - err?.status = responseCode - } - onResponse(nil, err) - } else if let data = responseData { - - let response = Utility.decode(EventProcessReports.self, from: data) - - onResponse(response, nil) - } else { - let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , - NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] - let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) - onResponse(nil, err) - } - }); - } - - - /** * * Summary: List event configurations @@ -324,7 +22,7 @@ historical delivery summery public func fetchAllEventConfigurations( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EventConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EventConfigResult?, _ error: FDKError?) -> Void ) { @@ -352,7 +50,7 @@ historical delivery summery onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EventConfigResponse.self, from: data) + let response = Utility.decode(EventConfigResult.self, from: data) onResponse(response, nil) } else { @@ -375,7 +73,7 @@ historical delivery summery public func registerSubscriberToEventV2( body: SubscriberConfigPostRequestV2, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SubscriberConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SubscriberConfigResult?, _ error: FDKError?) -> Void ) { @@ -403,7 +101,7 @@ historical delivery summery onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SubscriberConfigResponse.self, from: data) + let response = Utility.decode(SubscriberConfigResult.self, from: data) onResponse(response, nil) } else { @@ -426,7 +124,7 @@ historical delivery summery public func updateSubscriberV2( body: SubscriberConfigUpdateRequestV2, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SubscriberConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SubscriberConfigResult?, _ error: FDKError?) -> Void ) { @@ -454,7 +152,7 @@ historical delivery summery onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SubscriberConfigResponse.self, from: data) + let response = Utility.decode(SubscriberConfigResult.self, from: data) onResponse(response, nil) } else { @@ -476,7 +174,7 @@ historical delivery summery public func registerSubscriberToEvent( body: SubscriberConfigPost, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SubscriberConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SubscriberConfigResult?, _ error: FDKError?) -> Void ) { @@ -504,7 +202,7 @@ historical delivery summery onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SubscriberConfigResponse.self, from: data) + let response = Utility.decode(SubscriberConfigResult.self, from: data) onResponse(response, nil) } else { @@ -591,7 +289,7 @@ historical delivery summery public func updateSubscriberConfig( body: SubscriberConfigUpdate, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SubscriberConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SubscriberConfigResult?, _ error: FDKError?) -> Void ) { @@ -619,7 +317,58 @@ historical delivery summery onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SubscriberConfigResponse.self, from: data) + let response = Utility.decode(SubscriberConfigResult.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: Register Subscriber. + * Description: Register Subscriber. + + **/ + public func upsertSubscriberEvent( + body: UpsertSubscriberConfig, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: UpsertSubscriberConfigResult?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "PUT", + url: "/service/platform/webhook/v3.0/company/\(companyId)/subscriber/", + query: nil, + body: body.dictionary, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(UpsertSubscriberConfigResult.self, from: data) onResponse(response, nil) } else { @@ -642,7 +391,7 @@ historical delivery summery subscriberId: Int, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SubscriberResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SubscriberDetails?, _ error: FDKError?) -> Void ) { @@ -670,7 +419,7 @@ historical delivery summery onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SubscriberResponse.self, from: data) + let response = Utility.decode(SubscriberDetails.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/Models/Webhook/EventProcessReportsWebhookPlatformModel.swift b/Sources/code/platform/Models/Analytics/JobExecutionResultAnalyticsPlatformModel.swift similarity index 82% rename from Sources/code/platform/Models/Webhook/EventProcessReportsWebhookPlatformModel.swift rename to Sources/code/platform/Models/Analytics/JobExecutionResultAnalyticsPlatformModel.swift index f596513302..ab9bed05b6 100644 --- a/Sources/code/platform/Models/Webhook/EventProcessReportsWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Analytics/JobExecutionResultAnalyticsPlatformModel.swift @@ -3,16 +3,18 @@ import Foundation -public extension PlatformClient.Webhook { + + +public extension PlatformClient.ApplicationClient.Analytics { /* - Model: EventProcessReports - Used By: Webhook + Model: JobExecutionResult + Used By: Analytics */ - class EventProcessReports: Codable { + class JobExecutionResult: Codable { - public var rows: [EventProcessReportObject]? + public var rows: [[String: Any]]? public var page: Page? @@ -25,7 +27,7 @@ public extension PlatformClient.Webhook { } - public init(page: Page? = nil, rows: [EventProcessReportObject]? = nil) { + public init(page: Page? = nil, rows: [[String: Any]]? = nil) { self.rows = rows @@ -38,7 +40,7 @@ public extension PlatformClient.Webhook { do { - rows = try container.decode([EventProcessReportObject].self, forKey: .rows) + rows = try container.decode([[String: Any]].self, forKey: .rows) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -81,5 +83,3 @@ public extension PlatformClient.Webhook { } - - diff --git a/Sources/code/platform/Models/Finance/DownloadReportItemsFinancePlatformModel.swift b/Sources/code/platform/Models/Analytics/JobStatusAnalyticsPlatformModel.swift similarity index 74% rename from Sources/code/platform/Models/Finance/DownloadReportItemsFinancePlatformModel.swift rename to Sources/code/platform/Models/Analytics/JobStatusAnalyticsPlatformModel.swift index 0deb9cb68b..723c4d8f04 100644 --- a/Sources/code/platform/Models/Finance/DownloadReportItemsFinancePlatformModel.swift +++ b/Sources/code/platform/Models/Analytics/JobStatusAnalyticsPlatformModel.swift @@ -3,24 +3,26 @@ import Foundation -public extension PlatformClient.Finance { + + +public extension PlatformClient.ApplicationClient.Analytics { /* - Model: DownloadReportItems - Used By: Finance + Model: JobStatus + Used By: Analytics */ - class DownloadReportItems: Codable { + class JobStatus: Codable { public var startDate: String? public var endDate: String? - public var meta: GenerateReportMeta? + public var status: String? - public var reportId: String? + public var message: String? - public var filters: GenerateReportFilters? + public var fileMetadata: [[String: Any]]? public enum CodingKeys: String, CodingKey { @@ -29,25 +31,25 @@ public extension PlatformClient.Finance { case endDate = "end_date" - case meta = "meta" + case status = "status" - case reportId = "report_id" + case message = "message" - case filters = "filters" + case fileMetadata = "file_metadata" } - public init(endDate: String? = nil, filters: GenerateReportFilters? = nil, meta: GenerateReportMeta? = nil, reportId: String? = nil, startDate: String? = nil) { + public init(endDate: String? = nil, fileMetadata: [[String: Any]]? = nil, message: String? = nil, startDate: String? = nil, status: String? = nil) { self.startDate = startDate self.endDate = endDate - self.meta = meta + self.status = status - self.reportId = reportId + self.message = message - self.filters = filters + self.fileMetadata = fileMetadata } @@ -80,7 +82,7 @@ public extension PlatformClient.Finance { do { - meta = try container.decode(GenerateReportMeta.self, forKey: .meta) + status = try container.decode(String.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +94,7 @@ public extension PlatformClient.Finance { do { - reportId = try container.decode(String.self, forKey: .reportId) + message = try container.decode(String.self, forKey: .message) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +106,7 @@ public extension PlatformClient.Finance { do { - filters = try container.decode(GenerateReportFilters.self, forKey: .filters) + fileMetadata = try container.decode([[String: Any]].self, forKey: .fileMetadata) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -131,17 +133,17 @@ public extension PlatformClient.Finance { - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(reportId, forKey: .reportId) + try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(filters, forKey: .filters) + try? container.encodeIfPresent(fileMetadata, forKey: .fileMetadata) } @@ -150,5 +152,3 @@ public extension PlatformClient.Finance { } - - diff --git a/Sources/code/platform/Models/AuditTrail/BadRequestAuditTrailPlatformModel.swift b/Sources/code/platform/Models/AuditTrail/BadRequestSchemaAuditTrailPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/AuditTrail/BadRequestAuditTrailPlatformModel.swift rename to Sources/code/platform/Models/AuditTrail/BadRequestSchemaAuditTrailPlatformModel.swift index 38f3333264..db59917c4a 100644 --- a/Sources/code/platform/Models/AuditTrail/BadRequestAuditTrailPlatformModel.swift +++ b/Sources/code/platform/Models/AuditTrail/BadRequestSchemaAuditTrailPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.AuditTrail { /* - Model: BadRequest + Model: BadRequestSchema Used By: AuditTrail */ - class BadRequest: Codable { + class BadRequestSchema: Codable { public var message: String? diff --git a/Sources/code/platform/Models/AuditTrail/CreateLogResponseAuditTrailPlatformModel.swift b/Sources/code/platform/Models/AuditTrail/CreateLogRespAuditTrailPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/AuditTrail/CreateLogResponseAuditTrailPlatformModel.swift rename to Sources/code/platform/Models/AuditTrail/CreateLogRespAuditTrailPlatformModel.swift index c5a070b5c5..a277b21653 100644 --- a/Sources/code/platform/Models/AuditTrail/CreateLogResponseAuditTrailPlatformModel.swift +++ b/Sources/code/platform/Models/AuditTrail/CreateLogRespAuditTrailPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.AuditTrail { /* - Model: CreateLogResponse + Model: CreateLogResp Used By: AuditTrail */ - class CreateLogResponse: Codable { + class CreateLogResp: Codable { public var message: String? diff --git a/Sources/code/platform/Models/AuditTrail/DeviceInfoAuditTrailPlatformModel.swift b/Sources/code/platform/Models/AuditTrail/DeviceInfoAuditTrailPlatformModel.swift deleted file mode 100644 index 697b9f9cb0..0000000000 --- a/Sources/code/platform/Models/AuditTrail/DeviceInfoAuditTrailPlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.AuditTrail { - /* - Model: DeviceInfo - Used By: AuditTrail - */ - - class DeviceInfo: Codable { - - - public var userAgent: String? - - public var extraMeta: [String: Any]? - - - public enum CodingKeys: String, CodingKey { - - case userAgent = "user_agent" - - case extraMeta = "extra_meta" - - } - - public init(extraMeta: [String: Any]? = nil, userAgent: String? = nil) { - - self.userAgent = userAgent - - self.extraMeta = extraMeta - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - userAgent = try container.decode(String.self, forKey: .userAgent) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - extraMeta = try container.decode([String: Any].self, forKey: .extraMeta) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(userAgent, forKey: .userAgent) - - - - - try? container.encodeIfPresent(extraMeta, forKey: .extraMeta) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/AuditTrail/EntityTypeObjAuditTrailPlatformModel.swift b/Sources/code/platform/Models/AuditTrail/EntityTypeObjAuditTrailPlatformModel.swift deleted file mode 100644 index a0d35d6313..0000000000 --- a/Sources/code/platform/Models/AuditTrail/EntityTypeObjAuditTrailPlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.AuditTrail { - /* - Model: EntityTypeObj - Used By: AuditTrail - */ - - class EntityTypeObj: Codable { - - - public var entityValue: String? - - public var displayName: String? - - - public enum CodingKeys: String, CodingKey { - - case entityValue = "entity_value" - - case displayName = "display_name" - - } - - public init(displayName: String? = nil, entityValue: String? = nil) { - - self.entityValue = entityValue - - self.displayName = displayName - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - entityValue = try container.decode(String.self, forKey: .entityValue) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - displayName = try container.decode(String.self, forKey: .displayName) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(entityValue, forKey: .entityValue) - - - - - try? container.encodeIfPresent(displayName, forKey: .displayName) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/AuditTrail/EntityTypesResponseAuditTrailPlatformModel.swift b/Sources/code/platform/Models/AuditTrail/EntityTypesResponseAuditTrailPlatformModel.swift deleted file mode 100644 index f8786daaa8..0000000000 --- a/Sources/code/platform/Models/AuditTrail/EntityTypesResponseAuditTrailPlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.AuditTrail { - /* - Model: EntityTypesResponse - Used By: AuditTrail - */ - - class EntityTypesResponse: Codable { - - - public var items: [EntityTypeObj]? - - - public enum CodingKeys: String, CodingKey { - - case items = "items" - - } - - public init(items: [EntityTypeObj]? = nil) { - - self.items = items - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - items = try container.decode([EntityTypeObj].self, forKey: .items) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(items, forKey: .items) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/AuditTrail/LocationAuditTrailPlatformModel.swift b/Sources/code/platform/Models/AuditTrail/LocationAuditTrailPlatformModel.swift deleted file mode 100644 index 6d93b91a94..0000000000 --- a/Sources/code/platform/Models/AuditTrail/LocationAuditTrailPlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.AuditTrail { - /* - Model: Location - Used By: AuditTrail - */ - - class Location: Codable { - - - public var extraMeta: [String: Any]? - - - public enum CodingKeys: String, CodingKey { - - case extraMeta = "extra_meta" - - } - - public init(extraMeta: [String: Any]? = nil) { - - self.extraMeta = extraMeta - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - extraMeta = try container.decode([String: Any].self, forKey: .extraMeta) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(extraMeta, forKey: .extraMeta) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/AuditTrail/LogDocsAuditTrailPlatformModel.swift b/Sources/code/platform/Models/AuditTrail/LogDocsAuditTrailPlatformModel.swift deleted file mode 100644 index 877fc8b507..0000000000 --- a/Sources/code/platform/Models/AuditTrail/LogDocsAuditTrailPlatformModel.swift +++ /dev/null @@ -1,269 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.AuditTrail { - /* - Model: LogDocs - Used By: AuditTrail - */ - - class LogDocs: Codable { - - - public var entity: EntityObj? - - public var modifier: Modifier? - - public var deviceInfo: DeviceInfo? - - public var location: Location? - - public var id: String? - - public var company: String? - - public var application: String? - - public var sessions: String? - - public var date: String? - - public var logs: [String: Any]? - - - public enum CodingKeys: String, CodingKey { - - case entity = "entity" - - case modifier = "modifier" - - case deviceInfo = "device_info" - - case location = "location" - - case id = "_id" - - case company = "company" - - case application = "application" - - case sessions = "sessions" - - case date = "date" - - case logs = "logs" - - } - - public init(application: String? = nil, company: String? = nil, date: String? = nil, deviceInfo: DeviceInfo? = nil, entity: EntityObj? = nil, location: Location? = nil, logs: [String: Any]? = nil, modifier: Modifier? = nil, sessions: String? = nil, id: String? = nil) { - - self.entity = entity - - self.modifier = modifier - - self.deviceInfo = deviceInfo - - self.location = location - - self.id = id - - self.company = company - - self.application = application - - self.sessions = sessions - - self.date = date - - self.logs = logs - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - entity = try container.decode(EntityObj.self, forKey: .entity) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - modifier = try container.decode(Modifier.self, forKey: .modifier) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - deviceInfo = try container.decode(DeviceInfo.self, forKey: .deviceInfo) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - location = try container.decode(Location.self, forKey: .location) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - company = try container.decode(String.self, forKey: .company) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - application = try container.decode(String.self, forKey: .application) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - sessions = try container.decode(String.self, forKey: .sessions) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - date = try container.decode(String.self, forKey: .date) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - logs = try container.decode([String: Any].self, forKey: .logs) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(entity, forKey: .entity) - - - - - try? container.encodeIfPresent(modifier, forKey: .modifier) - - - - - try? container.encodeIfPresent(deviceInfo, forKey: .deviceInfo) - - - - - try? container.encodeIfPresent(location, forKey: .location) - - - - - try? container.encodeIfPresent(id, forKey: .id) - - - - - try? container.encodeIfPresent(company, forKey: .company) - - - - - try? container.encodeIfPresent(application, forKey: .application) - - - - - try? container.encodeIfPresent(sessions, forKey: .sessions) - - - - - try? container.encodeIfPresent(date, forKey: .date) - - - - - try? container.encodeIfPresent(logs, forKey: .logs) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/AuditTrail/LogMetaObjAuditTrailPlatformModel.swift b/Sources/code/platform/Models/AuditTrail/LogMetaObjAuditTrailPlatformModel.swift index 4c32157c24..eced3e8025 100644 --- a/Sources/code/platform/Models/AuditTrail/LogMetaObjAuditTrailPlatformModel.swift +++ b/Sources/code/platform/Models/AuditTrail/LogMetaObjAuditTrailPlatformModel.swift @@ -22,6 +22,8 @@ public extension PlatformClient.AuditTrail { public var location: [String: Any]? + public var sessions: String? + public enum CodingKeys: String, CodingKey { @@ -35,9 +37,11 @@ public extension PlatformClient.AuditTrail { case location = "location" + case sessions = "sessions" + } - public init(application: String? = nil, deviceInfo: [String: Any]? = nil, entity: EntityObject? = nil, location: [String: Any]? = nil, modifier: [String: Any]? = nil) { + public init(application: String? = nil, deviceInfo: [String: Any]? = nil, entity: EntityObject? = nil, location: [String: Any]? = nil, modifier: [String: Any]? = nil, sessions: String? = nil) { self.modifier = modifier @@ -49,6 +53,8 @@ public extension PlatformClient.AuditTrail { self.location = location + self.sessions = sessions + } required public init(from decoder: Decoder) throws { @@ -114,6 +120,18 @@ public extension PlatformClient.AuditTrail { } + + do { + sessions = try container.decode(String.self, forKey: .sessions) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -144,6 +162,11 @@ public extension PlatformClient.AuditTrail { try? container.encodeIfPresent(location, forKey: .location) + + + try? container.encodeIfPresent(sessions, forKey: .sessions) + + } } diff --git a/Sources/code/platform/Models/Billing/BadRequestBillingPlatformModel.swift b/Sources/code/platform/Models/Billing/BadRequestSchemaBillingPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Billing/BadRequestBillingPlatformModel.swift rename to Sources/code/platform/Models/Billing/BadRequestSchemaBillingPlatformModel.swift index 507ba8433e..27f2ec85d1 100644 --- a/Sources/code/platform/Models/Billing/BadRequestBillingPlatformModel.swift +++ b/Sources/code/platform/Models/Billing/BadRequestSchemaBillingPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Billing { /* - Model: BadRequest + Model: BadRequestSchema Used By: Billing */ - class BadRequest: Codable { + class BadRequestSchema: Codable { public var message: String? diff --git a/Sources/code/platform/Models/Billing/ChargeLineItemBillingPlatformModel.swift b/Sources/code/platform/Models/Billing/ChargeLineItemBillingPlatformModel.swift index e70dc536dd..094fce15fa 100644 --- a/Sources/code/platform/Models/Billing/ChargeLineItemBillingPlatformModel.swift +++ b/Sources/code/platform/Models/Billing/ChargeLineItemBillingPlatformModel.swift @@ -24,7 +24,7 @@ public extension PlatformClient.Billing { public var cappedAmount: Double? - public var trialDays: Int? + public var trialDays: Double? public var isTest: Bool? @@ -53,7 +53,7 @@ public extension PlatformClient.Billing { } - public init(cappedAmount: Double? = nil, isTest: Bool? = nil, metadata: [String: Any]? = nil, name: String, price: EntityChargePrice, pricingType: String, recurring: EntityChargeRecurring? = nil, term: String, trialDays: Int? = nil) { + public init(cappedAmount: Double? = nil, isTest: Bool? = nil, metadata: [String: Any]? = nil, name: String, price: EntityChargePrice, pricingType: String, recurring: EntityChargeRecurring? = nil, term: String, trialDays: Double? = nil) { self.name = name @@ -124,7 +124,7 @@ public extension PlatformClient.Billing { do { - trialDays = try container.decode(Int.self, forKey: .trialDays) + trialDays = try container.decode(Double.self, forKey: .trialDays) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Billing/CreateOneTimeChargeResponseBillingPlatformModel.swift b/Sources/code/platform/Models/Billing/CreateOneTimeChargeResponseSchemasBillingPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Billing/CreateOneTimeChargeResponseBillingPlatformModel.swift rename to Sources/code/platform/Models/Billing/CreateOneTimeChargeResponseSchemasBillingPlatformModel.swift index 6062b7adf8..af6b176877 100644 --- a/Sources/code/platform/Models/Billing/CreateOneTimeChargeResponseBillingPlatformModel.swift +++ b/Sources/code/platform/Models/Billing/CreateOneTimeChargeResponseSchemasBillingPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Billing { /* - Model: CreateOneTimeChargeResponse + Model: CreateOneTimeChargeResponseSchemas Used By: Billing */ - class CreateOneTimeChargeResponse: Codable { + class CreateOneTimeChargeResponseSchemas: Codable { public var charge: Charge? diff --git a/Sources/code/platform/Models/Billing/CreateSubscriptionResponseBillingPlatformModel.swift b/Sources/code/platform/Models/Billing/CreateSubscriptionBillingPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Billing/CreateSubscriptionResponseBillingPlatformModel.swift rename to Sources/code/platform/Models/Billing/CreateSubscriptionBillingPlatformModel.swift index c9f0884918..17ff631c35 100644 --- a/Sources/code/platform/Models/Billing/CreateSubscriptionResponseBillingPlatformModel.swift +++ b/Sources/code/platform/Models/Billing/CreateSubscriptionBillingPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Billing { /* - Model: CreateSubscriptionResponse + Model: CreateSubscription Used By: Billing */ - class CreateSubscriptionResponse: Codable { + class CreateSubscription: Codable { public var subscription: EntitySubscription? diff --git a/Sources/code/platform/Models/Billing/CreateSubscriptionChargeBillingPlatformModel.swift b/Sources/code/platform/Models/Billing/CreateSubscriptionChargeBillingPlatformModel.swift index 18d75fa7ce..f924d46763 100644 --- a/Sources/code/platform/Models/Billing/CreateSubscriptionChargeBillingPlatformModel.swift +++ b/Sources/code/platform/Models/Billing/CreateSubscriptionChargeBillingPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.Billing { public var name: String - public var trialDays: Int? + public var trialDays: Double? public var lineItems: [ChargeLineItem] @@ -37,7 +37,7 @@ public extension PlatformClient.Billing { } - public init(isTest: Bool? = nil, lineItems: [ChargeLineItem], name: String, returnUrl: String, trialDays: Int? = nil) { + public init(isTest: Bool? = nil, lineItems: [ChargeLineItem], name: String, returnUrl: String, trialDays: Double? = nil) { self.name = name @@ -61,7 +61,7 @@ public extension PlatformClient.Billing { do { - trialDays = try container.decode(Int.self, forKey: .trialDays) + trialDays = try container.decode(Double.self, forKey: .trialDays) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Billing/ResourceNotFoundBillingPlatformModel.swift b/Sources/code/platform/Models/Billing/ResourceNotFoundBillingPlatformModel.swift index b96cee054f..bdcc0d45a0 100644 --- a/Sources/code/platform/Models/Billing/ResourceNotFoundBillingPlatformModel.swift +++ b/Sources/code/platform/Models/Billing/ResourceNotFoundBillingPlatformModel.swift @@ -14,9 +14,9 @@ public extension PlatformClient.Billing { public var message: String? - public var code: [String: Any]? + public var code: Int? - public var success: [String: Any]? + public var success: Bool? public enum CodingKeys: String, CodingKey { @@ -29,7 +29,7 @@ public extension PlatformClient.Billing { } - public init(code: [String: Any]? = nil, message: String? = nil, success: [String: Any]? = nil) { + public init(code: Int? = nil, message: String? = nil, success: Bool? = nil) { self.message = message @@ -56,7 +56,7 @@ public extension PlatformClient.Billing { do { - code = try container.decode([String: Any].self, forKey: .code) + code = try container.decode(Int.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ public extension PlatformClient.Billing { do { - success = try container.decode([String: Any].self, forKey: .success) + success = try container.decode(Bool.self, forKey: .success) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Cart/AbandonedCartResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/AbandonedCartResultCartPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Cart/AbandonedCartResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/AbandonedCartResultCartPlatformModel.swift index ea5181450c..a7649c7ee7 100644 --- a/Sources/code/platform/Models/Cart/AbandonedCartResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/AbandonedCartResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: AbandonedCartResponse + Model: AbandonedCartResult Used By: Cart */ - class AbandonedCartResponse: Codable { + class AbandonedCartResult: Codable { public var items: [AbandonedCart]? diff --git a/Sources/code/platform/Models/Cart/ActivePromosResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/ActivePromosResultCartPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Cart/ActivePromosResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/ActivePromosResultCartPlatformModel.swift index 42168bf2a9..8a469f33d4 100644 --- a/Sources/code/platform/Models/Cart/ActivePromosResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/ActivePromosResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: ActivePromosResponse + Model: ActivePromosResult Used By: Cart */ - class ActivePromosResponse: Codable { + class ActivePromosResult: Codable { public var entitySlug: String? diff --git a/Sources/code/platform/Models/Cart/AddCartRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/AddCartCreationCartPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Cart/AddCartRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/AddCartCreationCartPlatformModel.swift index 8aa3e0ca7d..5bab2a8867 100644 --- a/Sources/code/platform/Models/Cart/AddCartRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/AddCartCreationCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: AddCartRequest + Model: AddCartCreation Used By: Cart */ - class AddCartRequest: Codable { + class AddCartCreation: Codable { public var newCart: Bool? diff --git a/Sources/code/platform/Models/Cart/AddCartDetailResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/AddCartDetailResultCartPlatformModel.swift similarity index 90% rename from Sources/code/platform/Models/Cart/AddCartDetailResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/AddCartDetailResultCartPlatformModel.swift index 4443e2bf7d..57d5fde04b 100644 --- a/Sources/code/platform/Models/Cart/AddCartDetailResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/AddCartDetailResultCartPlatformModel.swift @@ -7,16 +7,16 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: AddCartDetailResponse + Model: AddCartDetailResult Used By: Cart */ - class AddCartDetailResponse: Codable { + class AddCartDetailResult: Codable { public var success: Bool? - public var cart: CartDetailResponse? + public var cart: CartDetailResult? public var partial: Bool? @@ -35,7 +35,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(cart: CartDetailResponse? = nil, message: String? = nil, partial: Bool? = nil, success: Bool? = nil) { + public init(cart: CartDetailResult? = nil, message: String? = nil, partial: Bool? = nil, success: Bool? = nil) { self.success = success @@ -64,7 +64,7 @@ public extension PlatformClient.ApplicationClient.Cart { do { - cart = try container.decode(CartDetailResponse.self, forKey: .cart) + cart = try container.decode(CartDetailResult.self, forKey: .cart) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Cart/ApplyCouponRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/ApplyCouponDetailsCartPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Cart/ApplyCouponRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/ApplyCouponDetailsCartPlatformModel.swift index b1c9e12515..040b1b57e7 100644 --- a/Sources/code/platform/Models/Cart/ApplyCouponRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/ApplyCouponDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: ApplyCouponRequest + Model: ApplyCouponDetails Used By: Cart */ - class ApplyCouponRequest: Codable { + class ApplyCouponDetails: Codable { public var couponCode: String diff --git a/Sources/code/platform/Models/Cart/ArticlePriceDetailsCartPlatformModel.swift b/Sources/code/platform/Models/Cart/ArticlePriceDetailsCartPlatformModel.swift new file mode 100644 index 0000000000..7b54c7839f --- /dev/null +++ b/Sources/code/platform/Models/Cart/ArticlePriceDetailsCartPlatformModel.swift @@ -0,0 +1,85 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: ArticlePriceDetails + Used By: Cart + */ + + class ArticlePriceDetails: Codable { + + + public var marked: Double? + + public var effective: Double? + + + public enum CodingKeys: String, CodingKey { + + case marked = "marked" + + case effective = "effective" + + } + + public init(effective: Double? = nil, marked: Double? = nil) { + + self.marked = marked + + self.effective = effective + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + marked = try container.decode(Double.self, forKey: .marked) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + effective = try container.decode(Double.self, forKey: .effective) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/CartCheckoutCustomMetaCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CartCheckoutCustomMetaCartPlatformModel.swift new file mode 100644 index 0000000000..244252c92b --- /dev/null +++ b/Sources/code/platform/Models/Cart/CartCheckoutCustomMetaCartPlatformModel.swift @@ -0,0 +1,71 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: CartCheckoutCustomMeta + Used By: Cart + */ + + class CartCheckoutCustomMeta: Codable { + + + public var key: String + + public var value: String + + + public enum CodingKeys: String, CodingKey { + + case key = "key" + + case value = "value" + + } + + public init(key: String, value: String) { + + self.key = key + + self.value = value + + } + + 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) + + + + } + + 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) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/CartCheckoutResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CartCheckoutDetailsCartPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Cart/CartCheckoutResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/CartCheckoutDetailsCartPlatformModel.swift index 0741945479..e7ff195e9b 100644 --- a/Sources/code/platform/Models/Cart/CartCheckoutResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CartCheckoutDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: CartCheckoutResponse + Model: CartCheckoutDetails Used By: Cart */ - class CartCheckoutResponse: Codable { + class CartCheckoutDetails: Codable { public var appInterceptUrl: String? diff --git a/Sources/code/platform/Models/Finance/CnGenerateReportItemsFinancePlatformModel.swift b/Sources/code/platform/Models/Cart/CartCheckoutResultCartPlatformModel.swift similarity index 64% rename from Sources/code/platform/Models/Finance/CnGenerateReportItemsFinancePlatformModel.swift rename to Sources/code/platform/Models/Cart/CartCheckoutResultCartPlatformModel.swift index a036325967..329e5d40ef 100644 --- a/Sources/code/platform/Models/Finance/CnGenerateReportItemsFinancePlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CartCheckoutResultCartPlatformModel.swift @@ -3,69 +3,71 @@ import Foundation -public extension PlatformClient.Finance { + + +public extension PlatformClient.ApplicationClient.Cart { /* - Model: CnGenerateReportItems - Used By: Finance + Model: CartCheckoutResult + Used By: Cart */ - class CnGenerateReportItems: Codable { + class CartCheckoutResult: Codable { - public var expiryDate: String? + public var appInterceptUrl: String? - public var status: String? + public var data: [String: Any]? - public var totalAmount: Int? + public var cart: CheckCart? - public var orderId: String? + public var success: Bool? - public var dateIssued: String? + public var callbackUrl: String? - public var shipmentId: String? + public var paymentConfirmUrl: String? - public var invoiceNumber: String? + public var orderId: String? - public var creditNoteNumber: String? + public var message: String? public enum CodingKeys: String, CodingKey { - case expiryDate = "expiry_date" + case appInterceptUrl = "app_intercept_url" - case status = "status" + case data = "data" - case totalAmount = "total_amount" + case cart = "cart" - case orderId = "order_id" + case success = "success" - case dateIssued = "date_issued" + case callbackUrl = "callback_url" - case shipmentId = "shipment_id" + case paymentConfirmUrl = "payment_confirm_url" - case invoiceNumber = "invoice_number" + case orderId = "order_id" - case creditNoteNumber = "credit_note_number" + case message = "message" } - public init(creditNoteNumber: String? = nil, dateIssued: String? = nil, expiryDate: String? = nil, invoiceNumber: String? = nil, orderId: String? = nil, shipmentId: String? = nil, status: String? = nil, totalAmount: Int? = nil) { + public init(appInterceptUrl: String? = nil, callbackUrl: String? = nil, cart: CheckCart? = nil, data: [String: Any]? = nil, message: String? = nil, orderId: String? = nil, paymentConfirmUrl: String? = nil, success: Bool? = nil) { - self.expiryDate = expiryDate + self.appInterceptUrl = appInterceptUrl - self.status = status + self.data = data - self.totalAmount = totalAmount + self.cart = cart - self.orderId = orderId + self.success = success - self.dateIssued = dateIssued + self.callbackUrl = callbackUrl - self.shipmentId = shipmentId + self.paymentConfirmUrl = paymentConfirmUrl - self.invoiceNumber = invoiceNumber + self.orderId = orderId - self.creditNoteNumber = creditNoteNumber + self.message = message } @@ -74,7 +76,7 @@ public extension PlatformClient.Finance { do { - expiryDate = try container.decode(String.self, forKey: .expiryDate) + appInterceptUrl = try container.decode(String.self, forKey: .appInterceptUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,7 +88,7 @@ public extension PlatformClient.Finance { do { - status = try container.decode(String.self, forKey: .status) + data = try container.decode([String: Any].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +100,7 @@ public extension PlatformClient.Finance { do { - totalAmount = try container.decode(Int.self, forKey: .totalAmount) + cart = try container.decode(CheckCart.self, forKey: .cart) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +112,7 @@ public extension PlatformClient.Finance { do { - orderId = try container.decode(String.self, forKey: .orderId) + success = try container.decode(Bool.self, forKey: .success) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +124,7 @@ public extension PlatformClient.Finance { do { - dateIssued = try container.decode(String.self, forKey: .dateIssued) + callbackUrl = try container.decode(String.self, forKey: .callbackUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +136,7 @@ public extension PlatformClient.Finance { do { - shipmentId = try container.decode(String.self, forKey: .shipmentId) + paymentConfirmUrl = try container.decode(String.self, forKey: .paymentConfirmUrl) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +148,7 @@ public extension PlatformClient.Finance { do { - invoiceNumber = try container.decode(String.self, forKey: .invoiceNumber) + orderId = try container.decode(String.self, forKey: .orderId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +160,7 @@ public extension PlatformClient.Finance { do { - creditNoteNumber = try container.decode(String.self, forKey: .creditNoteNumber) + message = try container.decode(String.self, forKey: .message) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -175,42 +177,42 @@ public extension PlatformClient.Finance { - try? container.encodeIfPresent(expiryDate, forKey: .expiryDate) + try? container.encodeIfPresent(appInterceptUrl, forKey: .appInterceptUrl) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(data, forKey: .data) - try? container.encodeIfPresent(totalAmount, forKey: .totalAmount) + try? container.encodeIfPresent(cart, forKey: .cart) - try? container.encodeIfPresent(orderId, forKey: .orderId) + try? container.encodeIfPresent(success, forKey: .success) - try? container.encodeIfPresent(dateIssued, forKey: .dateIssued) + try? container.encodeIfPresent(callbackUrl, forKey: .callbackUrl) - try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) + try? container.encodeIfPresent(paymentConfirmUrl, forKey: .paymentConfirmUrl) - try? container.encodeIfPresent(invoiceNumber, forKey: .invoiceNumber) + try? container.encodeIfPresent(orderId, forKey: .orderId) - try? container.encodeIfPresent(creditNoteNumber, forKey: .creditNoteNumber) + try? container.encodeIfPresent(message, forKey: .message) } @@ -219,5 +221,3 @@ public extension PlatformClient.Finance { } - - diff --git a/Sources/code/platform/Models/Cart/CartDeliveryModesResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CartDeliveryModesDetailsCartPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Cart/CartDeliveryModesResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/CartDeliveryModesDetailsCartPlatformModel.swift index 0495253944..f6a5c18765 100644 --- a/Sources/code/platform/Models/Cart/CartDeliveryModesResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CartDeliveryModesDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: CartDeliveryModesResponse + Model: CartDeliveryModesDetails Used By: Cart */ - class CartDeliveryModesResponse: Codable { + class CartDeliveryModesDetails: Codable { public var pickupStores: [Int]? diff --git a/Sources/code/platform/Models/Cart/CartDetailResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CartDetailResultCartPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Cart/CartDetailResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/CartDetailResultCartPlatformModel.swift index 05604404da..114636bf9b 100644 --- a/Sources/code/platform/Models/Cart/CartDetailResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CartDetailResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: CartDetailResponse + Model: CartDetailResult Used By: Cart */ - class CartDetailResponse: Codable { + class CartDetailResult: Codable { public var cartId: Int? diff --git a/Sources/code/platform/Models/Cart/CartItemCountResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CartItemCountResultCartPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Cart/CartItemCountResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/CartItemCountResultCartPlatformModel.swift index 81b633468c..91818f63b4 100644 --- a/Sources/code/platform/Models/Cart/CartItemCountResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CartItemCountResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: CartItemCountResponse + Model: CartItemCountResult Used By: Cart */ - class CartItemCountResponse: Codable { + class CartItemCountResult: Codable { public var userCartItemsCount: Int? diff --git a/Sources/code/platform/Models/Cart/CartMetaResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CartMetaDetailsCartPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Cart/CartMetaResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/CartMetaDetailsCartPlatformModel.swift index 06bb8eb42c..1c2119533d 100644 --- a/Sources/code/platform/Models/Cart/CartMetaResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CartMetaDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: CartMetaResponse + Model: CartMetaDetails Used By: Cart */ - class CartMetaResponse: Codable { + class CartMetaDetails: Codable { public var isValid: Bool? diff --git a/Sources/code/platform/Models/Cart/CartMetaMissingResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CartMetaMissingDetailsCartPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Cart/CartMetaMissingResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/CartMetaMissingDetailsCartPlatformModel.swift index 22e86faba5..87a1839b7f 100644 --- a/Sources/code/platform/Models/Cart/CartMetaMissingResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CartMetaMissingDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: CartMetaMissingResponse + Model: CartMetaMissingDetails Used By: Cart */ - class CartMetaMissingResponse: Codable { + class CartMetaMissingDetails: Codable { public var errors: [String]? diff --git a/Sources/code/platform/Models/Cart/UpdateCartPaymentRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CartPaymentUpdateCartPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Cart/UpdateCartPaymentRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/CartPaymentUpdateCartPlatformModel.swift index 4751c20a53..76272efa24 100644 --- a/Sources/code/platform/Models/Cart/UpdateCartPaymentRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CartPaymentUpdateCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: UpdateCartPaymentRequest + Model: CartPaymentUpdate Used By: Cart */ - class UpdateCartPaymentRequest: Codable { + class CartPaymentUpdate: Codable { public var addressId: String? diff --git a/Sources/code/platform/Models/Cart/CouponAddCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CouponAddCartPlatformModel.swift index 13eb8f3268..40212ce98b 100644 --- a/Sources/code/platform/Models/Cart/CouponAddCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CouponAddCartPlatformModel.swift @@ -16,7 +16,7 @@ public extension PlatformClient.ApplicationClient.Cart { public var dateMeta: CouponDateMeta? - public var ownership: Ownership + public var ownership: Ownership? public var author: CouponAuthor? @@ -28,23 +28,29 @@ public extension PlatformClient.ApplicationClient.Cart { public var action: CouponAction? + public var couponType: String? + + public var couponPrefix: String? + + public var couponCounts: Int? + public var tags: [String]? public var schedule: CouponSchedule? - public var rule: [Rule] + public var rule: [Rule]? - public var displayMeta: DisplayMeta + public var displayMeta: DisplayMeta? public var code: String public var typeSlug: String - public var identifiers: Identifier + public var identifiers: Identifier? - public var validity: Validity + public var validity: Validity? - public var ruleDefinition: RuleDefinition + public var ruleDefinition: RuleDefinition? public var id: String? @@ -65,6 +71,12 @@ public extension PlatformClient.ApplicationClient.Cart { case action = "action" + case couponType = "coupon_type" + + case couponPrefix = "coupon_prefix" + + case couponCounts = "coupon_counts" + case tags = "tags" case schedule = "_schedule" @@ -87,7 +99,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(action: CouponAction? = nil, author: CouponAuthor? = nil, code: String, dateMeta: CouponDateMeta? = nil, displayMeta: DisplayMeta, identifiers: Identifier, ownership: Ownership, restrictions: Restrictions? = nil, rule: [Rule], ruleDefinition: RuleDefinition, state: State? = nil, tags: [String]? = nil, typeSlug: String, validation: Validation? = nil, validity: Validity, id: String? = nil, schedule: CouponSchedule? = nil) { + public init(action: CouponAction? = nil, author: CouponAuthor? = nil, code: String, couponCounts: Int? = nil, couponPrefix: String? = nil, couponType: String? = nil, dateMeta: CouponDateMeta? = nil, displayMeta: DisplayMeta? = nil, identifiers: Identifier? = nil, ownership: Ownership? = nil, restrictions: Restrictions? = nil, rule: [Rule]? = nil, ruleDefinition: RuleDefinition? = nil, state: State? = nil, tags: [String]? = nil, typeSlug: String, validation: Validation? = nil, validity: Validity? = nil, id: String? = nil, schedule: CouponSchedule? = nil) { self.dateMeta = dateMeta @@ -103,6 +115,12 @@ public extension PlatformClient.ApplicationClient.Cart { self.action = action + self.couponType = couponType + + self.couponPrefix = couponPrefix + + self.couponCounts = couponCounts + self.tags = tags self.schedule = schedule @@ -141,9 +159,16 @@ public extension PlatformClient.ApplicationClient.Cart { - ownership = try container.decode(Ownership.self, forKey: .ownership) + do { + ownership = try container.decode(Ownership.self, forKey: .ownership) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - do { @@ -207,7 +232,7 @@ public extension PlatformClient.ApplicationClient.Cart { do { - tags = try container.decode([String].self, forKey: .tags) + couponType = try container.decode(String.self, forKey: .couponType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -219,7 +244,19 @@ public extension PlatformClient.ApplicationClient.Cart { do { - schedule = try container.decode(CouponSchedule.self, forKey: .schedule) + couponPrefix = try container.decode(String.self, forKey: .couponPrefix) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + couponCounts = try container.decode(Int.self, forKey: .couponCounts) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,15 +267,53 @@ public extension PlatformClient.ApplicationClient.Cart { - rule = try container.decode([Rule].self, forKey: .rule) + do { + 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 { + + } + do { + schedule = try container.decode(CouponSchedule.self, forKey: .schedule) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + - displayMeta = try container.decode(DisplayMeta.self, forKey: .displayMeta) + do { + rule = try container.decode([Rule].self, forKey: .rule) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + do { + displayMeta = try container.decode(DisplayMeta.self, forKey: .displayMeta) + + } 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) @@ -250,19 +325,40 @@ public extension PlatformClient.ApplicationClient.Cart { - identifiers = try container.decode(Identifier.self, forKey: .identifiers) + do { + identifiers = try container.decode(Identifier.self, forKey: .identifiers) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - validity = try container.decode(Validity.self, forKey: .validity) + do { + validity = try container.decode(Validity.self, forKey: .validity) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - ruleDefinition = try container.decode(RuleDefinition.self, forKey: .ruleDefinition) + do { + ruleDefinition = try container.decode(RuleDefinition.self, forKey: .ruleDefinition) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - do { @@ -318,6 +414,21 @@ public extension PlatformClient.ApplicationClient.Cart { + try? container.encodeIfPresent(couponType, forKey: .couponType) + + + + + try? container.encodeIfPresent(couponPrefix, forKey: .couponPrefix) + + + + + try? container.encodeIfPresent(couponCounts, forKey: .couponCounts) + + + + try? container.encodeIfPresent(tags, forKey: .tags) diff --git a/Sources/code/platform/Models/Cart/CouponAuthorCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CouponAuthorCartPlatformModel.swift index 7c8a755a1d..f1f2f4a1ea 100644 --- a/Sources/code/platform/Models/Cart/CouponAuthorCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CouponAuthorCartPlatformModel.swift @@ -18,6 +18,12 @@ public extension PlatformClient.ApplicationClient.Cart { public var modifiedBy: String? + public var approvedBy: String? + + public var rejectedBy: String? + + public var reviewedBy: String? + public enum CodingKeys: String, CodingKey { @@ -25,14 +31,26 @@ public extension PlatformClient.ApplicationClient.Cart { case modifiedBy = "modified_by" + case approvedBy = "approved_by" + + case rejectedBy = "rejected_by" + + case reviewedBy = "reviewed_by" + } - public init(createdBy: String? = nil, modifiedBy: String? = nil) { + public init(approvedBy: String? = nil, createdBy: String? = nil, modifiedBy: String? = nil, rejectedBy: String? = nil, reviewedBy: String? = nil) { self.createdBy = createdBy self.modifiedBy = modifiedBy + self.approvedBy = approvedBy + + self.rejectedBy = rejectedBy + + self.reviewedBy = reviewedBy + } required public init(from decoder: Decoder) throws { @@ -62,6 +80,42 @@ public extension PlatformClient.ApplicationClient.Cart { } + + do { + approvedBy = try container.decode(String.self, forKey: .approvedBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + rejectedBy = try container.decode(String.self, forKey: .rejectedBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + reviewedBy = try container.decode(String.self, forKey: .reviewedBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -77,6 +131,21 @@ public extension PlatformClient.ApplicationClient.Cart { try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + + + try? container.encodeIfPresent(approvedBy, forKey: .approvedBy) + + + + + try? container.encodeIfPresent(rejectedBy, forKey: .rejectedBy) + + + + + try? container.encodeIfPresent(reviewedBy, forKey: .reviewedBy) + + } } diff --git a/Sources/code/platform/Models/Cart/CouponCreateResultCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CouponCreateResultCartPlatformModel.swift new file mode 100644 index 0000000000..d3b7f00dd6 --- /dev/null +++ b/Sources/code/platform/Models/Cart/CouponCreateResultCartPlatformModel.swift @@ -0,0 +1,108 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: CouponCreateResult + Used By: Cart + */ + + class CouponCreateResult: Codable { + + + public var success: Bool? + + public var message: String? + + public var id: String? + + + public enum CodingKeys: String, CodingKey { + + case success = "success" + + case message = "message" + + case id = "_id" + + } + + public init(message: String? = nil, success: Bool? = nil, id: String? = nil) { + + self.success = success + + self.message = message + + self.id = id + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + message = try container.decode(String.self, forKey: .message) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + 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(id, forKey: .id) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/CouponDateMetaCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CouponDateMetaCartPlatformModel.swift index 1865f126ff..1fb502eb3c 100644 --- a/Sources/code/platform/Models/Cart/CouponDateMetaCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CouponDateMetaCartPlatformModel.swift @@ -18,6 +18,12 @@ public extension PlatformClient.ApplicationClient.Cart { public var createdOn: String? + public var approvedOn: String? + + public var rejectedOn: String? + + public var reviewedOn: String? + public enum CodingKeys: String, CodingKey { @@ -25,14 +31,26 @@ public extension PlatformClient.ApplicationClient.Cart { case createdOn = "created_on" + case approvedOn = "approved_on" + + case rejectedOn = "rejected_on" + + case reviewedOn = "reviewed_on" + } - public init(createdOn: String? = nil, modifiedOn: String? = nil) { + public init(approvedOn: String? = nil, createdOn: String? = nil, modifiedOn: String? = nil, rejectedOn: String? = nil, reviewedOn: String? = nil) { self.modifiedOn = modifiedOn self.createdOn = createdOn + self.approvedOn = approvedOn + + self.rejectedOn = rejectedOn + + self.reviewedOn = reviewedOn + } required public init(from decoder: Decoder) throws { @@ -62,6 +80,42 @@ public extension PlatformClient.ApplicationClient.Cart { } + + do { + approvedOn = try container.decode(String.self, forKey: .approvedOn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + rejectedOn = try container.decode(String.self, forKey: .rejectedOn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + reviewedOn = try container.decode(String.self, forKey: .reviewedOn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -77,6 +131,21 @@ public extension PlatformClient.ApplicationClient.Cart { try? container.encodeIfPresent(createdOn, forKey: .createdOn) + + + try? container.encodeIfPresent(approvedOn, forKey: .approvedOn) + + + + + try? container.encodeIfPresent(rejectedOn, forKey: .rejectedOn) + + + + + try? container.encodeIfPresent(reviewedOn, forKey: .reviewedOn) + + } } diff --git a/Sources/code/platform/Models/Cart/CouponScheduleCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CouponScheduleCartPlatformModel.swift index 098a32b37c..357eaa0db1 100644 --- a/Sources/code/platform/Models/Cart/CouponScheduleCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CouponScheduleCartPlatformModel.swift @@ -22,6 +22,8 @@ public extension PlatformClient.ApplicationClient.Cart { public var cron: String? + public var status: String? + public var duration: Int? @@ -35,11 +37,13 @@ public extension PlatformClient.ApplicationClient.Cart { case cron = "cron" + case status = "status" + case duration = "duration" } - public init(cron: String? = nil, duration: Int? = nil, end: String? = nil, nextSchedule: [[String: Any]]? = nil, start: String? = nil) { + public init(cron: String? = nil, duration: Int? = nil, end: String? = nil, nextSchedule: [[String: Any]]? = nil, start: String? = nil, status: String? = nil) { self.end = end @@ -49,6 +53,8 @@ public extension PlatformClient.ApplicationClient.Cart { self.cron = cron + self.status = status + self.duration = duration } @@ -105,6 +111,18 @@ public extension PlatformClient.ApplicationClient.Cart { + do { + 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 { + + } + + + do { duration = try container.decode(Int.self, forKey: .duration) @@ -143,6 +161,11 @@ public extension PlatformClient.ApplicationClient.Cart { + try? container.encodeIfPresent(status, forKey: .status) + + + + try? container.encodeIfPresent(duration, forKey: .duration) diff --git a/Sources/code/platform/Models/Cart/CouponUpdateCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CouponUpdateCartPlatformModel.swift index 7ac0c2c6c6..0038bbb6de 100644 --- a/Sources/code/platform/Models/Cart/CouponUpdateCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CouponUpdateCartPlatformModel.swift @@ -16,7 +16,7 @@ public extension PlatformClient.ApplicationClient.Cart { public var dateMeta: CouponDateMeta? - public var ownership: Ownership + public var ownership: Ownership? public var author: CouponAuthor? @@ -32,19 +32,27 @@ public extension PlatformClient.ApplicationClient.Cart { public var schedule: CouponSchedule? - public var rule: [Rule] + public var rule: [Rule]? - public var displayMeta: DisplayMeta + public var displayMeta: DisplayMeta? public var code: String + public var couponType: String? + + public var couponPrefix: String? + + public var couponCounts: Int? + + public var reason: String? + public var typeSlug: String - public var identifiers: Identifier + public var identifiers: Identifier? - public var validity: Validity + public var validity: Validity? - public var ruleDefinition: RuleDefinition + public var ruleDefinition: RuleDefinition? public enum CodingKeys: String, CodingKey { @@ -73,6 +81,14 @@ public extension PlatformClient.ApplicationClient.Cart { case code = "code" + case couponType = "coupon_type" + + case couponPrefix = "coupon_prefix" + + case couponCounts = "coupon_counts" + + case reason = "reason" + case typeSlug = "type_slug" case identifiers = "identifiers" @@ -83,7 +99,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(action: CouponAction? = nil, author: CouponAuthor? = nil, code: String, dateMeta: CouponDateMeta? = nil, displayMeta: DisplayMeta, identifiers: Identifier, ownership: Ownership, restrictions: Restrictions? = nil, rule: [Rule], ruleDefinition: RuleDefinition, state: State? = nil, tags: [String]? = nil, typeSlug: String, validation: Validation? = nil, validity: Validity, schedule: CouponSchedule? = nil) { + public init(action: CouponAction? = nil, author: CouponAuthor? = nil, code: String, couponCounts: Int? = nil, couponPrefix: String? = nil, couponType: String? = nil, dateMeta: CouponDateMeta? = nil, displayMeta: DisplayMeta? = nil, identifiers: Identifier? = nil, ownership: Ownership? = nil, reason: String? = nil, restrictions: Restrictions? = nil, rule: [Rule]? = nil, ruleDefinition: RuleDefinition? = nil, state: State? = nil, tags: [String]? = nil, typeSlug: String, validation: Validation? = nil, validity: Validity? = nil, schedule: CouponSchedule? = nil) { self.dateMeta = dateMeta @@ -109,6 +125,14 @@ public extension PlatformClient.ApplicationClient.Cart { self.code = code + self.couponType = couponType + + self.couponPrefix = couponPrefix + + self.couponCounts = couponCounts + + self.reason = reason + self.typeSlug = typeSlug self.identifiers = identifiers @@ -135,9 +159,16 @@ public extension PlatformClient.ApplicationClient.Cart { - ownership = try container.decode(Ownership.self, forKey: .ownership) + do { + ownership = try container.decode(Ownership.self, forKey: .ownership) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - do { @@ -224,14 +255,28 @@ public extension PlatformClient.ApplicationClient.Cart { - rule = try container.decode([Rule].self, forKey: .rule) + do { + rule = try container.decode([Rule].self, forKey: .rule) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - displayMeta = try container.decode(DisplayMeta.self, forKey: .displayMeta) + do { + displayMeta = try container.decode(DisplayMeta.self, forKey: .displayMeta) + + } 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) @@ -239,25 +284,94 @@ public extension PlatformClient.ApplicationClient.Cart { - typeSlug = try container.decode(String.self, forKey: .typeSlug) + do { + couponType = try container.decode(String.self, forKey: .couponType) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + do { + couponPrefix = try container.decode(String.self, forKey: .couponPrefix) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + - identifiers = try container.decode(Identifier.self, forKey: .identifiers) + do { + couponCounts = try container.decode(Int.self, forKey: .couponCounts) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + do { + reason = try container.decode(String.self, forKey: .reason) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + - validity = try container.decode(Validity.self, forKey: .validity) + typeSlug = try container.decode(String.self, forKey: .typeSlug) - ruleDefinition = try container.decode(RuleDefinition.self, forKey: .ruleDefinition) + do { + identifiers = try container.decode(Identifier.self, forKey: .identifiers) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + do { + validity = try container.decode(Validity.self, forKey: .validity) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + ruleDefinition = try container.decode(RuleDefinition.self, forKey: .ruleDefinition) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -325,6 +439,26 @@ public extension PlatformClient.ApplicationClient.Cart { + try? container.encodeIfPresent(couponType, forKey: .couponType) + + + + + try? container.encodeIfPresent(couponPrefix, forKey: .couponPrefix) + + + + + try? container.encodeIfPresent(couponCounts, forKey: .couponCounts) + + + + + try? container.encodeIfPresent(reason, forKey: .reason) + + + + try? container.encodeIfPresent(typeSlug, forKey: .typeSlug) diff --git a/Sources/code/platform/Models/Cart/CouponValidityCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CouponValidityCartPlatformModel.swift index ba2980eef1..894e3ab615 100644 --- a/Sources/code/platform/Models/Cart/CouponValidityCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CouponValidityCartPlatformModel.swift @@ -26,6 +26,8 @@ public extension PlatformClient.ApplicationClient.Cart { public var discount: Double? + public var errorEn: String? + public enum CodingKeys: String, CodingKey { @@ -41,9 +43,11 @@ public extension PlatformClient.ApplicationClient.Cart { case discount = "discount" + case errorEn = "error_en" + } - public init(code: String? = nil, discount: Double? = nil, displayMessageEn: String? = nil, nextValidationRequired: Bool? = nil, title: String? = nil, valid: Bool? = nil) { + public init(code: String? = nil, discount: Double? = nil, displayMessageEn: String? = nil, errorEn: String? = nil, nextValidationRequired: Bool? = nil, title: String? = nil, valid: Bool? = nil) { self.title = title @@ -57,6 +61,8 @@ public extension PlatformClient.ApplicationClient.Cart { self.discount = discount + self.errorEn = errorEn + } required public init(from decoder: Decoder) throws { @@ -134,6 +140,18 @@ public extension PlatformClient.ApplicationClient.Cart { } + + do { + errorEn = try container.decode(String.self, forKey: .errorEn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -169,6 +187,11 @@ public extension PlatformClient.ApplicationClient.Cart { try? container.encodeIfPresent(discount, forKey: .discount) + + + try? container.encodeIfPresent(errorEn, forKey: .errorEn) + + } } diff --git a/Sources/code/platform/Models/Cart/CouponsResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/CouponsResultCartPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Cart/CouponsResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/CouponsResultCartPlatformModel.swift index 6d3695291a..9fa914df46 100644 --- a/Sources/code/platform/Models/Cart/CouponsResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/CouponsResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: CouponsResponse + Model: CouponsResult Used By: Cart */ - class CouponsResponse: Codable { + class CouponsResult: Codable { public var items: [CouponAdd]? diff --git a/Sources/code/platform/Models/Cart/DeleteAddressResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/DeleteAddressResultCartPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Cart/DeleteAddressResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/DeleteAddressResultCartPlatformModel.swift index 6cf4a3454f..a51d4638bd 100644 --- a/Sources/code/platform/Models/Cart/DeleteAddressResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/DeleteAddressResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: DeleteAddressResponse + Model: DeleteAddressResult Used By: Cart */ - class DeleteAddressResponse: Codable { + class DeleteAddressResult: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Cart/DeleteCartDetailResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/DeleteCartDetailResultCartPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Cart/DeleteCartDetailResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/DeleteCartDetailResultCartPlatformModel.swift index f8704bdb0f..72b526d767 100644 --- a/Sources/code/platform/Models/Cart/DeleteCartDetailResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/DeleteCartDetailResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: DeleteCartDetailResponse + Model: DeleteCartDetailResult Used By: Cart */ - class DeleteCartDetailResponse: Codable { + class DeleteCartDetailResult: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Cart/DeleteCartRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/DeleteCartDetailsCartPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Cart/DeleteCartRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/DeleteCartDetailsCartPlatformModel.swift index 51397bb4f1..62e6e6d3a9 100644 --- a/Sources/code/platform/Models/Cart/DeleteCartRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/DeleteCartDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: DeleteCartRequest + Model: DeleteCartDetails Used By: Cart */ - class DeleteCartRequest: Codable { + class DeleteCartDetails: Codable { public var cartIdList: [String]? diff --git a/Sources/code/platform/Models/Cart/DiscountRuleCartPlatformModel.swift b/Sources/code/platform/Models/Cart/DiscountRuleCartPlatformModel.swift index a924b9179c..268bb689b3 100644 --- a/Sources/code/platform/Models/Cart/DiscountRuleCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/DiscountRuleCartPlatformModel.swift @@ -20,6 +20,8 @@ public extension PlatformClient.ApplicationClient.Cart { public var itemCriteria: ItemCriteria + public var meta: ItemSizeMapping? + public var offer: DiscountOffer @@ -31,11 +33,13 @@ public extension PlatformClient.ApplicationClient.Cart { case itemCriteria = "item_criteria" + case meta = "meta" + case offer = "offer" } - public init(buyCondition: String, discountType: String, itemCriteria: ItemCriteria, offer: DiscountOffer) { + public init(buyCondition: String, discountType: String, itemCriteria: ItemCriteria, meta: ItemSizeMapping? = nil, offer: DiscountOffer) { self.discountType = discountType @@ -43,6 +47,8 @@ public extension PlatformClient.ApplicationClient.Cart { self.itemCriteria = itemCriteria + self.meta = meta + self.offer = offer } @@ -66,6 +72,18 @@ public extension PlatformClient.ApplicationClient.Cart { + do { + meta = try container.decode(ItemSizeMapping.self, forKey: .meta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + offer = try container.decode(DiscountOffer.self, forKey: .offer) @@ -92,6 +110,11 @@ public extension PlatformClient.ApplicationClient.Cart { + try? container.encodeIfPresent(meta, forKey: .meta) + + + + try? container.encodeIfPresent(offer, forKey: .offer) diff --git a/Sources/code/platform/Models/Cart/FreeGiftItemCreationCartPlatformModel.swift b/Sources/code/platform/Models/Cart/FreeGiftItemCreationCartPlatformModel.swift new file mode 100644 index 0000000000..dea5d64062 --- /dev/null +++ b/Sources/code/platform/Models/Cart/FreeGiftItemCreationCartPlatformModel.swift @@ -0,0 +1,87 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: FreeGiftItemCreation + Used By: Cart + */ + + class FreeGiftItemCreation: Codable { + + + public var promotionId: String + + public var itemId: String + + public var itemSize: String + + + public enum CodingKeys: String, CodingKey { + + case promotionId = "promotion_id" + + case itemId = "item_id" + + case itemSize = "item_size" + + } + + public init(itemId: String, itemSize: String, promotionId: String) { + + self.promotionId = promotionId + + self.itemId = itemId + + self.itemSize = itemSize + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + promotionId = try container.decode(String.self, forKey: .promotionId) + + + + + itemId = try container.decode(String.self, forKey: .itemId) + + + + + itemSize = try container.decode(String.self, forKey: .itemSize) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(promotionId, forKey: .promotionId) + + + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + + try? container.encodeIfPresent(itemSize, forKey: .itemSize) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/FreeGiftItemsCartPlatformModel.swift b/Sources/code/platform/Models/Cart/FreeGiftItemsCartPlatformModel.swift index 766887e817..78795467c8 100644 --- a/Sources/code/platform/Models/Cart/FreeGiftItemsCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/FreeGiftItemsCartPlatformModel.swift @@ -20,10 +20,16 @@ public extension PlatformClient.ApplicationClient.Cart { public var itemPriceDetails: ItemPriceDetails? + public var articlePrice: ArticlePriceDetails? + public var itemBrandName: String? public var itemId: Int? + public var availableSizes: [String]? + + public var size: String? + public var itemImagesUrl: [String]? @@ -35,15 +41,21 @@ public extension PlatformClient.ApplicationClient.Cart { case itemPriceDetails = "item_price_details" + case articlePrice = "article_price" + case itemBrandName = "item_brand_name" case itemId = "item_id" + case availableSizes = "available_sizes" + + case size = "size" + case itemImagesUrl = "item_images_url" } - public init(itemBrandName: String? = nil, itemId: Int? = nil, itemImagesUrl: [String]? = nil, itemName: String? = nil, itemPriceDetails: ItemPriceDetails? = nil, itemSlug: String? = nil) { + public init(articlePrice: ArticlePriceDetails? = nil, availableSizes: [String]? = nil, itemBrandName: String? = nil, itemId: Int? = nil, itemImagesUrl: [String]? = nil, itemName: String? = nil, itemPriceDetails: ItemPriceDetails? = nil, itemSlug: String? = nil, size: String? = nil) { self.itemSlug = itemSlug @@ -51,10 +63,16 @@ public extension PlatformClient.ApplicationClient.Cart { self.itemPriceDetails = itemPriceDetails + self.articlePrice = articlePrice + self.itemBrandName = itemBrandName self.itemId = itemId + self.availableSizes = availableSizes + + self.size = size + self.itemImagesUrl = itemImagesUrl } @@ -99,6 +117,18 @@ public extension PlatformClient.ApplicationClient.Cart { + do { + articlePrice = try container.decode(ArticlePriceDetails.self, forKey: .articlePrice) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { itemBrandName = try container.decode(String.self, forKey: .itemBrandName) @@ -123,6 +153,30 @@ public extension PlatformClient.ApplicationClient.Cart { + do { + availableSizes = try container.decode([String].self, forKey: .availableSizes) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + do { itemImagesUrl = try container.decode([String].self, forKey: .itemImagesUrl) @@ -156,6 +210,11 @@ public extension PlatformClient.ApplicationClient.Cart { + try? container.encodeIfPresent(articlePrice, forKey: .articlePrice) + + + + try? container.encodeIfPresent(itemBrandName, forKey: .itemBrandName) @@ -166,6 +225,16 @@ public extension PlatformClient.ApplicationClient.Cart { + try? container.encodeIfPresent(availableSizes, forKey: .availableSizes) + + + + + try? container.encodeIfPresent(size, forKey: .size) + + + + try? container.encodeIfPresent(itemImagesUrl, forKey: .itemImagesUrl) diff --git a/Sources/code/platform/Models/Cart/GetCouponResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/GetCouponResultCartPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Cart/GetCouponResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/GetCouponResultCartPlatformModel.swift index 72303e9533..61cb05221e 100644 --- a/Sources/code/platform/Models/Cart/GetCouponResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/GetCouponResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: GetCouponResponse + Model: GetCouponResult Used By: Cart */ - class GetCouponResponse: Codable { + class GetCouponResult: Codable { public var availableCouponList: [Coupon]? diff --git a/Sources/code/platform/Models/Cart/GetPriceAdjustmentResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/GetPriceAdjustmentResultCartPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Cart/GetPriceAdjustmentResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/GetPriceAdjustmentResultCartPlatformModel.swift index 3e744d5002..f55753e35b 100644 --- a/Sources/code/platform/Models/Cart/GetPriceAdjustmentResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/GetPriceAdjustmentResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: GetPriceAdjustmentResponse + Model: GetPriceAdjustmentResult Used By: Cart */ - class GetPriceAdjustmentResponse: Codable { + class GetPriceAdjustmentResult: Codable { public var data: [PriceAdjustment]? diff --git a/Sources/code/platform/Models/Cart/GetShareCartLinkRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/GetShareCartLinkCreationCartPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Cart/GetShareCartLinkRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/GetShareCartLinkCreationCartPlatformModel.swift index 72d04c894c..680649e419 100644 --- a/Sources/code/platform/Models/Cart/GetShareCartLinkRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/GetShareCartLinkCreationCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: GetShareCartLinkRequest + Model: GetShareCartLinkCreation Used By: Cart */ - class GetShareCartLinkRequest: Codable { + class GetShareCartLinkCreation: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Cart/GetShareCartLinkResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/GetShareCartLinkResultCartPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Cart/GetShareCartLinkResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/GetShareCartLinkResultCartPlatformModel.swift index bfea5dde24..e32d2f7333 100644 --- a/Sources/code/platform/Models/Cart/GetShareCartLinkResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/GetShareCartLinkResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: GetShareCartLinkResponse + Model: GetShareCartLinkResult Used By: Cart */ - class GetShareCartLinkResponse: Codable { + class GetShareCartLinkResult: Codable { public var token: String? diff --git a/Sources/code/platform/Models/Cart/PlatformGetAddressesResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/ItemSizeMappingCartPlatformModel.swift similarity index 68% rename from Sources/code/platform/Models/Cart/PlatformGetAddressesResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/ItemSizeMappingCartPlatformModel.swift index 3961d8660b..621ecfab87 100644 --- a/Sources/code/platform/Models/Cart/PlatformGetAddressesResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/ItemSizeMappingCartPlatformModel.swift @@ -7,25 +7,25 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PlatformGetAddressesResponse + Model: ItemSizeMapping Used By: Cart */ - class PlatformGetAddressesResponse: Codable { + class ItemSizeMapping: Codable { - public var address: [PlatformAddress]? + public var itemSizeMapping: [String: Any]? public enum CodingKeys: String, CodingKey { - case address = "address" + case itemSizeMapping = "item_size_mapping" } - public init(address: [PlatformAddress]? = nil) { + public init(itemSizeMapping: [String: Any]? = nil) { - self.address = address + self.itemSizeMapping = itemSizeMapping } @@ -34,7 +34,7 @@ public extension PlatformClient.ApplicationClient.Cart { do { - address = try container.decode([PlatformAddress].self, forKey: .address) + itemSizeMapping = try container.decode([String: Any].self, forKey: .itemSizeMapping) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -51,7 +51,7 @@ public extension PlatformClient.ApplicationClient.Cart { - try? container.encodeIfPresent(address, forKey: .address) + try? container.encodeIfPresent(itemSizeMapping, forKey: .itemSizeMapping) } diff --git a/Sources/code/platform/Models/Cart/MultiCartResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/MultiCartResultCartPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Cart/MultiCartResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/MultiCartResultCartPlatformModel.swift index 9b1609a2f7..43895de7d9 100644 --- a/Sources/code/platform/Models/Cart/MultiCartResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/MultiCartResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: MultiCartResponse + Model: MultiCartResult Used By: Cart */ - class MultiCartResponse: Codable { + class MultiCartResult: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Cart/OpenApiCartServiceabilityRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/OpenApiCartServiceabilityCreationCartPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Cart/OpenApiCartServiceabilityRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/OpenApiCartServiceabilityCreationCartPlatformModel.swift index e15f9c5761..ad59e32b84 100644 --- a/Sources/code/platform/Models/Cart/OpenApiCartServiceabilityRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/OpenApiCartServiceabilityCreationCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: OpenApiCartServiceabilityRequest + Model: OpenApiCartServiceabilityCreation Used By: Cart */ - class OpenApiCartServiceabilityRequest: Codable { + class OpenApiCartServiceabilityCreation: Codable { public var cartItems: [CartItem] diff --git a/Sources/code/platform/Models/Cart/OpenApiCartServiceabilityResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/OpenApiCartServiceabilityResultCartPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Cart/OpenApiCartServiceabilityResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/OpenApiCartServiceabilityResultCartPlatformModel.swift index bf729b3f21..d42732d23a 100644 --- a/Sources/code/platform/Models/Cart/OpenApiCartServiceabilityResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/OpenApiCartServiceabilityResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: OpenApiCartServiceabilityResponse + Model: OpenApiCartServiceabilityResult Used By: Cart */ - class OpenApiCartServiceabilityResponse: Codable { + class OpenApiCartServiceabilityResult: Codable { public var isValid: Bool? diff --git a/Sources/code/platform/Models/Cart/OpenApiCheckoutResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/OpenApiCheckoutResultCartPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Cart/OpenApiCheckoutResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/OpenApiCheckoutResultCartPlatformModel.swift index 7db9c1c89f..3d1d79a577 100644 --- a/Sources/code/platform/Models/Cart/OpenApiCheckoutResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/OpenApiCheckoutResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: OpenApiCheckoutResponse + Model: OpenApiCheckoutResult Used By: Cart */ - class OpenApiCheckoutResponse: Codable { + class OpenApiCheckoutResult: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Cart/OpenApiErrorResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/OpenApiErrorResultCartPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Cart/OpenApiErrorResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/OpenApiErrorResultCartPlatformModel.swift index 025325a580..22d567fa5f 100644 --- a/Sources/code/platform/Models/Cart/OpenApiErrorResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/OpenApiErrorResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: OpenApiErrorResponse + Model: OpenApiErrorResult Used By: Cart */ - class OpenApiErrorResponse: Codable { + class OpenApiErrorResult: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Cart/OpenapiCartDetailsRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/OpenapiCartDetailsCreationCartPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Cart/OpenapiCartDetailsRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/OpenapiCartDetailsCreationCartPlatformModel.swift index 4f0737a99d..31a04b8625 100644 --- a/Sources/code/platform/Models/Cart/OpenapiCartDetailsRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/OpenapiCartDetailsCreationCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: OpenapiCartDetailsRequest + Model: OpenapiCartDetailsCreation Used By: Cart */ - class OpenapiCartDetailsRequest: Codable { + class OpenapiCartDetailsCreation: Codable { public var cartItems: [CartItem] diff --git a/Sources/code/platform/Models/Cart/OpenapiCartDetailsResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/OpenapiCartDetailsResultCartPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Cart/OpenapiCartDetailsResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/OpenapiCartDetailsResultCartPlatformModel.swift index 78e3251c74..ae4043d829 100644 --- a/Sources/code/platform/Models/Cart/OpenapiCartDetailsResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/OpenapiCartDetailsResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: OpenapiCartDetailsResponse + Model: OpenapiCartDetailsResult Used By: Cart */ - class OpenapiCartDetailsResponse: Codable { + class OpenapiCartDetailsResult: Codable { public var isValid: Bool? diff --git a/Sources/code/platform/Models/Cart/OperationErrorResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/OperationErrorResultCartPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Cart/OperationErrorResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/OperationErrorResultCartPlatformModel.swift index f91000cabd..b2d5f87168 100644 --- a/Sources/code/platform/Models/Cart/OperationErrorResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/OperationErrorResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: OperationErrorResponse + Model: OperationErrorResult Used By: Cart */ - class OperationErrorResponse: Codable { + class OperationErrorResult: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Cart/OverrideCheckoutResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/OverrideCheckoutResultCartPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Cart/OverrideCheckoutResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/OverrideCheckoutResultCartPlatformModel.swift index e00789ab54..87a7c844c8 100644 --- a/Sources/code/platform/Models/Cart/OverrideCheckoutResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/OverrideCheckoutResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: OverrideCheckoutResponse + Model: OverrideCheckoutResult Used By: Cart */ - class OverrideCheckoutResponse: Codable { + class OverrideCheckoutResult: Codable { public var data: [String: Any] diff --git a/Sources/code/platform/Models/Cart/Ownership1CartPlatformModel.swift b/Sources/code/platform/Models/Cart/Ownership1CartPlatformModel.swift index da40058ee7..e7b77ed429 100644 --- a/Sources/code/platform/Models/Cart/Ownership1CartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/Ownership1CartPlatformModel.swift @@ -14,9 +14,9 @@ public extension PlatformClient.ApplicationClient.Cart { class Ownership1: Codable { - public var payableCategory: String + public var payableCategory: String? - public var payableBy: String + public var payableBy: String? public enum CodingKeys: String, CodingKey { @@ -27,7 +27,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(payableBy: String, payableCategory: String) { + public init(payableBy: String? = nil, payableCategory: String? = nil) { self.payableCategory = payableCategory @@ -39,14 +39,28 @@ public extension PlatformClient.ApplicationClient.Cart { let container = try decoder.container(keyedBy: CodingKeys.self) - payableCategory = try container.decode(String.self, forKey: .payableCategory) + do { + payableCategory = try container.decode(String.self, forKey: .payableCategory) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - payableBy = try container.decode(String.self, forKey: .payableBy) + do { + payableBy = try container.decode(String.self, forKey: .payableBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - } diff --git a/Sources/code/platform/Models/Cart/OwnershipCartPlatformModel.swift b/Sources/code/platform/Models/Cart/OwnershipCartPlatformModel.swift index 3f12beb857..a9acb065cd 100644 --- a/Sources/code/platform/Models/Cart/OwnershipCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/OwnershipCartPlatformModel.swift @@ -16,7 +16,7 @@ public extension PlatformClient.ApplicationClient.Cart { public var payableCategory: String - public var payableBy: String + public var payableBy: String? public enum CodingKeys: String, CodingKey { @@ -27,7 +27,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(payableBy: String, payableCategory: String) { + public init(payableBy: String? = nil, payableCategory: String) { self.payableCategory = payableCategory @@ -44,9 +44,16 @@ public extension PlatformClient.ApplicationClient.Cart { - payableBy = try container.decode(String.self, forKey: .payableBy) + do { + payableBy = try container.decode(String.self, forKey: .payableBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - } diff --git a/Sources/code/platform/Models/Cart/PlatformAddCartRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PlatformAddCartDetailsCartPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Cart/PlatformAddCartRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/PlatformAddCartDetailsCartPlatformModel.swift index ab1565b253..b2b429f26a 100644 --- a/Sources/code/platform/Models/Cart/PlatformAddCartRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PlatformAddCartDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PlatformAddCartRequest + Model: PlatformAddCartDetails Used By: Cart */ - class PlatformAddCartRequest: Codable { + class PlatformAddCartDetails: Codable { public var userId: String? diff --git a/Sources/code/platform/Models/Cart/PlatformCartCheckoutDetailCreationCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PlatformCartCheckoutDetailCreationCartPlatformModel.swift new file mode 100644 index 0000000000..a426cff076 --- /dev/null +++ b/Sources/code/platform/Models/Cart/PlatformCartCheckoutDetailCreationCartPlatformModel.swift @@ -0,0 +1,731 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: PlatformCartCheckoutDetailCreation + Used By: Cart + */ + + class PlatformCartCheckoutDetailCreation: Codable { + + + public var customMeta: [CartCheckoutCustomMeta]? + + public var addressId: String? + + public var paymentIdentifier: String? + + public var paymentParams: [String: Any]? + + public var paymentAutoConfirm: Bool? + + public var id: String + + public var pos: Bool? + + public var billingAddressId: String? + + public var merchantCode: String? + + public var aggregator: String? + + public var pickAtStoreUid: Int? + + public var deviceId: String? + + public var deliveryAddress: [String: Any]? + + public var paymentMode: String + + public var checkoutMode: String? + + public var customerDetails: CustomerDetails? + + public var meta: [String: Any]? + + public var staff: StaffCheckout? + + public var employeeCode: String? + + public var billingAddress: [String: Any]? + + public var callbackUrl: String? + + public var userId: String? + + public var extraMeta: [String: Any]? + + public var orderType: String + + public var files: [Files]? + + public var orderingStore: Int? + + public var paymentExtraIdentifiers: [String: Any]? + + public var iin: String? + + public var network: String? + + public var type: String? + + public var cardId: String? + + + public enum CodingKeys: String, CodingKey { + + case customMeta = "custom_meta" + + case addressId = "address_id" + + case paymentIdentifier = "payment_identifier" + + case paymentParams = "payment_params" + + case paymentAutoConfirm = "payment_auto_confirm" + + case id = "id" + + case pos = "pos" + + case billingAddressId = "billing_address_id" + + case merchantCode = "merchant_code" + + case aggregator = "aggregator" + + case pickAtStoreUid = "pick_at_store_uid" + + case deviceId = "device_id" + + case deliveryAddress = "delivery_address" + + case paymentMode = "payment_mode" + + case checkoutMode = "checkout_mode" + + case customerDetails = "customer_details" + + case meta = "meta" + + case staff = "staff" + + case employeeCode = "employee_code" + + case billingAddress = "billing_address" + + case callbackUrl = "callback_url" + + case userId = "user_id" + + case extraMeta = "extra_meta" + + case orderType = "order_type" + + case files = "files" + + case orderingStore = "ordering_store" + + case paymentExtraIdentifiers = "payment_extra_identifiers" + + case iin = "iin" + + case network = "network" + + case type = "type" + + case cardId = "card_id" + + } + + public init(addressId: String? = nil, aggregator: String? = nil, billingAddress: [String: Any]? = nil, billingAddressId: String? = nil, callbackUrl: String? = nil, cardId: String? = nil, checkoutMode: String? = nil, customerDetails: CustomerDetails? = nil, customMeta: [CartCheckoutCustomMeta]? = nil, deliveryAddress: [String: Any]? = nil, deviceId: String? = nil, employeeCode: String? = nil, extraMeta: [String: Any]? = nil, files: [Files]? = nil, id: String, iin: String? = nil, merchantCode: String? = nil, meta: [String: Any]? = nil, network: String? = nil, orderingStore: Int? = nil, orderType: String, paymentAutoConfirm: Bool? = nil, paymentExtraIdentifiers: [String: Any]? = nil, paymentIdentifier: String? = nil, paymentMode: String, paymentParams: [String: Any]? = nil, pickAtStoreUid: Int? = nil, pos: Bool? = nil, staff: StaffCheckout? = nil, type: String? = nil, userId: String? = nil) { + + self.customMeta = customMeta + + self.addressId = addressId + + self.paymentIdentifier = paymentIdentifier + + self.paymentParams = paymentParams + + self.paymentAutoConfirm = paymentAutoConfirm + + self.id = id + + self.pos = pos + + self.billingAddressId = billingAddressId + + self.merchantCode = merchantCode + + self.aggregator = aggregator + + self.pickAtStoreUid = pickAtStoreUid + + self.deviceId = deviceId + + self.deliveryAddress = deliveryAddress + + self.paymentMode = paymentMode + + self.checkoutMode = checkoutMode + + self.customerDetails = customerDetails + + self.meta = meta + + self.staff = staff + + self.employeeCode = employeeCode + + self.billingAddress = billingAddress + + self.callbackUrl = callbackUrl + + self.userId = userId + + self.extraMeta = extraMeta + + self.orderType = orderType + + self.files = files + + self.orderingStore = orderingStore + + self.paymentExtraIdentifiers = paymentExtraIdentifiers + + self.iin = iin + + self.network = network + + self.type = type + + self.cardId = cardId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + customMeta = try container.decode([CartCheckoutCustomMeta].self, forKey: .customMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + addressId = try container.decode(String.self, forKey: .addressId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentIdentifier = try container.decode(String.self, forKey: .paymentIdentifier) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentParams = try container.decode([String: Any].self, forKey: .paymentParams) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentAutoConfirm = try container.decode(Bool.self, forKey: .paymentAutoConfirm) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + id = try container.decode(String.self, forKey: .id) + + + + + do { + pos = try container.decode(Bool.self, forKey: .pos) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + billingAddressId = try container.decode(String.self, forKey: .billingAddressId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + merchantCode = try container.decode(String.self, forKey: .merchantCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + aggregator = try container.decode(String.self, forKey: .aggregator) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + pickAtStoreUid = try container.decode(Int.self, forKey: .pickAtStoreUid) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + deviceId = try container.decode(String.self, forKey: .deviceId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + deliveryAddress = try container.decode([String: Any].self, forKey: .deliveryAddress) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + paymentMode = try container.decode(String.self, forKey: .paymentMode) + + + + + do { + checkoutMode = try container.decode(String.self, forKey: .checkoutMode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + customerDetails = try container.decode(CustomerDetails.self, forKey: .customerDetails) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + staff = try container.decode(StaffCheckout.self, forKey: .staff) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + employeeCode = try container.decode(String.self, forKey: .employeeCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + billingAddress = try container.decode([String: Any].self, forKey: .billingAddress) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + callbackUrl = try container.decode(String.self, forKey: .callbackUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + extraMeta = try container.decode([String: Any].self, forKey: .extraMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + orderType = try container.decode(String.self, forKey: .orderType) + + + + + do { + files = try container.decode([Files].self, forKey: .files) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderingStore = try container.decode(Int.self, forKey: .orderingStore) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentExtraIdentifiers = try container.decode([String: Any].self, forKey: .paymentExtraIdentifiers) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + iin = try container.decode(String.self, forKey: .iin) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + network = try container.decode(String.self, forKey: .network) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + cardId = try container.decode(String.self, forKey: .cardId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(customMeta, forKey: .customMeta) + + + + + try? container.encodeIfPresent(addressId, forKey: .addressId) + + + + + try? container.encodeIfPresent(paymentIdentifier, forKey: .paymentIdentifier) + + + + + try? container.encodeIfPresent(paymentParams, forKey: .paymentParams) + + + + + try? container.encodeIfPresent(paymentAutoConfirm, forKey: .paymentAutoConfirm) + + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(pos, forKey: .pos) + + + + + try? container.encodeIfPresent(billingAddressId, forKey: .billingAddressId) + + + + + try? container.encodeIfPresent(merchantCode, forKey: .merchantCode) + + + + + try? container.encodeIfPresent(aggregator, forKey: .aggregator) + + + + + try? container.encodeIfPresent(pickAtStoreUid, forKey: .pickAtStoreUid) + + + + + try? container.encodeIfPresent(deviceId, forKey: .deviceId) + + + + + try? container.encodeIfPresent(deliveryAddress, forKey: .deliveryAddress) + + + + + try? container.encodeIfPresent(paymentMode, forKey: .paymentMode) + + + + + try? container.encodeIfPresent(checkoutMode, forKey: .checkoutMode) + + + + + try? container.encodeIfPresent(customerDetails, forKey: .customerDetails) + + + + + try? container.encodeIfPresent(meta, forKey: .meta) + + + + + try? container.encodeIfPresent(staff, forKey: .staff) + + + + + try? container.encodeIfPresent(employeeCode, forKey: .employeeCode) + + + + + try? container.encodeIfPresent(billingAddress, forKey: .billingAddress) + + + + + try? container.encodeIfPresent(callbackUrl, forKey: .callbackUrl) + + + + + try? container.encodeIfPresent(userId, forKey: .userId) + + + + + try? container.encodeIfPresent(extraMeta, forKey: .extraMeta) + + + + + try? container.encodeIfPresent(orderType, forKey: .orderType) + + + + + try? container.encodeIfPresent(files, forKey: .files) + + + + + try? container.encodeIfPresent(orderingStore, forKey: .orderingStore) + + + + + try? container.encodeIfPresent(paymentExtraIdentifiers, forKey: .paymentExtraIdentifiers) + + + + + try? container.encodeIfPresent(iin, forKey: .iin) + + + + + try? container.encodeIfPresent(network, forKey: .network) + + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(cardId, forKey: .cardId) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/PlatformCartCheckoutDetailV2RequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PlatformCartCheckoutDetailV2CreationCartPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Cart/PlatformCartCheckoutDetailV2RequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/PlatformCartCheckoutDetailV2CreationCartPlatformModel.swift index fa30ac7650..74381b4000 100644 --- a/Sources/code/platform/Models/Cart/PlatformCartCheckoutDetailV2RequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PlatformCartCheckoutDetailV2CreationCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PlatformCartCheckoutDetailV2Request + Model: PlatformCartCheckoutDetailV2Creation Used By: Cart */ - class PlatformCartCheckoutDetailV2Request: Codable { + class PlatformCartCheckoutDetailV2Creation: Codable { public var addressId: String? @@ -20,7 +20,7 @@ public extension PlatformClient.ApplicationClient.Cart { public var paymentParams: [String: Any]? - public var customMeta: [String: Any]? + public var customMeta: [CartCheckoutCustomMeta]? public var paymentAutoConfirm: Bool? @@ -143,7 +143,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(addressId: String? = nil, aggregator: String? = nil, billingAddress: [String: Any]? = nil, billingAddressId: String? = nil, callbackUrl: String? = nil, cardId: String? = nil, checkoutMode: String? = nil, customerDetails: CustomerDetails? = nil, customMeta: [String: Any]? = nil, deliveryAddress: [String: Any]? = nil, deviceId: String? = nil, employeeCode: String? = nil, extraMeta: [String: Any]? = nil, files: [Files]? = nil, id: String, iin: String? = nil, merchantCode: String? = nil, meta: [String: Any]? = nil, network: String? = nil, orderingStore: Int? = nil, orderType: String, paymentAutoConfirm: Bool? = nil, paymentIdentifier: String? = nil, paymentMethods: [PaymentMethod], paymentMode: String? = nil, paymentParams: [String: Any]? = nil, pickAtStoreUid: Int? = nil, pos: Bool? = nil, staff: StaffCheckout? = nil, type: String? = nil, userId: String) { + public init(addressId: String? = nil, aggregator: String? = nil, billingAddress: [String: Any]? = nil, billingAddressId: String? = nil, callbackUrl: String? = nil, cardId: String? = nil, checkoutMode: String? = nil, customerDetails: CustomerDetails? = nil, customMeta: [CartCheckoutCustomMeta]? = nil, deliveryAddress: [String: Any]? = nil, deviceId: String? = nil, employeeCode: String? = nil, extraMeta: [String: Any]? = nil, files: [Files]? = nil, id: String, iin: String? = nil, merchantCode: String? = nil, meta: [String: Any]? = nil, network: String? = nil, orderingStore: Int? = nil, orderType: String, paymentAutoConfirm: Bool? = nil, paymentIdentifier: String? = nil, paymentMethods: [PaymentMethod], paymentMode: String? = nil, paymentParams: [String: Any]? = nil, pickAtStoreUid: Int? = nil, pos: Bool? = nil, staff: StaffCheckout? = nil, type: String? = nil, userId: String) { self.addressId = addressId @@ -250,7 +250,7 @@ public extension PlatformClient.ApplicationClient.Cart { do { - customMeta = try container.decode([String: Any].self, forKey: .customMeta) + customMeta = try container.decode([CartCheckoutCustomMeta].self, forKey: .customMeta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Cart/PlatformCartMetaRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PlatformCartMetaCreationCartPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Cart/PlatformCartMetaRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/PlatformCartMetaCreationCartPlatformModel.swift index 2fd73d9f5c..ed081134f2 100644 --- a/Sources/code/platform/Models/Cart/PlatformCartMetaRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PlatformCartMetaCreationCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PlatformCartMetaRequest + Model: PlatformCartMetaCreation Used By: Cart */ - class PlatformCartMetaRequest: Codable { + class PlatformCartMetaCreation: Codable { public var gstin: String? diff --git a/Sources/code/platform/Models/Cart/PlatformCartShipmentsResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PlatformCartShipmentsResultCartPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Cart/PlatformCartShipmentsResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/PlatformCartShipmentsResultCartPlatformModel.swift index c8cc9891e7..7edab4b8fb 100644 --- a/Sources/code/platform/Models/Cart/PlatformCartShipmentsResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PlatformCartShipmentsResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PlatformCartShipmentsResponse + Model: PlatformCartShipmentsResult Used By: Cart */ - class PlatformCartShipmentsResponse: Codable { + class PlatformCartShipmentsResult: Codable { public var couponText: String? @@ -40,7 +40,7 @@ public extension PlatformClient.ApplicationClient.Cart { public var isValid: Bool? - public var shipments: [PlatformShipmentResponse]? + public var shipments: [PlatformShipmentDetails]? public var currency: CartCurrency? @@ -111,7 +111,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(appliedPromoDetails: [AppliedPromotion]? = nil, breakupValues: CartBreakup? = nil, buyNow: Bool? = nil, checkoutMode: String? = nil, comment: String? = nil, couponText: String? = nil, currency: CartCurrency? = nil, customCartMeta: [String: Any]? = nil, deliveryChargeInfo: String? = nil, deliveryPromise: ShipmentPromise? = nil, error: Bool? = nil, gstin: String? = nil, id: String? = nil, isValid: Bool? = nil, items: [CartProductInfo]? = nil, lastModified: String? = nil, message: String? = nil, panConfig: [String: Any]? = nil, panNo: String? = nil, paymentSelectionLock: PaymentSelectionLock? = nil, restrictCheckout: Bool? = nil, shipments: [PlatformShipmentResponse]? = nil, staffUserId: String? = nil) { + public init(appliedPromoDetails: [AppliedPromotion]? = nil, breakupValues: CartBreakup? = nil, buyNow: Bool? = nil, checkoutMode: String? = nil, comment: String? = nil, couponText: String? = nil, currency: CartCurrency? = nil, customCartMeta: [String: Any]? = nil, deliveryChargeInfo: String? = nil, deliveryPromise: ShipmentPromise? = nil, error: Bool? = nil, gstin: String? = nil, id: String? = nil, isValid: Bool? = nil, items: [CartProductInfo]? = nil, lastModified: String? = nil, message: String? = nil, panConfig: [String: Any]? = nil, panNo: String? = nil, paymentSelectionLock: PaymentSelectionLock? = nil, restrictCheckout: Bool? = nil, shipments: [PlatformShipmentDetails]? = nil, staffUserId: String? = nil) { self.couponText = couponText @@ -322,7 +322,7 @@ public extension PlatformClient.ApplicationClient.Cart { do { - shipments = try container.decode([PlatformShipmentResponse].self, forKey: .shipments) + shipments = try container.decode([PlatformShipmentDetails].self, forKey: .shipments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Cart/PlatformGetAddressesDetailsCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PlatformGetAddressesDetailsCartPlatformModel.swift new file mode 100644 index 0000000000..186491f57c --- /dev/null +++ b/Sources/code/platform/Models/Cart/PlatformGetAddressesDetailsCartPlatformModel.swift @@ -0,0 +1,85 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: PlatformGetAddressesDetails + Used By: Cart + */ + + class PlatformGetAddressesDetails: Codable { + + + public var address: [PlatformAddress]? + + public var validationConfig: ValidationConfig? + + + public enum CodingKeys: String, CodingKey { + + case address = "address" + + case validationConfig = "validation_config" + + } + + public init(address: [PlatformAddress]? = nil, validationConfig: ValidationConfig? = nil) { + + self.address = address + + self.validationConfig = validationConfig + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + address = try container.decode([PlatformAddress].self, forKey: .address) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + validationConfig = try container.decode(ValidationConfig.self, forKey: .validationConfig) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(address, forKey: .address) + + + + + try? container.encodeIfPresent(validationConfig, forKey: .validationConfig) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/PlatformSelectCartAddressRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PlatformSelectCartAddressCartPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Cart/PlatformSelectCartAddressRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/PlatformSelectCartAddressCartPlatformModel.swift index 4478011f08..9b078b6208 100644 --- a/Sources/code/platform/Models/Cart/PlatformSelectCartAddressRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PlatformSelectCartAddressCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PlatformSelectCartAddressRequest + Model: PlatformSelectCartAddress Used By: Cart */ - class PlatformSelectCartAddressRequest: Codable { + class PlatformSelectCartAddress: Codable { public var cartId: String? diff --git a/Sources/code/platform/Models/Cart/PlatformShipmentResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PlatformShipmentDetailsCartPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Cart/PlatformShipmentResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/PlatformShipmentDetailsCartPlatformModel.swift index 8ce44f55d2..004ae84b92 100644 --- a/Sources/code/platform/Models/Cart/PlatformShipmentResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PlatformShipmentDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PlatformShipmentResponse + Model: PlatformShipmentDetails Used By: Cart */ - class PlatformShipmentResponse: Codable { + class PlatformShipmentDetails: Codable { public var shipments: Int? diff --git a/Sources/code/platform/Models/AuditTrail/ModifierAuditTrailPlatformModel.swift b/Sources/code/platform/Models/Cart/PlatformUpdateCartDetailsCartPlatformModel.swift similarity index 60% rename from Sources/code/platform/Models/AuditTrail/ModifierAuditTrailPlatformModel.swift rename to Sources/code/platform/Models/Cart/PlatformUpdateCartDetailsCartPlatformModel.swift index db46872cda..94751581b8 100644 --- a/Sources/code/platform/Models/AuditTrail/ModifierAuditTrailPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PlatformUpdateCartDetailsCartPlatformModel.swift @@ -3,39 +3,47 @@ import Foundation -public extension PlatformClient.AuditTrail { + + +public extension PlatformClient.ApplicationClient.Cart { /* - Model: Modifier - Used By: AuditTrail + Model: PlatformUpdateCartDetails + Used By: Cart */ - class Modifier: Codable { + class PlatformUpdateCartDetails: Codable { public var userId: String? - public var asAdministrator: Bool? + public var items: [UpdateProductCart]? - public var userDetails: [String: Any]? + public var freeGiftItems: [FreeGiftItemCreation]? + + public var operation: String public enum CodingKeys: String, CodingKey { case userId = "user_id" - case asAdministrator = "as_administrator" + case items = "items" + + case freeGiftItems = "free_gift_items" - case userDetails = "user_details" + case operation = "operation" } - public init(asAdministrator: Bool? = nil, userDetails: [String: Any]? = nil, userId: String? = nil) { + public init(freeGiftItems: [FreeGiftItemCreation]? = nil, items: [UpdateProductCart]? = nil, operation: String, userId: String? = nil) { self.userId = userId - self.asAdministrator = asAdministrator + self.items = items - self.userDetails = userDetails + self.freeGiftItems = freeGiftItems + + self.operation = operation } @@ -56,7 +64,7 @@ public extension PlatformClient.AuditTrail { do { - asAdministrator = try container.decode(Bool.self, forKey: .asAdministrator) + items = try container.decode([UpdateProductCart].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +76,7 @@ public extension PlatformClient.AuditTrail { do { - userDetails = try container.decode([String: Any].self, forKey: .userDetails) + freeGiftItems = try container.decode([FreeGiftItemCreation].self, forKey: .freeGiftItems) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -78,6 +86,11 @@ public extension PlatformClient.AuditTrail { } + + operation = try container.decode(String.self, forKey: .operation) + + + } public func encode(to encoder: Encoder) throws { @@ -90,12 +103,17 @@ public extension PlatformClient.AuditTrail { - try? container.encodeIfPresent(asAdministrator, forKey: .asAdministrator) + try? container.encodeIfPresent(items, forKey: .items) + + + + try? container.encodeIfPresent(freeGiftItems, forKey: .freeGiftItems) - try? container.encodeIfPresent(userDetails, forKey: .userDetails) + + try? container.encodeIfPresent(operation, forKey: .operation) } @@ -104,5 +122,3 @@ public extension PlatformClient.AuditTrail { } - - diff --git a/Sources/code/platform/Models/Cart/PriceAdjustmentResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PriceAdjustmentResultCartPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Cart/PriceAdjustmentResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/PriceAdjustmentResultCartPlatformModel.swift index 0515c3590d..3a680e3901 100644 --- a/Sources/code/platform/Models/Cart/PriceAdjustmentResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PriceAdjustmentResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PriceAdjustmentResponse + Model: PriceAdjustmentResult Used By: Cart */ - class PriceAdjustmentResponse: Codable { + class PriceAdjustmentResult: Codable { public var data: PriceAdjustment? diff --git a/Sources/code/platform/Models/Cart/ProductActionCartPlatformModel.swift b/Sources/code/platform/Models/Cart/ProductActionCartPlatformModel.swift index c8e2a75c27..a36630bd97 100644 --- a/Sources/code/platform/Models/Cart/ProductActionCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/ProductActionCartPlatformModel.swift @@ -20,6 +20,8 @@ public extension PlatformClient.ApplicationClient.Cart { public var query: ActionQuery? + public var page: ProductActionPage? + public enum CodingKeys: String, CodingKey { @@ -29,9 +31,11 @@ public extension PlatformClient.ApplicationClient.Cart { case query = "query" + case page = "page" + } - public init(query: ActionQuery? = nil, type: String? = nil, url: String? = nil) { + public init(page: ProductActionPage? = nil, query: ActionQuery? = nil, type: String? = nil, url: String? = nil) { self.type = type @@ -39,6 +43,8 @@ public extension PlatformClient.ApplicationClient.Cart { self.query = query + self.page = page + } required public init(from decoder: Decoder) throws { @@ -80,6 +86,18 @@ public extension PlatformClient.ApplicationClient.Cart { } + + do { + page = try container.decode(ProductActionPage.self, forKey: .page) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -100,6 +118,11 @@ public extension PlatformClient.ApplicationClient.Cart { try? container.encodeIfPresent(query, forKey: .query) + + + try? container.encodeIfPresent(page, forKey: .page) + + } } diff --git a/Sources/code/platform/Models/Cart/ProductActionPageCartPlatformModel.swift b/Sources/code/platform/Models/Cart/ProductActionPageCartPlatformModel.swift new file mode 100644 index 0000000000..42b497a911 --- /dev/null +++ b/Sources/code/platform/Models/Cart/ProductActionPageCartPlatformModel.swift @@ -0,0 +1,85 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: ProductActionPage + Used By: Cart + */ + + class ProductActionPage: Codable { + + + public var type: String? + + public var params: ProductActionParams? + + + public enum CodingKeys: String, CodingKey { + + case type = "type" + + case params = "params" + + } + + public init(params: ProductActionParams? = nil, type: String? = nil) { + + self.type = type + + 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) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + params = try container.decode(ProductActionParams.self, forKey: .params) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/ProductActionParamsCartPlatformModel.swift b/Sources/code/platform/Models/Cart/ProductActionParamsCartPlatformModel.swift new file mode 100644 index 0000000000..1c03ff1de6 --- /dev/null +++ b/Sources/code/platform/Models/Cart/ProductActionParamsCartPlatformModel.swift @@ -0,0 +1,62 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: ProductActionParams + Used By: Cart + */ + + class ProductActionParams: Codable { + + + public var slug: [String]? + + + public enum CodingKeys: String, CodingKey { + + case slug = "slug" + + } + + public init(slug: [String]? = nil) { + + self.slug = slug + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + slug = try container.decode([String].self, forKey: .slug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(slug, forKey: .slug) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/PromotionActionCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionActionCartPlatformModel.swift index 05a8a932a7..d25b9c86c2 100644 --- a/Sources/code/platform/Models/Cart/PromotionActionCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PromotionActionCartPlatformModel.swift @@ -14,9 +14,9 @@ public extension PlatformClient.ApplicationClient.Cart { class PromotionAction: Codable { - public var actionDate: String + public var actionDate: String? - public var actionType: String + public var actionType: String? public enum CodingKeys: String, CodingKey { @@ -27,7 +27,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(actionDate: String, actionType: String) { + public init(actionDate: String? = nil, actionType: String? = nil) { self.actionDate = actionDate @@ -39,14 +39,28 @@ public extension PlatformClient.ApplicationClient.Cart { let container = try decoder.container(keyedBy: CodingKeys.self) - actionDate = try container.decode(String.self, forKey: .actionDate) + do { + actionDate = try container.decode(String.self, forKey: .actionDate) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - actionType = try container.decode(String.self, forKey: .actionType) + do { + actionType = try container.decode(String.self, forKey: .actionType) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - } diff --git a/Sources/code/platform/Models/Cart/PromotionAddCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionAddCartPlatformModel.swift index 5e9195bfde..5d17a8d969 100644 --- a/Sources/code/platform/Models/Cart/PromotionAddCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PromotionAddCartPlatformModel.swift @@ -26,13 +26,13 @@ public extension PlatformClient.ApplicationClient.Cart { public var applyAllDiscount: Bool? - public var displayMeta: DisplayMeta1 + public var displayMeta: DisplayMeta1? - public var ownership: Ownership1 + public var ownership: Ownership1? public var promotionType: String - public var discountRules: [DiscountRule] + public var discountRules: [DiscountRule]? public var restrictions: Restrictions1? @@ -52,7 +52,7 @@ public extension PlatformClient.ApplicationClient.Cart { public var applicationId: String - public var buyRules: [String: ItemCriteria] + public var buyRules: ItemCriteria? public var customJson: [String: Any]? @@ -111,7 +111,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(applicationId: String, applyAllDiscount: Bool? = nil, applyExclusive: String? = nil, applyPriority: Int? = nil, author: PromotionAuthor? = nil, buyRules: [String: ItemCriteria], calculateOn: String? = nil, code: String? = nil, currency: String? = nil, dateMeta: PromotionDateMeta? = nil, discountRules: [DiscountRule], displayMeta: DisplayMeta1, mode: String, ownership: Ownership1, postOrderAction: PromotionAction? = nil, promotionType: String, promoGroup: String, restrictions: Restrictions1? = nil, stackable: Bool? = nil, tags: [String]? = nil, visiblility: Visibility? = nil, customJson: [String: Any]? = nil, schedule: PromotionSchedule? = nil) { + public init(applicationId: String, applyAllDiscount: Bool? = nil, applyExclusive: String? = nil, applyPriority: Int? = nil, author: PromotionAuthor? = nil, buyRules: ItemCriteria? = nil, calculateOn: String? = nil, code: String? = nil, currency: String? = nil, dateMeta: PromotionDateMeta? = nil, discountRules: [DiscountRule]? = nil, displayMeta: DisplayMeta1? = nil, mode: String, ownership: Ownership1? = nil, postOrderAction: PromotionAction? = nil, promotionType: String, promoGroup: String, restrictions: Restrictions1? = nil, stackable: Bool? = nil, tags: [String]? = nil, visiblility: Visibility? = nil, customJson: [String: Any]? = nil, schedule: PromotionSchedule? = nil) { self.stackable = stackable @@ -223,14 +223,28 @@ public extension PlatformClient.ApplicationClient.Cart { - displayMeta = try container.decode(DisplayMeta1.self, forKey: .displayMeta) + do { + displayMeta = try container.decode(DisplayMeta1.self, forKey: .displayMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - ownership = try container.decode(Ownership1.self, forKey: .ownership) + do { + ownership = try container.decode(Ownership1.self, forKey: .ownership) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - promotionType = try container.decode(String.self, forKey: .promotionType) @@ -238,9 +252,16 @@ public extension PlatformClient.ApplicationClient.Cart { - discountRules = try container.decode([DiscountRule].self, forKey: .discountRules) + do { + discountRules = try container.decode([DiscountRule].self, forKey: .discountRules) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - do { @@ -344,9 +365,16 @@ public extension PlatformClient.ApplicationClient.Cart { - buyRules = try container.decode([String: ItemCriteria].self, forKey: .buyRules) + do { + buyRules = try container.decode(ItemCriteria.self, forKey: .buyRules) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - do { diff --git a/Sources/code/platform/Models/Cart/PromotionAddResultCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionAddResultCartPlatformModel.swift new file mode 100644 index 0000000000..981154af0d --- /dev/null +++ b/Sources/code/platform/Models/Cart/PromotionAddResultCartPlatformModel.swift @@ -0,0 +1,563 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: PromotionAddResult + Used By: Cart + */ + + class PromotionAddResult: Codable { + + + public var stackable: Bool? + + public var calculateOn: String? + + public var applyExclusive: String? + + public var promoGroup: String + + public var mode: String + + public var isProcessed: Bool? + + public var applyAllDiscount: Bool? + + public var displayMeta: DisplayMeta1? + + public var ownership: Ownership1? + + public var promotionType: String + + public var discountRules: [DiscountRule]? + + public var restrictions: Restrictions1? + + public var currency: String? + + public var code: String? + + public var schedule: PromotionSchedule? + + public var postOrderAction: PromotionAction? + + public var applyPriority: Int? + + public var author: PromotionAuthor? + + public var visiblility: Visibility? + + public var applicationId: String + + public var buyRules: ItemCriteria? + + public var customJson: [String: Any]? + + public var dateMeta: PromotionDateMeta? + + public var tags: [String]? + + + public enum CodingKeys: String, CodingKey { + + case stackable = "stackable" + + case calculateOn = "calculate_on" + + case applyExclusive = "apply_exclusive" + + case promoGroup = "promo_group" + + case mode = "mode" + + case isProcessed = "is_processed" + + case applyAllDiscount = "apply_all_discount" + + case displayMeta = "display_meta" + + case ownership = "ownership" + + case promotionType = "promotion_type" + + case discountRules = "discount_rules" + + case restrictions = "restrictions" + + case currency = "currency" + + case code = "code" + + case schedule = "_schedule" + + case postOrderAction = "post_order_action" + + case applyPriority = "apply_priority" + + case author = "author" + + case visiblility = "visiblility" + + case applicationId = "application_id" + + case buyRules = "buy_rules" + + case customJson = "_custom_json" + + case dateMeta = "date_meta" + + case tags = "tags" + + } + + public init(applicationId: String, applyAllDiscount: Bool? = nil, applyExclusive: String? = nil, applyPriority: Int? = nil, author: PromotionAuthor? = nil, buyRules: ItemCriteria? = nil, calculateOn: String? = nil, code: String? = nil, currency: String? = nil, dateMeta: PromotionDateMeta? = nil, discountRules: [DiscountRule]? = nil, displayMeta: DisplayMeta1? = nil, isProcessed: Bool? = nil, mode: String, ownership: Ownership1? = nil, postOrderAction: PromotionAction? = nil, promotionType: String, promoGroup: String, restrictions: Restrictions1? = nil, stackable: Bool? = nil, tags: [String]? = nil, visiblility: Visibility? = nil, customJson: [String: Any]? = nil, schedule: PromotionSchedule? = nil) { + + self.stackable = stackable + + self.calculateOn = calculateOn + + self.applyExclusive = applyExclusive + + self.promoGroup = promoGroup + + self.mode = mode + + self.isProcessed = isProcessed + + self.applyAllDiscount = applyAllDiscount + + self.displayMeta = displayMeta + + self.ownership = ownership + + self.promotionType = promotionType + + self.discountRules = discountRules + + self.restrictions = restrictions + + self.currency = currency + + self.code = code + + self.schedule = schedule + + self.postOrderAction = postOrderAction + + self.applyPriority = applyPriority + + self.author = author + + self.visiblility = visiblility + + self.applicationId = applicationId + + self.buyRules = buyRules + + self.customJson = customJson + + self.dateMeta = dateMeta + + self.tags = tags + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + stackable = try container.decode(Bool.self, forKey: .stackable) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + calculateOn = try container.decode(String.self, forKey: .calculateOn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + applyExclusive = try container.decode(String.self, forKey: .applyExclusive) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + promoGroup = try container.decode(String.self, forKey: .promoGroup) + + + + + mode = try container.decode(String.self, forKey: .mode) + + + + + do { + isProcessed = try container.decode(Bool.self, forKey: .isProcessed) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + applyAllDiscount = try container.decode(Bool.self, forKey: .applyAllDiscount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + displayMeta = try container.decode(DisplayMeta1.self, forKey: .displayMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + ownership = try container.decode(Ownership1.self, forKey: .ownership) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + promotionType = try container.decode(String.self, forKey: .promotionType) + + + + + do { + discountRules = try container.decode([DiscountRule].self, forKey: .discountRules) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + restrictions = try container.decode(Restrictions1.self, forKey: .restrictions) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + currency = try container.decode(String.self, forKey: .currency) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + code = try container.decode(String.self, forKey: .code) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + schedule = try container.decode(PromotionSchedule.self, forKey: .schedule) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + postOrderAction = try container.decode(PromotionAction.self, forKey: .postOrderAction) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + applyPriority = try container.decode(Int.self, forKey: .applyPriority) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + author = try container.decode(PromotionAuthor.self, forKey: .author) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + visiblility = try container.decode(Visibility.self, forKey: .visiblility) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + applicationId = try container.decode(String.self, forKey: .applicationId) + + + + + do { + buyRules = try container.decode(ItemCriteria.self, forKey: .buyRules) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + dateMeta = try container.decode(PromotionDateMeta.self, forKey: .dateMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(stackable, forKey: .stackable) + + + + + try? container.encodeIfPresent(calculateOn, forKey: .calculateOn) + + + + + try? container.encodeIfPresent(applyExclusive, forKey: .applyExclusive) + + + + + try? container.encodeIfPresent(promoGroup, forKey: .promoGroup) + + + + + try? container.encodeIfPresent(mode, forKey: .mode) + + + + + try? container.encodeIfPresent(isProcessed, forKey: .isProcessed) + + + + + try? container.encodeIfPresent(applyAllDiscount, forKey: .applyAllDiscount) + + + + + try? container.encodeIfPresent(displayMeta, forKey: .displayMeta) + + + + + try? container.encodeIfPresent(ownership, forKey: .ownership) + + + + + try? container.encodeIfPresent(promotionType, forKey: .promotionType) + + + + + try? container.encodeIfPresent(discountRules, forKey: .discountRules) + + + + + try? container.encodeIfPresent(restrictions, forKey: .restrictions) + + + + + try? container.encodeIfPresent(currency, forKey: .currency) + + + + + try? container.encodeIfPresent(code, forKey: .code) + + + + + try? container.encodeIfPresent(schedule, forKey: .schedule) + + + + + try? container.encodeIfPresent(postOrderAction, forKey: .postOrderAction) + + + + + try? container.encodeIfPresent(applyPriority, forKey: .applyPriority) + + + + + try? container.encodeIfPresent(author, forKey: .author) + + + + + try? container.encodeIfPresent(visiblility, forKey: .visiblility) + + + + + try? container.encodeIfPresent(applicationId, forKey: .applicationId) + + + + + try? container.encodeIfPresent(buyRules, forKey: .buyRules) + + + + + try? container.encodeIfPresent(customJson, forKey: .customJson) + + + + + try? container.encodeIfPresent(dateMeta, forKey: .dateMeta) + + + + + try? container.encodeIfPresent(tags, forKey: .tags) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/PromotionAuthorCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionAuthorCartPlatformModel.swift index 542f8bfd46..287c634ddc 100644 --- a/Sources/code/platform/Models/Cart/PromotionAuthorCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PromotionAuthorCartPlatformModel.swift @@ -18,6 +18,12 @@ public extension PlatformClient.ApplicationClient.Cart { public var modifiedBy: String? + public var approvedBy: String? + + public var rejectedBy: String? + + public var reviewedBy: String? + public enum CodingKeys: String, CodingKey { @@ -25,14 +31,26 @@ public extension PlatformClient.ApplicationClient.Cart { case modifiedBy = "modified_by" + case approvedBy = "approved_by" + + case rejectedBy = "rejected_by" + + case reviewedBy = "reviewed_by" + } - public init(createdBy: String? = nil, modifiedBy: String? = nil) { + public init(approvedBy: String? = nil, createdBy: String? = nil, modifiedBy: String? = nil, rejectedBy: String? = nil, reviewedBy: String? = nil) { self.createdBy = createdBy self.modifiedBy = modifiedBy + self.approvedBy = approvedBy + + self.rejectedBy = rejectedBy + + self.reviewedBy = reviewedBy + } required public init(from decoder: Decoder) throws { @@ -62,6 +80,42 @@ public extension PlatformClient.ApplicationClient.Cart { } + + do { + approvedBy = try container.decode(String.self, forKey: .approvedBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + rejectedBy = try container.decode(String.self, forKey: .rejectedBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + reviewedBy = try container.decode(String.self, forKey: .reviewedBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -77,6 +131,21 @@ public extension PlatformClient.ApplicationClient.Cart { try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + + + try? container.encodeIfPresent(approvedBy, forKey: .approvedBy) + + + + + try? container.encodeIfPresent(rejectedBy, forKey: .rejectedBy) + + + + + try? container.encodeIfPresent(reviewedBy, forKey: .reviewedBy) + + } } diff --git a/Sources/code/platform/Models/Cart/PromotionDateMetaCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionDateMetaCartPlatformModel.swift index 00f7b16f4c..4a550556e3 100644 --- a/Sources/code/platform/Models/Cart/PromotionDateMetaCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PromotionDateMetaCartPlatformModel.swift @@ -18,6 +18,12 @@ public extension PlatformClient.ApplicationClient.Cart { public var createdOn: String? + public var approvedOn: String? + + public var rejectedOn: String? + + public var reviewedOn: String? + public enum CodingKeys: String, CodingKey { @@ -25,14 +31,26 @@ public extension PlatformClient.ApplicationClient.Cart { case createdOn = "created_on" + case approvedOn = "approved_on" + + case rejectedOn = "rejected_on" + + case reviewedOn = "reviewed_on" + } - public init(createdOn: String? = nil, modifiedOn: String? = nil) { + public init(approvedOn: String? = nil, createdOn: String? = nil, modifiedOn: String? = nil, rejectedOn: String? = nil, reviewedOn: String? = nil) { self.modifiedOn = modifiedOn self.createdOn = createdOn + self.approvedOn = approvedOn + + self.rejectedOn = rejectedOn + + self.reviewedOn = reviewedOn + } required public init(from decoder: Decoder) throws { @@ -62,6 +80,42 @@ public extension PlatformClient.ApplicationClient.Cart { } + + do { + approvedOn = try container.decode(String.self, forKey: .approvedOn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + rejectedOn = try container.decode(String.self, forKey: .rejectedOn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + reviewedOn = try container.decode(String.self, forKey: .reviewedOn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -77,6 +131,21 @@ public extension PlatformClient.ApplicationClient.Cart { try? container.encodeIfPresent(createdOn, forKey: .createdOn) + + + try? container.encodeIfPresent(approvedOn, forKey: .approvedOn) + + + + + try? container.encodeIfPresent(rejectedOn, forKey: .rejectedOn) + + + + + try? container.encodeIfPresent(reviewedOn, forKey: .reviewedOn) + + } } diff --git a/Sources/code/platform/Models/Cart/PromotionListItemCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionListItemCartPlatformModel.swift index ef951a91e0..23ac068383 100644 --- a/Sources/code/platform/Models/Cart/PromotionListItemCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PromotionListItemCartPlatformModel.swift @@ -38,6 +38,8 @@ public extension PlatformClient.ApplicationClient.Cart { public var currency: String? + public var isProcessed: Bool? + public var code: String? public var schedule: PromotionSchedule? @@ -52,7 +54,7 @@ public extension PlatformClient.ApplicationClient.Cart { public var applicationId: String - public var buyRules: [String: ItemCriteria] + public var buyRules: ItemCriteria public var customJson: [String: Any]? @@ -89,6 +91,8 @@ public extension PlatformClient.ApplicationClient.Cart { case currency = "currency" + case isProcessed = "is_processed" + case code = "code" case schedule = "_schedule" @@ -115,7 +119,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(applicationId: String, applyAllDiscount: Bool? = nil, applyExclusive: String? = nil, applyPriority: Int? = nil, author: PromotionAuthor? = nil, buyRules: [String: ItemCriteria], calculateOn: String? = nil, code: String? = nil, currency: String? = nil, dateMeta: PromotionDateMeta? = nil, discountRules: [DiscountRule], displayMeta: DisplayMeta1, mode: String, ownership: Ownership1, postOrderAction: PromotionAction? = nil, promotionType: String, promoGroup: String, restrictions: Restrictions1? = nil, stackable: Bool? = nil, tags: [String]? = nil, visiblility: Visibility? = nil, customJson: [String: Any]? = nil, id: String? = nil, schedule: PromotionSchedule? = nil) { + public init(applicationId: String, applyAllDiscount: Bool? = nil, applyExclusive: String? = nil, applyPriority: Int? = nil, author: PromotionAuthor? = nil, buyRules: ItemCriteria, calculateOn: String? = nil, code: String? = nil, currency: String? = nil, dateMeta: PromotionDateMeta? = nil, discountRules: [DiscountRule], displayMeta: DisplayMeta1, isProcessed: Bool? = nil, mode: String, ownership: Ownership1, postOrderAction: PromotionAction? = nil, promotionType: String, promoGroup: String, restrictions: Restrictions1? = nil, stackable: Bool? = nil, tags: [String]? = nil, visiblility: Visibility? = nil, customJson: [String: Any]? = nil, id: String? = nil, schedule: PromotionSchedule? = nil) { self.stackable = stackable @@ -141,6 +145,8 @@ public extension PlatformClient.ApplicationClient.Cart { self.currency = currency + self.isProcessed = isProcessed + self.code = code self.schedule = schedule @@ -273,6 +279,18 @@ public extension PlatformClient.ApplicationClient.Cart { + do { + isProcessed = try container.decode(Bool.self, forKey: .isProcessed) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { code = try container.decode(String.self, forKey: .code) @@ -350,7 +368,7 @@ public extension PlatformClient.ApplicationClient.Cart { - buyRules = try container.decode([String: ItemCriteria].self, forKey: .buyRules) + buyRules = try container.decode(ItemCriteria.self, forKey: .buyRules) @@ -469,6 +487,11 @@ public extension PlatformClient.ApplicationClient.Cart { + try? container.encodeIfPresent(isProcessed, forKey: .isProcessed) + + + + try? container.encodeIfPresent(code, forKey: .code) diff --git a/Sources/code/platform/Models/Cart/PromotionOffersResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionOffersDetailsCartPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Cart/PromotionOffersResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/PromotionOffersDetailsCartPlatformModel.swift index ac166e786f..cd3ad4e68f 100644 --- a/Sources/code/platform/Models/Cart/PromotionOffersResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PromotionOffersDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PromotionOffersResponse + Model: PromotionOffersDetails Used By: Cart */ - class PromotionOffersResponse: Codable { + class PromotionOffersDetails: Codable { public var availablePromotions: [PromotionOffer]? diff --git a/Sources/code/platform/Models/Cart/PromotionPaymentModesCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionPaymentModesCartPlatformModel.swift index 38949c8767..582bbac824 100644 --- a/Sources/code/platform/Models/Cart/PromotionPaymentModesCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PromotionPaymentModesCartPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.ApplicationClient.Cart { class PromotionPaymentModes: Codable { - public var type: String + public var type: String? public var uses: PaymentAllowValue1? @@ -31,7 +31,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(codes: [String]? = nil, type: String, uses: PaymentAllowValue1? = nil) { + public init(codes: [String]? = nil, type: String? = nil, uses: PaymentAllowValue1? = nil) { self.type = type @@ -45,9 +45,16 @@ public extension PlatformClient.ApplicationClient.Cart { let container = try decoder.container(keyedBy: CodingKeys.self) - type = try container.decode(String.self, forKey: .type) + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - do { diff --git a/Sources/code/platform/Models/Cart/PromotionPaymentOffersResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionPaymentOffersDetailsCartPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Cart/PromotionPaymentOffersResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/PromotionPaymentOffersDetailsCartPlatformModel.swift index e52fdde0dc..ae6edfc6ab 100644 --- a/Sources/code/platform/Models/Cart/PromotionPaymentOffersResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PromotionPaymentOffersDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PromotionPaymentOffersResponse + Model: PromotionPaymentOffersDetails Used By: Cart */ - class PromotionPaymentOffersResponse: Codable { + class PromotionPaymentOffersDetails: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Cart/PromotionScheduleCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionScheduleCartPlatformModel.swift index 5471c65470..55d51b6014 100644 --- a/Sources/code/platform/Models/Cart/PromotionScheduleCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PromotionScheduleCartPlatformModel.swift @@ -14,11 +14,13 @@ public extension PlatformClient.ApplicationClient.Cart { class PromotionSchedule: Codable { - public var end: String + public var end: String? - public var start: String + public var start: String? - public var published: Bool + public var status: String? + + public var published: Bool? public var nextSchedule: [[String: Any]]? @@ -33,6 +35,8 @@ public extension PlatformClient.ApplicationClient.Cart { case start = "start" + case status = "status" + case published = "published" case nextSchedule = "next_schedule" @@ -43,12 +47,14 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(cron: String? = nil, duration: Int? = nil, end: String, nextSchedule: [[String: Any]]? = nil, published: Bool, start: String) { + public init(cron: String? = nil, duration: Int? = nil, end: String? = nil, nextSchedule: [[String: Any]]? = nil, published: Bool? = nil, start: String? = nil, status: String? = nil) { self.end = end self.start = start + self.status = status + self.published = published self.nextSchedule = nextSchedule @@ -63,20 +69,53 @@ public extension PlatformClient.ApplicationClient.Cart { let container = try decoder.container(keyedBy: CodingKeys.self) - end = try container.decode(String.self, forKey: .end) + do { + end = try container.decode(String.self, forKey: .end) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - start = try container.decode(String.self, forKey: .start) + do { + start = try container.decode(String.self, forKey: .start) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - published = try container.decode(Bool.self, forKey: .published) + do { + 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 { + + } + do { + 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 { + + } + + do { nextSchedule = try container.decode([[String: Any]].self, forKey: .nextSchedule) @@ -130,6 +169,11 @@ public extension PlatformClient.ApplicationClient.Cart { + try? container.encodeIfPresent(status, forKey: .status) + + + + try? container.encodeIfPresent(published, forKey: .published) diff --git a/Sources/code/platform/Models/Cart/PromotionUpdateCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionUpdateCartPlatformModel.swift index 2b42b3e56d..7564459b27 100644 --- a/Sources/code/platform/Models/Cart/PromotionUpdateCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PromotionUpdateCartPlatformModel.swift @@ -20,19 +20,21 @@ public extension PlatformClient.ApplicationClient.Cart { public var applyExclusive: String? + public var reason: String? + public var promoGroup: String public var mode: String public var applyAllDiscount: Bool? - public var displayMeta: DisplayMeta1 + public var displayMeta: DisplayMeta1? - public var ownership: Ownership1 + public var ownership: Ownership1? public var promotionType: String - public var discountRules: [DiscountRule] + public var discountRules: [DiscountRule]? public var restrictions: Restrictions1? @@ -52,7 +54,7 @@ public extension PlatformClient.ApplicationClient.Cart { public var applicationId: String - public var buyRules: [String: ItemCriteria] + public var buyRules: ItemCriteria? public var customJson: [String: Any]? @@ -69,6 +71,8 @@ public extension PlatformClient.ApplicationClient.Cart { case applyExclusive = "apply_exclusive" + case reason = "reason" + case promoGroup = "promo_group" case mode = "mode" @@ -111,7 +115,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(applicationId: String, applyAllDiscount: Bool? = nil, applyExclusive: String? = nil, applyPriority: Int? = nil, author: PromotionAuthor? = nil, buyRules: [String: ItemCriteria], calculateOn: String? = nil, code: String? = nil, currency: String? = nil, dateMeta: PromotionDateMeta? = nil, discountRules: [DiscountRule], displayMeta: DisplayMeta1, mode: String, ownership: Ownership1, postOrderAction: PromotionAction? = nil, promotionType: String, promoGroup: String, restrictions: Restrictions1? = nil, stackable: Bool? = nil, tags: [String]? = nil, visiblility: Visibility? = nil, customJson: [String: Any]? = nil, schedule: PromotionSchedule? = nil) { + public init(applicationId: String, applyAllDiscount: Bool? = nil, applyExclusive: String? = nil, applyPriority: Int? = nil, author: PromotionAuthor? = nil, buyRules: ItemCriteria? = nil, calculateOn: String? = nil, code: String? = nil, currency: String? = nil, dateMeta: PromotionDateMeta? = nil, discountRules: [DiscountRule]? = nil, displayMeta: DisplayMeta1? = nil, mode: String, ownership: Ownership1? = nil, postOrderAction: PromotionAction? = nil, promotionType: String, promoGroup: String, reason: String? = nil, restrictions: Restrictions1? = nil, stackable: Bool? = nil, tags: [String]? = nil, visiblility: Visibility? = nil, customJson: [String: Any]? = nil, schedule: PromotionSchedule? = nil) { self.stackable = stackable @@ -119,6 +123,8 @@ public extension PlatformClient.ApplicationClient.Cart { self.applyExclusive = applyExclusive + self.reason = reason + self.promoGroup = promoGroup self.mode = mode @@ -201,6 +207,18 @@ public extension PlatformClient.ApplicationClient.Cart { + do { + reason = try container.decode(String.self, forKey: .reason) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + promoGroup = try container.decode(String.self, forKey: .promoGroup) @@ -223,14 +241,28 @@ public extension PlatformClient.ApplicationClient.Cart { - displayMeta = try container.decode(DisplayMeta1.self, forKey: .displayMeta) + do { + displayMeta = try container.decode(DisplayMeta1.self, forKey: .displayMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - ownership = try container.decode(Ownership1.self, forKey: .ownership) + do { + ownership = try container.decode(Ownership1.self, forKey: .ownership) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - promotionType = try container.decode(String.self, forKey: .promotionType) @@ -238,9 +270,16 @@ public extension PlatformClient.ApplicationClient.Cart { - discountRules = try container.decode([DiscountRule].self, forKey: .discountRules) + do { + discountRules = try container.decode([DiscountRule].self, forKey: .discountRules) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - do { @@ -344,9 +383,16 @@ public extension PlatformClient.ApplicationClient.Cart { - buyRules = try container.decode([String: ItemCriteria].self, forKey: .buyRules) + do { + buyRules = try container.decode(ItemCriteria.self, forKey: .buyRules) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - do { @@ -406,6 +452,11 @@ public extension PlatformClient.ApplicationClient.Cart { + try? container.encodeIfPresent(reason, forKey: .reason) + + + + try? container.encodeIfPresent(promoGroup, forKey: .promoGroup) diff --git a/Sources/code/platform/Models/Cart/PromotionUpdateResultCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionUpdateResultCartPlatformModel.swift new file mode 100644 index 0000000000..fa36916102 --- /dev/null +++ b/Sources/code/platform/Models/Cart/PromotionUpdateResultCartPlatformModel.swift @@ -0,0 +1,586 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: PromotionUpdateResult + Used By: Cart + */ + + class PromotionUpdateResult: Codable { + + + public var stackable: Bool? + + public var calculateOn: String? + + public var applyExclusive: String? + + public var reason: String? + + public var isProcessed: Bool? + + public var promoGroup: String + + public var mode: String + + public var applyAllDiscount: Bool? + + public var displayMeta: DisplayMeta1? + + public var ownership: Ownership1? + + public var promotionType: String + + public var discountRules: [DiscountRule]? + + public var restrictions: Restrictions1? + + public var currency: String? + + public var code: String? + + public var schedule: PromotionSchedule? + + public var postOrderAction: PromotionAction? + + public var applyPriority: Int? + + public var author: PromotionAuthor? + + public var visiblility: Visibility? + + public var applicationId: String + + public var buyRules: ItemCriteria? + + public var customJson: [String: Any]? + + public var dateMeta: PromotionDateMeta? + + public var tags: [String]? + + + public enum CodingKeys: String, CodingKey { + + case stackable = "stackable" + + case calculateOn = "calculate_on" + + case applyExclusive = "apply_exclusive" + + case reason = "reason" + + case isProcessed = "is_processed" + + case promoGroup = "promo_group" + + case mode = "mode" + + case applyAllDiscount = "apply_all_discount" + + case displayMeta = "display_meta" + + case ownership = "ownership" + + case promotionType = "promotion_type" + + case discountRules = "discount_rules" + + case restrictions = "restrictions" + + case currency = "currency" + + case code = "code" + + case schedule = "_schedule" + + case postOrderAction = "post_order_action" + + case applyPriority = "apply_priority" + + case author = "author" + + case visiblility = "visiblility" + + case applicationId = "application_id" + + case buyRules = "buy_rules" + + case customJson = "_custom_json" + + case dateMeta = "date_meta" + + case tags = "tags" + + } + + public init(applicationId: String, applyAllDiscount: Bool? = nil, applyExclusive: String? = nil, applyPriority: Int? = nil, author: PromotionAuthor? = nil, buyRules: ItemCriteria? = nil, calculateOn: String? = nil, code: String? = nil, currency: String? = nil, dateMeta: PromotionDateMeta? = nil, discountRules: [DiscountRule]? = nil, displayMeta: DisplayMeta1? = nil, isProcessed: Bool? = nil, mode: String, ownership: Ownership1? = nil, postOrderAction: PromotionAction? = nil, promotionType: String, promoGroup: String, reason: String? = nil, restrictions: Restrictions1? = nil, stackable: Bool? = nil, tags: [String]? = nil, visiblility: Visibility? = nil, customJson: [String: Any]? = nil, schedule: PromotionSchedule? = nil) { + + self.stackable = stackable + + self.calculateOn = calculateOn + + self.applyExclusive = applyExclusive + + self.reason = reason + + self.isProcessed = isProcessed + + self.promoGroup = promoGroup + + self.mode = mode + + self.applyAllDiscount = applyAllDiscount + + self.displayMeta = displayMeta + + self.ownership = ownership + + self.promotionType = promotionType + + self.discountRules = discountRules + + self.restrictions = restrictions + + self.currency = currency + + self.code = code + + self.schedule = schedule + + self.postOrderAction = postOrderAction + + self.applyPriority = applyPriority + + self.author = author + + self.visiblility = visiblility + + self.applicationId = applicationId + + self.buyRules = buyRules + + self.customJson = customJson + + self.dateMeta = dateMeta + + self.tags = tags + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + stackable = try container.decode(Bool.self, forKey: .stackable) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + calculateOn = try container.decode(String.self, forKey: .calculateOn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + applyExclusive = try container.decode(String.self, forKey: .applyExclusive) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + reason = try container.decode(String.self, forKey: .reason) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + isProcessed = try container.decode(Bool.self, forKey: .isProcessed) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + promoGroup = try container.decode(String.self, forKey: .promoGroup) + + + + + mode = try container.decode(String.self, forKey: .mode) + + + + + do { + applyAllDiscount = try container.decode(Bool.self, forKey: .applyAllDiscount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + displayMeta = try container.decode(DisplayMeta1.self, forKey: .displayMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + ownership = try container.decode(Ownership1.self, forKey: .ownership) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + promotionType = try container.decode(String.self, forKey: .promotionType) + + + + + do { + discountRules = try container.decode([DiscountRule].self, forKey: .discountRules) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + restrictions = try container.decode(Restrictions1.self, forKey: .restrictions) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + currency = try container.decode(String.self, forKey: .currency) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + code = try container.decode(String.self, forKey: .code) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + schedule = try container.decode(PromotionSchedule.self, forKey: .schedule) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + postOrderAction = try container.decode(PromotionAction.self, forKey: .postOrderAction) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + applyPriority = try container.decode(Int.self, forKey: .applyPriority) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + author = try container.decode(PromotionAuthor.self, forKey: .author) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + visiblility = try container.decode(Visibility.self, forKey: .visiblility) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + applicationId = try container.decode(String.self, forKey: .applicationId) + + + + + do { + buyRules = try container.decode(ItemCriteria.self, forKey: .buyRules) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + dateMeta = try container.decode(PromotionDateMeta.self, forKey: .dateMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(stackable, forKey: .stackable) + + + + + try? container.encodeIfPresent(calculateOn, forKey: .calculateOn) + + + + + try? container.encodeIfPresent(applyExclusive, forKey: .applyExclusive) + + + + + try? container.encodeIfPresent(reason, forKey: .reason) + + + + + try? container.encodeIfPresent(isProcessed, forKey: .isProcessed) + + + + + try? container.encodeIfPresent(promoGroup, forKey: .promoGroup) + + + + + try? container.encodeIfPresent(mode, forKey: .mode) + + + + + try? container.encodeIfPresent(applyAllDiscount, forKey: .applyAllDiscount) + + + + + try? container.encodeIfPresent(displayMeta, forKey: .displayMeta) + + + + + try? container.encodeIfPresent(ownership, forKey: .ownership) + + + + + try? container.encodeIfPresent(promotionType, forKey: .promotionType) + + + + + try? container.encodeIfPresent(discountRules, forKey: .discountRules) + + + + + try? container.encodeIfPresent(restrictions, forKey: .restrictions) + + + + + try? container.encodeIfPresent(currency, forKey: .currency) + + + + + try? container.encodeIfPresent(code, forKey: .code) + + + + + try? container.encodeIfPresent(schedule, forKey: .schedule) + + + + + try? container.encodeIfPresent(postOrderAction, forKey: .postOrderAction) + + + + + try? container.encodeIfPresent(applyPriority, forKey: .applyPriority) + + + + + try? container.encodeIfPresent(author, forKey: .author) + + + + + try? container.encodeIfPresent(visiblility, forKey: .visiblility) + + + + + try? container.encodeIfPresent(applicationId, forKey: .applicationId) + + + + + try? container.encodeIfPresent(buyRules, forKey: .buyRules) + + + + + try? container.encodeIfPresent(customJson, forKey: .customJson) + + + + + try? container.encodeIfPresent(dateMeta, forKey: .dateMeta) + + + + + try? container.encodeIfPresent(tags, forKey: .tags) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/PromotionsResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/PromotionsResultCartPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Cart/PromotionsResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/PromotionsResultCartPlatformModel.swift index c4444ff64a..0c0f5dc814 100644 --- a/Sources/code/platform/Models/Cart/PromotionsResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/PromotionsResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PromotionsResponse + Model: PromotionsResult Used By: Cart */ - class PromotionsResponse: Codable { + class PromotionsResult: Codable { public var items: [PromotionListItem]? diff --git a/Sources/code/platform/Models/Cart/Restrictions1CartPlatformModel.swift b/Sources/code/platform/Models/Cart/Restrictions1CartPlatformModel.swift index f2b245b4ab..cc425dadbb 100644 --- a/Sources/code/platform/Models/Cart/Restrictions1CartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/Restrictions1CartPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.ApplicationClient.Cart { class Restrictions1: Codable { - public var payments: [String: PaymentModes]? + public var payments: PaymentModes? public var userRegistered: UserRegistered? @@ -30,7 +30,7 @@ public extension PlatformClient.ApplicationClient.Cart { public var userId: [String]? - public var uses: UsesRestriction1 + public var uses: UsesRestriction1? public var orderingStores: [Int]? @@ -59,7 +59,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(anonymousUsers: Bool? = nil, orderingStores: [Int]? = nil, orderQuantity: Int? = nil, payments: [String: PaymentModes]? = nil, platforms: [String]? = nil, postOrder: PostOrder1? = nil, userGroups: [Int]? = nil, userId: [String]? = nil, userRegistered: UserRegistered? = nil, uses: UsesRestriction1) { + public init(anonymousUsers: Bool? = nil, orderingStores: [Int]? = nil, orderQuantity: Int? = nil, payments: PaymentModes? = nil, platforms: [String]? = nil, postOrder: PostOrder1? = nil, userGroups: [Int]? = nil, userId: [String]? = nil, userRegistered: UserRegistered? = nil, uses: UsesRestriction1? = nil) { self.payments = payments @@ -88,7 +88,7 @@ public extension PlatformClient.ApplicationClient.Cart { do { - payments = try container.decode([String: PaymentModes].self, forKey: .payments) + payments = try container.decode(PaymentModes.self, forKey: .payments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -183,9 +183,16 @@ public extension PlatformClient.ApplicationClient.Cart { - uses = try container.decode(UsesRestriction1.self, forKey: .uses) + do { + uses = try container.decode(UsesRestriction1.self, forKey: .uses) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - do { diff --git a/Sources/code/platform/Models/Cart/RestrictionsCartPlatformModel.swift b/Sources/code/platform/Models/Cart/RestrictionsCartPlatformModel.swift index 4395016819..12b9a275b8 100644 --- a/Sources/code/platform/Models/Cart/RestrictionsCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/RestrictionsCartPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.ApplicationClient.Cart { class Restrictions: Codable { - public var payments: [String: PaymentModes]? + public var payments: PaymentModes? public var userType: String? @@ -59,7 +59,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(bulkBundle: BulkBundleRestriction? = nil, couponAllowed: Bool? = nil, orderingStores: [Int]? = nil, payments: [String: PaymentModes]? = nil, platforms: [String]? = nil, postOrder: PostOrder? = nil, priceRange: PriceRange? = nil, userGroups: [Int]? = nil, userType: String? = nil, uses: UsesRestriction? = nil) { + public init(bulkBundle: BulkBundleRestriction? = nil, couponAllowed: Bool? = nil, orderingStores: [Int]? = nil, payments: PaymentModes? = nil, platforms: [String]? = nil, postOrder: PostOrder? = nil, priceRange: PriceRange? = nil, userGroups: [Int]? = nil, userType: String? = nil, uses: UsesRestriction? = nil) { self.payments = payments @@ -88,7 +88,7 @@ public extension PlatformClient.ApplicationClient.Cart { do { - payments = try container.decode([String: PaymentModes].self, forKey: .payments) + payments = try container.decode(PaymentModes.self, forKey: .payments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Cart/RuleDefinitionCartPlatformModel.swift b/Sources/code/platform/Models/Cart/RuleDefinitionCartPlatformModel.swift index 6f58d8e250..e724f2796d 100644 --- a/Sources/code/platform/Models/Cart/RuleDefinitionCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/RuleDefinitionCartPlatformModel.swift @@ -18,15 +18,15 @@ public extension PlatformClient.ApplicationClient.Cart { public var autoApply: Bool? - public var type: String + public var type: String? public var isExact: Bool? - public var applicableOn: String + public var applicableOn: String? - public var calculateOn: String + public var calculateOn: String? - public var valueType: String + public var valueType: String? public var scope: [String]? @@ -51,7 +51,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(applicableOn: String, autoApply: Bool? = nil, calculateOn: String, currencyCode: String? = nil, isExact: Bool? = nil, scope: [String]? = nil, type: String, valueType: String) { + public init(applicableOn: String? = nil, autoApply: Bool? = nil, calculateOn: String? = nil, currencyCode: String? = nil, isExact: Bool? = nil, scope: [String]? = nil, type: String? = nil, valueType: String? = nil) { self.currencyCode = currencyCode @@ -99,9 +99,16 @@ public extension PlatformClient.ApplicationClient.Cart { - type = try container.decode(String.self, forKey: .type) + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - do { @@ -116,19 +123,40 @@ public extension PlatformClient.ApplicationClient.Cart { - applicableOn = try container.decode(String.self, forKey: .applicableOn) + do { + applicableOn = try container.decode(String.self, forKey: .applicableOn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - calculateOn = try container.decode(String.self, forKey: .calculateOn) + do { + calculateOn = try container.decode(String.self, forKey: .calculateOn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - valueType = try container.decode(String.self, forKey: .valueType) + do { + valueType = try container.decode(String.self, forKey: .valueType) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - do { diff --git a/Sources/code/platform/Models/Cart/SaveAddressResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/SaveAddressDetailsCartPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Cart/SaveAddressResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/SaveAddressDetailsCartPlatformModel.swift index 91c173c37e..ee91e3be7e 100644 --- a/Sources/code/platform/Models/Cart/SaveAddressResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/SaveAddressDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: SaveAddressResponse + Model: SaveAddressDetails Used By: Cart */ - class SaveAddressResponse: Codable { + class SaveAddressDetails: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Cart/SharedCartResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/SharedCartResultCartPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Cart/SharedCartResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/SharedCartResultCartPlatformModel.swift index 79c6af9399..5ef679750d 100644 --- a/Sources/code/platform/Models/Cart/SharedCartResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/SharedCartResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: SharedCartResponse + Model: SharedCartResult Used By: Cart */ - class SharedCartResponse: Codable { + class SharedCartResult: Codable { public var cart: SharedCart? diff --git a/Sources/code/platform/Models/Cart/StoreDetailsResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/StoreDetailsCartPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Cart/StoreDetailsResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/StoreDetailsCartPlatformModel.swift index 80d34bc6ff..040457c64c 100644 --- a/Sources/code/platform/Models/Cart/StoreDetailsResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/StoreDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: StoreDetailsResponse + Model: StoreDetails Used By: Cart */ - class StoreDetailsResponse: Codable { + class StoreDetails: Codable { public var items: [PickupStoreDetail]? diff --git a/Sources/code/platform/Models/Cart/UpdateAddressResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/UpdateAddressDetailsCartPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Cart/UpdateAddressResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/UpdateAddressDetailsCartPlatformModel.swift index d6bfad0e3d..55f1f81b18 100644 --- a/Sources/code/platform/Models/Cart/UpdateAddressResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/UpdateAddressDetailsCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: UpdateAddressResponse + Model: UpdateAddressDetails Used By: Cart */ - class UpdateAddressResponse: Codable { + class UpdateAddressDetails: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Cart/PlatformUpdateCartRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/UpdateCartCreationCartPlatformModel.swift similarity index 79% rename from Sources/code/platform/Models/Cart/PlatformUpdateCartRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/UpdateCartCreationCartPlatformModel.swift index e72932b2f6..0979aebb41 100644 --- a/Sources/code/platform/Models/Cart/PlatformUpdateCartRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/UpdateCartCreationCartPlatformModel.swift @@ -7,36 +7,36 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: PlatformUpdateCartRequest + Model: UpdateCartCreation Used By: Cart */ - class PlatformUpdateCartRequest: Codable { + class UpdateCartCreation: Codable { - public var userId: String? - public var items: [UpdateProductCart]? + public var freeGiftItems: [FreeGiftItemCreation]? + public var operation: String public enum CodingKeys: String, CodingKey { - case userId = "user_id" - case items = "items" + case freeGiftItems = "free_gift_items" + case operation = "operation" } - public init(items: [UpdateProductCart]? = nil, operation: String, userId: String? = nil) { - - self.userId = userId + public init(freeGiftItems: [FreeGiftItemCreation]? = nil, items: [UpdateProductCart]? = nil, operation: String) { self.items = items + self.freeGiftItems = freeGiftItems + self.operation = operation } @@ -46,7 +46,7 @@ public extension PlatformClient.ApplicationClient.Cart { do { - userId = try container.decode(String.self, forKey: .userId) + items = try container.decode([UpdateProductCart].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -58,7 +58,7 @@ public extension PlatformClient.ApplicationClient.Cart { do { - items = try container.decode([UpdateProductCart].self, forKey: .items) + freeGiftItems = try container.decode([FreeGiftItemCreation].self, forKey: .freeGiftItems) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -80,12 +80,12 @@ public extension PlatformClient.ApplicationClient.Cart { - try? container.encodeIfPresent(userId, forKey: .userId) + try? container.encodeIfPresent(items, forKey: .items) - try? container.encodeIfPresent(items, forKey: .items) + try? container.encodeIfPresent(freeGiftItems, forKey: .freeGiftItems) diff --git a/Sources/code/platform/Models/Cart/UpdateCartDetailResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/UpdateCartDetailResultCartPlatformModel.swift similarity index 88% rename from Sources/code/platform/Models/Cart/UpdateCartDetailResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/UpdateCartDetailResultCartPlatformModel.swift index 293c16911b..7cb2b1bd48 100644 --- a/Sources/code/platform/Models/Cart/UpdateCartDetailResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/UpdateCartDetailResultCartPlatformModel.swift @@ -7,16 +7,16 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: UpdateCartDetailResponse + Model: UpdateCartDetailResult Used By: Cart */ - class UpdateCartDetailResponse: Codable { + class UpdateCartDetailResult: Codable { public var success: Bool? - public var cart: CartDetailResponse? + public var cart: CartDetailResult? public var message: String? @@ -31,7 +31,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(cart: CartDetailResponse? = nil, message: String? = nil, success: Bool? = nil) { + public init(cart: CartDetailResult? = nil, message: String? = nil, success: Bool? = nil) { self.success = success @@ -58,7 +58,7 @@ public extension PlatformClient.ApplicationClient.Cart { do { - cart = try container.decode(CartDetailResponse.self, forKey: .cart) + cart = try container.decode(CartDetailResult.self, forKey: .cart) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Cart/UpdateCartShipmentRequestCartPlatformModel.swift b/Sources/code/platform/Models/Cart/UpdateCartShipmentCreationCartPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Cart/UpdateCartShipmentRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/UpdateCartShipmentCreationCartPlatformModel.swift index de81628fce..57d2d0bfb6 100644 --- a/Sources/code/platform/Models/Cart/UpdateCartShipmentRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/UpdateCartShipmentCreationCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: UpdateCartShipmentRequest + Model: UpdateCartShipmentCreation Used By: Cart */ - class UpdateCartShipmentRequest: Codable { + class UpdateCartShipmentCreation: Codable { public var shipments: [UpdateCartShipmentItem] diff --git a/Sources/code/platform/Models/Cart/UserCartMappingResponseCartPlatformModel.swift b/Sources/code/platform/Models/Cart/UserCartMappingResultCartPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Cart/UserCartMappingResponseCartPlatformModel.swift rename to Sources/code/platform/Models/Cart/UserCartMappingResultCartPlatformModel.swift index d33040217b..ba8b9bfaff 100644 --- a/Sources/code/platform/Models/Cart/UserCartMappingResponseCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/UserCartMappingResultCartPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Cart { /* - Model: UserCartMappingResponse + Model: UserCartMappingResult Used By: Cart */ - class UserCartMappingResponse: Codable { + class UserCartMappingResult: Codable { public var couponText: String? diff --git a/Sources/code/platform/Models/Cart/ValidationConfigCartPlatformModel.swift b/Sources/code/platform/Models/Cart/ValidationConfigCartPlatformModel.swift new file mode 100644 index 0000000000..2a86c2d883 --- /dev/null +++ b/Sources/code/platform/Models/Cart/ValidationConfigCartPlatformModel.swift @@ -0,0 +1,71 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: ValidationConfig + Used By: Cart + */ + + class ValidationConfig: Codable { + + + public var addressMaxLimit: Int + + public var userAddressCount: Int + + + public enum CodingKeys: String, CodingKey { + + case addressMaxLimit = "address_max_limit" + + case userAddressCount = "user_address_count" + + } + + public init(addressMaxLimit: Int, userAddressCount: Int) { + + self.addressMaxLimit = addressMaxLimit + + self.userAddressCount = userAddressCount + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + addressMaxLimit = try container.decode(Int.self, forKey: .addressMaxLimit) + + + + + userAddressCount = try container.decode(Int.self, forKey: .userAddressCount) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(addressMaxLimit, forKey: .addressMaxLimit) + + + + + try? container.encodeIfPresent(userAddressCount, forKey: .userAddressCount) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/ValidationErrorCartPlatformModel.swift b/Sources/code/platform/Models/Cart/ValidationErrorCartPlatformModel.swift new file mode 100644 index 0000000000..4e5bedd70c --- /dev/null +++ b/Sources/code/platform/Models/Cart/ValidationErrorCartPlatformModel.swift @@ -0,0 +1,71 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Cart { + /* + Model: ValidationError + Used By: Cart + */ + + class ValidationError: Codable { + + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Cart/VisibilityCartPlatformModel.swift b/Sources/code/platform/Models/Cart/VisibilityCartPlatformModel.swift index ee196d6558..2b082f096c 100644 --- a/Sources/code/platform/Models/Cart/VisibilityCartPlatformModel.swift +++ b/Sources/code/platform/Models/Cart/VisibilityCartPlatformModel.swift @@ -14,9 +14,9 @@ public extension PlatformClient.ApplicationClient.Cart { class Visibility: Codable { - public var couponList: Bool + public var couponList: Bool? - public var pdp: Bool + public var pdp: Bool? public enum CodingKeys: String, CodingKey { @@ -27,7 +27,7 @@ public extension PlatformClient.ApplicationClient.Cart { } - public init(couponList: Bool, pdp: Bool) { + public init(couponList: Bool? = nil, pdp: Bool? = nil) { self.couponList = couponList @@ -39,14 +39,28 @@ public extension PlatformClient.ApplicationClient.Cart { let container = try decoder.container(keyedBy: CodingKeys.self) - couponList = try container.decode(Bool.self, forKey: .couponList) + do { + couponList = try container.decode(Bool.self, forKey: .couponList) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - pdp = try container.decode(Bool.self, forKey: .pdp) + do { + pdp = try container.decode(Bool.self, forKey: .pdp) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - } diff --git a/Sources/code/platform/Models/Catalog/AllowSingleRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/AllowSingleRequestSchemaCatalogPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Catalog/AllowSingleRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/AllowSingleRequestSchemaCatalogPlatformModel.swift index ca45f8a138..fdbab37feb 100644 --- a/Sources/code/platform/Models/Catalog/AllowSingleRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/AllowSingleRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: AllowSingleRequest + Model: AllowSingleRequestSchema Used By: Catalog */ - class AllowSingleRequest: Codable { + class AllowSingleRequestSchema: Codable { public var allowSingle: Bool @@ -54,11 +54,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: AllowSingleRequest + Model: AllowSingleRequestSchema Used By: Catalog */ - class AllowSingleRequest: Codable { + class AllowSingleRequestSchema: Codable { public var allowSingle: Bool diff --git a/Sources/code/platform/Models/Catalog/AppCategoryReturnConfigCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/AppCategoryReturnConfigCatalogPlatformModel.swift index 378bfa0b7d..8742b6496a 100644 --- a/Sources/code/platform/Models/Catalog/AppCategoryReturnConfigCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/AppCategoryReturnConfigCatalogPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.Catalog { public var categoryId: Int - public var returnConfig: ProductReturnConfigBaseSerializer + public var returnConfig: ProductReturnConfigBaseSchema public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(categoryId: Int, returnConfig: ProductReturnConfigBaseSerializer) { + public init(categoryId: Int, returnConfig: ProductReturnConfigBaseSchema) { self.categoryId = categoryId @@ -42,7 +42,7 @@ public extension PlatformClient.Catalog { - returnConfig = try container.decode(ProductReturnConfigBaseSerializer.self, forKey: .returnConfig) + returnConfig = try container.decode(ProductReturnConfigBaseSchema.self, forKey: .returnConfig) @@ -79,7 +79,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var categoryId: Int - public var returnConfig: ProductReturnConfigBaseSerializer + public var returnConfig: ProductReturnConfigBaseSchema public enum CodingKeys: String, CodingKey { @@ -90,7 +90,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(categoryId: Int, returnConfig: ProductReturnConfigBaseSerializer) { + public init(categoryId: Int, returnConfig: ProductReturnConfigBaseSchema) { self.categoryId = categoryId @@ -107,7 +107,7 @@ public extension PlatformClient.ApplicationClient.Catalog { - returnConfig = try container.decode(ProductReturnConfigBaseSerializer.self, forKey: .returnConfig) + returnConfig = try container.decode(ProductReturnConfigBaseSchema.self, forKey: .returnConfig) diff --git a/Sources/code/platform/Models/Catalog/AppCategoryReturnConfigResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/AppCategoryReturnConfigResponseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/AppCategoryReturnConfigResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/AppCategoryReturnConfigResponseSchemaCatalogPlatformModel.swift index 2628d09a4a..41fe39505b 100644 --- a/Sources/code/platform/Models/Catalog/AppCategoryReturnConfigResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/AppCategoryReturnConfigResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: AppCategoryReturnConfigResponse + Model: AppCategoryReturnConfigResponseSchema Used By: Catalog */ - class AppCategoryReturnConfigResponse: Codable { + class AppCategoryReturnConfigResponseSchema: Codable { public var appId: String? @@ -20,7 +20,7 @@ public extension PlatformClient.Catalog { public var name: String? - public var returnConfig: ProductReturnConfigBaseSerializer? + public var returnConfig: ProductReturnConfigBaseSchema? public enum CodingKeys: String, CodingKey { @@ -37,7 +37,7 @@ public extension PlatformClient.Catalog { } - public init(appId: String? = nil, categoryId: Int? = nil, logo: String? = nil, name: String? = nil, returnConfig: ProductReturnConfigBaseSerializer? = nil) { + public init(appId: String? = nil, categoryId: Int? = nil, logo: String? = nil, name: String? = nil, returnConfig: ProductReturnConfigBaseSchema? = nil) { self.appId = appId @@ -104,7 +104,7 @@ public extension PlatformClient.Catalog { do { - returnConfig = try container.decode(ProductReturnConfigBaseSerializer.self, forKey: .returnConfig) + returnConfig = try container.decode(ProductReturnConfigBaseSchema.self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -153,11 +153,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: AppCategoryReturnConfigResponse + Model: AppCategoryReturnConfigResponseSchema Used By: Catalog */ - class AppCategoryReturnConfigResponse: Codable { + class AppCategoryReturnConfigResponseSchema: Codable { public var appId: String? @@ -168,7 +168,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var name: String? - public var returnConfig: ProductReturnConfigBaseSerializer? + public var returnConfig: ProductReturnConfigBaseSchema? public enum CodingKeys: String, CodingKey { @@ -185,7 +185,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(appId: String? = nil, categoryId: Int? = nil, logo: String? = nil, name: String? = nil, returnConfig: ProductReturnConfigBaseSerializer? = nil) { + public init(appId: String? = nil, categoryId: Int? = nil, logo: String? = nil, name: String? = nil, returnConfig: ProductReturnConfigBaseSchema? = nil) { self.appId = appId @@ -252,7 +252,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - returnConfig = try container.decode(ProductReturnConfigBaseSerializer.self, forKey: .returnConfig) + returnConfig = try container.decode(ProductReturnConfigBaseSchema.self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/AppReturnConfigResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/AppReturnConfigResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/AppReturnConfigResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/AppReturnConfigResponseSchemaCatalogPlatformModel.swift index bd62c29f8d..7b0fb8a893 100644 --- a/Sources/code/platform/Models/Catalog/AppReturnConfigResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/AppReturnConfigResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: AppReturnConfigResponse + Model: AppReturnConfigResponseSchema Used By: Catalog */ - class AppReturnConfigResponse: Codable { + class AppReturnConfigResponseSchema: Codable { public var appId: String? @@ -199,11 +199,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: AppReturnConfigResponse + Model: AppReturnConfigResponseSchema Used By: Catalog */ - class AppReturnConfigResponse: Codable { + class AppReturnConfigResponseSchema: Codable { public var appId: String? diff --git a/Sources/code/platform/Models/Catalog/ApplicationBrandListingItemSchemaCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ApplicationBrandListingItemSchemaCatalogPlatformModel.swift index f2f9087c02..6409d57160 100644 --- a/Sources/code/platform/Models/Catalog/ApplicationBrandListingItemSchemaCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ApplicationBrandListingItemSchemaCatalogPlatformModel.swift @@ -40,10 +40,6 @@ public extension PlatformClient.Catalog { public var departments: [Int]? - public var modifiedOn: String? - - public var active: Bool? - public enum CodingKeys: String, CodingKey { @@ -75,13 +71,9 @@ public extension PlatformClient.Catalog { case departments = "departments" - case modifiedOn = "modified_on" - - case active = "active" - } - public init(active: Bool? = nil, brandBannerPortraitUrl: String? = nil, brandBannerUrl: String? = nil, brandLogoUrl: String? = nil, createdOn: String? = nil, departments: [Int]? = nil, description: String? = nil, isActive: Bool? = nil, lastUpdated: String? = nil, modifiedOn: String? = nil, name: String? = nil, priority: Int? = nil, slugKey: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil) { + public init(brandBannerPortraitUrl: String? = nil, brandBannerUrl: String? = nil, brandLogoUrl: String? = nil, createdOn: String? = nil, departments: [Int]? = nil, description: String? = nil, isActive: Bool? = nil, lastUpdated: String? = nil, name: String? = nil, priority: Int? = nil, slugKey: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil) { self.customJson = customJson @@ -111,10 +103,6 @@ public extension PlatformClient.Catalog { self.departments = departments - self.modifiedOn = modifiedOn - - self.active = active - } required public init(from decoder: Decoder) throws { @@ -288,30 +276,6 @@ public extension PlatformClient.Catalog { } - - do { - 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 { - - } - - - - do { - active = try container.decode(Bool.self, forKey: .active) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -387,16 +351,6 @@ public extension PlatformClient.Catalog { try? container.encodeIfPresent(departments, forKey: .departments) - - - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - - - - - try? container.encodeIfPresent(active, forKey: .active) - - } } @@ -441,10 +395,6 @@ public extension PlatformClient.ApplicationClient.Catalog { public var departments: [Int]? - public var modifiedOn: String? - - public var active: Bool? - public enum CodingKeys: String, CodingKey { @@ -476,13 +426,9 @@ public extension PlatformClient.ApplicationClient.Catalog { case departments = "departments" - case modifiedOn = "modified_on" - - case active = "active" - } - public init(active: Bool? = nil, brandBannerPortraitUrl: String? = nil, brandBannerUrl: String? = nil, brandLogoUrl: String? = nil, createdOn: String? = nil, departments: [Int]? = nil, description: String? = nil, isActive: Bool? = nil, lastUpdated: String? = nil, modifiedOn: String? = nil, name: String? = nil, priority: Int? = nil, slugKey: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil) { + public init(brandBannerPortraitUrl: String? = nil, brandBannerUrl: String? = nil, brandLogoUrl: String? = nil, createdOn: String? = nil, departments: [Int]? = nil, description: String? = nil, isActive: Bool? = nil, lastUpdated: String? = nil, name: String? = nil, priority: Int? = nil, slugKey: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil) { self.customJson = customJson @@ -512,10 +458,6 @@ public extension PlatformClient.ApplicationClient.Catalog { self.departments = departments - self.modifiedOn = modifiedOn - - self.active = active - } required public init(from decoder: Decoder) throws { @@ -689,30 +631,6 @@ public extension PlatformClient.ApplicationClient.Catalog { } - - do { - 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 { - - } - - - - do { - active = try container.decode(Bool.self, forKey: .active) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -788,16 +706,6 @@ public extension PlatformClient.ApplicationClient.Catalog { try? container.encodeIfPresent(departments, forKey: .departments) - - - try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - - - - - try? container.encodeIfPresent(active, forKey: .active) - - } } diff --git a/Sources/code/platform/Models/Catalog/ApplicationCategoryListingItemSchemaCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ApplicationCategoryListingItemSchemaCatalogPlatformModel.swift index 5c774a7bac..6357bc6feb 100644 --- a/Sources/code/platform/Models/Catalog/ApplicationCategoryListingItemSchemaCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ApplicationCategoryListingItemSchemaCatalogPlatformModel.swift @@ -32,7 +32,7 @@ public extension PlatformClient.Catalog { public var createdOn: String? - public var modifiedBy: CreatedBy? + public var modifiedBy: ModifiedBy? public var modifiedOn: String? @@ -77,7 +77,7 @@ public extension PlatformClient.Catalog { } - public init(appId: String? = nil, attrName: String? = nil, createdBy: CreatedBy? = nil, createdOn: String? = nil, departments: [Int]? = nil, isActive: Bool? = nil, landscapeUrl: String? = nil, logo: String? = nil, modifiedBy: CreatedBy? = nil, modifiedOn: String? = nil, name: String? = nil, portraitUrl: String? = nil, priority: Int? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { + public init(appId: String? = nil, attrName: String? = nil, createdBy: CreatedBy? = nil, createdOn: String? = nil, departments: [Int]? = nil, isActive: Bool? = nil, landscapeUrl: String? = nil, logo: String? = nil, modifiedBy: ModifiedBy? = nil, modifiedOn: String? = nil, name: String? = nil, portraitUrl: String? = nil, priority: Int? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { self.name = name @@ -236,7 +236,7 @@ public extension PlatformClient.Catalog { do { - modifiedBy = try container.decode(CreatedBy.self, forKey: .modifiedBy) + modifiedBy = try container.decode(ModifiedBy.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -410,7 +410,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var createdOn: String? - public var modifiedBy: CreatedBy? + public var modifiedBy: ModifiedBy? public var modifiedOn: String? @@ -455,7 +455,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(appId: String? = nil, attrName: String? = nil, createdBy: CreatedBy? = nil, createdOn: String? = nil, departments: [Int]? = nil, isActive: Bool? = nil, landscapeUrl: String? = nil, logo: String? = nil, modifiedBy: CreatedBy? = nil, modifiedOn: String? = nil, name: String? = nil, portraitUrl: String? = nil, priority: Int? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { + public init(appId: String? = nil, attrName: String? = nil, createdBy: CreatedBy? = nil, createdOn: String? = nil, departments: [Int]? = nil, isActive: Bool? = nil, landscapeUrl: String? = nil, logo: String? = nil, modifiedBy: ModifiedBy? = nil, modifiedOn: String? = nil, name: String? = nil, portraitUrl: String? = nil, priority: Int? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { self.name = name @@ -614,7 +614,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - modifiedBy = try container.decode(CreatedBy.self, forKey: .modifiedBy) + modifiedBy = try container.decode(ModifiedBy.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/ApplicationDepartmentListingResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ApplicationDepartmentListingResponseSchemaCatalogPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Catalog/ApplicationDepartmentListingResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ApplicationDepartmentListingResponseSchemaCatalogPlatformModel.swift index ed5cab6ca3..b7eff4a47b 100644 --- a/Sources/code/platform/Models/Catalog/ApplicationDepartmentListingResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ApplicationDepartmentListingResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ApplicationDepartmentListingResponse + Model: ApplicationDepartmentListingResponseSchema Used By: Catalog */ - class ApplicationDepartmentListingResponse: Codable { + class ApplicationDepartmentListingResponseSchema: Codable { public var items: [ApplicationDepartment]? @@ -77,11 +77,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ApplicationDepartmentListingResponse + Model: ApplicationDepartmentListingResponseSchema Used By: Catalog */ - class ApplicationDepartmentListingResponse: Codable { + class ApplicationDepartmentListingResponseSchema: Codable { public var items: [ApplicationDepartment]? diff --git a/Sources/code/platform/Models/Catalog/ApplicationProductListingResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ApplicationProductListingResponseSchemaCatalogPlatformModel.swift similarity index 89% rename from Sources/code/platform/Models/Catalog/ApplicationProductListingResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ApplicationProductListingResponseSchemaCatalogPlatformModel.swift index 2850b33777..1f982ffedc 100644 --- a/Sources/code/platform/Models/Catalog/ApplicationProductListingResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ApplicationProductListingResponseSchemaCatalogPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ApplicationProductListingResponse + Model: ApplicationProductListingResponseSchema Used By: Catalog */ - class ApplicationProductListingResponse: Codable { + class ApplicationProductListingResponseSchema: Codable { public var filters: [ProductFilters]? - public var items: [ProductListingDetail]? + public var items: [ApplicationProductsSchema]? public var operators: [String: Any]? @@ -37,7 +37,7 @@ public extension PlatformClient.Catalog { } - public init(filters: [ProductFilters]? = nil, items: [ProductListingDetail]? = nil, operators: [String: Any]? = nil, page: Page, sortOn: [ProductSortOn]? = nil) { + public init(filters: [ProductFilters]? = nil, items: [ApplicationProductsSchema]? = nil, operators: [String: Any]? = nil, page: Page, sortOn: [ProductSortOn]? = nil) { self.filters = filters @@ -68,7 +68,7 @@ public extension PlatformClient.Catalog { do { - items = try container.decode([ProductListingDetail].self, forKey: .items) + items = try container.decode([ApplicationProductsSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,16 +146,16 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ApplicationProductListingResponse + Model: ApplicationProductListingResponseSchema Used By: Catalog */ - class ApplicationProductListingResponse: Codable { + class ApplicationProductListingResponseSchema: Codable { public var filters: [ProductFilters]? - public var items: [ProductListingDetail]? + public var items: [ApplicationProductsSchema]? public var operators: [String: Any]? @@ -178,7 +178,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(filters: [ProductFilters]? = nil, items: [ProductListingDetail]? = nil, operators: [String: Any]? = nil, page: Page, sortOn: [ProductSortOn]? = nil) { + public init(filters: [ProductFilters]? = nil, items: [ApplicationProductsSchema]? = nil, operators: [String: Any]? = nil, page: Page, sortOn: [ProductSortOn]? = nil) { self.filters = filters @@ -209,7 +209,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - items = try container.decode([ProductListingDetail].self, forKey: .items) + items = try container.decode([ApplicationProductsSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/ApplicationProductsSchemaCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ApplicationProductsSchemaCatalogPlatformModel.swift new file mode 100644 index 0000000000..04dc99298f --- /dev/null +++ b/Sources/code/platform/Models/Catalog/ApplicationProductsSchemaCatalogPlatformModel.swift @@ -0,0 +1,2578 @@ + + +import Foundation + + +public extension PlatformClient.Catalog { + /* + Model: ApplicationProductsSchema + Used By: Catalog + */ + + class ApplicationProductsSchema: Codable { + + + public var attributes: [String: Any]? + + public var brand: ProductBrand? + + public var color: String? + + public var description: String? + + public var discount: String? + + public var hasVariant: Bool? + + public var highlights: [String]? + + public var imageNature: String + + public var itemCode: String + + public var itemType: String + + public var medias: [Media]? + + public var name: String + + public var price: ProductListingPrice? + + public var productOnlineDate: String? + + public var promoMeta: [String: Any]? + + public var rating: Double? + + public var ratingCount: Int? + + public var sellable: Bool? + + public var shortDescription: String? + + public var similars: [String]? + + public var slug: String + + public var teaserTag: [String: Any]? + + public var tryouts: [String]? + + public var type: String? + + public var uid: Int + + public var popularity: Int? + + public var brandUid: Int + + public var categoryUid: Int + + public var verificationStatus: Int? + + public var channelIdentifier: String? + + public var categorySlug: String? + + public var sizeGuide: String? + + public var l3Categories: [Int] + + public var storeIds: [Int]? + + public var companyIds: [Int]? + + public var departments: [Int] + + public var tags: [String]? + + public var l3CategoryNames: [String]? + + public var sizes: [String]? + + public var productGroupTag: [String]? + + public var multiSize: Bool + + public var isGift: Bool + + public var isCod: Bool + + public var isDependent: Bool + + public var isAvailable: Bool + + public var moq: ApplicationItemMOQ + + public var seo: ApplicationItemSEO + + public var variants: [String: Any]? + + public var variantMedia: [String: Any]? + + public var variantGroup: [String: Any]? + + public var multiCategories: [MultiCategoriesSchema]? + + public var templateTag: String? + + public var netQuantity: [String: Any]? + + public var customOrder: CustomOrder? + + public var countryOfOrigin: String + + public var customJson: [String: Any]? + + public var identifiers: [String]? + + public var itemId: Int? + + public var customMeta: [CustomMeta]? + + public var discountPercentage: Int? + + + public enum CodingKeys: String, CodingKey { + + case attributes = "attributes" + + case brand = "brand" + + case color = "color" + + case description = "description" + + case discount = "discount" + + case hasVariant = "has_variant" + + case highlights = "highlights" + + case imageNature = "image_nature" + + case itemCode = "item_code" + + case itemType = "item_type" + + case medias = "medias" + + case name = "name" + + case price = "price" + + case productOnlineDate = "product_online_date" + + case promoMeta = "promo_meta" + + case rating = "rating" + + case ratingCount = "rating_count" + + case sellable = "sellable" + + case shortDescription = "short_description" + + case similars = "similars" + + case slug = "slug" + + case teaserTag = "teaser_tag" + + case tryouts = "tryouts" + + case type = "type" + + case uid = "uid" + + case popularity = "popularity" + + case brandUid = "brand_uid" + + case categoryUid = "category_uid" + + case verificationStatus = "verification_status" + + case channelIdentifier = "channel_identifier" + + case categorySlug = "category_slug" + + case sizeGuide = "size_guide" + + case l3Categories = "l3_categories" + + case storeIds = "store_ids" + + case companyIds = "company_ids" + + case departments = "departments" + + case tags = "tags" + + case l3CategoryNames = "l3_category_names" + + case sizes = "sizes" + + case productGroupTag = "product_group_tag" + + case multiSize = "multi_size" + + case isGift = "is_gift" + + case isCod = "is_cod" + + case isDependent = "is_dependent" + + case isAvailable = "is_available" + + case moq = "moq" + + case seo = "seo" + + case variants = "variants" + + case variantMedia = "variant_media" + + case variantGroup = "variant_group" + + case multiCategories = "multi_categories" + + case templateTag = "template_tag" + + case netQuantity = "net_quantity" + + case customOrder = "custom_order" + + case countryOfOrigin = "country_of_origin" + + case customJson = "_custom_json" + + case identifiers = "identifiers" + + case itemId = "item_id" + + case customMeta = "_custom_meta" + + case discountPercentage = "discount_percentage" + + } + + public init(attributes: [String: Any]? = nil, brand: ProductBrand? = nil, brandUid: Int, categorySlug: String? = nil, categoryUid: Int, channelIdentifier: String? = nil, color: String? = nil, companyIds: [Int]? = nil, countryOfOrigin: String, customOrder: CustomOrder? = nil, departments: [Int], description: String? = nil, discount: String? = nil, discountPercentage: Int? = nil, hasVariant: Bool? = nil, highlights: [String]? = nil, identifiers: [String]? = nil, imageNature: String, isAvailable: Bool, isCod: Bool, isDependent: Bool, isGift: Bool, itemCode: String, itemId: Int? = nil, itemType: String, l3Categories: [Int], l3CategoryNames: [String]? = nil, medias: [Media]? = nil, moq: ApplicationItemMOQ, multiCategories: [MultiCategoriesSchema]? = nil, multiSize: Bool, name: String, netQuantity: [String: Any]? = nil, popularity: Int? = nil, price: ProductListingPrice? = nil, productGroupTag: [String]? = nil, productOnlineDate: String? = nil, promoMeta: [String: Any]? = nil, rating: Double? = nil, ratingCount: Int? = nil, sellable: Bool? = nil, seo: ApplicationItemSEO, shortDescription: String? = nil, similars: [String]? = nil, sizes: [String]? = nil, sizeGuide: String? = nil, slug: String, storeIds: [Int]? = nil, tags: [String]? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, tryouts: [String]? = nil, type: String? = nil, uid: Int, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verificationStatus: Int? = nil, customJson: [String: Any]? = nil, customMeta: [CustomMeta]? = nil) { + + self.attributes = attributes + + self.brand = brand + + self.color = color + + self.description = description + + self.discount = discount + + self.hasVariant = hasVariant + + self.highlights = highlights + + self.imageNature = imageNature + + self.itemCode = itemCode + + self.itemType = itemType + + self.medias = medias + + self.name = name + + self.price = price + + self.productOnlineDate = productOnlineDate + + self.promoMeta = promoMeta + + self.rating = rating + + self.ratingCount = ratingCount + + self.sellable = sellable + + self.shortDescription = shortDescription + + self.similars = similars + + self.slug = slug + + self.teaserTag = teaserTag + + self.tryouts = tryouts + + self.type = type + + self.uid = uid + + self.popularity = popularity + + self.brandUid = brandUid + + self.categoryUid = categoryUid + + self.verificationStatus = verificationStatus + + self.channelIdentifier = channelIdentifier + + self.categorySlug = categorySlug + + self.sizeGuide = sizeGuide + + self.l3Categories = l3Categories + + self.storeIds = storeIds + + self.companyIds = companyIds + + self.departments = departments + + self.tags = tags + + self.l3CategoryNames = l3CategoryNames + + self.sizes = sizes + + self.productGroupTag = productGroupTag + + self.multiSize = multiSize + + self.isGift = isGift + + self.isCod = isCod + + self.isDependent = isDependent + + self.isAvailable = isAvailable + + self.moq = moq + + self.seo = seo + + self.variants = variants + + self.variantMedia = variantMedia + + self.variantGroup = variantGroup + + self.multiCategories = multiCategories + + self.templateTag = templateTag + + self.netQuantity = netQuantity + + self.customOrder = customOrder + + self.countryOfOrigin = countryOfOrigin + + self.customJson = customJson + + self.identifiers = identifiers + + self.itemId = itemId + + self.customMeta = customMeta + + self.discountPercentage = discountPercentage + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + attributes = try container.decode([String: Any].self, forKey: .attributes) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + brand = try container.decode(ProductBrand.self, forKey: .brand) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + color = try container.decode(String.self, forKey: .color) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + discount = try container.decode(String.self, forKey: .discount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + 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 { + + } + + + + imageNature = try container.decode(String.self, forKey: .imageNature) + + + + + itemCode = try container.decode(String.self, forKey: .itemCode) + + + + + itemType = try container.decode(String.self, forKey: .itemType) + + + + + do { + medias = try container.decode([Media].self, forKey: .medias) + + } 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 { + price = try container.decode(ProductListingPrice.self, forKey: .price) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + rating = try container.decode(Double.self, forKey: .rating) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + ratingCount = try container.decode(Int.self, forKey: .ratingCount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + sellable = try container.decode(Bool.self, forKey: .sellable) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + similars = try container.decode([String].self, forKey: .similars) + + } 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 { + teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + uid = try container.decode(Int.self, forKey: .uid) + + + + + do { + popularity = try container.decode(Int.self, forKey: .popularity) + + } 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) + + + + + categoryUid = try container.decode(Int.self, forKey: .categoryUid) + + + + + do { + verificationStatus = try container.decode(Int.self, forKey: .verificationStatus) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + categorySlug = try container.decode(String.self, forKey: .categorySlug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + l3Categories = try container.decode([Int].self, forKey: .l3Categories) + + + + + do { + storeIds = try container.decode([Int].self, forKey: .storeIds) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + companyIds = try container.decode([Int].self, forKey: .companyIds) + + } 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 { + 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 { + + } + + + + do { + l3CategoryNames = try container.decode([String].self, forKey: .l3CategoryNames) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + sizes = try container.decode([String].self, forKey: .sizes) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + productGroupTag = try container.decode([String].self, forKey: .productGroupTag) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + multiSize = try container.decode(Bool.self, forKey: .multiSize) + + + + + isGift = try container.decode(Bool.self, forKey: .isGift) + + + + + isCod = try container.decode(Bool.self, forKey: .isCod) + + + + + isDependent = try container.decode(Bool.self, forKey: .isDependent) + + + + + isAvailable = try container.decode(Bool.self, forKey: .isAvailable) + + + + + moq = try container.decode(ApplicationItemMOQ.self, forKey: .moq) + + + + + seo = try container.decode(ApplicationItemSEO.self, forKey: .seo) + + + + + do { + 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 { + + } + + + + do { + variantMedia = try container.decode([String: Any].self, forKey: .variantMedia) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + variantGroup = try container.decode([String: Any].self, forKey: .variantGroup) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + multiCategories = try container.decode([MultiCategoriesSchema].self, forKey: .multiCategories) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + templateTag = try container.decode(String.self, forKey: .templateTag) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + netQuantity = try container.decode([String: Any].self, forKey: .netQuantity) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) + + + + + do { + 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 { + + } + + + + do { + identifiers = try container.decode([String].self, forKey: .identifiers) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemId = try container.decode(Int.self, forKey: .itemId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + customMeta = try container.decode([CustomMeta].self, forKey: .customMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + discountPercentage = try container.decode(Int.self, forKey: .discountPercentage) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(attributes, forKey: .attributes) + + + + + try? container.encodeIfPresent(brand, forKey: .brand) + + + + + try? container.encodeIfPresent(color, forKey: .color) + + + + + try? container.encodeIfPresent(description, forKey: .description) + + + + + try? container.encodeIfPresent(discount, forKey: .discount) + + + + + try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + + + + + try? container.encodeIfPresent(highlights, forKey: .highlights) + + + + + try? container.encodeIfPresent(imageNature, forKey: .imageNature) + + + + + try? container.encodeIfPresent(itemCode, forKey: .itemCode) + + + + + try? container.encodeIfPresent(itemType, forKey: .itemType) + + + + + try? container.encodeIfPresent(medias, forKey: .medias) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(price, forKey: .price) + + + + + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) + + + + + try? container.encodeIfPresent(promoMeta, forKey: .promoMeta) + + + + + try? container.encodeIfPresent(rating, forKey: .rating) + + + + + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + + + + + try? container.encodeIfPresent(sellable, forKey: .sellable) + + + + + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + + + + + try? container.encodeIfPresent(similars, forKey: .similars) + + + + + try? container.encodeIfPresent(slug, forKey: .slug) + + + + + try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + + + + + try? container.encodeIfPresent(tryouts, forKey: .tryouts) + + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(uid, forKey: .uid) + + + + + try? container.encodeIfPresent(popularity, forKey: .popularity) + + + + + try? container.encodeIfPresent(brandUid, forKey: .brandUid) + + + + + try? container.encodeIfPresent(categoryUid, forKey: .categoryUid) + + + + + try? container.encodeIfPresent(verificationStatus, forKey: .verificationStatus) + + + + + try? container.encodeIfPresent(channelIdentifier, forKey: .channelIdentifier) + + + + + try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) + + + + + try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) + + + + + try? container.encodeIfPresent(l3Categories, forKey: .l3Categories) + + + + + try? container.encodeIfPresent(storeIds, forKey: .storeIds) + + + + + try? container.encodeIfPresent(companyIds, forKey: .companyIds) + + + + + try? container.encodeIfPresent(departments, forKey: .departments) + + + + + try? container.encodeIfPresent(tags, forKey: .tags) + + + + + try? container.encodeIfPresent(l3CategoryNames, forKey: .l3CategoryNames) + + + + + try? container.encodeIfPresent(sizes, forKey: .sizes) + + + + + try? container.encodeIfPresent(productGroupTag, forKey: .productGroupTag) + + + + + try? container.encodeIfPresent(multiSize, forKey: .multiSize) + + + + + try? container.encodeIfPresent(isGift, forKey: .isGift) + + + + + try? container.encodeIfPresent(isCod, forKey: .isCod) + + + + + try? container.encodeIfPresent(isDependent, forKey: .isDependent) + + + + + try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) + + + + + try? container.encodeIfPresent(moq, forKey: .moq) + + + + + try? container.encodeIfPresent(seo, forKey: .seo) + + + + + try? container.encodeIfPresent(variants, forKey: .variants) + + + + + try? container.encodeIfPresent(variantMedia, forKey: .variantMedia) + + + + + try? container.encodeIfPresent(variantGroup, forKey: .variantGroup) + + + + + try? container.encodeIfPresent(multiCategories, forKey: .multiCategories) + + + + + try? container.encodeIfPresent(templateTag, forKey: .templateTag) + + + + + try? container.encodeIfPresent(netQuantity, forKey: .netQuantity) + + + + + try? container.encodeIfPresent(customOrder, forKey: .customOrder) + + + + + try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) + + + + + try? container.encodeIfPresent(customJson, forKey: .customJson) + + + + + try? container.encodeIfPresent(identifiers, forKey: .identifiers) + + + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + + try? container.encodeIfPresent(customMeta, forKey: .customMeta) + + + + + try? container.encodeIfPresent(discountPercentage, forKey: .discountPercentage) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Catalog { + /* + Model: ApplicationProductsSchema + Used By: Catalog + */ + + class ApplicationProductsSchema: Codable { + + + public var attributes: [String: Any]? + + public var brand: ProductBrand? + + public var color: String? + + public var description: String? + + public var discount: String? + + public var hasVariant: Bool? + + public var highlights: [String]? + + public var imageNature: String + + public var itemCode: String + + public var itemType: String + + public var medias: [Media]? + + public var name: String + + public var price: ProductListingPrice? + + public var productOnlineDate: String? + + public var promoMeta: [String: Any]? + + public var rating: Double? + + public var ratingCount: Int? + + public var sellable: Bool? + + public var shortDescription: String? + + public var similars: [String]? + + public var slug: String + + public var teaserTag: [String: Any]? + + public var tryouts: [String]? + + public var type: String? + + public var uid: Int + + public var popularity: Int? + + public var brandUid: Int + + public var categoryUid: Int + + public var verificationStatus: Int? + + public var channelIdentifier: String? + + public var categorySlug: String? + + public var sizeGuide: String? + + public var l3Categories: [Int] + + public var storeIds: [Int]? + + public var companyIds: [Int]? + + public var departments: [Int] + + public var tags: [String]? + + public var l3CategoryNames: [String]? + + public var sizes: [String]? + + public var productGroupTag: [String]? + + public var multiSize: Bool + + public var isGift: Bool + + public var isCod: Bool + + public var isDependent: Bool + + public var isAvailable: Bool + + public var moq: ApplicationItemMOQ + + public var seo: ApplicationItemSEO + + public var variants: [String: Any]? + + public var variantMedia: [String: Any]? + + public var variantGroup: [String: Any]? + + public var multiCategories: [MultiCategoriesSchema]? + + public var templateTag: String? + + public var netQuantity: [String: Any]? + + public var customOrder: CustomOrder? + + public var countryOfOrigin: String + + public var customJson: [String: Any]? + + public var identifiers: [String]? + + public var itemId: Int? + + public var customMeta: [CustomMeta]? + + public var discountPercentage: Int? + + + public enum CodingKeys: String, CodingKey { + + case attributes = "attributes" + + case brand = "brand" + + case color = "color" + + case description = "description" + + case discount = "discount" + + case hasVariant = "has_variant" + + case highlights = "highlights" + + case imageNature = "image_nature" + + case itemCode = "item_code" + + case itemType = "item_type" + + case medias = "medias" + + case name = "name" + + case price = "price" + + case productOnlineDate = "product_online_date" + + case promoMeta = "promo_meta" + + case rating = "rating" + + case ratingCount = "rating_count" + + case sellable = "sellable" + + case shortDescription = "short_description" + + case similars = "similars" + + case slug = "slug" + + case teaserTag = "teaser_tag" + + case tryouts = "tryouts" + + case type = "type" + + case uid = "uid" + + case popularity = "popularity" + + case brandUid = "brand_uid" + + case categoryUid = "category_uid" + + case verificationStatus = "verification_status" + + case channelIdentifier = "channel_identifier" + + case categorySlug = "category_slug" + + case sizeGuide = "size_guide" + + case l3Categories = "l3_categories" + + case storeIds = "store_ids" + + case companyIds = "company_ids" + + case departments = "departments" + + case tags = "tags" + + case l3CategoryNames = "l3_category_names" + + case sizes = "sizes" + + case productGroupTag = "product_group_tag" + + case multiSize = "multi_size" + + case isGift = "is_gift" + + case isCod = "is_cod" + + case isDependent = "is_dependent" + + case isAvailable = "is_available" + + case moq = "moq" + + case seo = "seo" + + case variants = "variants" + + case variantMedia = "variant_media" + + case variantGroup = "variant_group" + + case multiCategories = "multi_categories" + + case templateTag = "template_tag" + + case netQuantity = "net_quantity" + + case customOrder = "custom_order" + + case countryOfOrigin = "country_of_origin" + + case customJson = "_custom_json" + + case identifiers = "identifiers" + + case itemId = "item_id" + + case customMeta = "_custom_meta" + + case discountPercentage = "discount_percentage" + + } + + public init(attributes: [String: Any]? = nil, brand: ProductBrand? = nil, brandUid: Int, categorySlug: String? = nil, categoryUid: Int, channelIdentifier: String? = nil, color: String? = nil, companyIds: [Int]? = nil, countryOfOrigin: String, customOrder: CustomOrder? = nil, departments: [Int], description: String? = nil, discount: String? = nil, discountPercentage: Int? = nil, hasVariant: Bool? = nil, highlights: [String]? = nil, identifiers: [String]? = nil, imageNature: String, isAvailable: Bool, isCod: Bool, isDependent: Bool, isGift: Bool, itemCode: String, itemId: Int? = nil, itemType: String, l3Categories: [Int], l3CategoryNames: [String]? = nil, medias: [Media]? = nil, moq: ApplicationItemMOQ, multiCategories: [MultiCategoriesSchema]? = nil, multiSize: Bool, name: String, netQuantity: [String: Any]? = nil, popularity: Int? = nil, price: ProductListingPrice? = nil, productGroupTag: [String]? = nil, productOnlineDate: String? = nil, promoMeta: [String: Any]? = nil, rating: Double? = nil, ratingCount: Int? = nil, sellable: Bool? = nil, seo: ApplicationItemSEO, shortDescription: String? = nil, similars: [String]? = nil, sizes: [String]? = nil, sizeGuide: String? = nil, slug: String, storeIds: [Int]? = nil, tags: [String]? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, tryouts: [String]? = nil, type: String? = nil, uid: Int, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verificationStatus: Int? = nil, customJson: [String: Any]? = nil, customMeta: [CustomMeta]? = nil) { + + self.attributes = attributes + + self.brand = brand + + self.color = color + + self.description = description + + self.discount = discount + + self.hasVariant = hasVariant + + self.highlights = highlights + + self.imageNature = imageNature + + self.itemCode = itemCode + + self.itemType = itemType + + self.medias = medias + + self.name = name + + self.price = price + + self.productOnlineDate = productOnlineDate + + self.promoMeta = promoMeta + + self.rating = rating + + self.ratingCount = ratingCount + + self.sellable = sellable + + self.shortDescription = shortDescription + + self.similars = similars + + self.slug = slug + + self.teaserTag = teaserTag + + self.tryouts = tryouts + + self.type = type + + self.uid = uid + + self.popularity = popularity + + self.brandUid = brandUid + + self.categoryUid = categoryUid + + self.verificationStatus = verificationStatus + + self.channelIdentifier = channelIdentifier + + self.categorySlug = categorySlug + + self.sizeGuide = sizeGuide + + self.l3Categories = l3Categories + + self.storeIds = storeIds + + self.companyIds = companyIds + + self.departments = departments + + self.tags = tags + + self.l3CategoryNames = l3CategoryNames + + self.sizes = sizes + + self.productGroupTag = productGroupTag + + self.multiSize = multiSize + + self.isGift = isGift + + self.isCod = isCod + + self.isDependent = isDependent + + self.isAvailable = isAvailable + + self.moq = moq + + self.seo = seo + + self.variants = variants + + self.variantMedia = variantMedia + + self.variantGroup = variantGroup + + self.multiCategories = multiCategories + + self.templateTag = templateTag + + self.netQuantity = netQuantity + + self.customOrder = customOrder + + self.countryOfOrigin = countryOfOrigin + + self.customJson = customJson + + self.identifiers = identifiers + + self.itemId = itemId + + self.customMeta = customMeta + + self.discountPercentage = discountPercentage + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + attributes = try container.decode([String: Any].self, forKey: .attributes) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + brand = try container.decode(ProductBrand.self, forKey: .brand) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + color = try container.decode(String.self, forKey: .color) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + discount = try container.decode(String.self, forKey: .discount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + 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 { + + } + + + + imageNature = try container.decode(String.self, forKey: .imageNature) + + + + + itemCode = try container.decode(String.self, forKey: .itemCode) + + + + + itemType = try container.decode(String.self, forKey: .itemType) + + + + + do { + medias = try container.decode([Media].self, forKey: .medias) + + } 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 { + price = try container.decode(ProductListingPrice.self, forKey: .price) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + rating = try container.decode(Double.self, forKey: .rating) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + ratingCount = try container.decode(Int.self, forKey: .ratingCount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + sellable = try container.decode(Bool.self, forKey: .sellable) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + similars = try container.decode([String].self, forKey: .similars) + + } 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 { + teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + uid = try container.decode(Int.self, forKey: .uid) + + + + + do { + popularity = try container.decode(Int.self, forKey: .popularity) + + } 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) + + + + + categoryUid = try container.decode(Int.self, forKey: .categoryUid) + + + + + do { + verificationStatus = try container.decode(Int.self, forKey: .verificationStatus) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + categorySlug = try container.decode(String.self, forKey: .categorySlug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + l3Categories = try container.decode([Int].self, forKey: .l3Categories) + + + + + do { + storeIds = try container.decode([Int].self, forKey: .storeIds) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + companyIds = try container.decode([Int].self, forKey: .companyIds) + + } 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 { + 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 { + + } + + + + do { + l3CategoryNames = try container.decode([String].self, forKey: .l3CategoryNames) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + sizes = try container.decode([String].self, forKey: .sizes) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + productGroupTag = try container.decode([String].self, forKey: .productGroupTag) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + multiSize = try container.decode(Bool.self, forKey: .multiSize) + + + + + isGift = try container.decode(Bool.self, forKey: .isGift) + + + + + isCod = try container.decode(Bool.self, forKey: .isCod) + + + + + isDependent = try container.decode(Bool.self, forKey: .isDependent) + + + + + isAvailable = try container.decode(Bool.self, forKey: .isAvailable) + + + + + moq = try container.decode(ApplicationItemMOQ.self, forKey: .moq) + + + + + seo = try container.decode(ApplicationItemSEO.self, forKey: .seo) + + + + + do { + 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 { + + } + + + + do { + variantMedia = try container.decode([String: Any].self, forKey: .variantMedia) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + variantGroup = try container.decode([String: Any].self, forKey: .variantGroup) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + multiCategories = try container.decode([MultiCategoriesSchema].self, forKey: .multiCategories) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + templateTag = try container.decode(String.self, forKey: .templateTag) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + netQuantity = try container.decode([String: Any].self, forKey: .netQuantity) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + countryOfOrigin = try container.decode(String.self, forKey: .countryOfOrigin) + + + + + do { + 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 { + + } + + + + do { + identifiers = try container.decode([String].self, forKey: .identifiers) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemId = try container.decode(Int.self, forKey: .itemId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + customMeta = try container.decode([CustomMeta].self, forKey: .customMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + discountPercentage = try container.decode(Int.self, forKey: .discountPercentage) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(attributes, forKey: .attributes) + + + + + try? container.encodeIfPresent(brand, forKey: .brand) + + + + + try? container.encodeIfPresent(color, forKey: .color) + + + + + try? container.encodeIfPresent(description, forKey: .description) + + + + + try? container.encodeIfPresent(discount, forKey: .discount) + + + + + try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + + + + + try? container.encodeIfPresent(highlights, forKey: .highlights) + + + + + try? container.encodeIfPresent(imageNature, forKey: .imageNature) + + + + + try? container.encodeIfPresent(itemCode, forKey: .itemCode) + + + + + try? container.encodeIfPresent(itemType, forKey: .itemType) + + + + + try? container.encodeIfPresent(medias, forKey: .medias) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(price, forKey: .price) + + + + + try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) + + + + + try? container.encodeIfPresent(promoMeta, forKey: .promoMeta) + + + + + try? container.encodeIfPresent(rating, forKey: .rating) + + + + + try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + + + + + try? container.encodeIfPresent(sellable, forKey: .sellable) + + + + + try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + + + + + try? container.encodeIfPresent(similars, forKey: .similars) + + + + + try? container.encodeIfPresent(slug, forKey: .slug) + + + + + try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + + + + + try? container.encodeIfPresent(tryouts, forKey: .tryouts) + + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(uid, forKey: .uid) + + + + + try? container.encodeIfPresent(popularity, forKey: .popularity) + + + + + try? container.encodeIfPresent(brandUid, forKey: .brandUid) + + + + + try? container.encodeIfPresent(categoryUid, forKey: .categoryUid) + + + + + try? container.encodeIfPresent(verificationStatus, forKey: .verificationStatus) + + + + + try? container.encodeIfPresent(channelIdentifier, forKey: .channelIdentifier) + + + + + try? container.encodeIfPresent(categorySlug, forKey: .categorySlug) + + + + + try? container.encodeIfPresent(sizeGuide, forKey: .sizeGuide) + + + + + try? container.encodeIfPresent(l3Categories, forKey: .l3Categories) + + + + + try? container.encodeIfPresent(storeIds, forKey: .storeIds) + + + + + try? container.encodeIfPresent(companyIds, forKey: .companyIds) + + + + + try? container.encodeIfPresent(departments, forKey: .departments) + + + + + try? container.encodeIfPresent(tags, forKey: .tags) + + + + + try? container.encodeIfPresent(l3CategoryNames, forKey: .l3CategoryNames) + + + + + try? container.encodeIfPresent(sizes, forKey: .sizes) + + + + + try? container.encodeIfPresent(productGroupTag, forKey: .productGroupTag) + + + + + try? container.encodeIfPresent(multiSize, forKey: .multiSize) + + + + + try? container.encodeIfPresent(isGift, forKey: .isGift) + + + + + try? container.encodeIfPresent(isCod, forKey: .isCod) + + + + + try? container.encodeIfPresent(isDependent, forKey: .isDependent) + + + + + try? container.encodeIfPresent(isAvailable, forKey: .isAvailable) + + + + + try? container.encodeIfPresent(moq, forKey: .moq) + + + + + try? container.encodeIfPresent(seo, forKey: .seo) + + + + + try? container.encodeIfPresent(variants, forKey: .variants) + + + + + try? container.encodeIfPresent(variantMedia, forKey: .variantMedia) + + + + + try? container.encodeIfPresent(variantGroup, forKey: .variantGroup) + + + + + try? container.encodeIfPresent(multiCategories, forKey: .multiCategories) + + + + + try? container.encodeIfPresent(templateTag, forKey: .templateTag) + + + + + try? container.encodeIfPresent(netQuantity, forKey: .netQuantity) + + + + + try? container.encodeIfPresent(customOrder, forKey: .customOrder) + + + + + try? container.encodeIfPresent(countryOfOrigin, forKey: .countryOfOrigin) + + + + + try? container.encodeIfPresent(customJson, forKey: .customJson) + + + + + try? container.encodeIfPresent(identifiers, forKey: .identifiers) + + + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + + try? container.encodeIfPresent(customMeta, forKey: .customMeta) + + + + + try? container.encodeIfPresent(discountPercentage, forKey: .discountPercentage) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Catalog/ArticleStoreResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ArticleStoreResponseSchemaCatalogPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Catalog/ArticleStoreResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ArticleStoreResponseSchemaCatalogPlatformModel.swift index 251964bb0f..8c7ad139e6 100644 --- a/Sources/code/platform/Models/Catalog/ArticleStoreResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ArticleStoreResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ArticleStoreResponse + Model: ArticleStoreResponseSchema Used By: Catalog */ - class ArticleStoreResponse: Codable { + class ArticleStoreResponseSchema: Codable { public var name: String? @@ -130,11 +130,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ArticleStoreResponse + Model: ArticleStoreResponseSchema Used By: Catalog */ - class ArticleStoreResponse: Codable { + class ArticleStoreResponseSchema: Codable { public var name: String? diff --git a/Sources/code/platform/Models/Catalog/AttributeMasterSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/AttributeMasterSchemaCatalogPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Catalog/AttributeMasterSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/AttributeMasterSchemaCatalogPlatformModel.swift index 4296357f9a..8d62d559eb 100644 --- a/Sources/code/platform/Models/Catalog/AttributeMasterSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/AttributeMasterSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: AttributeMasterSerializer + Model: AttributeMasterSchema Used By: Catalog */ - class AttributeMasterSerializer: Codable { + class AttributeMasterSchema: Codable { public var createdBy: [String: Any]? @@ -463,11 +463,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: AttributeMasterSerializer + Model: AttributeMasterSchema Used By: Catalog */ - class AttributeMasterSerializer: Codable { + class AttributeMasterSchema: Codable { public var createdBy: [String: Any]? diff --git a/Sources/code/platform/Models/Catalog/BaseAppCategoryReturnConfigCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/BaseAppCategoryReturnConfigCatalogPlatformModel.swift index 00b7f74214..accfed305a 100644 --- a/Sources/code/platform/Models/Catalog/BaseAppCategoryReturnConfigCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/BaseAppCategoryReturnConfigCatalogPlatformModel.swift @@ -12,28 +12,16 @@ public extension PlatformClient.Catalog { class BaseAppCategoryReturnConfig: Codable { - public var appId: String - - public var companyId: Int - public var data: [AppCategoryReturnConfig] public enum CodingKeys: String, CodingKey { - case appId = "app_id" - - case companyId = "company_id" - case data = "data" } - public init(appId: String, companyId: Int, data: [AppCategoryReturnConfig]) { - - self.appId = appId - - self.companyId = companyId + public init(data: [AppCategoryReturnConfig]) { self.data = data @@ -43,16 +31,6 @@ public extension PlatformClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - appId = try container.decode(String.self, forKey: .appId) - - - - - companyId = try container.decode(Int.self, forKey: .companyId) - - - - data = try container.decode([AppCategoryReturnConfig].self, forKey: .data) @@ -64,16 +42,6 @@ public extension PlatformClient.Catalog { - try? container.encodeIfPresent(appId, forKey: .appId) - - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) - - - - try? container.encodeIfPresent(data, forKey: .data) @@ -93,28 +61,16 @@ public extension PlatformClient.ApplicationClient.Catalog { class BaseAppCategoryReturnConfig: Codable { - public var appId: String - - public var companyId: Int - public var data: [AppCategoryReturnConfig] public enum CodingKeys: String, CodingKey { - case appId = "app_id" - - case companyId = "company_id" - case data = "data" } - public init(appId: String, companyId: Int, data: [AppCategoryReturnConfig]) { - - self.appId = appId - - self.companyId = companyId + public init(data: [AppCategoryReturnConfig]) { self.data = data @@ -124,16 +80,6 @@ public extension PlatformClient.ApplicationClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - appId = try container.decode(String.self, forKey: .appId) - - - - - companyId = try container.decode(Int.self, forKey: .companyId) - - - - data = try container.decode([AppCategoryReturnConfig].self, forKey: .data) @@ -145,16 +91,6 @@ public extension PlatformClient.ApplicationClient.Catalog { - try? container.encodeIfPresent(appId, forKey: .appId) - - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) - - - - try? container.encodeIfPresent(data, forKey: .data) diff --git a/Sources/code/platform/Models/Catalog/BaseAppCategoryReturnConfigResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/BaseAppCategoryReturnConfigResponseSchemaCatalogPlatformModel.swift similarity index 78% rename from Sources/code/platform/Models/Catalog/BaseAppCategoryReturnConfigResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/BaseAppCategoryReturnConfigResponseSchemaCatalogPlatformModel.swift index 9adb695aef..58e11a0770 100644 --- a/Sources/code/platform/Models/Catalog/BaseAppCategoryReturnConfigResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/BaseAppCategoryReturnConfigResponseSchemaCatalogPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: BaseAppCategoryReturnConfigResponse + Model: BaseAppCategoryReturnConfigResponseSchema Used By: Catalog */ - class BaseAppCategoryReturnConfigResponse: Codable { + class BaseAppCategoryReturnConfigResponseSchema: Codable { - public var data: [AppCategoryReturnConfigResponse]? + public var data: [AppCategoryReturnConfigResponseSchema]? - public var page: PageResponse? + public var page: PageResponseSchema? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(data: [AppCategoryReturnConfigResponse]? = nil, page: PageResponse? = nil) { + public init(data: [AppCategoryReturnConfigResponseSchema]? = nil, page: PageResponseSchema? = nil) { self.data = data @@ -38,7 +38,7 @@ public extension PlatformClient.Catalog { do { - data = try container.decode([AppCategoryReturnConfigResponse].self, forKey: .data) + data = try container.decode([AppCategoryReturnConfigResponseSchema].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient.Catalog { do { - page = try container.decode(PageResponse.self, forKey: .page) + page = try container.decode(PageResponseSchema.self, forKey: .page) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,16 +84,16 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: BaseAppCategoryReturnConfigResponse + Model: BaseAppCategoryReturnConfigResponseSchema Used By: Catalog */ - class BaseAppCategoryReturnConfigResponse: Codable { + class BaseAppCategoryReturnConfigResponseSchema: Codable { - public var data: [AppCategoryReturnConfigResponse]? + public var data: [AppCategoryReturnConfigResponseSchema]? - public var page: PageResponse? + public var page: PageResponseSchema? public enum CodingKeys: String, CodingKey { @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(data: [AppCategoryReturnConfigResponse]? = nil, page: PageResponse? = nil) { + public init(data: [AppCategoryReturnConfigResponseSchema]? = nil, page: PageResponseSchema? = nil) { self.data = data @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - data = try container.decode([AppCategoryReturnConfigResponse].self, forKey: .data) + data = try container.decode([AppCategoryReturnConfigResponseSchema].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -129,7 +129,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - page = try container.decode(PageResponse.self, forKey: .page) + page = try container.decode(PageResponseSchema.self, forKey: .page) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/BrandItemCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/BrandItemCatalogPlatformModel.swift index 95a78fa701..8836a94885 100644 --- a/Sources/code/platform/Models/Catalog/BrandItemCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/BrandItemCatalogPlatformModel.swift @@ -20,7 +20,7 @@ public extension PlatformClient.Catalog { public var discount: String? - public var logo: BrandMedia? + public var logo: Media2? public var name: String? @@ -49,7 +49,7 @@ public extension PlatformClient.Catalog { } - public init(action: Action? = nil, banners: ImageUrls? = nil, departments: [String]? = nil, discount: String? = nil, logo: BrandMedia? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { + public init(action: Action? = nil, banners: ImageUrls? = nil, departments: [String]? = nil, discount: String? = nil, logo: Media2? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { self.action = action @@ -122,7 +122,7 @@ public extension PlatformClient.Catalog { do { - logo = try container.decode(BrandMedia.self, forKey: .logo) + logo = try container.decode(Media2.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -237,7 +237,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var discount: String? - public var logo: BrandMedia? + public var logo: Media2? public var name: String? @@ -266,7 +266,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(action: Action? = nil, banners: ImageUrls? = nil, departments: [String]? = nil, discount: String? = nil, logo: BrandMedia? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { + public init(action: Action? = nil, banners: ImageUrls? = nil, departments: [String]? = nil, discount: String? = nil, logo: Media2? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { self.action = action @@ -339,7 +339,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - logo = try container.decode(BrandMedia.self, forKey: .logo) + logo = try container.decode(Media2.self, forKey: .logo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/BrandListingResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/BrandListingResponseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/BrandListingResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/BrandListingResponseSchemaCatalogPlatformModel.swift index a178d0b924..35c678dfd3 100644 --- a/Sources/code/platform/Models/Catalog/BrandListingResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/BrandListingResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: BrandListingResponse + Model: BrandListingResponseSchema Used By: Catalog */ - class BrandListingResponse: Codable { + class BrandListingResponseSchema: Codable { public var items: [BrandItem]? @@ -77,11 +77,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: BrandListingResponse + Model: BrandListingResponseSchema Used By: Catalog */ - class BrandListingResponse: Codable { + class BrandListingResponseSchema: Codable { public var items: [BrandItem]? diff --git a/Sources/code/platform/Models/Catalog/InventoryBrandMetaCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/BrandMeta1CatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/InventoryBrandMetaCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/BrandMeta1CatalogPlatformModel.swift index 1a8d609495..2ec97bbd18 100644 --- a/Sources/code/platform/Models/Catalog/InventoryBrandMetaCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/BrandMeta1CatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryBrandMeta + Model: BrandMeta1 Used By: Catalog */ - class InventoryBrandMeta: Codable { + class BrandMeta1: Codable { public var id: Int? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryBrandMeta + Model: BrandMeta1 Used By: Catalog */ - class InventoryBrandMeta: Codable { + class BrandMeta1: Codable { public var id: Int? diff --git a/Sources/code/platform/Models/Catalog/BulkAssetResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/BulkAssetResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/BulkAssetResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/BulkAssetResponseSchemaCatalogPlatformModel.swift index 89a15da408..efd89606b0 100644 --- a/Sources/code/platform/Models/Catalog/BulkAssetResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/BulkAssetResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: BulkAssetResponse + Model: BulkAssetResponseSchema Used By: Catalog */ - class BulkAssetResponse: Codable { + class BulkAssetResponseSchema: Codable { public var items: [Items]? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: BulkAssetResponse + Model: BulkAssetResponseSchema Used By: Catalog */ - class BulkAssetResponse: Codable { + class BulkAssetResponseSchema: Codable { public var items: [Items]? diff --git a/Sources/code/platform/Models/Catalog/SuccessResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/BulkHsnResponseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/SuccessResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/BulkHsnResponseSchemaCatalogPlatformModel.swift index cc65c7e942..719e669179 100644 --- a/Sources/code/platform/Models/Catalog/SuccessResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/BulkHsnResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: SuccessResponse + Model: BulkHsnResponseSchema Used By: Catalog */ - class SuccessResponse: Codable { + class BulkHsnResponseSchema: Codable { public var success: Bool? @@ -61,11 +61,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: SuccessResponse + Model: BulkHsnResponseSchema Used By: Catalog */ - class SuccessResponse: Codable { + class BulkHsnResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Catalog/BulkProductRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/BulkProductRequestSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/BulkProductRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/BulkProductRequestSchemaCatalogPlatformModel.swift index 53341946b3..a2613ac331 100644 --- a/Sources/code/platform/Models/Catalog/BulkProductRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/BulkProductRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: BulkProductRequest + Model: BulkProductRequestSchema Used By: Catalog */ - class BulkProductRequest: Codable { + class BulkProductRequestSchema: Codable { public var batchId: String @@ -102,11 +102,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: BulkProductRequest + Model: BulkProductRequestSchema Used By: Catalog */ - class BulkProductRequest: Codable { + class BulkProductRequestSchema: Codable { public var batchId: String diff --git a/Sources/code/platform/Models/Catalog/BulkResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/BulkResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/BulkResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/BulkResponseSchemaCatalogPlatformModel.swift index aa7f2495c7..cd93cff320 100644 --- a/Sources/code/platform/Models/Catalog/BulkResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/BulkResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: BulkResponse + Model: BulkResponseSchema Used By: Catalog */ - class BulkResponse: Codable { + class BulkResponseSchema: Codable { public var batchId: String @@ -162,11 +162,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: BulkResponse + Model: BulkResponseSchema Used By: Catalog */ - class BulkResponse: Codable { + class BulkResponseSchema: Codable { public var batchId: String diff --git a/Sources/code/platform/Models/Catalog/CatalogInsightResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CatalogInsightResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/CatalogInsightResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CatalogInsightResponseSchemaCatalogPlatformModel.swift index 7896f41d74..84ee6d6a0c 100644 --- a/Sources/code/platform/Models/Catalog/CatalogInsightResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CatalogInsightResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: CatalogInsightResponse + Model: CatalogInsightResponseSchema Used By: Catalog */ - class CatalogInsightResponse: Codable { + class CatalogInsightResponseSchema: Codable { public var brandDistribution: CatalogInsightBrand? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: CatalogInsightResponse + Model: CatalogInsightResponseSchema Used By: Catalog */ - class CatalogInsightResponse: Codable { + class CatalogInsightResponseSchema: Codable { public var brandDistribution: CatalogInsightBrand? diff --git a/Sources/code/platform/Models/Catalog/CategoriesResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CategoriesResponseSchemaCatalogPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Catalog/CategoriesResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CategoriesResponseSchemaCatalogPlatformModel.swift index 8d66c01744..50549c8823 100644 --- a/Sources/code/platform/Models/Catalog/CategoriesResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CategoriesResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: CategoriesResponse + Model: CategoriesResponseSchema Used By: Catalog */ - class CategoriesResponse: Codable { + class CategoriesResponseSchema: Codable { public var name: String? @@ -153,11 +153,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: CategoriesResponse + Model: CategoriesResponseSchema Used By: Catalog */ - class CategoriesResponse: Codable { + class CategoriesResponseSchema: Codable { public var name: String? diff --git a/Sources/code/platform/Models/Catalog/CategoryItemsCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CategoryItemsCatalogPlatformModel.swift index 54e996aa44..101dc864d4 100644 --- a/Sources/code/platform/Models/Catalog/CategoryItemsCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CategoryItemsCatalogPlatformModel.swift @@ -12,8 +12,6 @@ public extension PlatformClient.Catalog { class CategoryItems: Codable { - public var customJson: [String: Any]? - public var action: Action? public var banners: ImageUrls? @@ -29,8 +27,6 @@ public extension PlatformClient.Catalog { public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" - case action = "action" case banners = "banners" @@ -45,9 +41,7 @@ public extension PlatformClient.Catalog { } - public init(action: Action? = nil, banners: ImageUrls? = nil, childs: [Child]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { - - self.customJson = customJson + public init(action: Action? = nil, banners: ImageUrls? = nil, childs: [Child]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { self.action = action @@ -67,18 +61,6 @@ public extension PlatformClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - 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 { - - } - - - do { action = try container.decode(Action.self, forKey: .action) @@ -157,11 +139,6 @@ public extension PlatformClient.Catalog { - try? container.encodeIfPresent(customJson, forKey: .customJson) - - - - try? container.encodeIfPresent(action, forKey: .action) @@ -206,8 +183,6 @@ public extension PlatformClient.ApplicationClient.Catalog { class CategoryItems: Codable { - public var customJson: [String: Any]? - public var action: Action? public var banners: ImageUrls? @@ -223,8 +198,6 @@ public extension PlatformClient.ApplicationClient.Catalog { public enum CodingKeys: String, CodingKey { - case customJson = "_custom_json" - case action = "action" case banners = "banners" @@ -239,9 +212,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(action: Action? = nil, banners: ImageUrls? = nil, childs: [Child]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil, customJson: [String: Any]? = nil) { - - self.customJson = customJson + public init(action: Action? = nil, banners: ImageUrls? = nil, childs: [Child]? = nil, name: String? = nil, slug: String? = nil, uid: Int? = nil) { self.action = action @@ -261,18 +232,6 @@ public extension PlatformClient.ApplicationClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - 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 { - - } - - - do { action = try container.decode(Action.self, forKey: .action) @@ -351,11 +310,6 @@ public extension PlatformClient.ApplicationClient.Catalog { - try? container.encodeIfPresent(customJson, forKey: .customJson) - - - - try? container.encodeIfPresent(action, forKey: .action) diff --git a/Sources/code/platform/Models/Catalog/CategoryListingResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CategoryListingResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/CategoryListingResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CategoryListingResponseSchemaCatalogPlatformModel.swift index 53f02fe633..c7722f4801 100644 --- a/Sources/code/platform/Models/Catalog/CategoryListingResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CategoryListingResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: CategoryListingResponse + Model: CategoryListingResponseSchema Used By: Catalog */ - class CategoryListingResponse: Codable { + class CategoryListingResponseSchema: Codable { public var data: [DepartmentCategoryTree]? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: CategoryListingResponse + Model: CategoryListingResponseSchema Used By: Catalog */ - class CategoryListingResponse: Codable { + class CategoryListingResponseSchema: Codable { public var data: [DepartmentCategoryTree]? diff --git a/Sources/code/platform/Models/Catalog/CategoryResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CategoryResponseSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/CategoryResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CategoryResponseSchemaCatalogPlatformModel.swift index 404541d054..b762ee48c8 100644 --- a/Sources/code/platform/Models/Catalog/CategoryResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CategoryResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: CategoryResponse + Model: CategoryResponseSchema Used By: Catalog */ - class CategoryResponse: Codable { + class CategoryResponseSchema: Codable { public var items: [Category]? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: CategoryResponse + Model: CategoryResponseSchema Used By: Catalog */ - class CategoryResponse: Codable { + class CategoryResponseSchema: Codable { public var items: [Category]? diff --git a/Sources/code/platform/Models/Catalog/CollectionCreateResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CollectionCreateResponseSchemaCatalogPlatformModel.swift similarity index 69% rename from Sources/code/platform/Models/Catalog/CollectionCreateResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CollectionCreateResponseSchemaCatalogPlatformModel.swift index 016cc5b327..ce93fcbc04 100644 --- a/Sources/code/platform/Models/Catalog/CollectionCreateResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CollectionCreateResponseSchemaCatalogPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: CollectionCreateResponse + Model: CollectionCreateResponseSchema Used By: Catalog */ - class CollectionCreateResponse: Codable { + class CollectionCreateResponseSchema: Codable { public var uid: String? - public var schedule: CollectionSchedule? + public var schedule: [String: Any]? public var allowFacets: Bool? @@ -26,6 +26,8 @@ public extension PlatformClient.Catalog { public var banners: ImageUrls? + public var cron: [String: Any]? + public var description: String? public var isActive: Bool? @@ -50,22 +52,6 @@ public extension PlatformClient.Catalog { public var visibleFacetsKeys: [String]? - public var published: Bool? - - public var tags: [String]? - - public var action: Action? - - public var customJson: [String: Any]? - - public var localeLanguage: [String: Any]? - - public var seo: SeoDetail? - - public var isVisible: Bool? - - public var id: String? - public enum CodingKeys: String, CodingKey { @@ -83,6 +69,8 @@ public extension PlatformClient.Catalog { case banners = "banners" + case cron = "cron" + case description = "description" case isActive = "is_active" @@ -107,25 +95,9 @@ public extension PlatformClient.Catalog { case visibleFacetsKeys = "visible_facets_keys" - case published = "published" - - case tags = "tags" - - case action = "action" - - case customJson = "_custom_json" - - case localeLanguage = "_locale_language" - - case seo = "seo" - - case isVisible = "is_visible" - - case id = "id" - } - public init(action: Action? = nil, allowFacets: Bool? = nil, allowSort: Bool? = nil, appId: String? = nil, badge: [String: Any]? = nil, banners: ImageUrls? = nil, description: String? = nil, id: String? = nil, isActive: Bool? = nil, isVisible: Bool? = nil, logo: BannerImage? = nil, meta: [String: Any]? = nil, name: String? = nil, priority: Int? = nil, published: Bool? = nil, query: [CollectionQuery]? = nil, seo: SeoDetail? = nil, slug: String? = nil, sortOn: String? = nil, tag: [String]? = nil, tags: [String]? = nil, type: String? = nil, uid: String? = nil, visibleFacetsKeys: [String]? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil, schedule: CollectionSchedule? = nil) { + 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, priority: Int? = nil, query: [CollectionQuery]? = nil, slug: String? = nil, sortOn: String? = nil, tag: [String]? = nil, type: String? = nil, uid: String? = nil, visibleFacetsKeys: [String]? = nil, schedule: [String: Any]? = nil) { self.uid = uid @@ -141,6 +113,8 @@ public extension PlatformClient.Catalog { self.banners = banners + self.cron = cron + self.description = description self.isActive = isActive @@ -165,22 +139,6 @@ public extension PlatformClient.Catalog { self.visibleFacetsKeys = visibleFacetsKeys - self.published = published - - self.tags = tags - - self.action = action - - self.customJson = customJson - - self.localeLanguage = localeLanguage - - self.seo = seo - - self.isVisible = isVisible - - self.id = id - } required public init(from decoder: Decoder) throws { @@ -200,7 +158,7 @@ public extension PlatformClient.Catalog { do { - schedule = try container.decode(CollectionSchedule.self, forKey: .schedule) + schedule = try container.decode([String: Any].self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -271,6 +229,18 @@ public extension PlatformClient.Catalog { + do { + cron = try container.decode([String: Any].self, forKey: .cron) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { description = try container.decode(String.self, forKey: .description) @@ -414,102 +384,6 @@ public extension PlatformClient.Catalog { } - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - action = try container.decode(Action.self, forKey: .action) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - isVisible = try container.decode(Bool.self, forKey: .isVisible) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - } public func encode(to encoder: Encoder) throws { @@ -552,6 +426,11 @@ public extension PlatformClient.Catalog { + try? container.encodeIfPresent(cron, forKey: .cron) + + + + try? container.encodeIfPresent(description, forKey: .description) @@ -610,46 +489,6 @@ public extension PlatformClient.Catalog { try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - - - try? container.encodeIfPresent(published, forKey: .published) - - - - - try? container.encodeIfPresent(tags, forKey: .tags) - - - - - try? container.encodeIfPresent(action, forKey: .action) - - - - - try? container.encodeIfPresent(customJson, forKey: .customJson) - - - - - try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) - - - - - try? container.encodeIfPresent(seo, forKey: .seo) - - - - - try? container.encodeIfPresent(isVisible, forKey: .isVisible) - - - - - try? container.encodeIfPresent(id, forKey: .id) - - } } @@ -659,16 +498,16 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: CollectionCreateResponse + Model: CollectionCreateResponseSchema Used By: Catalog */ - class CollectionCreateResponse: Codable { + class CollectionCreateResponseSchema: Codable { public var uid: String? - public var schedule: CollectionSchedule? + public var schedule: [String: Any]? public var allowFacets: Bool? @@ -680,6 +519,8 @@ public extension PlatformClient.ApplicationClient.Catalog { public var banners: ImageUrls? + public var cron: [String: Any]? + public var description: String? public var isActive: Bool? @@ -704,22 +545,6 @@ public extension PlatformClient.ApplicationClient.Catalog { public var visibleFacetsKeys: [String]? - public var published: Bool? - - public var tags: [String]? - - public var action: Action? - - public var customJson: [String: Any]? - - public var localeLanguage: [String: Any]? - - public var seo: SeoDetail? - - public var isVisible: Bool? - - public var id: String? - public enum CodingKeys: String, CodingKey { @@ -737,6 +562,8 @@ public extension PlatformClient.ApplicationClient.Catalog { case banners = "banners" + case cron = "cron" + case description = "description" case isActive = "is_active" @@ -761,25 +588,9 @@ public extension PlatformClient.ApplicationClient.Catalog { case visibleFacetsKeys = "visible_facets_keys" - case published = "published" - - case tags = "tags" - - case action = "action" - - case customJson = "_custom_json" - - case localeLanguage = "_locale_language" - - case seo = "seo" - - case isVisible = "is_visible" - - case id = "id" - } - public init(action: Action? = nil, allowFacets: Bool? = nil, allowSort: Bool? = nil, appId: String? = nil, badge: [String: Any]? = nil, banners: ImageUrls? = nil, description: String? = nil, id: String? = nil, isActive: Bool? = nil, isVisible: Bool? = nil, logo: BannerImage? = nil, meta: [String: Any]? = nil, name: String? = nil, priority: Int? = nil, published: Bool? = nil, query: [CollectionQuery]? = nil, seo: SeoDetail? = nil, slug: String? = nil, sortOn: String? = nil, tag: [String]? = nil, tags: [String]? = nil, type: String? = nil, uid: String? = nil, visibleFacetsKeys: [String]? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil, schedule: CollectionSchedule? = nil) { + 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, priority: Int? = nil, query: [CollectionQuery]? = nil, slug: String? = nil, sortOn: String? = nil, tag: [String]? = nil, type: String? = nil, uid: String? = nil, visibleFacetsKeys: [String]? = nil, schedule: [String: Any]? = nil) { self.uid = uid @@ -795,6 +606,8 @@ public extension PlatformClient.ApplicationClient.Catalog { self.banners = banners + self.cron = cron + self.description = description self.isActive = isActive @@ -819,22 +632,6 @@ public extension PlatformClient.ApplicationClient.Catalog { self.visibleFacetsKeys = visibleFacetsKeys - self.published = published - - self.tags = tags - - self.action = action - - self.customJson = customJson - - self.localeLanguage = localeLanguage - - self.seo = seo - - self.isVisible = isVisible - - self.id = id - } required public init(from decoder: Decoder) throws { @@ -854,7 +651,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - schedule = try container.decode(CollectionSchedule.self, forKey: .schedule) + schedule = try container.decode([String: Any].self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -925,6 +722,18 @@ public extension PlatformClient.ApplicationClient.Catalog { + do { + cron = try container.decode([String: Any].self, forKey: .cron) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { description = try container.decode(String.self, forKey: .description) @@ -1068,102 +877,6 @@ public extension PlatformClient.ApplicationClient.Catalog { } - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - action = try container.decode(Action.self, forKey: .action) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - isVisible = try container.decode(Bool.self, forKey: .isVisible) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - } public func encode(to encoder: Encoder) throws { @@ -1206,6 +919,11 @@ public extension PlatformClient.ApplicationClient.Catalog { + try? container.encodeIfPresent(cron, forKey: .cron) + + + + try? container.encodeIfPresent(description, forKey: .description) @@ -1264,46 +982,6 @@ public extension PlatformClient.ApplicationClient.Catalog { try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - - - try? container.encodeIfPresent(published, forKey: .published) - - - - - try? container.encodeIfPresent(tags, forKey: .tags) - - - - - try? container.encodeIfPresent(action, forKey: .action) - - - - - try? container.encodeIfPresent(customJson, forKey: .customJson) - - - - - try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) - - - - - try? container.encodeIfPresent(seo, forKey: .seo) - - - - - try? container.encodeIfPresent(isVisible, forKey: .isVisible) - - - - - try? container.encodeIfPresent(id, forKey: .id) - - } } diff --git a/Sources/code/platform/Models/Catalog/CollectionDetailResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CollectionDetailResponseSchemaCatalogPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Catalog/CollectionDetailResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CollectionDetailResponseSchemaCatalogPlatformModel.swift index 50030b4424..8832388172 100644 --- a/Sources/code/platform/Models/Catalog/CollectionDetailResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CollectionDetailResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: CollectionDetailResponse + Model: CollectionDetailResponseSchema Used By: Catalog */ - class CollectionDetailResponse: Codable { + class CollectionDetailResponseSchema: Codable { public var schedule: [String: Any]? @@ -475,11 +475,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: CollectionDetailResponse + Model: CollectionDetailResponseSchema Used By: Catalog */ - class CollectionDetailResponse: Codable { + class CollectionDetailResponseSchema: Codable { public var schedule: [String: Any]? diff --git a/Sources/code/platform/Models/Catalog/InventoryCompanyMetaCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CompanyMeta1CatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/InventoryCompanyMetaCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CompanyMeta1CatalogPlatformModel.swift index 22d0be46ef..68de509429 100644 --- a/Sources/code/platform/Models/Catalog/InventoryCompanyMetaCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CompanyMeta1CatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryCompanyMeta + Model: CompanyMeta1 Used By: Catalog */ - class InventoryCompanyMeta: Codable { + class CompanyMeta1: Codable { public var id: Int? @@ -61,11 +61,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryCompanyMeta + Model: CompanyMeta1 Used By: Catalog */ - class InventoryCompanyMeta: Codable { + class CompanyMeta1: Codable { public var id: Int? diff --git a/Sources/code/platform/Models/Catalog/ConfigSuccessResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ConfigErrorResponseSchemaCatalogPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Catalog/ConfigSuccessResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ConfigErrorResponseSchemaCatalogPlatformModel.swift index 100963d7e3..521b2d75db 100644 --- a/Sources/code/platform/Models/Catalog/ConfigSuccessResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ConfigErrorResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ConfigSuccessResponse + Model: ConfigErrorResponseSchema Used By: Catalog */ - class ConfigSuccessResponse: Codable { + class ConfigErrorResponseSchema: Codable { public var message: String @@ -54,11 +54,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ConfigSuccessResponse + Model: ConfigErrorResponseSchema Used By: Catalog */ - class ConfigSuccessResponse: Codable { + class ConfigErrorResponseSchema: Codable { public var message: String diff --git a/Sources/code/platform/Models/Catalog/ConfigErrorResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ConfigSuccessResponseSchemaCatalogPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Catalog/ConfigErrorResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ConfigSuccessResponseSchemaCatalogPlatformModel.swift index 21c8a0b12a..a5f946e3a3 100644 --- a/Sources/code/platform/Models/Catalog/ConfigErrorResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ConfigSuccessResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ConfigErrorResponse + Model: ConfigSuccessResponseSchema Used By: Catalog */ - class ConfigErrorResponse: Codable { + class ConfigSuccessResponseSchema: Codable { public var message: String @@ -54,11 +54,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ConfigErrorResponse + Model: ConfigSuccessResponseSchema Used By: Catalog */ - class ConfigErrorResponse: Codable { + class ConfigSuccessResponseSchema: Codable { public var message: String diff --git a/Sources/code/platform/Models/Catalog/CreateAutocompleteWordsResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CreateAutocompleteWordsResponseSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/CreateAutocompleteWordsResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CreateAutocompleteWordsResponseSchemaCatalogPlatformModel.swift index 2ca6209fd8..334cf106c0 100644 --- a/Sources/code/platform/Models/Catalog/CreateAutocompleteWordsResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CreateAutocompleteWordsResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: CreateAutocompleteWordsResponse + Model: CreateAutocompleteWordsResponseSchema Used By: Catalog */ - class CreateAutocompleteWordsResponse: Codable { + class CreateAutocompleteWordsResponseSchema: Codable { public var customJson: [String: Any]? @@ -130,11 +130,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: CreateAutocompleteWordsResponse + Model: CreateAutocompleteWordsResponseSchema Used By: Catalog */ - class CreateAutocompleteWordsResponse: Codable { + class CreateAutocompleteWordsResponseSchema: Codable { public var customJson: [String: Any]? diff --git a/Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CreateMarketplaceOptinResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CreateMarketplaceOptinResponseSchemaCatalogPlatformModel.swift index 403c174768..2796fe59f7 100644 --- a/Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CreateMarketplaceOptinResponseSchemaCatalogPlatformModel.swift @@ -5,74 +5,74 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: UpdateMarketplaceOptinResponse + Model: CreateMarketplaceOptinResponseSchema Used By: Catalog */ - class UpdateMarketplaceOptinResponse: Codable { + class CreateMarketplaceOptinResponseSchema: Codable { + public var storeIds: [Int]? + public var brandIds: [Int]? public var companyId: Int? - public var appId: String? - - public var enabled: Bool? - public var optLevel: String? public var platform: String? - public var storeIds: [Int]? + public var enabled: Bool? public var createdBy: CreatedBy? public var modifiedBy: CreatedBy? + public var appId: String? + public enum CodingKeys: String, CodingKey { + case storeIds = "store_ids" + case brandIds = "brand_ids" case companyId = "company_id" - case appId = "app_id" - - case enabled = "enabled" - case optLevel = "opt_level" case platform = "platform" - case storeIds = "store_ids" + case enabled = "enabled" case createdBy = "created_by" case modifiedBy = "modified_by" + case appId = "app_id" + } public init(appId: String? = nil, brandIds: [Int]? = nil, companyId: Int? = nil, createdBy: CreatedBy? = nil, enabled: Bool? = nil, modifiedBy: CreatedBy? = nil, optLevel: String? = nil, platform: String? = nil, storeIds: [Int]? = nil) { + self.storeIds = storeIds + self.brandIds = brandIds self.companyId = companyId - self.appId = appId - - self.enabled = enabled - self.optLevel = optLevel self.platform = platform - self.storeIds = storeIds + self.enabled = enabled self.createdBy = createdBy self.modifiedBy = modifiedBy + self.appId = appId + } required public init(from decoder: Decoder) throws { @@ -80,7 +80,7 @@ public extension PlatformClient.Catalog { do { - brandIds = try container.decode([Int].self, forKey: .brandIds) + storeIds = try container.decode([Int].self, forKey: .storeIds) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +92,7 @@ public extension PlatformClient.Catalog { do { - companyId = try container.decode(Int.self, forKey: .companyId) + brandIds = try container.decode([Int].self, forKey: .brandIds) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +104,7 @@ public extension PlatformClient.Catalog { do { - appId = try container.decode(String.self, forKey: .appId) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,7 +116,7 @@ public extension PlatformClient.Catalog { do { - enabled = try container.decode(Bool.self, forKey: .enabled) + optLevel = try container.decode(String.self, forKey: .optLevel) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +128,7 @@ public extension PlatformClient.Catalog { do { - optLevel = try container.decode(String.self, forKey: .optLevel) + platform = try container.decode(String.self, forKey: .platform) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -140,7 +140,7 @@ public extension PlatformClient.Catalog { do { - platform = try container.decode(String.self, forKey: .platform) + enabled = try container.decode(Bool.self, forKey: .enabled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +152,7 @@ public extension PlatformClient.Catalog { do { - storeIds = try container.decode([Int].self, forKey: .storeIds) + createdBy = try container.decode(CreatedBy.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -164,7 +164,7 @@ public extension PlatformClient.Catalog { do { - createdBy = try container.decode(CreatedBy.self, forKey: .createdBy) + modifiedBy = try container.decode(CreatedBy.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +176,7 @@ public extension PlatformClient.Catalog { do { - modifiedBy = try container.decode(CreatedBy.self, forKey: .modifiedBy) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -193,22 +193,17 @@ public extension PlatformClient.Catalog { - try? container.encodeIfPresent(brandIds, forKey: .brandIds) - - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(storeIds, forKey: .storeIds) - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encodeIfPresent(brandIds, forKey: .brandIds) - try? container.encodeIfPresent(enabled, forKey: .enabled) + try? container.encodeIfPresent(companyId, forKey: .companyId) @@ -223,7 +218,7 @@ public extension PlatformClient.Catalog { - try? container.encodeIfPresent(storeIds, forKey: .storeIds) + try? container.encodeIfPresent(enabled, forKey: .enabled) @@ -236,6 +231,11 @@ public extension PlatformClient.Catalog { try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + + + try? container.encodeIfPresent(appId, forKey: .appId) + + } } @@ -245,74 +245,74 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: UpdateMarketplaceOptinResponse + Model: CreateMarketplaceOptinResponseSchema Used By: Catalog */ - class UpdateMarketplaceOptinResponse: Codable { + class CreateMarketplaceOptinResponseSchema: Codable { + public var storeIds: [Int]? + public var brandIds: [Int]? public var companyId: Int? - public var appId: String? - - public var enabled: Bool? - public var optLevel: String? public var platform: String? - public var storeIds: [Int]? + public var enabled: Bool? public var createdBy: CreatedBy? public var modifiedBy: CreatedBy? + public var appId: String? + public enum CodingKeys: String, CodingKey { + case storeIds = "store_ids" + case brandIds = "brand_ids" case companyId = "company_id" - case appId = "app_id" - - case enabled = "enabled" - case optLevel = "opt_level" case platform = "platform" - case storeIds = "store_ids" + case enabled = "enabled" case createdBy = "created_by" case modifiedBy = "modified_by" + case appId = "app_id" + } public init(appId: String? = nil, brandIds: [Int]? = nil, companyId: Int? = nil, createdBy: CreatedBy? = nil, enabled: Bool? = nil, modifiedBy: CreatedBy? = nil, optLevel: String? = nil, platform: String? = nil, storeIds: [Int]? = nil) { + self.storeIds = storeIds + self.brandIds = brandIds self.companyId = companyId - self.appId = appId - - self.enabled = enabled - self.optLevel = optLevel self.platform = platform - self.storeIds = storeIds + self.enabled = enabled self.createdBy = createdBy self.modifiedBy = modifiedBy + self.appId = appId + } required public init(from decoder: Decoder) throws { @@ -320,7 +320,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - brandIds = try container.decode([Int].self, forKey: .brandIds) + storeIds = try container.decode([Int].self, forKey: .storeIds) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -332,7 +332,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - companyId = try container.decode(Int.self, forKey: .companyId) + brandIds = try container.decode([Int].self, forKey: .brandIds) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -344,7 +344,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - appId = try container.decode(String.self, forKey: .appId) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -356,7 +356,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - enabled = try container.decode(Bool.self, forKey: .enabled) + optLevel = try container.decode(String.self, forKey: .optLevel) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -368,7 +368,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - optLevel = try container.decode(String.self, forKey: .optLevel) + platform = try container.decode(String.self, forKey: .platform) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -380,7 +380,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - platform = try container.decode(String.self, forKey: .platform) + enabled = try container.decode(Bool.self, forKey: .enabled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -392,7 +392,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - storeIds = try container.decode([Int].self, forKey: .storeIds) + createdBy = try container.decode(CreatedBy.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -404,7 +404,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - createdBy = try container.decode(CreatedBy.self, forKey: .createdBy) + modifiedBy = try container.decode(CreatedBy.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -416,7 +416,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - modifiedBy = try container.decode(CreatedBy.self, forKey: .modifiedBy) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -433,22 +433,17 @@ public extension PlatformClient.ApplicationClient.Catalog { - try? container.encodeIfPresent(brandIds, forKey: .brandIds) - - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(storeIds, forKey: .storeIds) - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encodeIfPresent(brandIds, forKey: .brandIds) - try? container.encodeIfPresent(enabled, forKey: .enabled) + try? container.encodeIfPresent(companyId, forKey: .companyId) @@ -463,7 +458,7 @@ public extension PlatformClient.ApplicationClient.Catalog { - try? container.encodeIfPresent(storeIds, forKey: .storeIds) + try? container.encodeIfPresent(enabled, forKey: .enabled) @@ -476,6 +471,11 @@ public extension PlatformClient.ApplicationClient.Catalog { try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + + + try? container.encodeIfPresent(appId, forKey: .appId) + + } } diff --git a/Sources/code/platform/Models/Catalog/GetSearchConfigurationResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CreateSearchConfigurationRequestSchemaCatalogPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Catalog/GetSearchConfigurationResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CreateSearchConfigurationRequestSchemaCatalogPlatformModel.swift index 1e2e5a595e..af3df67bf4 100644 --- a/Sources/code/platform/Models/Catalog/GetSearchConfigurationResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CreateSearchConfigurationRequestSchemaCatalogPlatformModel.swift @@ -5,24 +5,24 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetSearchConfigurationResponse + Model: CreateSearchConfigurationRequestSchema Used By: Catalog */ - class GetSearchConfigurationResponse: Codable { + class CreateSearchConfigurationRequestSchema: Codable { public var applicationId: String public var companyId: Int - public var createdBy: UserSerializer? + public var createdBy: UserSchema? public var createdOn: String? public var isProximityEnabled: Bool? - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? public var modifiedOn: String? @@ -53,7 +53,7 @@ public extension PlatformClient.Catalog { } - public init(applicationId: String, companyId: Int, createdBy: UserSerializer? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { + public init(applicationId: String, companyId: Int, createdBy: UserSchema? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { self.applicationId = applicationId @@ -90,7 +90,7 @@ public extension PlatformClient.Catalog { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient.Catalog { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -231,24 +231,24 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetSearchConfigurationResponse + Model: CreateSearchConfigurationRequestSchema Used By: Catalog */ - class GetSearchConfigurationResponse: Codable { + class CreateSearchConfigurationRequestSchema: Codable { public var applicationId: String public var companyId: Int - public var createdBy: UserSerializer? + public var createdBy: UserSchema? public var createdOn: String? public var isProximityEnabled: Bool? - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? public var modifiedOn: String? @@ -279,7 +279,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(applicationId: String, companyId: Int, createdBy: UserSerializer? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { + public init(applicationId: String, companyId: Int, createdBy: UserSchema? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { self.applicationId = applicationId @@ -316,7 +316,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -352,7 +352,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/DeleteSearchConfigurationResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CreateSearchConfigurationResponseSchemaCatalogPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Catalog/DeleteSearchConfigurationResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CreateSearchConfigurationResponseSchemaCatalogPlatformModel.swift index 41add504f9..87d3c4e784 100644 --- a/Sources/code/platform/Models/Catalog/DeleteSearchConfigurationResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CreateSearchConfigurationResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: DeleteSearchConfigurationResponse + Model: CreateSearchConfigurationResponseSchema Used By: Catalog */ - class DeleteSearchConfigurationResponse: Codable { + class CreateSearchConfigurationResponseSchema: Codable { public var success: Bool? @@ -61,11 +61,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: DeleteSearchConfigurationResponse + Model: CreateSearchConfigurationResponseSchema Used By: Catalog */ - class DeleteSearchConfigurationResponse: Codable { + class CreateSearchConfigurationResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Catalog/CreateUpdateAppReturnConfigCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CreateUpdateAppReturnConfigCatalogPlatformModel.swift index c0fb5eab14..bc8b8197dc 100644 --- a/Sources/code/platform/Models/Catalog/CreateUpdateAppReturnConfigCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CreateUpdateAppReturnConfigCatalogPlatformModel.swift @@ -12,28 +12,16 @@ public extension PlatformClient.Catalog { class CreateUpdateAppReturnConfig: Codable { - public var appId: String - - public var companyId: Int - public var returnConfigLevel: String public enum CodingKeys: String, CodingKey { - case appId = "app_id" - - case companyId = "company_id" - case returnConfigLevel = "return_config_level" } - public init(appId: String, companyId: Int, returnConfigLevel: String) { - - self.appId = appId - - self.companyId = companyId + public init(returnConfigLevel: String) { self.returnConfigLevel = returnConfigLevel @@ -43,16 +31,6 @@ public extension PlatformClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - appId = try container.decode(String.self, forKey: .appId) - - - - - companyId = try container.decode(Int.self, forKey: .companyId) - - - - returnConfigLevel = try container.decode(String.self, forKey: .returnConfigLevel) @@ -64,16 +42,6 @@ public extension PlatformClient.Catalog { - try? container.encodeIfPresent(appId, forKey: .appId) - - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) - - - - try? container.encodeIfPresent(returnConfigLevel, forKey: .returnConfigLevel) @@ -93,28 +61,16 @@ public extension PlatformClient.ApplicationClient.Catalog { class CreateUpdateAppReturnConfig: Codable { - public var appId: String - - public var companyId: Int - public var returnConfigLevel: String public enum CodingKeys: String, CodingKey { - case appId = "app_id" - - case companyId = "company_id" - case returnConfigLevel = "return_config_level" } - public init(appId: String, companyId: Int, returnConfigLevel: String) { - - self.appId = appId - - self.companyId = companyId + public init(returnConfigLevel: String) { self.returnConfigLevel = returnConfigLevel @@ -124,16 +80,6 @@ public extension PlatformClient.ApplicationClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - appId = try container.decode(String.self, forKey: .appId) - - - - - companyId = try container.decode(Int.self, forKey: .companyId) - - - - returnConfigLevel = try container.decode(String.self, forKey: .returnConfigLevel) @@ -145,16 +91,6 @@ public extension PlatformClient.ApplicationClient.Catalog { - try? container.encodeIfPresent(appId, forKey: .appId) - - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) - - - - try? container.encodeIfPresent(returnConfigLevel, forKey: .returnConfigLevel) diff --git a/Sources/code/platform/Models/Catalog/CrossSellingResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CrossSellingResponseSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/CrossSellingResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/CrossSellingResponseSchemaCatalogPlatformModel.swift index 048d67d9b5..bf675b0c37 100644 --- a/Sources/code/platform/Models/Catalog/CrossSellingResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CrossSellingResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: CrossSellingResponse + Model: CrossSellingResponseSchema Used By: Catalog */ - class CrossSellingResponse: Codable { + class CrossSellingResponseSchema: Codable { public var brandDistribution: CatalogInsightBrand? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: CrossSellingResponse + Model: CrossSellingResponseSchema Used By: Catalog */ - class CrossSellingResponse: Codable { + class CrossSellingResponseSchema: Codable { public var brandDistribution: CatalogInsightBrand? diff --git a/Sources/code/platform/Models/Catalog/CustomMetaCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CustomMetaCatalogPlatformModel.swift new file mode 100644 index 0000000000..e719398710 --- /dev/null +++ b/Sources/code/platform/Models/Catalog/CustomMetaCatalogPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Catalog { + /* + Model: CustomMeta + Used By: Catalog + */ + + class CustomMeta: Codable { + + + public var key: String + + public var value: String + + + public enum CodingKeys: String, CodingKey { + + case key = "key" + + case value = "value" + + } + + public init(key: String, value: String) { + + self.key = key + + self.value = value + + } + + 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) + + + + } + + 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) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Catalog { + /* + Model: CustomMeta + Used By: Catalog + */ + + class CustomMeta: Codable { + + + public var key: String + + public var value: String + + + public enum CodingKeys: String, CodingKey { + + case key = "key" + + case value = "value" + + } + + public init(key: String, value: String) { + + self.key = key + + self.value = value + + } + + 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) + + + + } + + 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) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Catalog/CustomOrderCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/CustomOrderCatalogPlatformModel.swift index 09d2811154..6a47cd2496 100644 --- a/Sources/code/platform/Models/Catalog/CustomOrderCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/CustomOrderCatalogPlatformModel.swift @@ -12,31 +12,31 @@ public extension PlatformClient.Catalog { class CustomOrder: Codable { - public var isCustomOrder: Bool? + public var manufacturingTimeUnit: String? - public var manufacturingTime: Int? + public var isCustomOrder: Bool - public var manufacturingTimeUnit: String? + public var manufacturingTime: Int? public enum CodingKeys: String, CodingKey { + case manufacturingTimeUnit = "manufacturing_time_unit" + case isCustomOrder = "is_custom_order" case manufacturingTime = "manufacturing_time" - case manufacturingTimeUnit = "manufacturing_time_unit" - } - public init(isCustomOrder: Bool? = nil, manufacturingTime: Int? = nil, manufacturingTimeUnit: String? = nil) { + public init(isCustomOrder: Bool, manufacturingTime: Int? = nil, manufacturingTimeUnit: String? = nil) { + + self.manufacturingTimeUnit = manufacturingTimeUnit self.isCustomOrder = isCustomOrder self.manufacturingTime = manufacturingTime - self.manufacturingTimeUnit = manufacturingTimeUnit - } required public init(from decoder: Decoder) throws { @@ -44,7 +44,7 @@ public extension PlatformClient.Catalog { do { - isCustomOrder = try container.decode(Bool.self, forKey: .isCustomOrder) + manufacturingTimeUnit = try container.decode(String.self, forKey: .manufacturingTimeUnit) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -55,20 +55,13 @@ public extension PlatformClient.Catalog { - do { - manufacturingTime = try container.decode(Int.self, forKey: .manufacturingTime) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } + isCustomOrder = try container.decode(Bool.self, forKey: .isCustomOrder) + do { - manufacturingTimeUnit = try container.decode(String.self, forKey: .manufacturingTimeUnit) + manufacturingTime = try container.decode(Int.self, forKey: .manufacturingTime) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,17 +78,17 @@ public extension PlatformClient.Catalog { - try? container.encodeIfPresent(isCustomOrder, forKey: .isCustomOrder) + try? container.encodeIfPresent(manufacturingTimeUnit, forKey: .manufacturingTimeUnit) - try? container.encodeIfPresent(manufacturingTime, forKey: .manufacturingTime) + try? container.encodeIfPresent(isCustomOrder, forKey: .isCustomOrder) - try? container.encodeIfPresent(manufacturingTimeUnit, forKey: .manufacturingTimeUnit) + try? container.encodeIfPresent(manufacturingTime, forKey: .manufacturingTime) } @@ -114,31 +107,31 @@ public extension PlatformClient.ApplicationClient.Catalog { class CustomOrder: Codable { - public var isCustomOrder: Bool? + public var manufacturingTimeUnit: String? - public var manufacturingTime: Int? + public var isCustomOrder: Bool - public var manufacturingTimeUnit: String? + public var manufacturingTime: Int? public enum CodingKeys: String, CodingKey { + case manufacturingTimeUnit = "manufacturing_time_unit" + case isCustomOrder = "is_custom_order" case manufacturingTime = "manufacturing_time" - case manufacturingTimeUnit = "manufacturing_time_unit" - } - public init(isCustomOrder: Bool? = nil, manufacturingTime: Int? = nil, manufacturingTimeUnit: String? = nil) { + public init(isCustomOrder: Bool, manufacturingTime: Int? = nil, manufacturingTimeUnit: String? = nil) { + + self.manufacturingTimeUnit = manufacturingTimeUnit self.isCustomOrder = isCustomOrder self.manufacturingTime = manufacturingTime - self.manufacturingTimeUnit = manufacturingTimeUnit - } required public init(from decoder: Decoder) throws { @@ -146,7 +139,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - isCustomOrder = try container.decode(Bool.self, forKey: .isCustomOrder) + manufacturingTimeUnit = try container.decode(String.self, forKey: .manufacturingTimeUnit) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -157,20 +150,13 @@ public extension PlatformClient.ApplicationClient.Catalog { - do { - manufacturingTime = try container.decode(Int.self, forKey: .manufacturingTime) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } + isCustomOrder = try container.decode(Bool.self, forKey: .isCustomOrder) + do { - manufacturingTimeUnit = try container.decode(String.self, forKey: .manufacturingTimeUnit) + manufacturingTime = try container.decode(Int.self, forKey: .manufacturingTime) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -187,17 +173,17 @@ public extension PlatformClient.ApplicationClient.Catalog { - try? container.encodeIfPresent(isCustomOrder, forKey: .isCustomOrder) + try? container.encodeIfPresent(manufacturingTimeUnit, forKey: .manufacturingTimeUnit) - try? container.encodeIfPresent(manufacturingTime, forKey: .manufacturingTime) + try? container.encodeIfPresent(isCustomOrder, forKey: .isCustomOrder) - try? container.encodeIfPresent(manufacturingTimeUnit, forKey: .manufacturingTimeUnit) + try? container.encodeIfPresent(manufacturingTime, forKey: .manufacturingTime) } diff --git a/Sources/code/platform/Models/Catalog/DefaultKeyRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/DefaultKeyRequestSchemaCatalogPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Catalog/DefaultKeyRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/DefaultKeyRequestSchemaCatalogPlatformModel.swift index e1a0267d94..dcdb7f4568 100644 --- a/Sources/code/platform/Models/Catalog/DefaultKeyRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/DefaultKeyRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: DefaultKeyRequest + Model: DefaultKeyRequestSchema Used By: Catalog */ - class DefaultKeyRequest: Codable { + class DefaultKeyRequestSchema: Codable { public var defaultKey: String @@ -54,11 +54,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: DefaultKeyRequest + Model: DefaultKeyRequestSchema Used By: Catalog */ - class DefaultKeyRequest: Codable { + class DefaultKeyRequestSchema: Codable { public var defaultKey: String diff --git a/Sources/code/platform/Models/Catalog/DeleteAppCategoryReturnConfigCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/DeleteAppCategoryReturnConfigCatalogPlatformModel.swift index e0e3b93baf..03c3c3fb4e 100644 --- a/Sources/code/platform/Models/Catalog/DeleteAppCategoryReturnConfigCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/DeleteAppCategoryReturnConfigCatalogPlatformModel.swift @@ -12,51 +12,29 @@ public extension PlatformClient.Catalog { class DeleteAppCategoryReturnConfig: Codable { - public var appId: String - public var categoryIds: [Int] - public var companyId: Int - public enum CodingKeys: String, CodingKey { - case appId = "app_id" - case categoryIds = "category_ids" - case companyId = "company_id" - } - public init(appId: String, categoryIds: [Int], companyId: Int) { - - self.appId = appId + public init(categoryIds: [Int]) { self.categoryIds = categoryIds - self.companyId = companyId - } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - appId = try container.decode(String.self, forKey: .appId) - - - - categoryIds = try container.decode([Int].self, forKey: .categoryIds) - - companyId = try container.decode(Int.self, forKey: .companyId) - - - } public func encode(to encoder: Encoder) throws { @@ -64,19 +42,9 @@ public extension PlatformClient.Catalog { - try? container.encodeIfPresent(appId, forKey: .appId) - - - - try? container.encodeIfPresent(categoryIds, forKey: .categoryIds) - - - try? container.encodeIfPresent(companyId, forKey: .companyId) - - } } @@ -93,51 +61,29 @@ public extension PlatformClient.ApplicationClient.Catalog { class DeleteAppCategoryReturnConfig: Codable { - public var appId: String - public var categoryIds: [Int] - public var companyId: Int - public enum CodingKeys: String, CodingKey { - case appId = "app_id" - case categoryIds = "category_ids" - case companyId = "company_id" - } - public init(appId: String, categoryIds: [Int], companyId: Int) { - - self.appId = appId + public init(categoryIds: [Int]) { self.categoryIds = categoryIds - self.companyId = companyId - } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - appId = try container.decode(String.self, forKey: .appId) - - - - categoryIds = try container.decode([Int].self, forKey: .categoryIds) - - companyId = try container.decode(Int.self, forKey: .companyId) - - - } public func encode(to encoder: Encoder) throws { @@ -145,19 +91,9 @@ public extension PlatformClient.ApplicationClient.Catalog { - try? container.encodeIfPresent(appId, forKey: .appId) - - - - try? container.encodeIfPresent(categoryIds, forKey: .categoryIds) - - - try? container.encodeIfPresent(companyId, forKey: .companyId) - - } } diff --git a/Sources/code/platform/Models/Catalog/DeleteResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/DeleteResponseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/DeleteResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/DeleteResponseSchemaCatalogPlatformModel.swift index 9c703cebe6..c757ee5d11 100644 --- a/Sources/code/platform/Models/Catalog/DeleteResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/DeleteResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: DeleteResponse + Model: DeleteResponseSchema Used By: Catalog */ - class DeleteResponse: Codable { + class DeleteResponseSchema: Codable { public var message: String? @@ -61,11 +61,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: DeleteResponse + Model: DeleteResponseSchema Used By: Catalog */ - class DeleteResponse: Codable { + class DeleteResponseSchema: Codable { public var message: String? diff --git a/Sources/code/platform/Models/Catalog/CreateSearchConfigurationResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/DeleteSearchConfigurationResponseSchemaCatalogPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Catalog/CreateSearchConfigurationResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/DeleteSearchConfigurationResponseSchemaCatalogPlatformModel.swift index 6df90110d7..6b61de4d9b 100644 --- a/Sources/code/platform/Models/Catalog/CreateSearchConfigurationResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/DeleteSearchConfigurationResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: CreateSearchConfigurationResponse + Model: DeleteSearchConfigurationResponseSchema Used By: Catalog */ - class CreateSearchConfigurationResponse: Codable { + class DeleteSearchConfigurationResponseSchema: Codable { public var success: Bool? @@ -61,11 +61,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: CreateSearchConfigurationResponse + Model: DeleteSearchConfigurationResponseSchema Used By: Catalog */ - class CreateSearchConfigurationResponse: Codable { + class DeleteSearchConfigurationResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Catalog/DepartmentErrorResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/DepartmentErrorResponseSchemaCatalogPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Catalog/DepartmentErrorResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/DepartmentErrorResponseSchemaCatalogPlatformModel.swift index 0f80b8c6b5..a60f2f3602 100644 --- a/Sources/code/platform/Models/Catalog/DepartmentErrorResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/DepartmentErrorResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: DepartmentErrorResponse + Model: DepartmentErrorResponseSchema Used By: Catalog */ - class DepartmentErrorResponse: Codable { + class DepartmentErrorResponseSchema: Codable { public var code: String? @@ -153,11 +153,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: DepartmentErrorResponse + Model: DepartmentErrorResponseSchema Used By: Catalog */ - class DepartmentErrorResponse: Codable { + class DepartmentErrorResponseSchema: Codable { public var code: String? diff --git a/Sources/code/platform/Models/Catalog/DepartmentIdentifierCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/DepartmentIdentifierCatalogPlatformModel.swift index 641fe0e282..adf2124ce8 100644 --- a/Sources/code/platform/Models/Catalog/DepartmentIdentifierCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/DepartmentIdentifierCatalogPlatformModel.swift @@ -12,8 +12,6 @@ public extension PlatformClient.Catalog { class DepartmentIdentifier: Codable { - public var name: String? - public var slug: String? public var uid: Int? @@ -21,17 +19,13 @@ public extension PlatformClient.Catalog { public enum CodingKeys: String, CodingKey { - case name = "name" - case slug = "slug" case uid = "uid" } - public init(name: String? = nil, slug: String? = nil, uid: Int? = nil) { - - self.name = name + public init(slug: String? = nil, uid: Int? = nil) { self.slug = slug @@ -43,18 +37,6 @@ public extension PlatformClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - 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 { - - } - - - do { slug = try container.decode(String.self, forKey: .slug) @@ -85,11 +67,6 @@ public extension PlatformClient.Catalog { - try? container.encodeIfPresent(name, forKey: .name) - - - - try? container.encodeIfPresent(slug, forKey: .slug) @@ -114,8 +91,6 @@ public extension PlatformClient.ApplicationClient.Catalog { class DepartmentIdentifier: Codable { - public var name: String? - public var slug: String? public var uid: Int? @@ -123,17 +98,13 @@ public extension PlatformClient.ApplicationClient.Catalog { public enum CodingKeys: String, CodingKey { - case name = "name" - case slug = "slug" case uid = "uid" } - public init(name: String? = nil, slug: String? = nil, uid: Int? = nil) { - - self.name = name + public init(slug: String? = nil, uid: Int? = nil) { self.slug = slug @@ -145,18 +116,6 @@ public extension PlatformClient.ApplicationClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - 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 { - - } - - - do { slug = try container.decode(String.self, forKey: .slug) @@ -187,11 +146,6 @@ public extension PlatformClient.ApplicationClient.Catalog { - try? container.encodeIfPresent(name, forKey: .name) - - - - try? container.encodeIfPresent(slug, forKey: .slug) diff --git a/Sources/code/platform/Models/Catalog/DepartmentResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/DepartmentResponseSchemaCatalogPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Catalog/DepartmentResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/DepartmentResponseSchemaCatalogPlatformModel.swift index 2c20f45828..250986ba1c 100644 --- a/Sources/code/platform/Models/Catalog/DepartmentResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/DepartmentResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: DepartmentResponse + Model: DepartmentResponseSchema Used By: Catalog */ - class DepartmentResponse: Codable { + class DepartmentResponseSchema: Codable { public var items: [Department]? @@ -61,11 +61,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: DepartmentResponse + Model: DepartmentResponseSchema Used By: Catalog */ - class DepartmentResponse: Codable { + class DepartmentResponseSchema: Codable { public var items: [Department]? diff --git a/Sources/code/platform/Models/Catalog/DepartmentsResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/DepartmentsResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/DepartmentsResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/DepartmentsResponseSchemaCatalogPlatformModel.swift index f05c8f3884..73927f52ad 100644 --- a/Sources/code/platform/Models/Catalog/DepartmentsResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/DepartmentsResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: DepartmentsResponse + Model: DepartmentsResponseSchema Used By: Catalog */ - class DepartmentsResponse: Codable { + class DepartmentsResponseSchema: Codable { public var items: [GetDepartment]? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: DepartmentsResponse + Model: DepartmentsResponseSchema Used By: Catalog */ - class DepartmentsResponse: Codable { + class DepartmentsResponseSchema: Codable { public var items: [GetDepartment]? diff --git a/Sources/code/platform/Models/Catalog/InventoryDimensionResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/DimensionResponse1CatalogPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Catalog/InventoryDimensionResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/DimensionResponse1CatalogPlatformModel.swift index 3c1f160670..8a886b59d1 100644 --- a/Sources/code/platform/Models/Catalog/InventoryDimensionResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/DimensionResponse1CatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryDimensionResponse + Model: DimensionResponse1 Used By: Catalog */ - class InventoryDimensionResponse: Codable { + class DimensionResponse1: Codable { public var height: Double? @@ -130,11 +130,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryDimensionResponse + Model: DimensionResponse1 Used By: Catalog */ - class InventoryDimensionResponse: Codable { + class DimensionResponse1: Codable { public var height: Double? diff --git a/Sources/code/platform/Models/Catalog/DimensionResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/DimensionResponseSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/DimensionResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/DimensionResponseSchemaCatalogPlatformModel.swift index 0bb43ea552..c68d698ebf 100644 --- a/Sources/code/platform/Models/Catalog/DimensionResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/DimensionResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: DimensionResponse + Model: DimensionResponseSchema Used By: Catalog */ - class DimensionResponse: Codable { + class DimensionResponseSchema: Codable { public var height: Double @@ -118,11 +118,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: DimensionResponse + Model: DimensionResponseSchema Used By: Catalog */ - class DimensionResponse: Codable { + class DimensionResponseSchema: Codable { public var height: Double diff --git a/Sources/code/platform/Models/Catalog/ErrorResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ErrorResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/ErrorResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ErrorResponseSchemaCatalogPlatformModel.swift index c3d1ef0520..f4a56935ad 100644 --- a/Sources/code/platform/Models/Catalog/ErrorResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ErrorResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ErrorResponse + Model: ErrorResponseSchema Used By: Catalog */ - class ErrorResponse: Codable { + class ErrorResponseSchema: Codable { public var code: String? @@ -153,11 +153,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ErrorResponse + Model: ErrorResponseSchema Used By: Catalog */ - class ErrorResponse: Codable { + class ErrorResponseSchema: Codable { public var code: String? diff --git a/Sources/code/platform/Models/Catalog/FiltersCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/FiltersCatalogPlatformModel.swift new file mode 100644 index 0000000000..0d7042b841 --- /dev/null +++ b/Sources/code/platform/Models/Catalog/FiltersCatalogPlatformModel.swift @@ -0,0 +1,300 @@ + + +import Foundation + + +public extension PlatformClient.Catalog { + /* + Model: Filters + Used By: Catalog + */ + + class Filters: Codable { + + + public var brands: [String]? + + public var fromDate: String? + + public var quantity: InventoryExportQuantityFilter? + + public var stores: [String]? + + public var toDate: String? + + + public enum CodingKeys: String, CodingKey { + + case brands = "brands" + + case fromDate = "from_date" + + case quantity = "quantity" + + case stores = "stores" + + case toDate = "to_date" + + } + + public init(brands: [String]? = nil, fromDate: String? = nil, quantity: InventoryExportQuantityFilter? = nil, stores: [String]? = nil, toDate: String? = nil) { + + self.brands = brands + + self.fromDate = fromDate + + self.quantity = quantity + + self.stores = stores + + self.toDate = toDate + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + brands = try container.decode([String].self, forKey: .brands) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + fromDate = try container.decode(String.self, forKey: .fromDate) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + quantity = try container.decode(InventoryExportQuantityFilter.self, forKey: .quantity) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + stores = try container.decode([String].self, forKey: .stores) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + toDate = try container.decode(String.self, forKey: .toDate) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(brands, forKey: .brands) + + + + + try? container.encodeIfPresent(fromDate, forKey: .fromDate) + + + + + try? container.encodeIfPresent(quantity, forKey: .quantity) + + + + + try? container.encodeIfPresent(stores, forKey: .stores) + + + + + try? container.encodeIfPresent(toDate, forKey: .toDate) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Catalog { + /* + Model: Filters + Used By: Catalog + */ + + class Filters: Codable { + + + public var brands: [String]? + + public var fromDate: String? + + public var quantity: InventoryExportQuantityFilter? + + public var stores: [String]? + + public var toDate: String? + + + public enum CodingKeys: String, CodingKey { + + case brands = "brands" + + case fromDate = "from_date" + + case quantity = "quantity" + + case stores = "stores" + + case toDate = "to_date" + + } + + public init(brands: [String]? = nil, fromDate: String? = nil, quantity: InventoryExportQuantityFilter? = nil, stores: [String]? = nil, toDate: String? = nil) { + + self.brands = brands + + self.fromDate = fromDate + + self.quantity = quantity + + self.stores = stores + + self.toDate = toDate + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + brands = try container.decode([String].self, forKey: .brands) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + fromDate = try container.decode(String.self, forKey: .fromDate) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + quantity = try container.decode(InventoryExportQuantityFilter.self, forKey: .quantity) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + stores = try container.decode([String].self, forKey: .stores) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + toDate = try container.decode(String.self, forKey: .toDate) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(brands, forKey: .brands) + + + + + try? container.encodeIfPresent(fromDate, forKey: .fromDate) + + + + + try? container.encodeIfPresent(quantity, forKey: .quantity) + + + + + try? container.encodeIfPresent(stores, forKey: .stores) + + + + + try? container.encodeIfPresent(toDate, forKey: .toDate) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Catalog/GetAddressSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetAddressSchemaCatalogPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Catalog/GetAddressSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetAddressSchemaCatalogPlatformModel.swift index 5f249b0f39..41eae76cc0 100644 --- a/Sources/code/platform/Models/Catalog/GetAddressSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetAddressSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetAddressSerializer + Model: GetAddressSchema Used By: Catalog */ - class GetAddressSerializer: Codable { + class GetAddressSchema: Codable { public var address1: String? @@ -291,11 +291,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetAddressSerializer + Model: GetAddressSchema Used By: Catalog */ - class GetAddressSerializer: Codable { + class GetAddressSchema: Codable { public var address1: String? diff --git a/Sources/code/platform/Models/Catalog/GetAutocompleteWordsResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetAutocompleteWordsResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/GetAutocompleteWordsResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetAutocompleteWordsResponseSchemaCatalogPlatformModel.swift index de35ad0397..f93a8f5968 100644 --- a/Sources/code/platform/Models/Catalog/GetAutocompleteWordsResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetAutocompleteWordsResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetAutocompleteWordsResponse + Model: GetAutocompleteWordsResponseSchema Used By: Catalog */ - class GetAutocompleteWordsResponse: Codable { + class GetAutocompleteWordsResponseSchema: Codable { public var items: [GetAutocompleteWordsData]? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetAutocompleteWordsResponse + Model: GetAutocompleteWordsResponseSchema Used By: Catalog */ - class GetAutocompleteWordsResponse: Codable { + class GetAutocompleteWordsResponseSchema: Codable { public var items: [GetAutocompleteWordsData]? diff --git a/Sources/code/platform/Models/Catalog/GetCatalogConfigurationMetaDataCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetCatalogConfigurationMetaDataCatalogPlatformModel.swift index 3ca7be4da1..b05735c642 100644 --- a/Sources/code/platform/Models/Catalog/GetCatalogConfigurationMetaDataCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetCatalogConfigurationMetaDataCatalogPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Catalog { class GetCatalogConfigurationMetaData: Codable { - public var listing: MetaDataListingResponse? + public var listing: MetaDataListingResponseSchema? public var product: GetCatalogConfigurationDetailsProduct? @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(listing: MetaDataListingResponse? = nil, product: GetCatalogConfigurationDetailsProduct? = nil) { + public init(listing: MetaDataListingResponseSchema? = nil, product: GetCatalogConfigurationDetailsProduct? = nil) { self.listing = listing @@ -38,7 +38,7 @@ public extension PlatformClient.Catalog { do { - listing = try container.decode(MetaDataListingResponse.self, forKey: .listing) + listing = try container.decode(MetaDataListingResponseSchema.self, forKey: .listing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension PlatformClient.ApplicationClient.Catalog { class GetCatalogConfigurationMetaData: Codable { - public var listing: MetaDataListingResponse? + public var listing: MetaDataListingResponseSchema? public var product: GetCatalogConfigurationDetailsProduct? @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(listing: MetaDataListingResponse? = nil, product: GetCatalogConfigurationDetailsProduct? = nil) { + public init(listing: MetaDataListingResponseSchema? = nil, product: GetCatalogConfigurationDetailsProduct? = nil) { self.listing = listing @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - listing = try container.decode(MetaDataListingResponse.self, forKey: .listing) + listing = try container.decode(MetaDataListingResponseSchema.self, forKey: .listing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/GetCollectionDetailNestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetCollectionDetailNestCatalogPlatformModel.swift index bf3a93b5b7..1667840fb2 100644 --- a/Sources/code/platform/Models/Catalog/GetCollectionDetailNestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetCollectionDetailNestCatalogPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Catalog { class GetCollectionDetailNest: Codable { - public var schedule: CollectionSchedule? + public var schedule: [String: Any]? public var action: Action? @@ -22,10 +22,12 @@ public extension PlatformClient.Catalog { public var appId: String? - public var badge: CollectionBadge? + public var badge: [String: Any]? public var banners: ImageUrls? + public var cron: [String: Any]? + public var description: String? public var isActive: Bool? @@ -50,22 +52,6 @@ public extension PlatformClient.Catalog { public var visibleFacetsKeys: [String]? - public var id: String? - - public var published: Bool? - - public var tags: [String]? - - public var sortOn: String? - - public var customJson: [String: Any]? - - public var localeLanguage: [String: Any]? - - public var seo: SeoDetail? - - public var isVisible: Bool? - public enum CodingKeys: String, CodingKey { @@ -83,6 +69,8 @@ public extension PlatformClient.Catalog { case banners = "banners" + case cron = "cron" + case description = "description" case isActive = "is_active" @@ -107,25 +95,9 @@ public extension PlatformClient.Catalog { case visibleFacetsKeys = "visible_facets_keys" - case id = "_id" - - case published = "published" - - case tags = "tags" - - case sortOn = "sort_on" - - case customJson = "_custom_json" - - case localeLanguage = "_locale_language" - - case seo = "seo" - - case isVisible = "is_visible" - } - public init(action: Action? = nil, allowFacets: Bool? = nil, allowSort: Bool? = nil, appId: String? = nil, badge: CollectionBadge? = nil, banners: ImageUrls? = nil, description: String? = nil, isActive: Bool? = nil, isVisible: Bool? = nil, logo: Media? = nil, meta: [String: Any]? = nil, name: String? = nil, priority: Int? = nil, published: Bool? = nil, query: [CollectionQuery]? = nil, seo: SeoDetail? = nil, slug: String? = nil, sortOn: String? = nil, tag: [String]? = nil, tags: [String]? = nil, type: String? = nil, uid: String? = nil, visibleFacetsKeys: [String]? = nil, customJson: [String: Any]? = nil, id: String? = nil, localeLanguage: [String: Any]? = nil, schedule: CollectionSchedule? = nil) { + 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: Media? = nil, meta: [String: Any]? = nil, name: String? = nil, priority: Int? = nil, query: [CollectionQuery]? = nil, slug: String? = nil, tag: [String]? = nil, type: String? = nil, uid: String? = nil, visibleFacetsKeys: [String]? = nil, schedule: [String: Any]? = nil) { self.schedule = schedule @@ -141,6 +113,8 @@ public extension PlatformClient.Catalog { self.banners = banners + self.cron = cron + self.description = description self.isActive = isActive @@ -165,22 +139,6 @@ public extension PlatformClient.Catalog { self.visibleFacetsKeys = visibleFacetsKeys - self.id = id - - self.published = published - - self.tags = tags - - self.sortOn = sortOn - - self.customJson = customJson - - self.localeLanguage = localeLanguage - - self.seo = seo - - self.isVisible = isVisible - } required public init(from decoder: Decoder) throws { @@ -188,7 +146,7 @@ public extension PlatformClient.Catalog { do { - schedule = try container.decode(CollectionSchedule.self, forKey: .schedule) + schedule = try container.decode([String: Any].self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -248,7 +206,7 @@ public extension PlatformClient.Catalog { do { - badge = try container.decode(CollectionBadge.self, forKey: .badge) + badge = try container.decode([String: Any].self, forKey: .badge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -271,6 +229,18 @@ public extension PlatformClient.Catalog { + do { + cron = try container.decode([String: Any].self, forKey: .cron) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { description = try container.decode(String.self, forKey: .description) @@ -414,102 +384,6 @@ public extension PlatformClient.Catalog { } - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - sortOn = try container.decode(String.self, forKey: .sortOn) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - isVisible = try container.decode(Bool.self, forKey: .isVisible) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -552,6 +426,11 @@ public extension PlatformClient.Catalog { + try? container.encodeIfPresent(cron, forKey: .cron) + + + + try? container.encodeIfPresent(description, forKey: .description) @@ -610,46 +489,6 @@ public extension PlatformClient.Catalog { try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - - - try? container.encodeIfPresent(id, forKey: .id) - - - - - try? container.encodeIfPresent(published, forKey: .published) - - - - - try? container.encodeIfPresent(tags, forKey: .tags) - - - - - try? container.encodeIfPresent(sortOn, forKey: .sortOn) - - - - - try? container.encodeIfPresent(customJson, forKey: .customJson) - - - - - try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) - - - - - try? container.encodeIfPresent(seo, forKey: .seo) - - - - - try? container.encodeIfPresent(isVisible, forKey: .isVisible) - - } } @@ -666,7 +505,7 @@ public extension PlatformClient.ApplicationClient.Catalog { class GetCollectionDetailNest: Codable { - public var schedule: CollectionSchedule? + public var schedule: [String: Any]? public var action: Action? @@ -676,10 +515,12 @@ public extension PlatformClient.ApplicationClient.Catalog { public var appId: String? - public var badge: CollectionBadge? + public var badge: [String: Any]? public var banners: ImageUrls? + public var cron: [String: Any]? + public var description: String? public var isActive: Bool? @@ -704,22 +545,6 @@ public extension PlatformClient.ApplicationClient.Catalog { public var visibleFacetsKeys: [String]? - public var id: String? - - public var published: Bool? - - public var tags: [String]? - - public var sortOn: String? - - public var customJson: [String: Any]? - - public var localeLanguage: [String: Any]? - - public var seo: SeoDetail? - - public var isVisible: Bool? - public enum CodingKeys: String, CodingKey { @@ -737,6 +562,8 @@ public extension PlatformClient.ApplicationClient.Catalog { case banners = "banners" + case cron = "cron" + case description = "description" case isActive = "is_active" @@ -761,25 +588,9 @@ public extension PlatformClient.ApplicationClient.Catalog { case visibleFacetsKeys = "visible_facets_keys" - case id = "_id" - - case published = "published" - - case tags = "tags" - - case sortOn = "sort_on" - - case customJson = "_custom_json" - - case localeLanguage = "_locale_language" - - case seo = "seo" - - case isVisible = "is_visible" - } - public init(action: Action? = nil, allowFacets: Bool? = nil, allowSort: Bool? = nil, appId: String? = nil, badge: CollectionBadge? = nil, banners: ImageUrls? = nil, description: String? = nil, isActive: Bool? = nil, isVisible: Bool? = nil, logo: Media? = nil, meta: [String: Any]? = nil, name: String? = nil, priority: Int? = nil, published: Bool? = nil, query: [CollectionQuery]? = nil, seo: SeoDetail? = nil, slug: String? = nil, sortOn: String? = nil, tag: [String]? = nil, tags: [String]? = nil, type: String? = nil, uid: String? = nil, visibleFacetsKeys: [String]? = nil, customJson: [String: Any]? = nil, id: String? = nil, localeLanguage: [String: Any]? = nil, schedule: CollectionSchedule? = nil) { + 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: Media? = nil, meta: [String: Any]? = nil, name: String? = nil, priority: Int? = nil, query: [CollectionQuery]? = nil, slug: String? = nil, tag: [String]? = nil, type: String? = nil, uid: String? = nil, visibleFacetsKeys: [String]? = nil, schedule: [String: Any]? = nil) { self.schedule = schedule @@ -795,6 +606,8 @@ public extension PlatformClient.ApplicationClient.Catalog { self.banners = banners + self.cron = cron + self.description = description self.isActive = isActive @@ -819,22 +632,6 @@ public extension PlatformClient.ApplicationClient.Catalog { self.visibleFacetsKeys = visibleFacetsKeys - self.id = id - - self.published = published - - self.tags = tags - - self.sortOn = sortOn - - self.customJson = customJson - - self.localeLanguage = localeLanguage - - self.seo = seo - - self.isVisible = isVisible - } required public init(from decoder: Decoder) throws { @@ -842,7 +639,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - schedule = try container.decode(CollectionSchedule.self, forKey: .schedule) + schedule = try container.decode([String: Any].self, forKey: .schedule) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -902,7 +699,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - badge = try container.decode(CollectionBadge.self, forKey: .badge) + badge = try container.decode([String: Any].self, forKey: .badge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -925,6 +722,18 @@ public extension PlatformClient.ApplicationClient.Catalog { + do { + cron = try container.decode([String: Any].self, forKey: .cron) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { description = try container.decode(String.self, forKey: .description) @@ -1068,102 +877,6 @@ public extension PlatformClient.ApplicationClient.Catalog { } - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - sortOn = try container.decode(String.self, forKey: .sortOn) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - isVisible = try container.decode(Bool.self, forKey: .isVisible) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -1206,6 +919,11 @@ public extension PlatformClient.ApplicationClient.Catalog { + try? container.encodeIfPresent(cron, forKey: .cron) + + + + try? container.encodeIfPresent(description, forKey: .description) @@ -1264,46 +982,6 @@ public extension PlatformClient.ApplicationClient.Catalog { try? container.encodeIfPresent(visibleFacetsKeys, forKey: .visibleFacetsKeys) - - - try? container.encodeIfPresent(id, forKey: .id) - - - - - try? container.encodeIfPresent(published, forKey: .published) - - - - - try? container.encodeIfPresent(tags, forKey: .tags) - - - - - try? container.encodeIfPresent(sortOn, forKey: .sortOn) - - - - - try? container.encodeIfPresent(customJson, forKey: .customJson) - - - - - try? container.encodeIfPresent(localeLanguage, forKey: .localeLanguage) - - - - - try? container.encodeIfPresent(seo, forKey: .seo) - - - - - try? container.encodeIfPresent(isVisible, forKey: .isVisible) - - } } diff --git a/Sources/code/platform/Models/Catalog/GetCollectionDetailResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetCollectionDetailResponseSchemaCatalogPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Catalog/GetCollectionDetailResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetCollectionDetailResponseSchemaCatalogPlatformModel.swift index 770104ae13..9260392a41 100644 --- a/Sources/code/platform/Models/Catalog/GetCollectionDetailResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetCollectionDetailResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetCollectionDetailResponse + Model: GetCollectionDetailResponseSchema Used By: Catalog */ - class GetCollectionDetailResponse: Codable { + class GetCollectionDetailResponseSchema: Codable { public var customJson: [String: Any]? @@ -613,11 +613,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetCollectionDetailResponse + Model: GetCollectionDetailResponseSchema Used By: Catalog */ - class GetCollectionDetailResponse: Codable { + class GetCollectionDetailResponseSchema: Codable { public var customJson: [String: Any]? diff --git a/Sources/code/platform/Models/Catalog/GetCollectionItemsResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetCollectionItemsResponseSchemaCatalogPlatformModel.swift similarity index 88% rename from Sources/code/platform/Models/Catalog/GetCollectionItemsResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetCollectionItemsResponseSchemaCatalogPlatformModel.swift index 42cb74e5d0..b3aa5959a9 100644 --- a/Sources/code/platform/Models/Catalog/GetCollectionItemsResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetCollectionItemsResponseSchemaCatalogPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetCollectionItemsResponse + Model: GetCollectionItemsResponseSchema Used By: Catalog */ - class GetCollectionItemsResponse: Codable { + class GetCollectionItemsResponseSchema: Codable { public var filters: [ProductFilters]? - public var items: [ProductListingDetail]? + public var items: [ApplicationProductsSchema]? public var page: Page? @@ -33,7 +33,7 @@ public extension PlatformClient.Catalog { } - public init(filters: [ProductFilters]? = nil, items: [ProductListingDetail]? = nil, page: Page? = nil, sortOn: [ProductSortOn]? = nil) { + public init(filters: [ProductFilters]? = nil, items: [ApplicationProductsSchema]? = nil, page: Page? = nil, sortOn: [ProductSortOn]? = nil) { self.filters = filters @@ -62,7 +62,7 @@ public extension PlatformClient.Catalog { do { - items = try container.decode([ProductListingDetail].self, forKey: .items) + items = try container.decode([ApplicationProductsSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,16 +130,16 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetCollectionItemsResponse + Model: GetCollectionItemsResponseSchema Used By: Catalog */ - class GetCollectionItemsResponse: Codable { + class GetCollectionItemsResponseSchema: Codable { public var filters: [ProductFilters]? - public var items: [ProductListingDetail]? + public var items: [ApplicationProductsSchema]? public var page: Page? @@ -158,7 +158,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(filters: [ProductFilters]? = nil, items: [ProductListingDetail]? = nil, page: Page? = nil, sortOn: [ProductSortOn]? = nil) { + public init(filters: [ProductFilters]? = nil, items: [ApplicationProductsSchema]? = nil, page: Page? = nil, sortOn: [ProductSortOn]? = nil) { self.filters = filters @@ -187,7 +187,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - items = try container.decode([ProductListingDetail].self, forKey: .items) + items = try container.decode([ApplicationProductsSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/GetCollectionListingResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetCollectionListingResponseSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/GetCollectionListingResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetCollectionListingResponseSchemaCatalogPlatformModel.swift index aa123ffd78..45eb71f078 100644 --- a/Sources/code/platform/Models/Catalog/GetCollectionListingResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetCollectionListingResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetCollectionListingResponse + Model: GetCollectionListingResponseSchema Used By: Catalog */ - class GetCollectionListingResponse: Codable { + class GetCollectionListingResponseSchema: Codable { public var filters: CollectionListingFilter? @@ -107,11 +107,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetCollectionListingResponse + Model: GetCollectionListingResponseSchema Used By: Catalog */ - class GetCollectionListingResponse: Codable { + class GetCollectionListingResponseSchema: Codable { public var filters: CollectionListingFilter? diff --git a/Sources/code/platform/Models/Catalog/GetCollectionQueryOptionResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetCollectionQueryOptionResponseSchemaCatalogPlatformModel.swift similarity index 88% rename from Sources/code/platform/Models/Catalog/GetCollectionQueryOptionResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetCollectionQueryOptionResponseSchemaCatalogPlatformModel.swift index a3a95058d2..7ea81b0e59 100644 --- a/Sources/code/platform/Models/Catalog/GetCollectionQueryOptionResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetCollectionQueryOptionResponseSchemaCatalogPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetCollectionQueryOptionResponse + Model: GetCollectionQueryOptionResponseSchema Used By: Catalog */ - class GetCollectionQueryOptionResponse: Codable { + class GetCollectionQueryOptionResponseSchema: Codable { public var filters: [ProductFilters]? - public var operators: [String: String] + public var operators: [String: Any] public var sortOn: [ProductSortOn]? @@ -29,7 +29,7 @@ public extension PlatformClient.Catalog { } - public init(filters: [ProductFilters]? = nil, operators: [String: String], sortOn: [ProductSortOn]? = nil) { + public init(filters: [ProductFilters]? = nil, operators: [String: Any], sortOn: [ProductSortOn]? = nil) { self.filters = filters @@ -55,7 +55,7 @@ public extension PlatformClient.Catalog { - operators = try container.decode([String: String].self, forKey: .operators) + operators = try container.decode([String: Any].self, forKey: .operators) @@ -100,16 +100,16 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetCollectionQueryOptionResponse + Model: GetCollectionQueryOptionResponseSchema Used By: Catalog */ - class GetCollectionQueryOptionResponse: Codable { + class GetCollectionQueryOptionResponseSchema: Codable { public var filters: [ProductFilters]? - public var operators: [String: String] + public var operators: [String: Any] public var sortOn: [ProductSortOn]? @@ -124,7 +124,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(filters: [ProductFilters]? = nil, operators: [String: String], sortOn: [ProductSortOn]? = nil) { + public init(filters: [ProductFilters]? = nil, operators: [String: Any], sortOn: [ProductSortOn]? = nil) { self.filters = filters @@ -150,7 +150,7 @@ public extension PlatformClient.ApplicationClient.Catalog { - operators = try container.decode([String: String].self, forKey: .operators) + operators = try container.decode([String: Any].self, forKey: .operators) diff --git a/Sources/code/platform/Models/Catalog/GetCompanySerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetCompanySchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/GetCompanySerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetCompanySchemaCatalogPlatformModel.swift index 12b004139c..41606e6682 100644 --- a/Sources/code/platform/Models/Catalog/GetCompanySerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetCompanySchemaCatalogPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetCompanySerializer + Model: GetCompanySchema Used By: Catalog */ - class GetCompanySerializer: Codable { + class GetCompanySchema: Codable { - public var addresses: [GetAddressSerializer]? + public var addresses: [GetAddressSchema]? public var businessType: String? @@ -69,7 +69,7 @@ public extension PlatformClient.Catalog { } - public init(addresses: [GetAddressSerializer]? = nil, businessType: String? = nil, companyType: String? = nil, createdBy: UserSerializer2? = nil, createdOn: String? = nil, modifiedBy: UserSerializer2? = nil, modifiedOn: String? = nil, name: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSerializer2? = nil, verifiedOn: String? = nil) { + public init(addresses: [GetAddressSchema]? = nil, businessType: String? = nil, companyType: String? = nil, createdBy: UserSerializer2? = nil, createdOn: String? = nil, modifiedBy: UserSerializer2? = nil, modifiedOn: String? = nil, name: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSerializer2? = nil, verifiedOn: String? = nil) { self.addresses = addresses @@ -104,7 +104,7 @@ public extension PlatformClient.Catalog { do { - addresses = try container.decode([GetAddressSerializer].self, forKey: .addresses) + addresses = try container.decode([GetAddressSchema].self, forKey: .addresses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -337,14 +337,14 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetCompanySerializer + Model: GetCompanySchema Used By: Catalog */ - class GetCompanySerializer: Codable { + class GetCompanySchema: Codable { - public var addresses: [GetAddressSerializer]? + public var addresses: [GetAddressSchema]? public var businessType: String? @@ -401,7 +401,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(addresses: [GetAddressSerializer]? = nil, businessType: String? = nil, companyType: String? = nil, createdBy: UserSerializer2? = nil, createdOn: String? = nil, modifiedBy: UserSerializer2? = nil, modifiedOn: String? = nil, name: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSerializer2? = nil, verifiedOn: String? = nil) { + public init(addresses: [GetAddressSchema]? = nil, businessType: String? = nil, companyType: String? = nil, createdBy: UserSerializer2? = nil, createdOn: String? = nil, modifiedBy: UserSerializer2? = nil, modifiedOn: String? = nil, name: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSerializer2? = nil, verifiedOn: String? = nil) { self.addresses = addresses @@ -436,7 +436,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - addresses = try container.decode([GetAddressSerializer].self, forKey: .addresses) + addresses = try container.decode([GetAddressSchema].self, forKey: .addresses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/GetConfigMetadataResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetConfigMetadataResponseSchemaCatalogPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Catalog/GetConfigMetadataResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetConfigMetadataResponseSchemaCatalogPlatformModel.swift index 65201a0402..7ab8563d74 100644 --- a/Sources/code/platform/Models/Catalog/GetConfigMetadataResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetConfigMetadataResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetConfigMetadataResponse + Model: GetConfigMetadataResponseSchema Used By: Catalog */ - class GetConfigMetadataResponse: Codable { + class GetConfigMetadataResponseSchema: Codable { public var condition: [ConditionItem]? @@ -123,11 +123,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetConfigMetadataResponse + Model: GetConfigMetadataResponseSchema Used By: Catalog */ - class GetConfigMetadataResponse: Codable { + class GetConfigMetadataResponseSchema: Codable { public var condition: [ConditionItem]? diff --git a/Sources/code/platform/Models/Catalog/GetConfigResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetConfigResponseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/GetConfigResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetConfigResponseSchemaCatalogPlatformModel.swift index 32484018b4..11ccf6939f 100644 --- a/Sources/code/platform/Models/Catalog/GetConfigResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetConfigResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetConfigResponse + Model: GetConfigResponseSchema Used By: Catalog */ - class GetConfigResponse: Codable { + class GetConfigResponseSchema: Codable { public var data: [[String: Any]] @@ -70,11 +70,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetConfigResponse + Model: GetConfigResponseSchema Used By: Catalog */ - class GetConfigResponse: Codable { + class GetConfigResponseSchema: Codable { public var data: [[String: Any]] diff --git a/Sources/code/platform/Models/Catalog/GetDepartmentCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetDepartmentCatalogPlatformModel.swift index 086fc6472b..3665fabece 100644 --- a/Sources/code/platform/Models/Catalog/GetDepartmentCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetDepartmentCatalogPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Catalog { class GetDepartment: Codable { - public var createdBy: RequestUserSerializer? + public var createdBy: UserSerializer1? public var createdOn: String? @@ -22,7 +22,7 @@ public extension PlatformClient.Catalog { public var logo: String? - public var modifiedBy: RequestUserSerializer? + public var modifiedBy: UserSerializer1? public var modifiedOn: String? @@ -77,7 +77,7 @@ public extension PlatformClient.Catalog { } - public init(createdBy: RequestUserSerializer? = nil, createdOn: String? = nil, isActive: Bool? = nil, itemType: String? = nil, logo: String? = nil, modifiedBy: RequestUserSerializer? = 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) { + public init(createdBy: UserSerializer1? = nil, createdOn: String? = nil, isActive: Bool? = nil, itemType: String? = nil, logo: String? = nil, modifiedBy: UserSerializer1? = nil, modifiedOn: String? = nil, name: String? = nil, pageNo: Int? = nil, pageSize: Int? = nil, priorityOrder: Int? = nil, search: String? = nil, slug: String? = nil, synonyms: [String]? = nil, uid: Int? = nil) { self.createdBy = createdBy @@ -116,7 +116,7 @@ public extension PlatformClient.Catalog { do { - createdBy = try container.decode(RequestUserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +176,7 @@ public extension PlatformClient.Catalog { do { - modifiedBy = try container.decode(RequestUserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -390,7 +390,7 @@ public extension PlatformClient.ApplicationClient.Catalog { class GetDepartment: Codable { - public var createdBy: RequestUserSerializer? + public var createdBy: UserSerializer1? public var createdOn: String? @@ -400,7 +400,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var logo: String? - public var modifiedBy: RequestUserSerializer? + public var modifiedBy: UserSerializer1? public var modifiedOn: String? @@ -455,7 +455,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(createdBy: RequestUserSerializer? = nil, createdOn: String? = nil, isActive: Bool? = nil, itemType: String? = nil, logo: String? = nil, modifiedBy: RequestUserSerializer? = 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) { + public init(createdBy: UserSerializer1? = nil, createdOn: String? = nil, isActive: Bool? = nil, itemType: String? = nil, logo: String? = nil, modifiedBy: UserSerializer1? = nil, modifiedOn: String? = nil, name: String? = nil, pageNo: Int? = nil, pageSize: Int? = nil, priorityOrder: Int? = nil, search: String? = nil, slug: String? = nil, synonyms: [String]? = nil, uid: Int? = nil) { self.createdBy = createdBy @@ -494,7 +494,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - createdBy = try container.decode(RequestUserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -554,7 +554,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - modifiedBy = try container.decode(RequestUserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/GetInventoriesCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetInventoriesCatalogPlatformModel.swift index 86707e001d..6e659af1ae 100644 --- a/Sources/code/platform/Models/Catalog/GetInventoriesCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetInventoriesCatalogPlatformModel.swift @@ -12,23 +12,23 @@ public extension PlatformClient.Catalog { class GetInventories: Codable { - public var brand: InventoryBrandMeta? + public var brand: BrandMeta1? - public var company: InventoryCompanyMeta? + public var company: CompanyMeta1? public var countryOfOrigin: String? - public var createdBy: RequestUserSerializer? + public var createdBy: UserSerializer1? public var dateMeta: DateMeta? - public var dimension: InventoryDimensionResponse? + public var dimension: DimensionResponse1? public var expirationDate: String? public var id: String? - public var identifier: [String: Any]? + public var identifier: Identifier? public var inventoryUpdatedOn: String? @@ -36,9 +36,9 @@ public extension PlatformClient.Catalog { public var itemId: Int? - public var manufacturer: InventoryManufacturerResponse? + public var manufacturer: ManufacturerResponse1? - public var modifiedBy: RequestUserSerializer? + public var modifiedBy: UserSerializer1? public var platforms: [String: Any]? @@ -46,7 +46,7 @@ public extension PlatformClient.Catalog { public var quantities: QuantitiesArticle? - public var returnConfig: ReturnConfig? + public var returnConfig: ReturnConfig2? public var sellerIdentifier: String? @@ -54,11 +54,11 @@ public extension PlatformClient.Catalog { public var stage: String? - public var store: ArticleStoreResponse? + public var store: ArticleStoreResponseSchema? public var tags: [String]? - public var taxIdentifier: [String: Any]? + public var taxIdentifier: TaxIdentifier? public var totalQuantity: Int? @@ -66,11 +66,11 @@ public extension PlatformClient.Catalog { public var trackInventory: Bool? - public var trader: [TraderResponse]? + public var trader: [Trader2]? public var uid: String? - public var weight: InventoryWeightResponse? + public var weight: WeightResponse1? public enum CodingKeys: String, CodingKey { @@ -137,7 +137,7 @@ public extension PlatformClient.Catalog { } - public init(brand: InventoryBrandMeta? = nil, company: InventoryCompanyMeta? = nil, countryOfOrigin: String? = nil, createdBy: RequestUserSerializer? = nil, dateMeta: DateMeta? = nil, dimension: InventoryDimensionResponse? = nil, expirationDate: String? = nil, id: String? = nil, identifier: [String: Any]? = nil, inventoryUpdatedOn: String? = nil, isSet: Bool? = nil, itemId: Int? = nil, manufacturer: InventoryManufacturerResponse? = nil, modifiedBy: RequestUserSerializer? = nil, platforms: [String: Any]? = nil, price: PriceArticle? = nil, quantities: QuantitiesArticle? = nil, returnConfig: ReturnConfig? = nil, sellerIdentifier: String? = nil, size: String? = nil, stage: String? = nil, store: ArticleStoreResponse? = nil, tags: [String]? = nil, taxIdentifier: [String: Any]? = nil, totalQuantity: Int? = nil, traceId: String? = nil, trackInventory: Bool? = nil, trader: [TraderResponse]? = nil, uid: String? = nil, weight: InventoryWeightResponse? = nil) { + public init(brand: BrandMeta1? = nil, company: CompanyMeta1? = nil, countryOfOrigin: String? = nil, createdBy: UserSerializer1? = nil, dateMeta: DateMeta? = nil, dimension: DimensionResponse1? = nil, expirationDate: String? = nil, id: String? = nil, identifier: Identifier? = nil, inventoryUpdatedOn: String? = nil, isSet: Bool? = nil, itemId: Int? = nil, manufacturer: ManufacturerResponse1? = nil, modifiedBy: UserSerializer1? = nil, platforms: [String: Any]? = nil, price: PriceArticle? = nil, quantities: QuantitiesArticle? = nil, returnConfig: ReturnConfig2? = nil, sellerIdentifier: String? = nil, size: String? = nil, stage: String? = nil, store: ArticleStoreResponseSchema? = nil, tags: [String]? = nil, taxIdentifier: TaxIdentifier? = nil, totalQuantity: Int? = nil, traceId: String? = nil, trackInventory: Bool? = nil, trader: [Trader2]? = nil, uid: String? = nil, weight: WeightResponse1? = nil) { self.brand = brand @@ -206,7 +206,7 @@ public extension PlatformClient.Catalog { do { - brand = try container.decode(InventoryBrandMeta.self, forKey: .brand) + brand = try container.decode(BrandMeta1.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +218,7 @@ public extension PlatformClient.Catalog { do { - company = try container.decode(InventoryCompanyMeta.self, forKey: .company) + company = try container.decode(CompanyMeta1.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -242,7 +242,7 @@ public extension PlatformClient.Catalog { do { - createdBy = try container.decode(RequestUserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -266,7 +266,7 @@ public extension PlatformClient.Catalog { do { - dimension = try container.decode(InventoryDimensionResponse.self, forKey: .dimension) + dimension = try container.decode(DimensionResponse1.self, forKey: .dimension) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -302,7 +302,7 @@ public extension PlatformClient.Catalog { do { - identifier = try container.decode([String: Any].self, forKey: .identifier) + identifier = try container.decode(Identifier.self, forKey: .identifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -350,7 +350,7 @@ public extension PlatformClient.Catalog { do { - manufacturer = try container.decode(InventoryManufacturerResponse.self, forKey: .manufacturer) + manufacturer = try container.decode(ManufacturerResponse1.self, forKey: .manufacturer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -362,7 +362,7 @@ public extension PlatformClient.Catalog { do { - modifiedBy = try container.decode(RequestUserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -410,7 +410,7 @@ public extension PlatformClient.Catalog { do { - returnConfig = try container.decode(ReturnConfig.self, forKey: .returnConfig) + returnConfig = try container.decode(ReturnConfig2.self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -458,7 +458,7 @@ public extension PlatformClient.Catalog { do { - store = try container.decode(ArticleStoreResponse.self, forKey: .store) + store = try container.decode(ArticleStoreResponseSchema.self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -482,7 +482,7 @@ public extension PlatformClient.Catalog { do { - taxIdentifier = try container.decode([String: Any].self, forKey: .taxIdentifier) + taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -530,7 +530,7 @@ public extension PlatformClient.Catalog { do { - trader = try container.decode([TraderResponse].self, forKey: .trader) + trader = try container.decode([Trader2].self, forKey: .trader) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -554,7 +554,7 @@ public extension PlatformClient.Catalog { do { - weight = try container.decode(InventoryWeightResponse.self, forKey: .weight) + weight = try container.decode(WeightResponse1.self, forKey: .weight) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -735,23 +735,23 @@ public extension PlatformClient.ApplicationClient.Catalog { class GetInventories: Codable { - public var brand: InventoryBrandMeta? + public var brand: BrandMeta1? - public var company: InventoryCompanyMeta? + public var company: CompanyMeta1? public var countryOfOrigin: String? - public var createdBy: RequestUserSerializer? + public var createdBy: UserSerializer1? public var dateMeta: DateMeta? - public var dimension: InventoryDimensionResponse? + public var dimension: DimensionResponse1? public var expirationDate: String? public var id: String? - public var identifier: [String: Any]? + public var identifier: Identifier? public var inventoryUpdatedOn: String? @@ -759,9 +759,9 @@ public extension PlatformClient.ApplicationClient.Catalog { public var itemId: Int? - public var manufacturer: InventoryManufacturerResponse? + public var manufacturer: ManufacturerResponse1? - public var modifiedBy: RequestUserSerializer? + public var modifiedBy: UserSerializer1? public var platforms: [String: Any]? @@ -769,7 +769,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var quantities: QuantitiesArticle? - public var returnConfig: ReturnConfig? + public var returnConfig: ReturnConfig2? public var sellerIdentifier: String? @@ -777,11 +777,11 @@ public extension PlatformClient.ApplicationClient.Catalog { public var stage: String? - public var store: ArticleStoreResponse? + public var store: ArticleStoreResponseSchema? public var tags: [String]? - public var taxIdentifier: [String: Any]? + public var taxIdentifier: TaxIdentifier? public var totalQuantity: Int? @@ -789,11 +789,11 @@ public extension PlatformClient.ApplicationClient.Catalog { public var trackInventory: Bool? - public var trader: [TraderResponse]? + public var trader: [Trader2]? public var uid: String? - public var weight: InventoryWeightResponse? + public var weight: WeightResponse1? public enum CodingKeys: String, CodingKey { @@ -860,7 +860,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(brand: InventoryBrandMeta? = nil, company: InventoryCompanyMeta? = nil, countryOfOrigin: String? = nil, createdBy: RequestUserSerializer? = nil, dateMeta: DateMeta? = nil, dimension: InventoryDimensionResponse? = nil, expirationDate: String? = nil, id: String? = nil, identifier: [String: Any]? = nil, inventoryUpdatedOn: String? = nil, isSet: Bool? = nil, itemId: Int? = nil, manufacturer: InventoryManufacturerResponse? = nil, modifiedBy: RequestUserSerializer? = nil, platforms: [String: Any]? = nil, price: PriceArticle? = nil, quantities: QuantitiesArticle? = nil, returnConfig: ReturnConfig? = nil, sellerIdentifier: String? = nil, size: String? = nil, stage: String? = nil, store: ArticleStoreResponse? = nil, tags: [String]? = nil, taxIdentifier: [String: Any]? = nil, totalQuantity: Int? = nil, traceId: String? = nil, trackInventory: Bool? = nil, trader: [TraderResponse]? = nil, uid: String? = nil, weight: InventoryWeightResponse? = nil) { + public init(brand: BrandMeta1? = nil, company: CompanyMeta1? = nil, countryOfOrigin: String? = nil, createdBy: UserSerializer1? = nil, dateMeta: DateMeta? = nil, dimension: DimensionResponse1? = nil, expirationDate: String? = nil, id: String? = nil, identifier: Identifier? = nil, inventoryUpdatedOn: String? = nil, isSet: Bool? = nil, itemId: Int? = nil, manufacturer: ManufacturerResponse1? = nil, modifiedBy: UserSerializer1? = nil, platforms: [String: Any]? = nil, price: PriceArticle? = nil, quantities: QuantitiesArticle? = nil, returnConfig: ReturnConfig2? = nil, sellerIdentifier: String? = nil, size: String? = nil, stage: String? = nil, store: ArticleStoreResponseSchema? = nil, tags: [String]? = nil, taxIdentifier: TaxIdentifier? = nil, totalQuantity: Int? = nil, traceId: String? = nil, trackInventory: Bool? = nil, trader: [Trader2]? = nil, uid: String? = nil, weight: WeightResponse1? = nil) { self.brand = brand @@ -929,7 +929,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - brand = try container.decode(InventoryBrandMeta.self, forKey: .brand) + brand = try container.decode(BrandMeta1.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -941,7 +941,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - company = try container.decode(InventoryCompanyMeta.self, forKey: .company) + company = try container.decode(CompanyMeta1.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -965,7 +965,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - createdBy = try container.decode(RequestUserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -989,7 +989,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - dimension = try container.decode(InventoryDimensionResponse.self, forKey: .dimension) + dimension = try container.decode(DimensionResponse1.self, forKey: .dimension) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1025,7 +1025,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - identifier = try container.decode([String: Any].self, forKey: .identifier) + identifier = try container.decode(Identifier.self, forKey: .identifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1073,7 +1073,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - manufacturer = try container.decode(InventoryManufacturerResponse.self, forKey: .manufacturer) + manufacturer = try container.decode(ManufacturerResponse1.self, forKey: .manufacturer) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1085,7 +1085,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - modifiedBy = try container.decode(RequestUserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1133,7 +1133,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - returnConfig = try container.decode(ReturnConfig.self, forKey: .returnConfig) + returnConfig = try container.decode(ReturnConfig2.self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1181,7 +1181,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - store = try container.decode(ArticleStoreResponse.self, forKey: .store) + store = try container.decode(ArticleStoreResponseSchema.self, forKey: .store) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1205,7 +1205,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - taxIdentifier = try container.decode([String: Any].self, forKey: .taxIdentifier) + taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1253,7 +1253,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - trader = try container.decode([TraderResponse].self, forKey: .trader) + trader = try container.decode([Trader2].self, forKey: .trader) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1277,7 +1277,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - weight = try container.decode(InventoryWeightResponse.self, forKey: .weight) + weight = try container.decode(WeightResponse1.self, forKey: .weight) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/GetInventoriesResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetInventoriesResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/GetInventoriesResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetInventoriesResponseSchemaCatalogPlatformModel.swift index 2005e03295..3aeaa7c41d 100644 --- a/Sources/code/platform/Models/Catalog/GetInventoriesResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetInventoriesResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetInventoriesResponse + Model: GetInventoriesResponseSchema Used By: Catalog */ - class GetInventoriesResponse: Codable { + class GetInventoriesResponseSchema: Codable { public var items: [GetInventories]? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetInventoriesResponse + Model: GetInventoriesResponseSchema Used By: Catalog */ - class GetInventoriesResponse: Codable { + class GetInventoriesResponseSchema: Codable { public var items: [GetInventories]? diff --git a/Sources/code/platform/Models/Catalog/GetLocationSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetLocationSchemaCatalogPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Catalog/GetLocationSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetLocationSchemaCatalogPlatformModel.swift index 02a59ee63f..aa17bd10d6 100644 --- a/Sources/code/platform/Models/Catalog/GetLocationSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetLocationSchemaCatalogPlatformModel.swift @@ -5,20 +5,20 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetLocationSerializer + Model: GetLocationSchema Used By: Catalog */ - class GetLocationSerializer: Codable { + class GetLocationSchema: Codable { public var customJson: [String: Any]? - public var address: GetAddressSerializer + public var address: GetAddressSchema public var code: String - public var company: GetCompanySerializer? + public var company: GetCompanySchema? public var contactNumbers: [SellerPhoneNumber]? @@ -30,11 +30,11 @@ public extension PlatformClient.Catalog { public var documents: [Document]? - public var gstCredentials: InvoiceDetailsSerializer? + public var gstCredentials: InvoiceDetailsSchema? public var integrationType: LocationIntegrationType? - public var manager: LocationManagerSerializer? + public var manager: LocationManagerSchema? public var modifiedBy: UserSerializer3? @@ -46,13 +46,13 @@ public extension PlatformClient.Catalog { public var phoneNumber: String - public var productReturnConfig: ProductReturnConfigSerializer? + public var productReturnConfig: ProductReturnConfigSchema? public var stage: String? public var storeType: String? - public var timing: [LocationDayWiseSerializer]? + public var timing: [LocationDayWiseSchema]? public var uid: Int? @@ -117,7 +117,7 @@ public extension PlatformClient.Catalog { } - public init(address: GetAddressSerializer, code: String, company: GetCompanySerializer? = nil, contactNumbers: [SellerPhoneNumber]? = nil, createdBy: UserSerializer3? = nil, createdOn: String? = nil, displayName: String, documents: [Document]? = nil, gstCredentials: InvoiceDetailsSerializer? = nil, integrationType: LocationIntegrationType? = nil, manager: LocationManagerSerializer? = nil, modifiedBy: UserSerializer3? = 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: UserSerializer3? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { + public init(address: GetAddressSchema, code: String, company: GetCompanySchema? = nil, contactNumbers: [SellerPhoneNumber]? = nil, createdBy: UserSerializer3? = nil, createdOn: String? = nil, displayName: String, documents: [Document]? = nil, gstCredentials: InvoiceDetailsSchema? = nil, integrationType: LocationIntegrationType? = nil, manager: LocationManagerSchema? = nil, modifiedBy: UserSerializer3? = nil, modifiedOn: String? = nil, name: String, notificationEmails: [String]? = nil, phoneNumber: String, productReturnConfig: ProductReturnConfigSchema? = nil, stage: String? = nil, storeType: String? = nil, timing: [LocationDayWiseSchema]? = nil, uid: Int? = nil, verifiedBy: UserSerializer3? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { self.customJson = customJson @@ -187,7 +187,7 @@ public extension PlatformClient.Catalog { - address = try container.decode(GetAddressSerializer.self, forKey: .address) + address = try container.decode(GetAddressSchema.self, forKey: .address) @@ -198,7 +198,7 @@ public extension PlatformClient.Catalog { do { - company = try container.decode(GetCompanySerializer.self, forKey: .company) + company = try container.decode(GetCompanySchema.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -263,7 +263,7 @@ public extension PlatformClient.Catalog { do { - gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) + gstCredentials = try container.decode(InvoiceDetailsSchema.self, forKey: .gstCredentials) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -287,7 +287,7 @@ public extension PlatformClient.Catalog { do { - manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) + manager = try container.decode(LocationManagerSchema.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -345,7 +345,7 @@ public extension PlatformClient.Catalog { do { - productReturnConfig = try container.decode(ProductReturnConfigSerializer.self, forKey: .productReturnConfig) + productReturnConfig = try container.decode(ProductReturnConfigSchema.self, forKey: .productReturnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -381,7 +381,7 @@ public extension PlatformClient.Catalog { do { - timing = try container.decode([LocationDayWiseSerializer].self, forKey: .timing) + timing = try container.decode([LocationDayWiseSchema].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -578,20 +578,20 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetLocationSerializer + Model: GetLocationSchema Used By: Catalog */ - class GetLocationSerializer: Codable { + class GetLocationSchema: Codable { public var customJson: [String: Any]? - public var address: GetAddressSerializer + public var address: GetAddressSchema public var code: String - public var company: GetCompanySerializer? + public var company: GetCompanySchema? public var contactNumbers: [SellerPhoneNumber]? @@ -603,11 +603,11 @@ public extension PlatformClient.ApplicationClient.Catalog { public var documents: [Document]? - public var gstCredentials: InvoiceDetailsSerializer? + public var gstCredentials: InvoiceDetailsSchema? public var integrationType: LocationIntegrationType? - public var manager: LocationManagerSerializer? + public var manager: LocationManagerSchema? public var modifiedBy: UserSerializer3? @@ -619,13 +619,13 @@ public extension PlatformClient.ApplicationClient.Catalog { public var phoneNumber: String - public var productReturnConfig: ProductReturnConfigSerializer? + public var productReturnConfig: ProductReturnConfigSchema? public var stage: String? public var storeType: String? - public var timing: [LocationDayWiseSerializer]? + public var timing: [LocationDayWiseSchema]? public var uid: Int? @@ -690,7 +690,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(address: GetAddressSerializer, code: String, company: GetCompanySerializer? = nil, contactNumbers: [SellerPhoneNumber]? = nil, createdBy: UserSerializer3? = nil, createdOn: String? = nil, displayName: String, documents: [Document]? = nil, gstCredentials: InvoiceDetailsSerializer? = nil, integrationType: LocationIntegrationType? = nil, manager: LocationManagerSerializer? = nil, modifiedBy: UserSerializer3? = 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: UserSerializer3? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { + public init(address: GetAddressSchema, code: String, company: GetCompanySchema? = nil, contactNumbers: [SellerPhoneNumber]? = nil, createdBy: UserSerializer3? = nil, createdOn: String? = nil, displayName: String, documents: [Document]? = nil, gstCredentials: InvoiceDetailsSchema? = nil, integrationType: LocationIntegrationType? = nil, manager: LocationManagerSchema? = nil, modifiedBy: UserSerializer3? = nil, modifiedOn: String? = nil, name: String, notificationEmails: [String]? = nil, phoneNumber: String, productReturnConfig: ProductReturnConfigSchema? = nil, stage: String? = nil, storeType: String? = nil, timing: [LocationDayWiseSchema]? = nil, uid: Int? = nil, verifiedBy: UserSerializer3? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { self.customJson = customJson @@ -760,7 +760,7 @@ public extension PlatformClient.ApplicationClient.Catalog { - address = try container.decode(GetAddressSerializer.self, forKey: .address) + address = try container.decode(GetAddressSchema.self, forKey: .address) @@ -771,7 +771,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - company = try container.decode(GetCompanySerializer.self, forKey: .company) + company = try container.decode(GetCompanySchema.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -836,7 +836,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) + gstCredentials = try container.decode(InvoiceDetailsSchema.self, forKey: .gstCredentials) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -860,7 +860,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) + manager = try container.decode(LocationManagerSchema.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -918,7 +918,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - productReturnConfig = try container.decode(ProductReturnConfigSerializer.self, forKey: .productReturnConfig) + productReturnConfig = try container.decode(ProductReturnConfigSchema.self, forKey: .productReturnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -954,7 +954,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - timing = try container.decode([LocationDayWiseSerializer].self, forKey: .timing) + timing = try container.decode([LocationDayWiseSchema].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/GetProductBundleCreateResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetProductBundleCreateResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/GetProductBundleCreateResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetProductBundleCreateResponseSchemaCatalogPlatformModel.swift index e389242292..702564627c 100644 --- a/Sources/code/platform/Models/Catalog/GetProductBundleCreateResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetProductBundleCreateResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetProductBundleCreateResponse + Model: GetProductBundleCreateResponseSchema Used By: Catalog */ - class GetProductBundleCreateResponse: Codable { + class GetProductBundleCreateResponseSchema: Codable { public var choice: String @@ -348,11 +348,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetProductBundleCreateResponse + Model: GetProductBundleCreateResponseSchema Used By: Catalog */ - class GetProductBundleCreateResponse: Codable { + class GetProductBundleCreateResponseSchema: Codable { public var choice: String diff --git a/Sources/code/platform/Models/Catalog/GetProductBundleListingResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetProductBundleListingResponseSchemaCatalogPlatformModel.swift similarity index 85% rename from Sources/code/platform/Models/Catalog/GetProductBundleListingResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetProductBundleListingResponseSchemaCatalogPlatformModel.swift index 9516ba254a..3458729f33 100644 --- a/Sources/code/platform/Models/Catalog/GetProductBundleListingResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetProductBundleListingResponseSchemaCatalogPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetProductBundleListingResponse + Model: GetProductBundleListingResponseSchema Used By: Catalog */ - class GetProductBundleListingResponse: Codable { + class GetProductBundleListingResponseSchema: Codable { - public var items: [GetProductBundleCreateResponse]? + public var items: [GetProductBundleCreateResponseSchema]? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(items: [GetProductBundleCreateResponse]? = nil, page: Page? = nil) { + public init(items: [GetProductBundleCreateResponseSchema]? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.Catalog { do { - items = try container.decode([GetProductBundleCreateResponse].self, forKey: .items) + items = try container.decode([GetProductBundleCreateResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,14 +84,14 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetProductBundleListingResponse + Model: GetProductBundleListingResponseSchema Used By: Catalog */ - class GetProductBundleListingResponse: Codable { + class GetProductBundleListingResponseSchema: Codable { - public var items: [GetProductBundleCreateResponse]? + public var items: [GetProductBundleCreateResponseSchema]? public var page: Page? @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(items: [GetProductBundleCreateResponse]? = nil, page: Page? = nil) { + public init(items: [GetProductBundleCreateResponseSchema]? = nil, page: Page? = nil) { self.items = items @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - items = try container.decode([GetProductBundleCreateResponse].self, forKey: .items) + items = try container.decode([GetProductBundleCreateResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/GetProductBundleResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetProductBundleResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/GetProductBundleResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetProductBundleResponseSchemaCatalogPlatformModel.swift index 48ebca6d45..1370f0a6ce 100644 --- a/Sources/code/platform/Models/Catalog/GetProductBundleResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetProductBundleResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetProductBundleResponse + Model: GetProductBundleResponseSchema Used By: Catalog */ - class GetProductBundleResponse: Codable { + class GetProductBundleResponseSchema: Codable { public var choice: String? @@ -268,11 +268,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetProductBundleResponse + Model: GetProductBundleResponseSchema Used By: Catalog */ - class GetProductBundleResponse: Codable { + class GetProductBundleResponseSchema: Codable { public var choice: String? diff --git a/Sources/code/platform/Models/Catalog/GetQueryFiltersKeysResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetQueryFiltersKeysResponseSchemaCatalogPlatformModel.swift similarity index 89% rename from Sources/code/platform/Models/Catalog/GetQueryFiltersKeysResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetQueryFiltersKeysResponseSchemaCatalogPlatformModel.swift index 0cd638682f..573c022fae 100644 --- a/Sources/code/platform/Models/Catalog/GetQueryFiltersKeysResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetQueryFiltersKeysResponseSchemaCatalogPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetQueryFiltersKeysResponse + Model: GetQueryFiltersKeysResponseSchema Used By: Catalog */ - class GetQueryFiltersKeysResponse: Codable { + class GetQueryFiltersKeysResponseSchema: Codable { public var filters: [ProductFiltersKeysOnly]? - public var operators: [String: String] + public var operators: [String: Any] public var sortOn: [ProductSortOn]? @@ -29,7 +29,7 @@ public extension PlatformClient.Catalog { } - public init(filters: [ProductFiltersKeysOnly]? = nil, operators: [String: String], sortOn: [ProductSortOn]? = nil) { + public init(filters: [ProductFiltersKeysOnly]? = nil, operators: [String: Any], sortOn: [ProductSortOn]? = nil) { self.filters = filters @@ -55,7 +55,7 @@ public extension PlatformClient.Catalog { - operators = try container.decode([String: String].self, forKey: .operators) + operators = try container.decode([String: Any].self, forKey: .operators) @@ -100,16 +100,16 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetQueryFiltersKeysResponse + Model: GetQueryFiltersKeysResponseSchema Used By: Catalog */ - class GetQueryFiltersKeysResponse: Codable { + class GetQueryFiltersKeysResponseSchema: Codable { public var filters: [ProductFiltersKeysOnly]? - public var operators: [String: String] + public var operators: [String: Any] public var sortOn: [ProductSortOn]? @@ -124,7 +124,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(filters: [ProductFiltersKeysOnly]? = nil, operators: [String: String], sortOn: [ProductSortOn]? = nil) { + public init(filters: [ProductFiltersKeysOnly]? = nil, operators: [String: Any], sortOn: [ProductSortOn]? = nil) { self.filters = filters @@ -150,7 +150,7 @@ public extension PlatformClient.ApplicationClient.Catalog { - operators = try container.decode([String: String].self, forKey: .operators) + operators = try container.decode([String: Any].self, forKey: .operators) diff --git a/Sources/code/platform/Models/Catalog/GetQueryFiltersResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetQueryFiltersResponseSchemaCatalogPlatformModel.swift similarity index 89% rename from Sources/code/platform/Models/Catalog/GetQueryFiltersResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetQueryFiltersResponseSchemaCatalogPlatformModel.swift index 19553a0f71..02d13cdea2 100644 --- a/Sources/code/platform/Models/Catalog/GetQueryFiltersResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetQueryFiltersResponseSchemaCatalogPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetQueryFiltersResponse + Model: GetQueryFiltersResponseSchema Used By: Catalog */ - class GetQueryFiltersResponse: Codable { + class GetQueryFiltersResponseSchema: Codable { public var filters: [ProductFilters]? - public var operators: [String: String] + public var operators: [String: Any] public var sortOn: [ProductSortOn]? @@ -29,7 +29,7 @@ public extension PlatformClient.Catalog { } - public init(filters: [ProductFilters]? = nil, operators: [String: String], sortOn: [ProductSortOn]? = nil) { + public init(filters: [ProductFilters]? = nil, operators: [String: Any], sortOn: [ProductSortOn]? = nil) { self.filters = filters @@ -55,7 +55,7 @@ public extension PlatformClient.Catalog { - operators = try container.decode([String: String].self, forKey: .operators) + operators = try container.decode([String: Any].self, forKey: .operators) @@ -100,16 +100,16 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetQueryFiltersResponse + Model: GetQueryFiltersResponseSchema Used By: Catalog */ - class GetQueryFiltersResponse: Codable { + class GetQueryFiltersResponseSchema: Codable { public var filters: [ProductFilters]? - public var operators: [String: String] + public var operators: [String: Any] public var sortOn: [ProductSortOn]? @@ -124,7 +124,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(filters: [ProductFilters]? = nil, operators: [String: String], sortOn: [ProductSortOn]? = nil) { + public init(filters: [ProductFilters]? = nil, operators: [String: Any], sortOn: [ProductSortOn]? = nil) { self.filters = filters @@ -150,7 +150,7 @@ public extension PlatformClient.ApplicationClient.Catalog { - operators = try container.decode([String: String].self, forKey: .operators) + operators = try container.decode([String: Any].self, forKey: .operators) diff --git a/Sources/code/platform/Models/Catalog/GetQueryFiltersValuesResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetQueryFiltersValuesResponseSchemaCatalogPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Catalog/GetQueryFiltersValuesResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetQueryFiltersValuesResponseSchemaCatalogPlatformModel.swift index fc949a8254..38a3128c93 100644 --- a/Sources/code/platform/Models/Catalog/GetQueryFiltersValuesResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetQueryFiltersValuesResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetQueryFiltersValuesResponse + Model: GetQueryFiltersValuesResponseSchema Used By: Catalog */ - class GetQueryFiltersValuesResponse: Codable { + class GetQueryFiltersValuesResponseSchema: Codable { public var values: [ProductFiltersValue] @@ -70,11 +70,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetQueryFiltersValuesResponse + Model: GetQueryFiltersValuesResponseSchema Used By: Catalog */ - class GetQueryFiltersValuesResponse: Codable { + class GetQueryFiltersValuesResponseSchema: Codable { public var values: [ProductFiltersValue] diff --git a/Sources/code/platform/Models/Catalog/CreateSearchConfigurationRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetSearchConfigurationResponseSchemaCatalogPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Catalog/CreateSearchConfigurationRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetSearchConfigurationResponseSchemaCatalogPlatformModel.swift index fdb1a04654..06f5ccec07 100644 --- a/Sources/code/platform/Models/Catalog/CreateSearchConfigurationRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetSearchConfigurationResponseSchemaCatalogPlatformModel.swift @@ -5,24 +5,24 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: CreateSearchConfigurationRequest + Model: GetSearchConfigurationResponseSchema Used By: Catalog */ - class CreateSearchConfigurationRequest: Codable { + class GetSearchConfigurationResponseSchema: Codable { public var applicationId: String public var companyId: Int - public var createdBy: UserSerializer? + public var createdBy: UserSchema? public var createdOn: String? public var isProximityEnabled: Bool? - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? public var modifiedOn: String? @@ -53,7 +53,7 @@ public extension PlatformClient.Catalog { } - public init(applicationId: String, companyId: Int, createdBy: UserSerializer? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { + public init(applicationId: String, companyId: Int, createdBy: UserSchema? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { self.applicationId = applicationId @@ -90,7 +90,7 @@ public extension PlatformClient.Catalog { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient.Catalog { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -231,24 +231,24 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: CreateSearchConfigurationRequest + Model: GetSearchConfigurationResponseSchema Used By: Catalog */ - class CreateSearchConfigurationRequest: Codable { + class GetSearchConfigurationResponseSchema: Codable { public var applicationId: String public var companyId: Int - public var createdBy: UserSerializer? + public var createdBy: UserSchema? public var createdOn: String? public var isProximityEnabled: Bool? - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? public var modifiedOn: String? @@ -279,7 +279,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(applicationId: String, companyId: Int, createdBy: UserSerializer? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { + public init(applicationId: String, companyId: Int, createdBy: UserSchema? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { self.applicationId = applicationId @@ -316,7 +316,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -352,7 +352,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/GetSearchWordsDetailResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetSearchWordsDetailResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/GetSearchWordsDetailResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetSearchWordsDetailResponseSchemaCatalogPlatformModel.swift index 28b24118f0..b517fa863d 100644 --- a/Sources/code/platform/Models/Catalog/GetSearchWordsDetailResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetSearchWordsDetailResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetSearchWordsDetailResponse + Model: GetSearchWordsDetailResponseSchema Used By: Catalog */ - class GetSearchWordsDetailResponse: Codable { + class GetSearchWordsDetailResponseSchema: Codable { public var items: GetSearchWordsData? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetSearchWordsDetailResponse + Model: GetSearchWordsDetailResponseSchema Used By: Catalog */ - class GetSearchWordsDetailResponse: Codable { + class GetSearchWordsDetailResponseSchema: Codable { public var items: GetSearchWordsData? diff --git a/Sources/code/platform/Models/Catalog/GetSearchWordsResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/GetSearchWordsResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/GetSearchWordsResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/GetSearchWordsResponseSchemaCatalogPlatformModel.swift index 3882528be6..c2bcfd7ec5 100644 --- a/Sources/code/platform/Models/Catalog/GetSearchWordsResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/GetSearchWordsResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: GetSearchWordsResponse + Model: GetSearchWordsResponseSchema Used By: Catalog */ - class GetSearchWordsResponse: Codable { + class GetSearchWordsResponseSchema: Codable { public var items: [GetSearchWordsData]? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: GetSearchWordsResponse + Model: GetSearchWordsResponseSchema Used By: Catalog */ - class GetSearchWordsResponse: Codable { + class GetSearchWordsResponseSchema: Codable { public var items: [GetSearchWordsData]? diff --git a/Sources/code/platform/Models/Catalog/HSNCodesResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/HSNCodesResponseSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/HSNCodesResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/HSNCodesResponseSchemaCatalogPlatformModel.swift index 16e0edab32..50a5817184 100644 --- a/Sources/code/platform/Models/Catalog/HSNCodesResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/HSNCodesResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: HSNCodesResponse + Model: HSNCodesResponseSchema Used By: Catalog */ - class HSNCodesResponse: Codable { + class HSNCodesResponseSchema: Codable { public var data: HSNData? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: HSNCodesResponse + Model: HSNCodesResponseSchema Used By: Catalog */ - class HSNCodesResponse: Codable { + class HSNCodesResponseSchema: Codable { public var data: HSNData? diff --git a/Sources/code/platform/Models/Catalog/HsnCodesListingResponseSchemaV2CatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/HsnCodesListingResponseSchemaV2CatalogPlatformModel.swift index 026d6d087d..10cdcba8f8 100644 --- a/Sources/code/platform/Models/Catalog/HsnCodesListingResponseSchemaV2CatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/HsnCodesListingResponseSchemaV2CatalogPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.Catalog { public var items: [HSNDataInsertV2]? - public var page: PageResponse? + public var page: PageResponseSchema? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(items: [HSNDataInsertV2]? = nil, page: PageResponse? = nil) { + public init(items: [HSNDataInsertV2]? = nil, page: PageResponseSchema? = nil) { self.items = items @@ -50,7 +50,7 @@ public extension PlatformClient.Catalog { do { - page = try container.decode(PageResponse.self, forKey: .page) + page = try container.decode(PageResponseSchema.self, forKey: .page) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +93,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var items: [HSNDataInsertV2]? - public var page: PageResponse? + public var page: PageResponseSchema? public enum CodingKeys: String, CodingKey { @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(items: [HSNDataInsertV2]? = nil, page: PageResponse? = nil) { + public init(items: [HSNDataInsertV2]? = nil, page: PageResponseSchema? = nil) { self.items = items @@ -129,7 +129,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - page = try container.decode(PageResponse.self, forKey: .page) + page = try container.decode(PageResponseSchema.self, forKey: .page) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/HsnUpsertCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/HsnUpsertCatalogPlatformModel.swift index 053a29bbdb..c5853c30bd 100644 --- a/Sources/code/platform/Models/Catalog/HsnUpsertCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/HsnUpsertCatalogPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.Catalog { public var companyId: Int - public var hs2Code: String + public var hs2Code: String? public var hsnCode: String @@ -61,7 +61,7 @@ public extension PlatformClient.Catalog { } - public init(companyId: Int, hs2Code: String, hsnCode: String, isActive: Bool? = nil, tax1: Double, tax2: Double? = nil, taxOnEsp: Bool? = nil, taxOnMrp: Bool, threshold1: Double, threshold2: Double? = nil, uid: Int? = nil) { + public init(companyId: Int, hs2Code: String? = nil, hsnCode: String, isActive: Bool? = nil, tax1: Double, tax2: Double? = nil, taxOnEsp: Bool? = nil, taxOnMrp: Bool, threshold1: Double, threshold2: Double? = nil, uid: Int? = nil) { self.companyId = companyId @@ -96,9 +96,16 @@ public extension PlatformClient.Catalog { - hs2Code = try container.decode(String.self, forKey: .hs2Code) + do { + hs2Code = try container.decode(String.self, forKey: .hs2Code) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - hsnCode = try container.decode(String.self, forKey: .hsnCode) @@ -258,7 +265,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var companyId: Int - public var hs2Code: String + public var hs2Code: String? public var hsnCode: String @@ -305,7 +312,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(companyId: Int, hs2Code: String, hsnCode: String, isActive: Bool? = nil, tax1: Double, tax2: Double? = nil, taxOnEsp: Bool? = nil, taxOnMrp: Bool, threshold1: Double, threshold2: Double? = nil, uid: Int? = nil) { + public init(companyId: Int, hs2Code: String? = nil, hsnCode: String, isActive: Bool? = nil, tax1: Double, tax2: Double? = nil, taxOnEsp: Bool? = nil, taxOnMrp: Bool, threshold1: Double, threshold2: Double? = nil, uid: Int? = nil) { self.companyId = companyId @@ -340,9 +347,16 @@ public extension PlatformClient.ApplicationClient.Catalog { - hs2Code = try container.decode(String.self, forKey: .hs2Code) + do { + hs2Code = try container.decode(String.self, forKey: .hs2Code) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - hsnCode = try container.decode(String.self, forKey: .hsnCode) diff --git a/Sources/code/platform/Models/Catalog/IdentifierCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/IdentifierCatalogPlatformModel.swift new file mode 100644 index 0000000000..3a35a2cddd --- /dev/null +++ b/Sources/code/platform/Models/Catalog/IdentifierCatalogPlatformModel.swift @@ -0,0 +1,300 @@ + + +import Foundation + + +public extension PlatformClient.Catalog { + /* + Model: Identifier + Used By: Catalog + */ + + class Identifier: Codable { + + + public var ean: String? + + public var skuCode: String? + + public var alu: String? + + public var upc: String? + + public var isbn: String? + + + public enum CodingKeys: String, CodingKey { + + case ean = "ean" + + case skuCode = "sku_code" + + case alu = "alu" + + case upc = "upc" + + case isbn = "isbn" + + } + + public init(alu: String? = nil, ean: String? = nil, isbn: String? = nil, skuCode: String? = nil, upc: String? = nil) { + + self.ean = ean + + self.skuCode = skuCode + + self.alu = alu + + self.upc = upc + + self.isbn = isbn + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + ean = try container.decode(String.self, forKey: .ean) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + skuCode = try container.decode(String.self, forKey: .skuCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + alu = try container.decode(String.self, forKey: .alu) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + upc = try container.decode(String.self, forKey: .upc) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + isbn = try container.decode(String.self, forKey: .isbn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(ean, forKey: .ean) + + + + + try? container.encodeIfPresent(skuCode, forKey: .skuCode) + + + + + try? container.encodeIfPresent(alu, forKey: .alu) + + + + + try? container.encodeIfPresent(upc, forKey: .upc) + + + + + try? container.encodeIfPresent(isbn, forKey: .isbn) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Catalog { + /* + Model: Identifier + Used By: Catalog + */ + + class Identifier: Codable { + + + public var ean: String? + + public var skuCode: String? + + public var alu: String? + + public var upc: String? + + public var isbn: String? + + + public enum CodingKeys: String, CodingKey { + + case ean = "ean" + + case skuCode = "sku_code" + + case alu = "alu" + + case upc = "upc" + + case isbn = "isbn" + + } + + public init(alu: String? = nil, ean: String? = nil, isbn: String? = nil, skuCode: String? = nil, upc: String? = nil) { + + self.ean = ean + + self.skuCode = skuCode + + self.alu = alu + + self.upc = upc + + self.isbn = isbn + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + ean = try container.decode(String.self, forKey: .ean) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + skuCode = try container.decode(String.self, forKey: .skuCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + alu = try container.decode(String.self, forKey: .alu) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + upc = try container.decode(String.self, forKey: .upc) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + isbn = try container.decode(String.self, forKey: .isbn) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(ean, forKey: .ean) + + + + + try? container.encodeIfPresent(skuCode, forKey: .skuCode) + + + + + try? container.encodeIfPresent(alu, forKey: .alu) + + + + + try? container.encodeIfPresent(upc, forKey: .upc) + + + + + try? container.encodeIfPresent(isbn, forKey: .isbn) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Catalog/InventoryBulkRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryBulkRequestSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/InventoryBulkRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventoryBulkRequestSchemaCatalogPlatformModel.swift index 10f4140348..2f4de379c4 100644 --- a/Sources/code/platform/Models/Catalog/InventoryBulkRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryBulkRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryBulkRequest + Model: InventoryBulkRequestSchema Used By: Catalog */ - class InventoryBulkRequest: Codable { + class InventoryBulkRequestSchema: Codable { public var batchId: String @@ -109,11 +109,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryBulkRequest + Model: InventoryBulkRequestSchema Used By: Catalog */ - class InventoryBulkRequest: Codable { + class InventoryBulkRequestSchema: Codable { public var batchId: String diff --git a/Sources/code/platform/Models/Catalog/InventoryCreateRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryCreateRequestSchemaCatalogPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Catalog/InventoryCreateRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventoryCreateRequestSchemaCatalogPlatformModel.swift index 358db39053..846ba762c2 100644 --- a/Sources/code/platform/Models/Catalog/InventoryCreateRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryCreateRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryCreateRequest + Model: InventoryCreateRequestSchema Used By: Catalog */ - class InventoryCreateRequest: Codable { + class InventoryCreateRequestSchema: Codable { public var data: [String]? @@ -123,11 +123,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryCreateRequest + Model: InventoryCreateRequestSchema Used By: Catalog */ - class InventoryCreateRequest: Codable { + class InventoryCreateRequestSchema: Codable { public var data: [String]? diff --git a/Sources/code/platform/Models/Catalog/InventoryExportJobListResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryExportJobListResponseSchemaCatalogPlatformModel.swift similarity index 84% rename from Sources/code/platform/Models/Catalog/InventoryExportJobListResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventoryExportJobListResponseSchemaCatalogPlatformModel.swift index 71fe2bf2d4..2ec4b6eef7 100644 --- a/Sources/code/platform/Models/Catalog/InventoryExportJobListResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryExportJobListResponseSchemaCatalogPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryExportJobListResponse + Model: InventoryExportJobListResponseSchema Used By: Catalog */ - class InventoryExportJobListResponse: Codable { + class InventoryExportJobListResponseSchema: Codable { - public var items: InventoryJobDetailResponse + public var items: InventoryJobDetailResponseSchema public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(items: InventoryJobDetailResponse, page: Page? = nil) { + public init(items: InventoryJobDetailResponseSchema, page: Page? = nil) { self.items = items @@ -37,7 +37,7 @@ public extension PlatformClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - items = try container.decode(InventoryJobDetailResponse.self, forKey: .items) + items = try container.decode(InventoryJobDetailResponseSchema.self, forKey: .items) @@ -77,14 +77,14 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryExportJobListResponse + Model: InventoryExportJobListResponseSchema Used By: Catalog */ - class InventoryExportJobListResponse: Codable { + class InventoryExportJobListResponseSchema: Codable { - public var items: InventoryJobDetailResponse + public var items: InventoryJobDetailResponseSchema public var page: Page? @@ -97,7 +97,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(items: InventoryJobDetailResponse, page: Page? = nil) { + public init(items: InventoryJobDetailResponseSchema, page: Page? = nil) { self.items = items @@ -109,7 +109,7 @@ public extension PlatformClient.ApplicationClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - items = try container.decode(InventoryJobDetailResponse.self, forKey: .items) + items = try container.decode(InventoryJobDetailResponseSchema.self, forKey: .items) diff --git a/Sources/code/platform/Models/Catalog/InventoryExportRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryExportRequestSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/InventoryExportRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventoryExportRequestSchemaCatalogPlatformModel.swift index 16c5bfefc9..065c76a754 100644 --- a/Sources/code/platform/Models/Catalog/InventoryExportRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryExportRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryExportRequest + Model: InventoryExportRequestSchema Used By: Catalog */ - class InventoryExportRequest: Codable { + class InventoryExportRequestSchema: Codable { public var brand: [Int]? @@ -107,11 +107,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryExportRequest + Model: InventoryExportRequestSchema Used By: Catalog */ - class InventoryExportRequest: Codable { + class InventoryExportRequestSchema: Codable { public var brand: [Int]? diff --git a/Sources/code/platform/Models/Catalog/InventoryExportResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryExportResponseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/InventoryExportResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventoryExportResponseSchemaCatalogPlatformModel.swift index 980a06bbcf..84f8681e65 100644 --- a/Sources/code/platform/Models/Catalog/InventoryExportResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryExportResponseSchemaCatalogPlatformModel.swift @@ -5,18 +5,18 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryExportResponse + Model: InventoryExportResponseSchema Used By: Catalog */ - class InventoryExportResponse: Codable { + class InventoryExportResponseSchema: Codable { public var createdBy: String? public var createdOn: String? - public var filters: [String: Any]? + public var filters: Filters? public var modifiedOn: String? @@ -53,7 +53,7 @@ public extension PlatformClient.Catalog { } - public init(createdBy: String? = nil, createdOn: String? = nil, filters: [String: Any]? = nil, modifiedOn: String? = nil, notificationEmails: [String]? = nil, sellerId: Int, status: String? = nil, taskId: String, type: String? = nil) { + public init(createdBy: String? = nil, createdOn: String? = nil, filters: Filters? = nil, modifiedOn: String? = nil, notificationEmails: [String]? = nil, sellerId: Int, status: String? = nil, taskId: String, type: String? = nil) { self.createdBy = createdBy @@ -104,7 +104,7 @@ public extension PlatformClient.Catalog { do { - filters = try container.decode([String: Any].self, forKey: .filters) + filters = try container.decode(Filters.self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -231,18 +231,18 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryExportResponse + Model: InventoryExportResponseSchema Used By: Catalog */ - class InventoryExportResponse: Codable { + class InventoryExportResponseSchema: Codable { public var createdBy: String? public var createdOn: String? - public var filters: [String: Any]? + public var filters: Filters? public var modifiedOn: String? @@ -279,7 +279,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(createdBy: String? = nil, createdOn: String? = nil, filters: [String: Any]? = nil, modifiedOn: String? = nil, notificationEmails: [String]? = nil, sellerId: Int, status: String? = nil, taskId: String, type: String? = nil) { + public init(createdBy: String? = nil, createdOn: String? = nil, filters: Filters? = nil, modifiedOn: String? = nil, notificationEmails: [String]? = nil, sellerId: Int, status: String? = nil, taskId: String, type: String? = nil) { self.createdBy = createdBy @@ -330,7 +330,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - filters = try container.decode([String: Any].self, forKey: .filters) + filters = try container.decode(Filters.self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/InventoryJobDetailResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryJobDetailResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/InventoryJobDetailResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventoryJobDetailResponseSchemaCatalogPlatformModel.swift index 2e429115dc..3925f8bf9a 100644 --- a/Sources/code/platform/Models/Catalog/InventoryJobDetailResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryJobDetailResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryJobDetailResponse + Model: InventoryJobDetailResponseSchema Used By: Catalog */ - class InventoryJobDetailResponse: Codable { + class InventoryJobDetailResponseSchema: Codable { public var cancelledBy: UserDetail? @@ -325,11 +325,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryJobDetailResponse + Model: InventoryJobDetailResponseSchema Used By: Catalog */ - class InventoryJobDetailResponse: Codable { + class InventoryJobDetailResponseSchema: Codable { public var cancelledBy: UserDetail? diff --git a/Sources/code/platform/Models/Catalog/InventoryRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryRequestSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/InventoryRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventoryRequestSchemaCatalogPlatformModel.swift index a947956eb2..774bfcb278 100644 --- a/Sources/code/platform/Models/Catalog/InventoryRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryRequest + Model: InventoryRequestSchema Used By: Catalog */ - class InventoryRequest: Codable { + class InventoryRequestSchema: Codable { public var companyId: Int @@ -86,11 +86,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryRequest + Model: InventoryRequestSchema Used By: Catalog */ - class InventoryRequest: Codable { + class InventoryRequestSchema: Codable { public var companyId: Int diff --git a/Sources/code/platform/Models/Catalog/InventoryResponsePaginatedCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryResponsePaginatedCatalogPlatformModel.swift index 1049ef1fff..88cea698c4 100644 --- a/Sources/code/platform/Models/Catalog/InventoryResponsePaginatedCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryResponsePaginatedCatalogPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Catalog { class InventoryResponsePaginated: Codable { - public var items: [InventoryResponse]? + public var items: [InventoryResponseSchema]? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(items: [InventoryResponse]? = nil, page: Page? = nil) { + public init(items: [InventoryResponseSchema]? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.Catalog { do { - items = try container.decode([InventoryResponse].self, forKey: .items) + items = try container.decode([InventoryResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension PlatformClient.ApplicationClient.Catalog { class InventoryResponsePaginated: Codable { - public var items: [InventoryResponse]? + public var items: [InventoryResponseSchema]? public var page: Page? @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(items: [InventoryResponse]? = nil, page: Page? = nil) { + public init(items: [InventoryResponseSchema]? = nil, page: Page? = nil) { self.items = items @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - items = try container.decode([InventoryResponse].self, forKey: .items) + items = try container.decode([InventoryResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/InventoryResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryResponseSchemaCatalogPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Catalog/InventoryResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventoryResponseSchemaCatalogPlatformModel.swift index 350ef78354..c4bf91691a 100644 --- a/Sources/code/platform/Models/Catalog/InventoryResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryResponse + Model: InventoryResponseSchema Used By: Catalog */ - class InventoryResponse: Codable { + class InventoryResponseSchema: Codable { public var currency: String? @@ -337,11 +337,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryResponse + Model: InventoryResponseSchema Used By: Catalog */ - class InventoryResponse: Codable { + class InventoryResponseSchema: Codable { public var currency: String? diff --git a/Sources/code/platform/Models/Catalog/InventorySellerIdentifierResponsePaginatedCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventorySellerIdentifierResponsePaginatedCatalogPlatformModel.swift index 414b2d9917..e068c54e4b 100644 --- a/Sources/code/platform/Models/Catalog/InventorySellerIdentifierResponsePaginatedCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventorySellerIdentifierResponsePaginatedCatalogPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Catalog { class InventorySellerIdentifierResponsePaginated: Codable { - public var items: [InventorySellerResponse]? + public var items: [InventorySellerResponseSchema]? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(items: [InventorySellerResponse]? = nil, page: Page? = nil) { + public init(items: [InventorySellerResponseSchema]? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.Catalog { do { - items = try container.decode([InventorySellerResponse].self, forKey: .items) + items = try container.decode([InventorySellerResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension PlatformClient.ApplicationClient.Catalog { class InventorySellerIdentifierResponsePaginated: Codable { - public var items: [InventorySellerResponse]? + public var items: [InventorySellerResponseSchema]? public var page: Page? @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(items: [InventorySellerResponse]? = nil, page: Page? = nil) { + public init(items: [InventorySellerResponseSchema]? = nil, page: Page? = nil) { self.items = items @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - items = try container.decode([InventorySellerResponse].self, forKey: .items) + items = try container.decode([InventorySellerResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/InventorySellerResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventorySellerResponseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/InventorySellerResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventorySellerResponseSchemaCatalogPlatformModel.swift index 65924b54c5..f22e6730eb 100644 --- a/Sources/code/platform/Models/Catalog/InventorySellerResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventorySellerResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventorySellerResponse + Model: InventorySellerResponseSchema Used By: Catalog */ - class InventorySellerResponse: Codable { + class InventorySellerResponseSchema: Codable { public var customJson: [String: Any]? @@ -22,9 +22,9 @@ public extension PlatformClient.Catalog { public var countryOfOrigin: String - public var createdBy: RequestUserSerializer? + public var createdBy: UserSerializer1? - public var dimension: DimensionResponse + public var dimension: DimensionResponseSchema public var expirationDate: String? @@ -44,11 +44,11 @@ public extension PlatformClient.Catalog { public var itemId: Int - public var manufacturer: ManufacturerResponse + public var manufacturer: ManufacturerResponseSchema public var meta: [String: Any]? - public var modifiedBy: RequestUserSerializer? + public var modifiedBy: UserSerializer1? public var price: PriceMeta @@ -70,7 +70,7 @@ public extension PlatformClient.Catalog { public var tags: [String]? - public var taxIdentifier: [String: Any]? + public var taxIdentifier: TaxIdentifier? public var totalQuantity: Int @@ -82,7 +82,7 @@ public extension PlatformClient.Catalog { public var uid: String - public var weight: WeightResponse + public var weight: WeightResponseSchema public enum CodingKeys: String, CodingKey { @@ -161,7 +161,7 @@ public extension PlatformClient.Catalog { } - public init(addedOnStore: String? = nil, brand: BrandMeta, company: CompanyMeta, countryOfOrigin: String, createdBy: RequestUserSerializer? = nil, dimension: DimensionResponse, expirationDate: String? = nil, fragile: Bool, fyndArticleCode: String, fyndItemCode: String, fyndMeta: [String: Any]? = nil, identifier: [String: Any], isActive: Bool? = nil, isSet: Bool? = nil, itemId: Int, manufacturer: ManufacturerResponse, meta: [String: Any]? = nil, modifiedBy: RequestUserSerializer? = nil, price: PriceMeta, quantities: Quantities? = nil, rawMeta: [String: Any]? = nil, returnConfig: ReturnConfig1? = nil, sellerIdentifier: String, set: InventorySet? = nil, size: String, stage: String? = nil, store: StoreMeta, tags: [String]? = nil, taxIdentifier: [String: Any]? = nil, totalQuantity: Int, traceId: String? = nil, trackInventory: Bool? = nil, trader: [Trader1]? = nil, uid: String, weight: WeightResponse, customJson: [String: Any]? = nil) { + public init(addedOnStore: String? = nil, brand: BrandMeta, company: CompanyMeta, countryOfOrigin: String, createdBy: UserSerializer1? = nil, dimension: DimensionResponseSchema, expirationDate: String? = nil, fragile: Bool, fyndArticleCode: String, fyndItemCode: String, fyndMeta: [String: Any]? = nil, identifier: [String: Any], isActive: Bool? = nil, isSet: Bool? = nil, itemId: Int, manufacturer: ManufacturerResponseSchema, meta: [String: Any]? = nil, modifiedBy: UserSerializer1? = nil, price: PriceMeta, quantities: Quantities? = nil, rawMeta: [String: Any]? = nil, returnConfig: ReturnConfig1? = nil, sellerIdentifier: String, set: InventorySet? = nil, size: String, stage: String? = nil, store: StoreMeta, tags: [String]? = nil, taxIdentifier: TaxIdentifier? = nil, totalQuantity: Int, traceId: String? = nil, trackInventory: Bool? = nil, trader: [Trader1]? = nil, uid: String, weight: WeightResponseSchema, customJson: [String: Any]? = nil) { self.customJson = customJson @@ -281,7 +281,7 @@ public extension PlatformClient.Catalog { do { - createdBy = try container.decode(RequestUserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -292,7 +292,7 @@ public extension PlatformClient.Catalog { - dimension = try container.decode(DimensionResponse.self, forKey: .dimension) + dimension = try container.decode(DimensionResponseSchema.self, forKey: .dimension) @@ -370,7 +370,7 @@ public extension PlatformClient.Catalog { - manufacturer = try container.decode(ManufacturerResponse.self, forKey: .manufacturer) + manufacturer = try container.decode(ManufacturerResponseSchema.self, forKey: .manufacturer) @@ -388,7 +388,7 @@ public extension PlatformClient.Catalog { do { - modifiedBy = try container.decode(RequestUserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -492,7 +492,7 @@ public extension PlatformClient.Catalog { do { - taxIdentifier = try container.decode([String: Any].self, forKey: .taxIdentifier) + taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -549,7 +549,7 @@ public extension PlatformClient.Catalog { - weight = try container.decode(WeightResponse.self, forKey: .weight) + weight = try container.decode(WeightResponseSchema.self, forKey: .weight) @@ -747,11 +747,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventorySellerResponse + Model: InventorySellerResponseSchema Used By: Catalog */ - class InventorySellerResponse: Codable { + class InventorySellerResponseSchema: Codable { public var customJson: [String: Any]? @@ -764,9 +764,9 @@ public extension PlatformClient.ApplicationClient.Catalog { public var countryOfOrigin: String - public var createdBy: RequestUserSerializer? + public var createdBy: UserSerializer1? - public var dimension: DimensionResponse + public var dimension: DimensionResponseSchema public var expirationDate: String? @@ -786,11 +786,11 @@ public extension PlatformClient.ApplicationClient.Catalog { public var itemId: Int - public var manufacturer: ManufacturerResponse + public var manufacturer: ManufacturerResponseSchema public var meta: [String: Any]? - public var modifiedBy: RequestUserSerializer? + public var modifiedBy: UserSerializer1? public var price: PriceMeta @@ -812,7 +812,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var tags: [String]? - public var taxIdentifier: [String: Any]? + public var taxIdentifier: TaxIdentifier? public var totalQuantity: Int @@ -824,7 +824,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var uid: String - public var weight: WeightResponse + public var weight: WeightResponseSchema public enum CodingKeys: String, CodingKey { @@ -903,7 +903,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(addedOnStore: String? = nil, brand: BrandMeta, company: CompanyMeta, countryOfOrigin: String, createdBy: RequestUserSerializer? = nil, dimension: DimensionResponse, expirationDate: String? = nil, fragile: Bool, fyndArticleCode: String, fyndItemCode: String, fyndMeta: [String: Any]? = nil, identifier: [String: Any], isActive: Bool? = nil, isSet: Bool? = nil, itemId: Int, manufacturer: ManufacturerResponse, meta: [String: Any]? = nil, modifiedBy: RequestUserSerializer? = nil, price: PriceMeta, quantities: Quantities? = nil, rawMeta: [String: Any]? = nil, returnConfig: ReturnConfig1? = nil, sellerIdentifier: String, set: InventorySet? = nil, size: String, stage: String? = nil, store: StoreMeta, tags: [String]? = nil, taxIdentifier: [String: Any]? = nil, totalQuantity: Int, traceId: String? = nil, trackInventory: Bool? = nil, trader: [Trader1]? = nil, uid: String, weight: WeightResponse, customJson: [String: Any]? = nil) { + public init(addedOnStore: String? = nil, brand: BrandMeta, company: CompanyMeta, countryOfOrigin: String, createdBy: UserSerializer1? = nil, dimension: DimensionResponseSchema, expirationDate: String? = nil, fragile: Bool, fyndArticleCode: String, fyndItemCode: String, fyndMeta: [String: Any]? = nil, identifier: [String: Any], isActive: Bool? = nil, isSet: Bool? = nil, itemId: Int, manufacturer: ManufacturerResponseSchema, meta: [String: Any]? = nil, modifiedBy: UserSerializer1? = nil, price: PriceMeta, quantities: Quantities? = nil, rawMeta: [String: Any]? = nil, returnConfig: ReturnConfig1? = nil, sellerIdentifier: String, set: InventorySet? = nil, size: String, stage: String? = nil, store: StoreMeta, tags: [String]? = nil, taxIdentifier: TaxIdentifier? = nil, totalQuantity: Int, traceId: String? = nil, trackInventory: Bool? = nil, trader: [Trader1]? = nil, uid: String, weight: WeightResponseSchema, customJson: [String: Any]? = nil) { self.customJson = customJson @@ -1023,7 +1023,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - createdBy = try container.decode(RequestUserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSerializer1.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1034,7 +1034,7 @@ public extension PlatformClient.ApplicationClient.Catalog { - dimension = try container.decode(DimensionResponse.self, forKey: .dimension) + dimension = try container.decode(DimensionResponseSchema.self, forKey: .dimension) @@ -1112,7 +1112,7 @@ public extension PlatformClient.ApplicationClient.Catalog { - manufacturer = try container.decode(ManufacturerResponse.self, forKey: .manufacturer) + manufacturer = try container.decode(ManufacturerResponseSchema.self, forKey: .manufacturer) @@ -1130,7 +1130,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - modifiedBy = try container.decode(RequestUserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSerializer1.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1234,7 +1234,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - taxIdentifier = try container.decode([String: Any].self, forKey: .taxIdentifier) + taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1291,7 +1291,7 @@ public extension PlatformClient.ApplicationClient.Catalog { - weight = try container.decode(WeightResponse.self, forKey: .weight) + weight = try container.decode(WeightResponseSchema.self, forKey: .weight) diff --git a/Sources/code/platform/Models/Catalog/InventoryStockResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryStockResponseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/InventoryStockResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventoryStockResponseSchemaCatalogPlatformModel.swift index 57835a108c..573b4b89e7 100644 --- a/Sources/code/platform/Models/Catalog/InventoryStockResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryStockResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryStockResponse + Model: InventoryStockResponseSchema Used By: Catalog */ - class InventoryStockResponse: Codable { + class InventoryStockResponseSchema: Codable { public var items: [[String: Any]]? @@ -77,11 +77,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryStockResponse + Model: InventoryStockResponseSchema Used By: Catalog */ - class InventoryStockResponse: Codable { + class InventoryStockResponseSchema: Codable { public var items: [[String: Any]]? diff --git a/Sources/code/platform/Models/Catalog/InventoryUpdateResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryUpdateResponseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/InventoryUpdateResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventoryUpdateResponseSchemaCatalogPlatformModel.swift index d70947122b..f5fd81d118 100644 --- a/Sources/code/platform/Models/Catalog/InventoryUpdateResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryUpdateResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryUpdateResponse + Model: InventoryUpdateResponseSchema Used By: Catalog */ - class InventoryUpdateResponse: Codable { + class InventoryUpdateResponseSchema: Codable { public var items: [InventoryResponseItem]? @@ -77,11 +77,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryUpdateResponse + Model: InventoryUpdateResponseSchema Used By: Catalog */ - class InventoryUpdateResponse: Codable { + class InventoryUpdateResponseSchema: Codable { public var items: [InventoryResponseItem]? diff --git a/Sources/code/platform/Models/Catalog/InventoryValidationResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InventoryValidationResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/InventoryValidationResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InventoryValidationResponseSchemaCatalogPlatformModel.swift index fa476efa2f..e55d008c55 100644 --- a/Sources/code/platform/Models/Catalog/InventoryValidationResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InventoryValidationResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryValidationResponse + Model: InventoryValidationResponseSchema Used By: Catalog */ - class InventoryValidationResponse: Codable { + class InventoryValidationResponseSchema: Codable { public var data: [String: Any]? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryValidationResponse + Model: InventoryValidationResponseSchema Used By: Catalog */ - class InventoryValidationResponse: Codable { + class InventoryValidationResponseSchema: Codable { public var data: [String: Any]? diff --git a/Sources/code/platform/Models/Catalog/InvoiceCredSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InvoiceCredSchemaCatalogPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Catalog/InvoiceCredSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InvoiceCredSchemaCatalogPlatformModel.swift index 66966455b6..6e36275b64 100644 --- a/Sources/code/platform/Models/Catalog/InvoiceCredSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InvoiceCredSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InvoiceCredSerializer + Model: InvoiceCredSchema Used By: Catalog */ - class InvoiceCredSerializer: Codable { + class InvoiceCredSchema: Codable { public var enabled: Bool? @@ -107,11 +107,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InvoiceCredSerializer + Model: InvoiceCredSchema Used By: Catalog */ - class InvoiceCredSerializer: Codable { + class InvoiceCredSchema: Codable { public var enabled: Bool? diff --git a/Sources/code/platform/Models/Catalog/InvoiceDetailsSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/InvoiceDetailsSchemaCatalogPlatformModel.swift similarity index 83% rename from Sources/code/platform/Models/Catalog/InvoiceDetailsSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/InvoiceDetailsSchemaCatalogPlatformModel.swift index 1b26cdb538..cfd14d4f42 100644 --- a/Sources/code/platform/Models/Catalog/InvoiceDetailsSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/InvoiceDetailsSchemaCatalogPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InvoiceDetailsSerializer + Model: InvoiceDetailsSchema Used By: Catalog */ - class InvoiceDetailsSerializer: Codable { + class InvoiceDetailsSchema: Codable { - public var eInvoice: InvoiceCredSerializer? + public var eInvoice: InvoiceCredSchema? - public var eWaybill: InvoiceCredSerializer? + public var eWaybill: InvoiceCredSchema? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(eInvoice: InvoiceCredSerializer? = nil, eWaybill: InvoiceCredSerializer? = nil) { + public init(eInvoice: InvoiceCredSchema? = nil, eWaybill: InvoiceCredSchema? = nil) { self.eInvoice = eInvoice @@ -38,7 +38,7 @@ public extension PlatformClient.Catalog { do { - eInvoice = try container.decode(InvoiceCredSerializer.self, forKey: .eInvoice) + eInvoice = try container.decode(InvoiceCredSchema.self, forKey: .eInvoice) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient.Catalog { do { - eWaybill = try container.decode(InvoiceCredSerializer.self, forKey: .eWaybill) + eWaybill = try container.decode(InvoiceCredSchema.self, forKey: .eWaybill) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,16 +84,16 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InvoiceDetailsSerializer + Model: InvoiceDetailsSchema Used By: Catalog */ - class InvoiceDetailsSerializer: Codable { + class InvoiceDetailsSchema: Codable { - public var eInvoice: InvoiceCredSerializer? + public var eInvoice: InvoiceCredSchema? - public var eWaybill: InvoiceCredSerializer? + public var eWaybill: InvoiceCredSchema? public enum CodingKeys: String, CodingKey { @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(eInvoice: InvoiceCredSerializer? = nil, eWaybill: InvoiceCredSerializer? = nil) { + public init(eInvoice: InvoiceCredSchema? = nil, eWaybill: InvoiceCredSchema? = nil) { self.eInvoice = eInvoice @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - eInvoice = try container.decode(InvoiceCredSerializer.self, forKey: .eInvoice) + eInvoice = try container.decode(InvoiceCredSchema.self, forKey: .eInvoice) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -129,7 +129,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - eWaybill = try container.decode(InvoiceCredSerializer.self, forKey: .eWaybill) + eWaybill = try container.decode(InvoiceCredSchema.self, forKey: .eWaybill) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/LocationDayWiseSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/LocationDayWiseSchemaCatalogPlatformModel.swift similarity index 86% rename from Sources/code/platform/Models/Catalog/LocationDayWiseSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/LocationDayWiseSchemaCatalogPlatformModel.swift index b7a35555b1..95787c78dd 100644 --- a/Sources/code/platform/Models/Catalog/LocationDayWiseSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/LocationDayWiseSchemaCatalogPlatformModel.swift @@ -5,18 +5,18 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: LocationDayWiseSerializer + Model: LocationDayWiseSchema Used By: Catalog */ - class LocationDayWiseSerializer: Codable { + class LocationDayWiseSchema: Codable { - public var closing: LocationTimingSerializer? + public var closing: LocationTimingSchema? public var open: Bool - public var opening: LocationTimingSerializer? + public var opening: LocationTimingSchema? public var weekday: String @@ -33,7 +33,7 @@ public extension PlatformClient.Catalog { } - public init(closing: LocationTimingSerializer? = nil, open: Bool, opening: LocationTimingSerializer? = nil, weekday: String) { + public init(closing: LocationTimingSchema? = nil, open: Bool, opening: LocationTimingSchema? = nil, weekday: String) { self.closing = closing @@ -50,7 +50,7 @@ public extension PlatformClient.Catalog { do { - closing = try container.decode(LocationTimingSerializer.self, forKey: .closing) + closing = try container.decode(LocationTimingSchema.self, forKey: .closing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -67,7 +67,7 @@ public extension PlatformClient.Catalog { do { - opening = try container.decode(LocationTimingSerializer.self, forKey: .opening) + opening = try container.decode(LocationTimingSchema.self, forKey: .opening) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,18 +116,18 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: LocationDayWiseSerializer + Model: LocationDayWiseSchema Used By: Catalog */ - class LocationDayWiseSerializer: Codable { + class LocationDayWiseSchema: Codable { - public var closing: LocationTimingSerializer? + public var closing: LocationTimingSchema? public var open: Bool - public var opening: LocationTimingSerializer? + public var opening: LocationTimingSchema? public var weekday: String @@ -144,7 +144,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(closing: LocationTimingSerializer? = nil, open: Bool, opening: LocationTimingSerializer? = nil, weekday: String) { + public init(closing: LocationTimingSchema? = nil, open: Bool, opening: LocationTimingSchema? = nil, weekday: String) { self.closing = closing @@ -161,7 +161,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - closing = try container.decode(LocationTimingSerializer.self, forKey: .closing) + closing = try container.decode(LocationTimingSchema.self, forKey: .closing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -178,7 +178,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - opening = try container.decode(LocationTimingSerializer.self, forKey: .opening) + opening = try container.decode(LocationTimingSchema.self, forKey: .opening) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/LocationIntegrationTypeCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/LocationIntegrationTypeCatalogPlatformModel.swift index d0bf901b30..dd94b869e1 100644 --- a/Sources/code/platform/Models/Catalog/LocationIntegrationTypeCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/LocationIntegrationTypeCatalogPlatformModel.swift @@ -14,23 +14,17 @@ public extension PlatformClient.Catalog { public var inventory: String? - public var order: String? - public enum CodingKeys: String, CodingKey { case inventory = "inventory" - case order = "order" - } - public init(inventory: String? = nil, order: String? = nil) { + public init(inventory: String? = nil) { self.inventory = inventory - self.order = order - } required public init(from decoder: Decoder) throws { @@ -48,18 +42,6 @@ public extension PlatformClient.Catalog { } - - do { - order = try container.decode(String.self, forKey: .order) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -70,11 +52,6 @@ public extension PlatformClient.Catalog { try? container.encodeIfPresent(inventory, forKey: .inventory) - - - try? container.encodeIfPresent(order, forKey: .order) - - } } @@ -93,23 +70,17 @@ public extension PlatformClient.ApplicationClient.Catalog { public var inventory: String? - public var order: String? - public enum CodingKeys: String, CodingKey { case inventory = "inventory" - case order = "order" - } - public init(inventory: String? = nil, order: String? = nil) { + public init(inventory: String? = nil) { self.inventory = inventory - self.order = order - } required public init(from decoder: Decoder) throws { @@ -127,18 +98,6 @@ public extension PlatformClient.ApplicationClient.Catalog { } - - do { - order = try container.decode(String.self, forKey: .order) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -149,11 +108,6 @@ public extension PlatformClient.ApplicationClient.Catalog { try? container.encodeIfPresent(inventory, forKey: .inventory) - - - try? container.encodeIfPresent(order, forKey: .order) - - } } diff --git a/Sources/code/platform/Models/Catalog/LocationListSchemaCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/LocationListSchemaCatalogPlatformModel.swift new file mode 100644 index 0000000000..53b7316907 --- /dev/null +++ b/Sources/code/platform/Models/Catalog/LocationListSchemaCatalogPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Catalog { + /* + Model: LocationListSchema + Used By: Catalog + */ + + class LocationListSchema: Codable { + + + public var items: [GetLocationSchema]? + + public var page: Page? + + + public enum CodingKeys: String, CodingKey { + + case items = "items" + + case page = "page" + + } + + public init(items: [GetLocationSchema]? = nil, page: Page? = nil) { + + self.items = items + + self.page = page + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + items = try container.decode([GetLocationSchema].self, forKey: .items) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + page = try container.decode(Page.self, forKey: .page) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Catalog { + /* + Model: LocationListSchema + Used By: Catalog + */ + + class LocationListSchema: Codable { + + + public var items: [GetLocationSchema]? + + public var page: Page? + + + public enum CodingKeys: String, CodingKey { + + case items = "items" + + case page = "page" + + } + + public init(items: [GetLocationSchema]? = nil, page: Page? = nil) { + + self.items = items + + self.page = page + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + items = try container.decode([GetLocationSchema].self, forKey: .items) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + page = try container.decode(Page.self, forKey: .page) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Catalog/LocationListSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/LocationListSerializerCatalogPlatformModel.swift deleted file mode 100644 index 2e3de496d5..0000000000 --- a/Sources/code/platform/Models/Catalog/LocationListSerializerCatalogPlatformModel.swift +++ /dev/null @@ -1,162 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Catalog { - /* - Model: LocationListSerializer - Used By: Catalog - */ - - class LocationListSerializer: Codable { - - - public var items: [GetLocationSerializer]? - - public var page: Page? - - - public enum CodingKeys: String, CodingKey { - - case items = "items" - - case page = "page" - - } - - public init(items: [GetLocationSerializer]? = nil, page: Page? = nil) { - - self.items = items - - self.page = page - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - items = try container.decode([GetLocationSerializer].self, forKey: .items) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - page = try container.decode(Page.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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) - - - } - - } -} - - - -public extension PlatformClient.ApplicationClient.Catalog { - /* - Model: LocationListSerializer - Used By: Catalog - */ - - class LocationListSerializer: Codable { - - - public var items: [GetLocationSerializer]? - - public var page: Page? - - - public enum CodingKeys: String, CodingKey { - - case items = "items" - - case page = "page" - - } - - public init(items: [GetLocationSerializer]? = nil, page: Page? = nil) { - - self.items = items - - self.page = page - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - items = try container.decode([GetLocationSerializer].self, forKey: .items) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - page = try container.decode(Page.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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) - - - } - - } -} - - diff --git a/Sources/code/platform/Models/Catalog/LocationManagerSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/LocationManagerSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/LocationManagerSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/LocationManagerSchemaCatalogPlatformModel.swift index e3f7b0fa5e..fd97eba994 100644 --- a/Sources/code/platform/Models/Catalog/LocationManagerSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/LocationManagerSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: LocationManagerSerializer + Model: LocationManagerSchema Used By: Catalog */ - class LocationManagerSerializer: Codable { + class LocationManagerSchema: Codable { public var email: String? @@ -100,11 +100,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: LocationManagerSerializer + Model: LocationManagerSchema Used By: Catalog */ - class LocationManagerSerializer: Codable { + class LocationManagerSchema: Codable { public var email: String? diff --git a/Sources/code/platform/Models/Catalog/LocationTimingSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/LocationTimingSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/LocationTimingSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/LocationTimingSchemaCatalogPlatformModel.swift index 3c69ec2d68..70f14c500a 100644 --- a/Sources/code/platform/Models/Catalog/LocationTimingSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/LocationTimingSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: LocationTimingSerializer + Model: LocationTimingSchema Used By: Catalog */ - class LocationTimingSerializer: Codable { + class LocationTimingSchema: Codable { public var hour: Int? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: LocationTimingSerializer + Model: LocationTimingSchema Used By: Catalog */ - class LocationTimingSerializer: Codable { + class LocationTimingSchema: Codable { public var hour: Int? diff --git a/Sources/code/platform/Models/Catalog/InventoryManufacturerResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ManufacturerResponse1CatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/InventoryManufacturerResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ManufacturerResponse1CatalogPlatformModel.swift index 899fcad63d..88f5db2e0a 100644 --- a/Sources/code/platform/Models/Catalog/InventoryManufacturerResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ManufacturerResponse1CatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryManufacturerResponse + Model: ManufacturerResponse1 Used By: Catalog */ - class InventoryManufacturerResponse: Codable { + class ManufacturerResponse1: Codable { public var address: String? @@ -107,11 +107,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryManufacturerResponse + Model: ManufacturerResponse1 Used By: Catalog */ - class InventoryManufacturerResponse: Codable { + class ManufacturerResponse1: Codable { public var address: String? diff --git a/Sources/code/platform/Models/Catalog/ManufacturerResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ManufacturerResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/ManufacturerResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ManufacturerResponseSchemaCatalogPlatformModel.swift index 4e88e735f0..328ef8ba3f 100644 --- a/Sources/code/platform/Models/Catalog/ManufacturerResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ManufacturerResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ManufacturerResponse + Model: ManufacturerResponseSchema Used By: Catalog */ - class ManufacturerResponse: Codable { + class ManufacturerResponseSchema: Codable { public var address: String @@ -86,11 +86,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ManufacturerResponse + Model: ManufacturerResponseSchema Used By: Catalog */ - class ManufacturerResponse: Codable { + class ManufacturerResponseSchema: Codable { public var address: String diff --git a/Sources/code/platform/Models/Catalog/MediaCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/MediaCatalogPlatformModel.swift index aebb370bcb..86e85e1566 100644 --- a/Sources/code/platform/Models/Catalog/MediaCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/MediaCatalogPlatformModel.swift @@ -18,6 +18,10 @@ public extension PlatformClient.Catalog { public var url: String + public var alt: String? + + public var thumbnail: String? + public enum CodingKeys: String, CodingKey { @@ -27,9 +31,13 @@ public extension PlatformClient.Catalog { case url = "url" + case alt = "alt" + + case thumbnail = "thumbnail" + } - public init(meta: [String: Any]? = nil, type: String? = nil, url: String) { + public init(alt: String? = nil, meta: [String: Any]? = nil, thumbnail: String? = nil, type: String? = nil, url: String) { self.meta = meta @@ -37,6 +45,10 @@ public extension PlatformClient.Catalog { self.url = url + self.alt = alt + + self.thumbnail = thumbnail + } required public init(from decoder: Decoder) throws { @@ -71,6 +83,30 @@ public extension PlatformClient.Catalog { + + do { + alt = try container.decode(String.self, forKey: .alt) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + thumbnail = try container.decode(String.self, forKey: .thumbnail) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -91,6 +127,16 @@ public extension PlatformClient.Catalog { try? container.encodeIfPresent(url, forKey: .url) + + + try? container.encodeIfPresent(alt, forKey: .alt) + + + + + try? container.encodeIfPresent(thumbnail, forKey: .thumbnail) + + } } @@ -113,6 +159,10 @@ public extension PlatformClient.ApplicationClient.Catalog { public var url: String + public var alt: String? + + public var thumbnail: String? + public enum CodingKeys: String, CodingKey { @@ -122,9 +172,13 @@ public extension PlatformClient.ApplicationClient.Catalog { case url = "url" + case alt = "alt" + + case thumbnail = "thumbnail" + } - public init(meta: [String: Any]? = nil, type: String? = nil, url: String) { + public init(alt: String? = nil, meta: [String: Any]? = nil, thumbnail: String? = nil, type: String? = nil, url: String) { self.meta = meta @@ -132,6 +186,10 @@ public extension PlatformClient.ApplicationClient.Catalog { self.url = url + self.alt = alt + + self.thumbnail = thumbnail + } required public init(from decoder: Decoder) throws { @@ -166,6 +224,30 @@ public extension PlatformClient.ApplicationClient.Catalog { + + do { + alt = try container.decode(String.self, forKey: .alt) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + thumbnail = try container.decode(String.self, forKey: .thumbnail) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -186,6 +268,16 @@ public extension PlatformClient.ApplicationClient.Catalog { try? container.encodeIfPresent(url, forKey: .url) + + + try? container.encodeIfPresent(alt, forKey: .alt) + + + + + try? container.encodeIfPresent(thumbnail, forKey: .thumbnail) + + } } diff --git a/Sources/code/platform/Models/Catalog/MetaDataListingFilterMetaResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/MetaDataListingFilterMetaResponseSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/MetaDataListingFilterMetaResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/MetaDataListingFilterMetaResponseSchemaCatalogPlatformModel.swift index f7f176a29f..9a7522ebf9 100644 --- a/Sources/code/platform/Models/Catalog/MetaDataListingFilterMetaResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/MetaDataListingFilterMetaResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: MetaDataListingFilterMetaResponse + Model: MetaDataListingFilterMetaResponseSchema Used By: Catalog */ - class MetaDataListingFilterMetaResponse: Codable { + class MetaDataListingFilterMetaResponseSchema: Codable { public var display: String? @@ -130,11 +130,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: MetaDataListingFilterMetaResponse + Model: MetaDataListingFilterMetaResponseSchema Used By: Catalog */ - class MetaDataListingFilterMetaResponse: Codable { + class MetaDataListingFilterMetaResponseSchema: Codable { public var display: String? diff --git a/Sources/code/platform/Models/Catalog/MetaDataListingSortResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/MetaDataListingFilterResponseSchemaCatalogPlatformModel.swift similarity index 79% rename from Sources/code/platform/Models/Catalog/MetaDataListingSortResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/MetaDataListingFilterResponseSchemaCatalogPlatformModel.swift index 36fd87e94d..eab98ae5c7 100644 --- a/Sources/code/platform/Models/Catalog/MetaDataListingSortResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/MetaDataListingFilterResponseSchemaCatalogPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: MetaDataListingSortResponse + Model: MetaDataListingFilterResponseSchema Used By: Catalog */ - class MetaDataListingSortResponse: Codable { + class MetaDataListingFilterResponseSchema: Codable { - public var data: [MetaDataListingSortMetaResponse]? + public var data: [MetaDataListingFilterMetaResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -21,7 +21,7 @@ public extension PlatformClient.Catalog { } - public init(data: [MetaDataListingSortMetaResponse]? = nil) { + public init(data: [MetaDataListingFilterMetaResponseSchema]? = nil) { self.data = data @@ -32,7 +32,7 @@ public extension PlatformClient.Catalog { do { - data = try container.decode([MetaDataListingSortMetaResponse].self, forKey: .data) + data = try container.decode([MetaDataListingFilterMetaResponseSchema].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,14 +61,14 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: MetaDataListingSortResponse + Model: MetaDataListingFilterResponseSchema Used By: Catalog */ - class MetaDataListingSortResponse: Codable { + class MetaDataListingFilterResponseSchema: Codable { - public var data: [MetaDataListingSortMetaResponse]? + public var data: [MetaDataListingFilterMetaResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -77,7 +77,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(data: [MetaDataListingSortMetaResponse]? = nil) { + public init(data: [MetaDataListingFilterMetaResponseSchema]? = nil) { self.data = data @@ -88,7 +88,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - data = try container.decode([MetaDataListingSortMetaResponse].self, forKey: .data) + data = try container.decode([MetaDataListingFilterMetaResponseSchema].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/MetaDataListingResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/MetaDataListingResponseSchemaCatalogPlatformModel.swift similarity index 75% rename from Sources/code/platform/Models/Catalog/MetaDataListingResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/MetaDataListingResponseSchemaCatalogPlatformModel.swift index 063e35c353..acfe9658e0 100644 --- a/Sources/code/platform/Models/Catalog/MetaDataListingResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/MetaDataListingResponseSchemaCatalogPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: MetaDataListingResponse + Model: MetaDataListingResponseSchema Used By: Catalog */ - class MetaDataListingResponse: Codable { + class MetaDataListingResponseSchema: Codable { - public var filter: MetaDataListingFilterResponse + public var filter: MetaDataListingFilterResponseSchema - public var sort: MetaDataListingSortResponse + public var sort: MetaDataListingSortResponseSchema public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(filter: MetaDataListingFilterResponse, sort: MetaDataListingSortResponse) { + public init(filter: MetaDataListingFilterResponseSchema, sort: MetaDataListingSortResponseSchema) { self.filter = filter @@ -37,12 +37,12 @@ public extension PlatformClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - filter = try container.decode(MetaDataListingFilterResponse.self, forKey: .filter) + filter = try container.decode(MetaDataListingFilterResponseSchema.self, forKey: .filter) - sort = try container.decode(MetaDataListingSortResponse.self, forKey: .sort) + sort = try container.decode(MetaDataListingSortResponseSchema.self, forKey: .sort) @@ -70,16 +70,16 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: MetaDataListingResponse + Model: MetaDataListingResponseSchema Used By: Catalog */ - class MetaDataListingResponse: Codable { + class MetaDataListingResponseSchema: Codable { - public var filter: MetaDataListingFilterResponse + public var filter: MetaDataListingFilterResponseSchema - public var sort: MetaDataListingSortResponse + public var sort: MetaDataListingSortResponseSchema public enum CodingKeys: String, CodingKey { @@ -90,7 +90,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(filter: MetaDataListingFilterResponse, sort: MetaDataListingSortResponse) { + public init(filter: MetaDataListingFilterResponseSchema, sort: MetaDataListingSortResponseSchema) { self.filter = filter @@ -102,12 +102,12 @@ public extension PlatformClient.ApplicationClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - filter = try container.decode(MetaDataListingFilterResponse.self, forKey: .filter) + filter = try container.decode(MetaDataListingFilterResponseSchema.self, forKey: .filter) - sort = try container.decode(MetaDataListingSortResponse.self, forKey: .sort) + sort = try container.decode(MetaDataListingSortResponseSchema.self, forKey: .sort) diff --git a/Sources/code/platform/Models/Catalog/MetaDataListingSortMetaResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/MetaDataListingSortMetaResponseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/MetaDataListingSortMetaResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/MetaDataListingSortMetaResponseSchemaCatalogPlatformModel.swift index dd9f971662..4668fe7507 100644 --- a/Sources/code/platform/Models/Catalog/MetaDataListingSortMetaResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/MetaDataListingSortMetaResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: MetaDataListingSortMetaResponse + Model: MetaDataListingSortMetaResponseSchema Used By: Catalog */ - class MetaDataListingSortMetaResponse: Codable { + class MetaDataListingSortMetaResponseSchema: Codable { public var display: String? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: MetaDataListingSortMetaResponse + Model: MetaDataListingSortMetaResponseSchema Used By: Catalog */ - class MetaDataListingSortMetaResponse: Codable { + class MetaDataListingSortMetaResponseSchema: Codable { public var display: String? diff --git a/Sources/code/platform/Models/Catalog/MetaDataListingFilterResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/MetaDataListingSortResponseSchemaCatalogPlatformModel.swift similarity index 80% rename from Sources/code/platform/Models/Catalog/MetaDataListingFilterResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/MetaDataListingSortResponseSchemaCatalogPlatformModel.swift index f4a6ffa25f..9767af3cea 100644 --- a/Sources/code/platform/Models/Catalog/MetaDataListingFilterResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/MetaDataListingSortResponseSchemaCatalogPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: MetaDataListingFilterResponse + Model: MetaDataListingSortResponseSchema Used By: Catalog */ - class MetaDataListingFilterResponse: Codable { + class MetaDataListingSortResponseSchema: Codable { - public var data: [MetaDataListingFilterMetaResponse]? + public var data: [MetaDataListingSortMetaResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -21,7 +21,7 @@ public extension PlatformClient.Catalog { } - public init(data: [MetaDataListingFilterMetaResponse]? = nil) { + public init(data: [MetaDataListingSortMetaResponseSchema]? = nil) { self.data = data @@ -32,7 +32,7 @@ public extension PlatformClient.Catalog { do { - data = try container.decode([MetaDataListingFilterMetaResponse].self, forKey: .data) + data = try container.decode([MetaDataListingSortMetaResponseSchema].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,14 +61,14 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: MetaDataListingFilterResponse + Model: MetaDataListingSortResponseSchema Used By: Catalog */ - class MetaDataListingFilterResponse: Codable { + class MetaDataListingSortResponseSchema: Codable { - public var data: [MetaDataListingFilterMetaResponse]? + public var data: [MetaDataListingSortMetaResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -77,7 +77,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(data: [MetaDataListingFilterMetaResponse]? = nil) { + public init(data: [MetaDataListingSortMetaResponseSchema]? = nil) { self.data = data @@ -88,7 +88,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - data = try container.decode([MetaDataListingFilterMetaResponse].self, forKey: .data) + data = try container.decode([MetaDataListingSortMetaResponseSchema].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/ModifiedByCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ModifiedByCatalogPlatformModel.swift new file mode 100644 index 0000000000..d516fa27af --- /dev/null +++ b/Sources/code/platform/Models/Catalog/ModifiedByCatalogPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Catalog { + /* + Model: ModifiedBy + Used By: Catalog + */ + + class ModifiedBy: Codable { + + + public var username: String? + + public var userId: String? + + + public enum CodingKeys: String, CodingKey { + + case username = "username" + + case userId = "user_id" + + } + + public init(username: String? = nil, userId: String? = nil) { + + self.username = username + + self.userId = userId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + username = try container.decode(String.self, forKey: .username) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(username, forKey: .username) + + + + + try? container.encodeIfPresent(userId, forKey: .userId) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Catalog { + /* + Model: ModifiedBy + Used By: Catalog + */ + + class ModifiedBy: Codable { + + + public var username: String? + + public var userId: String? + + + public enum CodingKeys: String, CodingKey { + + case username = "username" + + case userId = "user_id" + + } + + public init(username: String? = nil, userId: String? = nil) { + + self.username = username + + self.userId = userId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + username = try container.decode(String.self, forKey: .username) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(username, forKey: .username) + + + + + try? container.encodeIfPresent(userId, forKey: .userId) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Catalog/MultiCategoriesSchemaCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/MultiCategoriesSchemaCatalogPlatformModel.swift new file mode 100644 index 0000000000..4231dc99f1 --- /dev/null +++ b/Sources/code/platform/Models/Catalog/MultiCategoriesSchemaCatalogPlatformModel.swift @@ -0,0 +1,300 @@ + + +import Foundation + + +public extension PlatformClient.Catalog { + /* + Model: MultiCategoriesSchema + Used By: Catalog + */ + + class MultiCategoriesSchema: Codable { + + + public var l1: Int? + + public var l2: Int? + + public var l3: Int? + + public var isActive: Bool? + + public var department: Int? + + + public enum CodingKeys: String, CodingKey { + + case l1 = "l1" + + case l2 = "l2" + + case l3 = "l3" + + case isActive = "is_active" + + case department = "department" + + } + + public init(department: Int? = nil, isActive: Bool? = nil, l1: Int? = nil, l2: Int? = nil, l3: Int? = nil) { + + self.l1 = l1 + + self.l2 = l2 + + self.l3 = l3 + + self.isActive = isActive + + self.department = department + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + l1 = try container.decode(Int.self, forKey: .l1) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + l2 = try container.decode(Int.self, forKey: .l2) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + l3 = try container.decode(Int.self, forKey: .l3) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + department = try container.decode(Int.self, forKey: .department) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(l1, forKey: .l1) + + + + + try? container.encodeIfPresent(l2, forKey: .l2) + + + + + try? container.encodeIfPresent(l3, forKey: .l3) + + + + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + + + + try? container.encodeIfPresent(department, forKey: .department) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Catalog { + /* + Model: MultiCategoriesSchema + Used By: Catalog + */ + + class MultiCategoriesSchema: Codable { + + + public var l1: Int? + + public var l2: Int? + + public var l3: Int? + + public var isActive: Bool? + + public var department: Int? + + + public enum CodingKeys: String, CodingKey { + + case l1 = "l1" + + case l2 = "l2" + + case l3 = "l3" + + case isActive = "is_active" + + case department = "department" + + } + + public init(department: Int? = nil, isActive: Bool? = nil, l1: Int? = nil, l2: Int? = nil, l3: Int? = nil) { + + self.l1 = l1 + + self.l2 = l2 + + self.l3 = l3 + + self.isActive = isActive + + self.department = department + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + l1 = try container.decode(Int.self, forKey: .l1) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + l2 = try container.decode(Int.self, forKey: .l2) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + l3 = try container.decode(Int.self, forKey: .l3) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + department = try container.decode(Int.self, forKey: .department) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(l1, forKey: .l1) + + + + + try? container.encodeIfPresent(l2, forKey: .l2) + + + + + try? container.encodeIfPresent(l3, forKey: .l3) + + + + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + + + + try? container.encodeIfPresent(department, forKey: .department) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Catalog/NetQuantityResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/NetQuantityResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/NetQuantityResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/NetQuantityResponseSchemaCatalogPlatformModel.swift index 3ff1d89f71..8982c15a05 100644 --- a/Sources/code/platform/Models/Catalog/NetQuantityResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/NetQuantityResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: NetQuantityResponse + Model: NetQuantityResponseSchema Used By: Catalog */ - class NetQuantityResponse: Codable { + class NetQuantityResponseSchema: Codable { public var unit: String? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: NetQuantityResponse + Model: NetQuantityResponseSchema Used By: Catalog */ - class NetQuantityResponse: Codable { + class NetQuantityResponseSchema: Codable { public var unit: String? diff --git a/Sources/code/platform/Models/Catalog/OptInPostRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/OptInPostRequestSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/OptInPostRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/OptInPostRequestSchemaCatalogPlatformModel.swift index 39d2b1aa69..fc1c1ff1f1 100644 --- a/Sources/code/platform/Models/Catalog/OptInPostRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/OptInPostRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: OptInPostRequest + Model: OptInPostRequestSchema Used By: Catalog */ - class OptInPostRequest: Codable { + class OptInPostRequestSchema: Codable { public var brandIds: [Int]? @@ -169,11 +169,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: OptInPostRequest + Model: OptInPostRequestSchema Used By: Catalog */ - class OptInPostRequest: Codable { + class OptInPostRequestSchema: Codable { public var brandIds: [Int]? diff --git a/Sources/code/platform/Models/Catalog/OwnerAppItemResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/OwnerAppItemResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/OwnerAppItemResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/OwnerAppItemResponseSchemaCatalogPlatformModel.swift index c16029de48..33a788f0ce 100644 --- a/Sources/code/platform/Models/Catalog/OwnerAppItemResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/OwnerAppItemResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: OwnerAppItemResponse + Model: OwnerAppItemResponseSchema Used By: Catalog */ - class OwnerAppItemResponse: Codable { + class OwnerAppItemResponseSchema: Codable { public var altText: [String: Any]? @@ -199,11 +199,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: OwnerAppItemResponse + Model: OwnerAppItemResponseSchema Used By: Catalog */ - class OwnerAppItemResponse: Codable { + class OwnerAppItemResponseSchema: Codable { public var altText: [String: Any]? diff --git a/Sources/code/platform/Models/Catalog/PTErrorResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/PTErrorResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/PTErrorResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/PTErrorResponseSchemaCatalogPlatformModel.swift index 3c2350d121..cdb8a374fc 100644 --- a/Sources/code/platform/Models/Catalog/PTErrorResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/PTErrorResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: PTErrorResponse + Model: PTErrorResponseSchema Used By: Catalog */ - class PTErrorResponse: Codable { + class PTErrorResponseSchema: Codable { public var code: String? @@ -153,11 +153,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: PTErrorResponse + Model: PTErrorResponseSchema Used By: Catalog */ - class PTErrorResponse: Codable { + class PTErrorResponseSchema: Codable { public var code: String? diff --git a/Sources/code/platform/Models/Catalog/PageResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/PageResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/PageResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/PageResponseSchemaCatalogPlatformModel.swift index 49c5797364..851477c189 100644 --- a/Sources/code/platform/Models/Catalog/PageResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/PageResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: PageResponse + Model: PageResponseSchema Used By: Catalog */ - class PageResponse: Codable { + class PageResponseSchema: Codable { public var current: String? @@ -153,11 +153,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: PageResponse + Model: PageResponseSchema Used By: Catalog */ - class PageResponse: Codable { + class PageResponseSchema: Codable { public var current: String? diff --git a/Sources/code/platform/Models/Catalog/Price1CatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/Price1CatalogPlatformModel.swift index fa912f0894..f541e5ad5a 100644 --- a/Sources/code/platform/Models/Catalog/Price1CatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/Price1CatalogPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Catalog { class Price1: Codable { - public var currencyCode: String? + public var currencyCode: CurrencyCodeEnum? public var currencySymbol: String? @@ -33,7 +33,7 @@ public extension PlatformClient.Catalog { } - public init(currencyCode: String? = nil, currencySymbol: String? = nil, max: Double? = nil, min: Double? = nil) { + public init(currencyCode: CurrencyCodeEnum? = nil, currencySymbol: String? = nil, max: Double? = nil, min: Double? = nil) { self.currencyCode = currencyCode @@ -50,7 +50,7 @@ public extension PlatformClient.Catalog { do { - currencyCode = try container.decode(String.self, forKey: .currencyCode) + currencyCode = try container.decode(CurrencyCodeEnum.self, forKey: .currencyCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -137,7 +137,7 @@ public extension PlatformClient.ApplicationClient.Catalog { class Price1: Codable { - public var currencyCode: String? + public var currencyCode: CurrencyCodeEnum? public var currencySymbol: String? @@ -158,7 +158,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(currencyCode: String? = nil, currencySymbol: String? = nil, max: Double? = nil, min: Double? = nil) { + public init(currencyCode: CurrencyCodeEnum? = nil, currencySymbol: String? = nil, max: Double? = nil, min: Double? = nil) { self.currencyCode = currencyCode @@ -175,7 +175,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - currencyCode = try container.decode(String.self, forKey: .currencyCode) + currencyCode = try container.decode(CurrencyCodeEnum.self, forKey: .currencyCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/ProdcutTemplateCategoriesResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProdcutTemplateCategoriesResponseSchemaCatalogPlatformModel.swift similarity index 86% rename from Sources/code/platform/Models/Catalog/ProdcutTemplateCategoriesResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProdcutTemplateCategoriesResponseSchemaCatalogPlatformModel.swift index f9cdba7129..c88cb0efcf 100644 --- a/Sources/code/platform/Models/Catalog/ProdcutTemplateCategoriesResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProdcutTemplateCategoriesResponseSchemaCatalogPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProdcutTemplateCategoriesResponse + Model: ProdcutTemplateCategoriesResponseSchema Used By: Catalog */ - class ProdcutTemplateCategoriesResponse: Codable { + class ProdcutTemplateCategoriesResponseSchema: Codable { - public var items: [CategoriesResponse]? + public var items: [CategoriesResponseSchema]? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(items: [CategoriesResponse]? = nil, page: Page? = nil) { + public init(items: [CategoriesResponseSchema]? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.Catalog { do { - items = try container.decode([CategoriesResponse].self, forKey: .items) + items = try container.decode([CategoriesResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,14 +84,14 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProdcutTemplateCategoriesResponse + Model: ProdcutTemplateCategoriesResponseSchema Used By: Catalog */ - class ProdcutTemplateCategoriesResponse: Codable { + class ProdcutTemplateCategoriesResponseSchema: Codable { - public var items: [CategoriesResponse]? + public var items: [CategoriesResponseSchema]? public var page: Page? @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(items: [CategoriesResponse]? = nil, page: Page? = nil) { + public init(items: [CategoriesResponseSchema]? = nil, page: Page? = nil) { self.items = items @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - items = try container.decode([CategoriesResponse].self, forKey: .items) + items = try container.decode([CategoriesResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/ProductAttributesResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductAttributesResponseSchemaCatalogPlatformModel.swift similarity index 73% rename from Sources/code/platform/Models/Catalog/ProductAttributesResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductAttributesResponseSchemaCatalogPlatformModel.swift index 3176f8c5f8..b7eff4b727 100644 --- a/Sources/code/platform/Models/Catalog/ProductAttributesResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductAttributesResponseSchemaCatalogPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductAttributesResponse + Model: ProductAttributesResponseSchema Used By: Catalog */ - class ProductAttributesResponse: Codable { + class ProductAttributesResponseSchema: Codable { - public var items: [AttributeMasterSerializer] + public var items: [AttributeMasterSchema] public enum CodingKeys: String, CodingKey { @@ -21,7 +21,7 @@ public extension PlatformClient.Catalog { } - public init(items: [AttributeMasterSerializer]) { + public init(items: [AttributeMasterSchema]) { self.items = items @@ -31,7 +31,7 @@ public extension PlatformClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - items = try container.decode([AttributeMasterSerializer].self, forKey: .items) + items = try container.decode([AttributeMasterSchema].self, forKey: .items) @@ -54,14 +54,14 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductAttributesResponse + Model: ProductAttributesResponseSchema Used By: Catalog */ - class ProductAttributesResponse: Codable { + class ProductAttributesResponseSchema: Codable { - public var items: [AttributeMasterSerializer] + public var items: [AttributeMasterSchema] public enum CodingKeys: String, CodingKey { @@ -70,7 +70,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(items: [AttributeMasterSerializer]) { + public init(items: [AttributeMasterSchema]) { self.items = items @@ -80,7 +80,7 @@ public extension PlatformClient.ApplicationClient.Catalog { let container = try decoder.container(keyedBy: CodingKeys.self) - items = try container.decode([AttributeMasterSerializer].self, forKey: .items) + items = try container.decode([AttributeMasterSchema].self, forKey: .items) diff --git a/Sources/code/platform/Models/Catalog/ProductBulkRequestListCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductBulkRequestListCatalogPlatformModel.swift index 923717230f..f3d6206e73 100644 --- a/Sources/code/platform/Models/Catalog/ProductBulkRequestListCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductBulkRequestListCatalogPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Catalog { class ProductBulkRequestList: Codable { - public var items: [ProductBulkRequest]? + public var items: [String: Any]? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(items: [ProductBulkRequest]? = nil, page: Page? = nil) { + public init(items: [String: Any]? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.Catalog { do { - items = try container.decode([ProductBulkRequest].self, forKey: .items) + items = try container.decode([String: Any].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension PlatformClient.ApplicationClient.Catalog { class ProductBulkRequestList: Codable { - public var items: [ProductBulkRequest]? + public var items: [String: Any]? public var page: Page? @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(items: [ProductBulkRequest]? = nil, page: Page? = nil) { + public init(items: [String: Any]? = nil, page: Page? = nil) { self.items = items @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - items = try container.decode([ProductBulkRequest].self, forKey: .items) + items = try container.decode([String: Any].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/ProductBulkRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductBulkRequestSchemaCatalogPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Catalog/ProductBulkRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductBulkRequestSchemaCatalogPlatformModel.swift index 3241f57371..7e2569f414 100644 --- a/Sources/code/platform/Models/Catalog/ProductBulkRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductBulkRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductBulkRequest + Model: ProductBulkRequestSchema Used By: Catalog */ - class ProductBulkRequest: Codable { + class ProductBulkRequestSchema: Codable { public var cancelled: Int? @@ -406,11 +406,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductBulkRequest + Model: ProductBulkRequestSchema Used By: Catalog */ - class ProductBulkRequest: Codable { + class ProductBulkRequestSchema: Codable { public var cancelled: Int? diff --git a/Sources/code/platform/Models/Catalog/ProductBundleRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductBundleRequestSchemaCatalogPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Catalog/ProductBundleRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductBundleRequestSchemaCatalogPlatformModel.swift index 7bff4b7b97..23aa4ed61e 100644 --- a/Sources/code/platform/Models/Catalog/ProductBundleRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductBundleRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductBundleRequest + Model: ProductBundleRequestSchema Used By: Catalog */ - class ProductBundleRequest: Codable { + class ProductBundleRequestSchema: Codable { public var choice: String @@ -325,11 +325,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductBundleRequest + Model: ProductBundleRequestSchema Used By: Catalog */ - class ProductBundleRequest: Codable { + class ProductBundleRequestSchema: Codable { public var choice: String diff --git a/Sources/code/platform/Models/Catalog/ProductBundleUpdateRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductBundleUpdateRequestSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/ProductBundleUpdateRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductBundleUpdateRequestSchemaCatalogPlatformModel.swift index 6c83961869..1aade559c6 100644 --- a/Sources/code/platform/Models/Catalog/ProductBundleUpdateRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductBundleUpdateRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductBundleUpdateRequest + Model: ProductBundleUpdateRequestSchema Used By: Catalog */ - class ProductBundleUpdateRequest: Codable { + class ProductBundleUpdateRequestSchema: Codable { public var choice: String @@ -279,11 +279,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductBundleUpdateRequest + Model: ProductBundleUpdateRequestSchema Used By: Catalog */ - class ProductBundleUpdateRequest: Codable { + class ProductBundleUpdateRequestSchema: Codable { public var choice: String diff --git a/Sources/code/platform/Models/Catalog/ProductCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductCatalogPlatformModel.swift index 0f0b4baa29..de4b4eff86 100644 --- a/Sources/code/platform/Models/Catalog/ProductCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductCatalogPlatformModel.swift @@ -90,7 +90,7 @@ public extension PlatformClient.Catalog { public var name: String? - public var netQuantity: NetQuantityResponse? + public var netQuantity: NetQuantityResponseSchema? public var noOfBoxes: Int? @@ -102,7 +102,7 @@ public extension PlatformClient.Catalog { public var productPublish: ProductPublished? - public var returnConfig: ReturnConfigResponse? + public var returnConfig: ReturnConfigResponseSchema? public var shortDescription: String? @@ -116,7 +116,7 @@ public extension PlatformClient.Catalog { public var tags: [String]? - public var taxIdentifier: [String: Any]? + public var taxIdentifier: TaxIdentifier? public var teaserTag: [String: Any]? @@ -265,7 +265,7 @@ public extension PlatformClient.Catalog { } - public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponse? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublished? = nil, returnConfig: ReturnConfigResponse? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, tags: [String]? = nil, taxIdentifier: [String: Any]? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { + public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponseSchema? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublished? = nil, returnConfig: ReturnConfigResponseSchema? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, tags: [String]? = nil, taxIdentifier: TaxIdentifier? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { self.customJson = customJson @@ -866,7 +866,7 @@ public extension PlatformClient.Catalog { do { - netQuantity = try container.decode(NetQuantityResponse.self, forKey: .netQuantity) + netQuantity = try container.decode(NetQuantityResponseSchema.self, forKey: .netQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -938,7 +938,7 @@ public extension PlatformClient.Catalog { do { - returnConfig = try container.decode(ReturnConfigResponse.self, forKey: .returnConfig) + returnConfig = try container.decode(ReturnConfigResponseSchema.self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1022,7 +1022,7 @@ public extension PlatformClient.Catalog { do { - taxIdentifier = try container.decode([String: Any].self, forKey: .taxIdentifier) + taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1549,7 +1549,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var name: String? - public var netQuantity: NetQuantityResponse? + public var netQuantity: NetQuantityResponseSchema? public var noOfBoxes: Int? @@ -1561,7 +1561,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var productPublish: ProductPublished? - public var returnConfig: ReturnConfigResponse? + public var returnConfig: ReturnConfigResponseSchema? public var shortDescription: String? @@ -1575,7 +1575,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var tags: [String]? - public var taxIdentifier: [String: Any]? + public var taxIdentifier: TaxIdentifier? public var teaserTag: [String: Any]? @@ -1724,7 +1724,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponse? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublished? = nil, returnConfig: ReturnConfigResponse? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, tags: [String]? = nil, taxIdentifier: [String: Any]? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { + public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponseSchema? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublished? = nil, returnConfig: ReturnConfigResponseSchema? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, tags: [String]? = nil, taxIdentifier: TaxIdentifier? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { self.customJson = customJson @@ -2325,7 +2325,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - netQuantity = try container.decode(NetQuantityResponse.self, forKey: .netQuantity) + netQuantity = try container.decode(NetQuantityResponseSchema.self, forKey: .netQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -2397,7 +2397,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - returnConfig = try container.decode(ReturnConfigResponse.self, forKey: .returnConfig) + returnConfig = try container.decode(ReturnConfigResponseSchema.self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -2481,7 +2481,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - taxIdentifier = try container.decode([String: Any].self, forKey: .taxIdentifier) + taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/ProductDownloadsResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductDownloadsResponseSchemaCatalogPlatformModel.swift similarity index 86% rename from Sources/code/platform/Models/Catalog/ProductDownloadsResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductDownloadsResponseSchemaCatalogPlatformModel.swift index 79b1245fdc..01c971c148 100644 --- a/Sources/code/platform/Models/Catalog/ProductDownloadsResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductDownloadsResponseSchemaCatalogPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductDownloadsResponse + Model: ProductDownloadsResponseSchema Used By: Catalog */ - class ProductDownloadsResponse: Codable { + class ProductDownloadsResponseSchema: Codable { - public var items: [ProductTemplateExportResponse]? + public var items: [ProductTemplateExportResponseSchema]? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(items: [ProductTemplateExportResponse]? = nil, page: Page? = nil) { + public init(items: [ProductTemplateExportResponseSchema]? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.Catalog { do { - items = try container.decode([ProductTemplateExportResponse].self, forKey: .items) + items = try container.decode([ProductTemplateExportResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,14 +84,14 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductDownloadsResponse + Model: ProductDownloadsResponseSchema Used By: Catalog */ - class ProductDownloadsResponse: Codable { + class ProductDownloadsResponseSchema: Codable { - public var items: [ProductTemplateExportResponse]? + public var items: [ProductTemplateExportResponseSchema]? public var page: Page? @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(items: [ProductTemplateExportResponse]? = nil, page: Page? = nil) { + public init(items: [ProductTemplateExportResponseSchema]? = nil, page: Page? = nil) { self.items = items @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - items = try container.decode([ProductTemplateExportResponse].self, forKey: .items) + items = try container.decode([ProductTemplateExportResponseSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/ProductListingPriceCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductListingPriceCatalogPlatformModel.swift index c9ac27808b..f70d112c6c 100644 --- a/Sources/code/platform/Models/Catalog/ProductListingPriceCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductListingPriceCatalogPlatformModel.swift @@ -16,6 +16,8 @@ public extension PlatformClient.Catalog { public var marked: Price1? + public var selling: Price1? + public enum CodingKeys: String, CodingKey { @@ -23,14 +25,18 @@ public extension PlatformClient.Catalog { case marked = "marked" + case selling = "selling" + } - public init(effective: Price1? = nil, marked: Price1? = nil) { + public init(effective: Price1? = nil, marked: Price1? = nil, selling: Price1? = nil) { self.effective = effective self.marked = marked + self.selling = selling + } required public init(from decoder: Decoder) throws { @@ -60,6 +66,18 @@ public extension PlatformClient.Catalog { } + + do { + selling = try container.decode(Price1.self, forKey: .selling) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -75,6 +93,11 @@ public extension PlatformClient.Catalog { try? container.encodeIfPresent(marked, forKey: .marked) + + + try? container.encodeIfPresent(selling, forKey: .selling) + + } } @@ -95,6 +118,8 @@ public extension PlatformClient.ApplicationClient.Catalog { public var marked: Price1? + public var selling: Price1? + public enum CodingKeys: String, CodingKey { @@ -102,14 +127,18 @@ public extension PlatformClient.ApplicationClient.Catalog { case marked = "marked" + case selling = "selling" + } - public init(effective: Price1? = nil, marked: Price1? = nil) { + public init(effective: Price1? = nil, marked: Price1? = nil, selling: Price1? = nil) { self.effective = effective self.marked = marked + self.selling = selling + } required public init(from decoder: Decoder) throws { @@ -139,6 +168,18 @@ public extension PlatformClient.ApplicationClient.Catalog { } + + do { + selling = try container.decode(Price1.self, forKey: .selling) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -154,6 +195,11 @@ public extension PlatformClient.ApplicationClient.Catalog { try? container.encodeIfPresent(marked, forKey: .marked) + + + try? container.encodeIfPresent(selling, forKey: .selling) + + } } diff --git a/Sources/code/platform/Models/Catalog/ProductListingResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductListingResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/ProductListingResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductListingResponseSchemaCatalogPlatformModel.swift index 1b4bac7af8..6eef17dbc6 100644 --- a/Sources/code/platform/Models/Catalog/ProductListingResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductListingResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductListingResponse + Model: ProductListingResponseSchema Used By: Catalog */ - class ProductListingResponse: Codable { + class ProductListingResponseSchema: Codable { public var items: [Product]? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductListingResponse + Model: ProductListingResponseSchema Used By: Catalog */ - class ProductListingResponse: Codable { + class ProductListingResponseSchema: Codable { public var items: [Product]? diff --git a/Sources/code/platform/Models/Catalog/ProductReturnConfigBaseSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductReturnConfigBaseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/ProductReturnConfigBaseSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductReturnConfigBaseSchemaCatalogPlatformModel.swift index 61c36fcecb..3582f1a218 100644 --- a/Sources/code/platform/Models/Catalog/ProductReturnConfigBaseSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductReturnConfigBaseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductReturnConfigBaseSerializer + Model: ProductReturnConfigBaseSchema Used By: Catalog */ - class ProductReturnConfigBaseSerializer: Codable { + class ProductReturnConfigBaseSchema: Codable { public var returnable: Bool @@ -86,11 +86,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductReturnConfigBaseSerializer + Model: ProductReturnConfigBaseSchema Used By: Catalog */ - class ProductReturnConfigBaseSerializer: Codable { + class ProductReturnConfigBaseSchema: Codable { public var returnable: Bool diff --git a/Sources/code/platform/Models/Catalog/ProductReturnConfigSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductReturnConfigSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/ProductReturnConfigSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductReturnConfigSchemaCatalogPlatformModel.swift index f0c4db9135..0e9ce4421e 100644 --- a/Sources/code/platform/Models/Catalog/ProductReturnConfigSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductReturnConfigSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductReturnConfigSerializer + Model: ProductReturnConfigSchema Used By: Catalog */ - class ProductReturnConfigSerializer: Codable { + class ProductReturnConfigSchema: Codable { public var onSameStore: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductReturnConfigSerializer + Model: ProductReturnConfigSchema Used By: Catalog */ - class ProductReturnConfigSerializer: Codable { + class ProductReturnConfigSchema: Codable { public var onSameStore: Bool? diff --git a/Sources/code/platform/Models/Catalog/ProductSchemaV2CatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductSchemaV2CatalogPlatformModel.swift index b472a20817..6508ccb18f 100644 --- a/Sources/code/platform/Models/Catalog/ProductSchemaV2CatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductSchemaV2CatalogPlatformModel.swift @@ -90,7 +90,7 @@ public extension PlatformClient.Catalog { public var name: String? - public var netQuantity: NetQuantityResponse? + public var netQuantity: NetQuantityResponseSchema? public var noOfBoxes: Int? @@ -102,7 +102,7 @@ public extension PlatformClient.Catalog { public var productPublish: ProductPublish? - public var returnConfig: ReturnConfigResponse? + public var returnConfig: ReturnConfigResponseSchema? public var shortDescription: String? @@ -116,7 +116,7 @@ public extension PlatformClient.Catalog { public var tags: [String]? - public var taxIdentifier: [String: Any]? + public var taxIdentifier: TaxIdentifier? public var teaserTag: [String: Any]? @@ -265,7 +265,7 @@ public extension PlatformClient.Catalog { } - public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponse? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublish? = nil, returnConfig: ReturnConfigResponse? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, tags: [String]? = nil, taxIdentifier: [String: Any]? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { + public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponseSchema? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublish? = nil, returnConfig: ReturnConfigResponseSchema? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, tags: [String]? = nil, taxIdentifier: TaxIdentifier? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { self.customJson = customJson @@ -866,7 +866,7 @@ public extension PlatformClient.Catalog { do { - netQuantity = try container.decode(NetQuantityResponse.self, forKey: .netQuantity) + netQuantity = try container.decode(NetQuantityResponseSchema.self, forKey: .netQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -938,7 +938,7 @@ public extension PlatformClient.Catalog { do { - returnConfig = try container.decode(ReturnConfigResponse.self, forKey: .returnConfig) + returnConfig = try container.decode(ReturnConfigResponseSchema.self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1022,7 +1022,7 @@ public extension PlatformClient.Catalog { do { - taxIdentifier = try container.decode([String: Any].self, forKey: .taxIdentifier) + taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1549,7 +1549,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var name: String? - public var netQuantity: NetQuantityResponse? + public var netQuantity: NetQuantityResponseSchema? public var noOfBoxes: Int? @@ -1561,7 +1561,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var productPublish: ProductPublish? - public var returnConfig: ReturnConfigResponse? + public var returnConfig: ReturnConfigResponseSchema? public var shortDescription: String? @@ -1575,7 +1575,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var tags: [String]? - public var taxIdentifier: [String: Any]? + public var taxIdentifier: TaxIdentifier? public var teaserTag: [String: Any]? @@ -1724,7 +1724,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponse? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublish? = nil, returnConfig: ReturnConfigResponse? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, tags: [String]? = nil, taxIdentifier: [String: Any]? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { + public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponseSchema? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublish? = nil, returnConfig: ReturnConfigResponseSchema? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, tags: [String]? = nil, taxIdentifier: TaxIdentifier? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { self.customJson = customJson @@ -2325,7 +2325,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - netQuantity = try container.decode(NetQuantityResponse.self, forKey: .netQuantity) + netQuantity = try container.decode(NetQuantityResponseSchema.self, forKey: .netQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -2397,7 +2397,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - returnConfig = try container.decode(ReturnConfigResponse.self, forKey: .returnConfig) + returnConfig = try container.decode(ReturnConfigResponseSchema.self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -2481,7 +2481,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - taxIdentifier = try container.decode([String: Any].self, forKey: .taxIdentifier) + taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/ProductSizeDeleteDataResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductSizeDeleteDataResponseSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/ProductSizeDeleteDataResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductSizeDeleteDataResponseSchemaCatalogPlatformModel.swift index bce693bdc2..9d8d9df559 100644 --- a/Sources/code/platform/Models/Catalog/ProductSizeDeleteDataResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductSizeDeleteDataResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductSizeDeleteDataResponse + Model: ProductSizeDeleteDataResponseSchema Used By: Catalog */ - class ProductSizeDeleteDataResponse: Codable { + class ProductSizeDeleteDataResponseSchema: Codable { public var companyId: Int? @@ -107,11 +107,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductSizeDeleteDataResponse + Model: ProductSizeDeleteDataResponseSchema Used By: Catalog */ - class ProductSizeDeleteDataResponse: Codable { + class ProductSizeDeleteDataResponseSchema: Codable { public var companyId: Int? diff --git a/Sources/code/platform/Models/Catalog/ProductSizeDeleteResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductSizeDeleteResponseSchemaCatalogPlatformModel.swift similarity index 86% rename from Sources/code/platform/Models/Catalog/ProductSizeDeleteResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductSizeDeleteResponseSchemaCatalogPlatformModel.swift index 5eced6ad04..df78bc8619 100644 --- a/Sources/code/platform/Models/Catalog/ProductSizeDeleteResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductSizeDeleteResponseSchemaCatalogPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductSizeDeleteResponse + Model: ProductSizeDeleteResponseSchema Used By: Catalog */ - class ProductSizeDeleteResponse: Codable { + class ProductSizeDeleteResponseSchema: Codable { - public var data: ProductSizeDeleteDataResponse? + public var data: ProductSizeDeleteDataResponseSchema? public var success: Bool? @@ -25,7 +25,7 @@ public extension PlatformClient.Catalog { } - public init(data: ProductSizeDeleteDataResponse? = nil, success: Bool? = nil) { + public init(data: ProductSizeDeleteDataResponseSchema? = nil, success: Bool? = nil) { self.data = data @@ -38,7 +38,7 @@ public extension PlatformClient.Catalog { do { - data = try container.decode(ProductSizeDeleteDataResponse.self, forKey: .data) + data = try container.decode(ProductSizeDeleteDataResponseSchema.self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,14 +84,14 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductSizeDeleteResponse + Model: ProductSizeDeleteResponseSchema Used By: Catalog */ - class ProductSizeDeleteResponse: Codable { + class ProductSizeDeleteResponseSchema: Codable { - public var data: ProductSizeDeleteDataResponse? + public var data: ProductSizeDeleteDataResponseSchema? public var success: Bool? @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(data: ProductSizeDeleteDataResponse? = nil, success: Bool? = nil) { + public init(data: ProductSizeDeleteDataResponseSchema? = nil, success: Bool? = nil) { self.data = data @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - data = try container.decode(ProductSizeDeleteDataResponse.self, forKey: .data) + data = try container.decode(ProductSizeDeleteDataResponseSchema.self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/ProductTagsViewResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductTagsViewResponseSchemaCatalogPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Catalog/ProductTagsViewResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductTagsViewResponseSchemaCatalogPlatformModel.swift index 060ca70fb0..9dfe4f7e78 100644 --- a/Sources/code/platform/Models/Catalog/ProductTagsViewResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductTagsViewResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductTagsViewResponse + Model: ProductTagsViewResponseSchema Used By: Catalog */ - class ProductTagsViewResponse: Codable { + class ProductTagsViewResponseSchema: Codable { public var items: [String]? @@ -61,11 +61,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductTagsViewResponse + Model: ProductTagsViewResponseSchema Used By: Catalog */ - class ProductTagsViewResponse: Codable { + class ProductTagsViewResponseSchema: Codable { public var items: [String]? diff --git a/Sources/code/platform/Models/Catalog/ProductTemplateDownloadsExportCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductTemplateDownloadsExportCatalogPlatformModel.swift index 51f1c38f78..062548c310 100644 --- a/Sources/code/platform/Models/Catalog/ProductTemplateDownloadsExportCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductTemplateDownloadsExportCatalogPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Catalog { class ProductTemplateDownloadsExport: Codable { - public var filters: ProductTemplateExportFilterRequest? + public var filters: ProductTemplateExportFilterRequestSchema? public var notificationEmails: [String]? @@ -29,7 +29,7 @@ public extension PlatformClient.Catalog { } - public init(filters: ProductTemplateExportFilterRequest? = nil, notificationEmails: [String]? = nil, type: String? = nil) { + public init(filters: ProductTemplateExportFilterRequestSchema? = nil, notificationEmails: [String]? = nil, type: String? = nil) { self.filters = filters @@ -44,7 +44,7 @@ public extension PlatformClient.Catalog { do { - filters = try container.decode(ProductTemplateExportFilterRequest.self, forKey: .filters) + filters = try container.decode(ProductTemplateExportFilterRequestSchema.self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -114,7 +114,7 @@ public extension PlatformClient.ApplicationClient.Catalog { class ProductTemplateDownloadsExport: Codable { - public var filters: ProductTemplateExportFilterRequest? + public var filters: ProductTemplateExportFilterRequestSchema? public var notificationEmails: [String]? @@ -131,7 +131,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(filters: ProductTemplateExportFilterRequest? = nil, notificationEmails: [String]? = nil, type: String? = nil) { + public init(filters: ProductTemplateExportFilterRequestSchema? = nil, notificationEmails: [String]? = nil, type: String? = nil) { self.filters = filters @@ -146,7 +146,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - filters = try container.decode(ProductTemplateExportFilterRequest.self, forKey: .filters) + filters = try container.decode(ProductTemplateExportFilterRequestSchema.self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/ProductTemplateExportFilterRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductTemplateExportFilterRequestSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/ProductTemplateExportFilterRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductTemplateExportFilterRequestSchemaCatalogPlatformModel.swift index af7b9c56bb..780379f97d 100644 --- a/Sources/code/platform/Models/Catalog/ProductTemplateExportFilterRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductTemplateExportFilterRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductTemplateExportFilterRequest + Model: ProductTemplateExportFilterRequestSchema Used By: Catalog */ - class ProductTemplateExportFilterRequest: Codable { + class ProductTemplateExportFilterRequestSchema: Codable { public var brands: [String]? @@ -139,11 +139,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductTemplateExportFilterRequest + Model: ProductTemplateExportFilterRequestSchema Used By: Catalog */ - class ProductTemplateExportFilterRequest: Codable { + class ProductTemplateExportFilterRequestSchema: Codable { public var brands: [String]? diff --git a/Sources/code/platform/Models/Catalog/ProductTemplateExportResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductTemplateExportResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/ProductTemplateExportResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductTemplateExportResponseSchemaCatalogPlatformModel.swift index 2c27bcee71..743121e0bc 100644 --- a/Sources/code/platform/Models/Catalog/ProductTemplateExportResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductTemplateExportResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductTemplateExportResponse + Model: ProductTemplateExportResponseSchema Used By: Catalog */ - class ProductTemplateExportResponse: Codable { + class ProductTemplateExportResponseSchema: Codable { public var completedOn: String? @@ -254,11 +254,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductTemplateExportResponse + Model: ProductTemplateExportResponseSchema Used By: Catalog */ - class ProductTemplateExportResponse: Codable { + class ProductTemplateExportResponseSchema: Codable { public var completedOn: String? diff --git a/Sources/code/platform/Models/Catalog/ProductVariantsResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ProductVariantsResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/ProductVariantsResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ProductVariantsResponseSchemaCatalogPlatformModel.swift index 01aff1229b..a8dfc024d0 100644 --- a/Sources/code/platform/Models/Catalog/ProductVariantsResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ProductVariantsResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ProductVariantsResponse + Model: ProductVariantsResponseSchema Used By: Catalog */ - class ProductVariantsResponse: Codable { + class ProductVariantsResponseSchema: Codable { public var page: Page? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ProductVariantsResponse + Model: ProductVariantsResponseSchema Used By: Catalog */ - class ProductVariantsResponse: Codable { + class ProductVariantsResponseSchema: Codable { public var page: Page? diff --git a/Sources/code/platform/Models/Catalog/RawProductCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/RawProductCatalogPlatformModel.swift index 02681f66db..7a63403a09 100644 --- a/Sources/code/platform/Models/Catalog/RawProductCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/RawProductCatalogPlatformModel.swift @@ -90,7 +90,7 @@ public extension PlatformClient.Catalog { public var name: String? - public var netQuantity: NetQuantityResponse? + public var netQuantity: NetQuantityResponseSchema? public var noOfBoxes: Int? @@ -102,7 +102,7 @@ public extension PlatformClient.Catalog { public var productPublish: ProductPublished? - public var returnConfig: ReturnConfigResponse? + public var returnConfig: ReturnConfigResponseSchema? public var shortDescription: String? @@ -116,7 +116,7 @@ public extension PlatformClient.Catalog { public var tags: [String]? - public var taxIdentifier: [String: Any]? + public var taxIdentifier: TaxIdentifier? public var teaserTag: [String: Any]? @@ -269,7 +269,7 @@ public extension PlatformClient.Catalog { } - public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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: [String]? = nil, imageNature: String? = nil, isActive: Bool? = nil, isDependent: Bool? = nil, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponse? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublished? = nil, returnConfig: ReturnConfigResponse? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, storeIdList: [String]? = nil, tags: [String]? = nil, taxIdentifier: [String: Any]? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { + public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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: [String]? = nil, imageNature: String? = nil, isActive: Bool? = nil, isDependent: Bool? = nil, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponseSchema? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublished? = nil, returnConfig: ReturnConfigResponseSchema? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, storeIdList: [String]? = nil, tags: [String]? = nil, taxIdentifier: TaxIdentifier? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { self.customJson = customJson @@ -872,7 +872,7 @@ public extension PlatformClient.Catalog { do { - netQuantity = try container.decode(NetQuantityResponse.self, forKey: .netQuantity) + netQuantity = try container.decode(NetQuantityResponseSchema.self, forKey: .netQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -944,7 +944,7 @@ public extension PlatformClient.Catalog { do { - returnConfig = try container.decode(ReturnConfigResponse.self, forKey: .returnConfig) + returnConfig = try container.decode(ReturnConfigResponseSchema.self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1028,7 +1028,7 @@ public extension PlatformClient.Catalog { do { - taxIdentifier = try container.decode([String: Any].self, forKey: .taxIdentifier) + taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1572,7 +1572,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var name: String? - public var netQuantity: NetQuantityResponse? + public var netQuantity: NetQuantityResponseSchema? public var noOfBoxes: Int? @@ -1584,7 +1584,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var productPublish: ProductPublished? - public var returnConfig: ReturnConfigResponse? + public var returnConfig: ReturnConfigResponseSchema? public var shortDescription: String? @@ -1598,7 +1598,7 @@ public extension PlatformClient.ApplicationClient.Catalog { public var tags: [String]? - public var taxIdentifier: [String: Any]? + public var taxIdentifier: TaxIdentifier? public var teaserTag: [String: Any]? @@ -1751,7 +1751,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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: [String]? = nil, imageNature: String? = nil, isActive: Bool? = nil, isDependent: Bool? = nil, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponse? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublished? = nil, returnConfig: ReturnConfigResponse? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, storeIdList: [String]? = nil, tags: [String]? = nil, taxIdentifier: [String: Any]? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { + public init(allCompanyIds: [Int]? = nil, allIdentifiers: [String]? = nil, allSizes: [[String: Any]]? = nil, attributes: [String: Any]? = nil, brand: Brand? = nil, brandUid: Int? = nil, category: [String: Any]? = nil, categorySlug: String? = nil, categoryUid: Int? = nil, color: String? = nil, companyId: Int? = nil, countryOfOrigin: String? = nil, createdBy: [String: Any]? = nil, createdOn: 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: [String]? = nil, imageNature: String? = nil, isActive: Bool? = nil, isDependent: Bool? = nil, isExpirable: Bool? = nil, isImageLessProduct: Bool? = nil, isPhysical: Bool? = nil, isSet: Bool? = nil, itemCode: String? = nil, itemType: String? = nil, l3Mapping: [String]? = nil, media: [Media]? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, moq: [String: Any]? = nil, multiSize: Bool? = nil, name: String? = nil, netQuantity: NetQuantityResponseSchema? = nil, noOfBoxes: Int? = nil, pending: String? = nil, primaryColor: String? = nil, productGroupTag: [String]? = nil, productPublish: ProductPublished? = nil, returnConfig: ReturnConfigResponseSchema? = nil, shortDescription: String? = nil, sizes: [[String: Any]]? = nil, sizeGuide: String? = nil, slug: String? = nil, stage: String? = nil, storeIdList: [String]? = nil, tags: [String]? = nil, taxIdentifier: TaxIdentifier? = nil, teaserTag: [String: Any]? = nil, templateTag: String? = nil, trader: [Trader]? = nil, uid: Int? = nil, variants: [String: Any]? = nil, variantGroup: [String: Any]? = nil, variantMedia: [String: Any]? = nil, verifiedBy: VerifiedBy? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { self.customJson = customJson @@ -2354,7 +2354,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - netQuantity = try container.decode(NetQuantityResponse.self, forKey: .netQuantity) + netQuantity = try container.decode(NetQuantityResponseSchema.self, forKey: .netQuantity) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -2426,7 +2426,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - returnConfig = try container.decode(ReturnConfigResponse.self, forKey: .returnConfig) + returnConfig = try container.decode(ReturnConfigResponseSchema.self, forKey: .returnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -2510,7 +2510,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - taxIdentifier = try container.decode([String: Any].self, forKey: .taxIdentifier) + taxIdentifier = try container.decode(TaxIdentifier.self, forKey: .taxIdentifier) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/RawProductListingResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/RawProductListingResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/RawProductListingResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/RawProductListingResponseSchemaCatalogPlatformModel.swift index e9191c7e6e..858d203a4f 100644 --- a/Sources/code/platform/Models/Catalog/RawProductListingResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/RawProductListingResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: RawProductListingResponse + Model: RawProductListingResponseSchema Used By: Catalog */ - class RawProductListingResponse: Codable { + class RawProductListingResponseSchema: Codable { public var items: [RawProduct]? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: RawProductListingResponse + Model: RawProductListingResponseSchema Used By: Catalog */ - class RawProductListingResponse: Codable { + class RawProductListingResponseSchema: Codable { public var items: [RawProduct]? diff --git a/Sources/code/platform/Models/Catalog/ReturnConfigResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/ReturnConfigResponseSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/ReturnConfigResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/ReturnConfigResponseSchemaCatalogPlatformModel.swift index 83ad952a82..38eb37192a 100644 --- a/Sources/code/platform/Models/Catalog/ReturnConfigResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/ReturnConfigResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: ReturnConfigResponse + Model: ReturnConfigResponseSchema Used By: Catalog */ - class ReturnConfigResponse: Codable { + class ReturnConfigResponseSchema: Codable { public var returnable: Bool? @@ -107,11 +107,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: ReturnConfigResponse + Model: ReturnConfigResponseSchema Used By: Catalog */ - class ReturnConfigResponse: Codable { + class ReturnConfigResponseSchema: Codable { public var returnable: Bool? diff --git a/Sources/code/platform/Models/Catalog/SingleCategoryResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/SingleCategoryResponseSchemaCatalogPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Catalog/SingleCategoryResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/SingleCategoryResponseSchemaCatalogPlatformModel.swift index 0a8f774e70..be3c096967 100644 --- a/Sources/code/platform/Models/Catalog/SingleCategoryResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/SingleCategoryResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: SingleCategoryResponse + Model: SingleCategoryResponseSchema Used By: Catalog */ - class SingleCategoryResponse: Codable { + class SingleCategoryResponseSchema: Codable { public var data: Category? @@ -61,11 +61,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: SingleCategoryResponse + Model: SingleCategoryResponseSchema Used By: Catalog */ - class SingleCategoryResponse: Codable { + class SingleCategoryResponseSchema: Codable { public var data: Category? diff --git a/Sources/code/platform/Models/Catalog/SingleProductResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/SingleProductResponseSchemaCatalogPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Catalog/SingleProductResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/SingleProductResponseSchemaCatalogPlatformModel.swift index 93b8abe460..c27a3a0636 100644 --- a/Sources/code/platform/Models/Catalog/SingleProductResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/SingleProductResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: SingleProductResponse + Model: SingleProductResponseSchema Used By: Catalog */ - class SingleProductResponse: Codable { + class SingleProductResponseSchema: Codable { public var data: ProductSchemaV2? @@ -61,11 +61,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: SingleProductResponse + Model: SingleProductResponseSchema Used By: Catalog */ - class SingleProductResponse: Codable { + class SingleProductResponseSchema: Codable { public var data: ProductSchemaV2? diff --git a/Sources/code/platform/Models/Catalog/SizeGuideResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/SizeGuideResponseSchemaCatalogPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Catalog/SizeGuideResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/SizeGuideResponseSchemaCatalogPlatformModel.swift index bec4250fba..67d4a55a8b 100644 --- a/Sources/code/platform/Models/Catalog/SizeGuideResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/SizeGuideResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: SizeGuideResponse + Model: SizeGuideResponseSchema Used By: Catalog */ - class SizeGuideResponse: Codable { + class SizeGuideResponseSchema: Codable { public var active: Bool? @@ -337,11 +337,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: SizeGuideResponse + Model: SizeGuideResponseSchema Used By: Catalog */ - class SizeGuideResponse: Codable { + class SizeGuideResponseSchema: Codable { public var active: Bool? diff --git a/Sources/code/platform/Models/Catalog/StoreAssignResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/StoreAssignResponseSchemaCatalogPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Catalog/StoreAssignResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/StoreAssignResponseSchemaCatalogPlatformModel.swift index e6203f31de..0d4ba052dc 100644 --- a/Sources/code/platform/Models/Catalog/StoreAssignResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/StoreAssignResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: StoreAssignResponse + Model: StoreAssignResponseSchema Used By: Catalog */ - class StoreAssignResponse: Codable { + class StoreAssignResponseSchema: Codable { public var id: String? @@ -394,11 +394,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: StoreAssignResponse + Model: StoreAssignResponseSchema Used By: Catalog */ - class StoreAssignResponse: Codable { + class StoreAssignResponseSchema: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Catalog/SuccessResponseObjectCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/SuccessResponse1CatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/SuccessResponseObjectCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/SuccessResponse1CatalogPlatformModel.swift index 87c9d5fac9..96fd05717c 100644 --- a/Sources/code/platform/Models/Catalog/SuccessResponseObjectCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/SuccessResponse1CatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: SuccessResponseObject + Model: SuccessResponse1 Used By: Catalog */ - class SuccessResponseObject: Codable { + class SuccessResponse1: Codable { public var success: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: SuccessResponseObject + Model: SuccessResponse1 Used By: Catalog */ - class SuccessResponseObject: Codable { + class SuccessResponse1: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Catalog/BulkHsnResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/SuccessResponseSchemaCatalogPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Catalog/BulkHsnResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/SuccessResponseSchemaCatalogPlatformModel.swift index b851d42a5f..b9e214d612 100644 --- a/Sources/code/platform/Models/Catalog/BulkHsnResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/SuccessResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: BulkHsnResponse + Model: SuccessResponseSchema Used By: Catalog */ - class BulkHsnResponse: Codable { + class SuccessResponseSchema: Codable { public var success: Bool? @@ -61,11 +61,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: BulkHsnResponse + Model: SuccessResponseSchema Used By: Catalog */ - class BulkHsnResponse: Codable { + class SuccessResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Catalog/TemplatesResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/TemplatesResponseSchemaCatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/TemplatesResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/TemplatesResponseSchemaCatalogPlatformModel.swift index 0aa1638a4c..b5947c6d7f 100644 --- a/Sources/code/platform/Models/Catalog/TemplatesResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/TemplatesResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: TemplatesResponse + Model: TemplatesResponseSchema Used By: Catalog */ - class TemplatesResponse: Codable { + class TemplatesResponseSchema: Codable { public var items: ProductTemplate? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: TemplatesResponse + Model: TemplatesResponseSchema Used By: Catalog */ - class TemplatesResponse: Codable { + class TemplatesResponseSchema: Codable { public var items: ProductTemplate? diff --git a/Sources/code/platform/Models/Catalog/TemplatesValidationResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/TemplatesValidationResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/TemplatesValidationResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/TemplatesValidationResponseSchemaCatalogPlatformModel.swift index 538b4c0dae..cd146b5295 100644 --- a/Sources/code/platform/Models/Catalog/TemplatesValidationResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/TemplatesValidationResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: TemplatesValidationResponse + Model: TemplatesValidationResponseSchema Used By: Catalog */ - class TemplatesValidationResponse: Codable { + class TemplatesValidationResponseSchema: Codable { public var data: TemplateValidationData? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: TemplatesValidationResponse + Model: TemplatesValidationResponseSchema Used By: Catalog */ - class TemplatesValidationResponse: Codable { + class TemplatesValidationResponseSchema: Codable { public var data: TemplateValidationData? diff --git a/Sources/code/platform/Models/Catalog/TraderResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/Trader2CatalogPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Catalog/TraderResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/Trader2CatalogPlatformModel.swift index fc9036d58c..5817ee38cf 100644 --- a/Sources/code/platform/Models/Catalog/TraderResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/Trader2CatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: TraderResponse + Model: Trader2 Used By: Catalog */ - class TraderResponse: Codable { + class Trader2: Codable { public var address: [String]? @@ -107,11 +107,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: TraderResponse + Model: Trader2 Used By: Catalog */ - class TraderResponse: Codable { + class Trader2: Codable { public var address: [String]? diff --git a/Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinRequestSchemaCatalogPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinRequestSchemaCatalogPlatformModel.swift index 1c6f43cae9..1b975b5d55 100644 --- a/Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinRequestSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: UpdateMarketplaceOptinRequest + Model: UpdateMarketplaceOptinRequestSchema Used By: Catalog */ - class UpdateMarketplaceOptinRequest: Codable { + class UpdateMarketplaceOptinRequestSchema: Codable { public var brandIds: [Int]? @@ -176,11 +176,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: UpdateMarketplaceOptinRequest + Model: UpdateMarketplaceOptinRequestSchema Used By: Catalog */ - class UpdateMarketplaceOptinRequest: Codable { + class UpdateMarketplaceOptinRequestSchema: Codable { public var brandIds: [Int]? diff --git a/Sources/code/platform/Models/Catalog/CreateMarketplaceOptinResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinResponseSchemaCatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/CreateMarketplaceOptinResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinResponseSchemaCatalogPlatformModel.swift index 1a7a46f86d..0e5f0bd980 100644 --- a/Sources/code/platform/Models/Catalog/CreateMarketplaceOptinResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/UpdateMarketplaceOptinResponseSchemaCatalogPlatformModel.swift @@ -5,74 +5,74 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: CreateMarketplaceOptinResponse + Model: UpdateMarketplaceOptinResponseSchema Used By: Catalog */ - class CreateMarketplaceOptinResponse: Codable { + class UpdateMarketplaceOptinResponseSchema: Codable { - public var storeIds: [Int]? - public var brandIds: [Int]? public var companyId: Int? + public var appId: String? + + public var enabled: Bool? + public var optLevel: String? public var platform: String? - public var enabled: Bool? + public var storeIds: [Int]? public var createdBy: CreatedBy? public var modifiedBy: CreatedBy? - public var appId: String? - public enum CodingKeys: String, CodingKey { - case storeIds = "store_ids" - case brandIds = "brand_ids" case companyId = "company_id" + case appId = "app_id" + + case enabled = "enabled" + case optLevel = "opt_level" case platform = "platform" - case enabled = "enabled" + case storeIds = "store_ids" case createdBy = "created_by" case modifiedBy = "modified_by" - case appId = "app_id" - } public init(appId: String? = nil, brandIds: [Int]? = nil, companyId: Int? = nil, createdBy: CreatedBy? = nil, enabled: Bool? = nil, modifiedBy: CreatedBy? = nil, optLevel: String? = nil, platform: String? = nil, storeIds: [Int]? = nil) { - self.storeIds = storeIds - self.brandIds = brandIds self.companyId = companyId + self.appId = appId + + self.enabled = enabled + self.optLevel = optLevel self.platform = platform - self.enabled = enabled + self.storeIds = storeIds self.createdBy = createdBy self.modifiedBy = modifiedBy - self.appId = appId - } required public init(from decoder: Decoder) throws { @@ -80,7 +80,7 @@ public extension PlatformClient.Catalog { do { - storeIds = try container.decode([Int].self, forKey: .storeIds) + brandIds = try container.decode([Int].self, forKey: .brandIds) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +92,7 @@ public extension PlatformClient.Catalog { do { - brandIds = try container.decode([Int].self, forKey: .brandIds) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +104,7 @@ public extension PlatformClient.Catalog { do { - companyId = try container.decode(Int.self, forKey: .companyId) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,7 +116,7 @@ public extension PlatformClient.Catalog { do { - optLevel = try container.decode(String.self, forKey: .optLevel) + enabled = try container.decode(Bool.self, forKey: .enabled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +128,7 @@ public extension PlatformClient.Catalog { do { - platform = try container.decode(String.self, forKey: .platform) + optLevel = try container.decode(String.self, forKey: .optLevel) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -140,7 +140,7 @@ public extension PlatformClient.Catalog { do { - enabled = try container.decode(Bool.self, forKey: .enabled) + platform = try container.decode(String.self, forKey: .platform) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +152,7 @@ public extension PlatformClient.Catalog { do { - createdBy = try container.decode(CreatedBy.self, forKey: .createdBy) + storeIds = try container.decode([Int].self, forKey: .storeIds) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -164,7 +164,7 @@ public extension PlatformClient.Catalog { do { - modifiedBy = try container.decode(CreatedBy.self, forKey: .modifiedBy) + createdBy = try container.decode(CreatedBy.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +176,7 @@ public extension PlatformClient.Catalog { do { - appId = try container.decode(String.self, forKey: .appId) + modifiedBy = try container.decode(CreatedBy.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -193,47 +193,47 @@ public extension PlatformClient.Catalog { - try? container.encodeIfPresent(storeIds, forKey: .storeIds) + try? container.encodeIfPresent(brandIds, forKey: .brandIds) - try? container.encodeIfPresent(brandIds, forKey: .brandIds) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(optLevel, forKey: .optLevel) + try? container.encodeIfPresent(enabled, forKey: .enabled) - try? container.encodeIfPresent(platform, forKey: .platform) + try? container.encodeIfPresent(optLevel, forKey: .optLevel) - try? container.encodeIfPresent(enabled, forKey: .enabled) + try? container.encodeIfPresent(platform, forKey: .platform) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(storeIds, forKey: .storeIds) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) } @@ -245,74 +245,74 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: CreateMarketplaceOptinResponse + Model: UpdateMarketplaceOptinResponseSchema Used By: Catalog */ - class CreateMarketplaceOptinResponse: Codable { + class UpdateMarketplaceOptinResponseSchema: Codable { - public var storeIds: [Int]? - public var brandIds: [Int]? public var companyId: Int? + public var appId: String? + + public var enabled: Bool? + public var optLevel: String? public var platform: String? - public var enabled: Bool? + public var storeIds: [Int]? public var createdBy: CreatedBy? public var modifiedBy: CreatedBy? - public var appId: String? - public enum CodingKeys: String, CodingKey { - case storeIds = "store_ids" - case brandIds = "brand_ids" case companyId = "company_id" + case appId = "app_id" + + case enabled = "enabled" + case optLevel = "opt_level" case platform = "platform" - case enabled = "enabled" + case storeIds = "store_ids" case createdBy = "created_by" case modifiedBy = "modified_by" - case appId = "app_id" - } public init(appId: String? = nil, brandIds: [Int]? = nil, companyId: Int? = nil, createdBy: CreatedBy? = nil, enabled: Bool? = nil, modifiedBy: CreatedBy? = nil, optLevel: String? = nil, platform: String? = nil, storeIds: [Int]? = nil) { - self.storeIds = storeIds - self.brandIds = brandIds self.companyId = companyId + self.appId = appId + + self.enabled = enabled + self.optLevel = optLevel self.platform = platform - self.enabled = enabled + self.storeIds = storeIds self.createdBy = createdBy self.modifiedBy = modifiedBy - self.appId = appId - } required public init(from decoder: Decoder) throws { @@ -320,7 +320,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - storeIds = try container.decode([Int].self, forKey: .storeIds) + brandIds = try container.decode([Int].self, forKey: .brandIds) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -332,7 +332,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - brandIds = try container.decode([Int].self, forKey: .brandIds) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -344,7 +344,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - companyId = try container.decode(Int.self, forKey: .companyId) + appId = try container.decode(String.self, forKey: .appId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -356,7 +356,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - optLevel = try container.decode(String.self, forKey: .optLevel) + enabled = try container.decode(Bool.self, forKey: .enabled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -368,7 +368,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - platform = try container.decode(String.self, forKey: .platform) + optLevel = try container.decode(String.self, forKey: .optLevel) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -380,7 +380,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - enabled = try container.decode(Bool.self, forKey: .enabled) + platform = try container.decode(String.self, forKey: .platform) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -392,7 +392,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - createdBy = try container.decode(CreatedBy.self, forKey: .createdBy) + storeIds = try container.decode([Int].self, forKey: .storeIds) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -404,7 +404,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - modifiedBy = try container.decode(CreatedBy.self, forKey: .modifiedBy) + createdBy = try container.decode(CreatedBy.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -416,7 +416,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - appId = try container.decode(String.self, forKey: .appId) + modifiedBy = try container.decode(CreatedBy.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -433,47 +433,47 @@ public extension PlatformClient.ApplicationClient.Catalog { - try? container.encodeIfPresent(storeIds, forKey: .storeIds) + try? container.encodeIfPresent(brandIds, forKey: .brandIds) - try? container.encodeIfPresent(brandIds, forKey: .brandIds) + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(companyId, forKey: .companyId) + try? container.encodeIfPresent(appId, forKey: .appId) - try? container.encodeIfPresent(optLevel, forKey: .optLevel) + try? container.encodeIfPresent(enabled, forKey: .enabled) - try? container.encodeIfPresent(platform, forKey: .platform) + try? container.encodeIfPresent(optLevel, forKey: .optLevel) - try? container.encodeIfPresent(enabled, forKey: .enabled) + try? container.encodeIfPresent(platform, forKey: .platform) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(storeIds, forKey: .storeIds) - try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(appId, forKey: .appId) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) } diff --git a/Sources/code/platform/Models/Catalog/UpdateSearchConfigurationRequestCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/UpdateSearchConfigurationRequestSchemaCatalogPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Catalog/UpdateSearchConfigurationRequestCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/UpdateSearchConfigurationRequestSchemaCatalogPlatformModel.swift index 260d6383a0..791f2f1406 100644 --- a/Sources/code/platform/Models/Catalog/UpdateSearchConfigurationRequestCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/UpdateSearchConfigurationRequestSchemaCatalogPlatformModel.swift @@ -5,24 +5,24 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: UpdateSearchConfigurationRequest + Model: UpdateSearchConfigurationRequestSchema Used By: Catalog */ - class UpdateSearchConfigurationRequest: Codable { + class UpdateSearchConfigurationRequestSchema: Codable { public var applicationId: String public var companyId: Int - public var createdBy: UserSerializer? + public var createdBy: UserSchema? public var createdOn: String? public var isProximityEnabled: Bool? - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? public var modifiedOn: String? @@ -53,7 +53,7 @@ public extension PlatformClient.Catalog { } - public init(applicationId: String, companyId: Int, createdBy: UserSerializer? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { + public init(applicationId: String, companyId: Int, createdBy: UserSchema? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { self.applicationId = applicationId @@ -90,7 +90,7 @@ public extension PlatformClient.Catalog { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,7 +126,7 @@ public extension PlatformClient.Catalog { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -231,24 +231,24 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: UpdateSearchConfigurationRequest + Model: UpdateSearchConfigurationRequestSchema Used By: Catalog */ - class UpdateSearchConfigurationRequest: Codable { + class UpdateSearchConfigurationRequestSchema: Codable { public var applicationId: String public var companyId: Int - public var createdBy: UserSerializer? + public var createdBy: UserSchema? public var createdOn: String? public var isProximityEnabled: Bool? - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? public var modifiedOn: String? @@ -279,7 +279,7 @@ public extension PlatformClient.ApplicationClient.Catalog { } - public init(applicationId: String, companyId: Int, createdBy: UserSerializer? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { + public init(applicationId: String, companyId: Int, createdBy: UserSchema? = nil, createdOn: String? = nil, isProximityEnabled: Bool? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, proximity: Int? = nil, searchableAttributes: [SearchableAttribute]? = nil) { self.applicationId = applicationId @@ -316,7 +316,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -352,7 +352,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Catalog/UpdateSearchConfigurationResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/UpdateSearchConfigurationResponseCatalogPlatformModel.swift deleted file mode 100644 index 9aeaf912a9..0000000000 --- a/Sources/code/platform/Models/Catalog/UpdateSearchConfigurationResponseCatalogPlatformModel.swift +++ /dev/null @@ -1,116 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Catalog { - /* - Model: UpdateSearchConfigurationResponse - Used By: Catalog - */ - - class UpdateSearchConfigurationResponse: Codable { - - - public var success: Bool? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - } - - public init(success: Bool? = nil) { - - 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) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(success, forKey: .success) - - - } - - } -} - - - -public extension PlatformClient.ApplicationClient.Catalog { - /* - Model: UpdateSearchConfigurationResponse - Used By: Catalog - */ - - class UpdateSearchConfigurationResponse: Codable { - - - public var success: Bool? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - } - - public init(success: Bool? = nil) { - - 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) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(success, forKey: .success) - - - } - - } -} - - diff --git a/Sources/code/platform/Models/Catalog/UpdateSearchConfigurationResponseSchemaCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/UpdateSearchConfigurationResponseSchemaCatalogPlatformModel.swift new file mode 100644 index 0000000000..07c8f390b1 --- /dev/null +++ b/Sources/code/platform/Models/Catalog/UpdateSearchConfigurationResponseSchemaCatalogPlatformModel.swift @@ -0,0 +1,116 @@ + + +import Foundation + + +public extension PlatformClient.Catalog { + /* + Model: UpdateSearchConfigurationResponseSchema + Used By: Catalog + */ + + class UpdateSearchConfigurationResponseSchema: Codable { + + + public var success: Bool? + + + public enum CodingKeys: String, CodingKey { + + case success = "success" + + } + + public init(success: Bool? = nil) { + + 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) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(success, forKey: .success) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Catalog { + /* + Model: UpdateSearchConfigurationResponseSchema + Used By: Catalog + */ + + class UpdateSearchConfigurationResponseSchema: Codable { + + + public var success: Bool? + + + public enum CodingKeys: String, CodingKey { + + case success = "success" + + } + + public init(success: Bool? = nil) { + + 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) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(success, forKey: .success) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Catalog/UserSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/UserSchemaCatalogPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Catalog/UserSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/UserSchemaCatalogPlatformModel.swift index 1b240c2e39..201723caf7 100644 --- a/Sources/code/platform/Models/Catalog/UserSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/UserSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: UserSerializer + Model: UserSchema Used By: Catalog */ - class UserSerializer: Codable { + class UserSchema: Codable { public var contact: String? @@ -107,11 +107,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: UserSerializer + Model: UserSchema Used By: Catalog */ - class UserSerializer: Codable { + class UserSchema: Codable { public var contact: String? diff --git a/Sources/code/platform/Models/Catalog/RequestUserSerializerCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/UserSerializer1CatalogPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Catalog/RequestUserSerializerCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/UserSerializer1CatalogPlatformModel.swift index 3809c06862..51397fa003 100644 --- a/Sources/code/platform/Models/Catalog/RequestUserSerializerCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/UserSerializer1CatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: RequestUserSerializer + Model: UserSerializer1 Used By: Catalog */ - class RequestUserSerializer: Codable { + class UserSerializer1: Codable { public var id: String? @@ -153,11 +153,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: RequestUserSerializer + Model: UserSerializer1 Used By: Catalog */ - class RequestUserSerializer: Codable { + class UserSerializer1: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Catalog/InventoryWeightResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/WeightResponse1CatalogPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Catalog/InventoryWeightResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/WeightResponse1CatalogPlatformModel.swift index 20165a33cd..9d4ddf9625 100644 --- a/Sources/code/platform/Models/Catalog/InventoryWeightResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/WeightResponse1CatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: InventoryWeightResponse + Model: WeightResponse1 Used By: Catalog */ - class InventoryWeightResponse: Codable { + class WeightResponse1: Codable { public var shipping: Double? @@ -84,11 +84,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: InventoryWeightResponse + Model: WeightResponse1 Used By: Catalog */ - class InventoryWeightResponse: Codable { + class WeightResponse1: Codable { public var shipping: Double? diff --git a/Sources/code/platform/Models/Catalog/WeightResponseCatalogPlatformModel.swift b/Sources/code/platform/Models/Catalog/WeightResponseSchemaCatalogPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Catalog/WeightResponseCatalogPlatformModel.swift rename to Sources/code/platform/Models/Catalog/WeightResponseSchemaCatalogPlatformModel.swift index e16c2e328c..b813791f0e 100644 --- a/Sources/code/platform/Models/Catalog/WeightResponseCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Catalog/WeightResponseSchemaCatalogPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Catalog { /* - Model: WeightResponse + Model: WeightResponseSchema Used By: Catalog */ - class WeightResponse: Codable { + class WeightResponseSchema: Codable { public var isDefault: Bool @@ -86,11 +86,11 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { /* - Model: WeightResponse + Model: WeightResponseSchema Used By: Catalog */ - class WeightResponse: Codable { + class WeightResponseSchema: Codable { public var isDefault: Bool diff --git a/Sources/code/platform/Models/Common/ApplicationResponseCommonPlatformModel.swift b/Sources/code/platform/Models/Common/ApplicationResponseSchemaCommonPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Common/ApplicationResponseCommonPlatformModel.swift rename to Sources/code/platform/Models/Common/ApplicationResponseSchemaCommonPlatformModel.swift index 16b1822417..a1450c389a 100644 --- a/Sources/code/platform/Models/Common/ApplicationResponseCommonPlatformModel.swift +++ b/Sources/code/platform/Models/Common/ApplicationResponseSchemaCommonPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Common { /* - Model: ApplicationResponse + Model: ApplicationResponseSchema Used By: Common */ - class ApplicationResponse: Codable { + class ApplicationResponseSchema: Codable { public var application: Application? diff --git a/Sources/code/platform/Models/Common/BadRequestCommonPlatformModel.swift b/Sources/code/platform/Models/Common/BadRequestSchemaCommonPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Common/BadRequestCommonPlatformModel.swift rename to Sources/code/platform/Models/Common/BadRequestSchemaCommonPlatformModel.swift index 7bcaddefde..e29638ffb1 100644 --- a/Sources/code/platform/Models/Common/BadRequestCommonPlatformModel.swift +++ b/Sources/code/platform/Models/Common/BadRequestSchemaCommonPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Common { /* - Model: BadRequest + Model: BadRequestSchema Used By: Common */ - class BadRequest: Codable { + class BadRequestSchema: Codable { public var message: String? diff --git a/Sources/code/platform/Models/Communication/GlobalVariablesPostResponseCommunicationPlatformModel.swift b/Sources/code/platform/Models/Communication/CreateGlobalVariablesResultCommunicationPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Communication/GlobalVariablesPostResponseCommunicationPlatformModel.swift rename to Sources/code/platform/Models/Communication/CreateGlobalVariablesResultCommunicationPlatformModel.swift index 412312e0ed..84129e5646 100644 --- a/Sources/code/platform/Models/Communication/GlobalVariablesPostResponseCommunicationPlatformModel.swift +++ b/Sources/code/platform/Models/Communication/CreateGlobalVariablesResultCommunicationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Communication { /* - Model: GlobalVariablesPostResponse + Model: CreateGlobalVariablesResult Used By: Communication */ - class GlobalVariablesPostResponse: Codable { + class CreateGlobalVariablesResult: Codable { public var id: String? @@ -153,11 +153,11 @@ public extension PlatformClient.Communication { public extension PlatformClient.ApplicationClient.Communication { /* - Model: GlobalVariablesPostResponse + Model: CreateGlobalVariablesResult Used By: Communication */ - class GlobalVariablesPostResponse: Codable { + class CreateGlobalVariablesResult: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Communication/EngineRequestCommunicationPlatformModel.swift b/Sources/code/platform/Models/Communication/EnginePayloadCommunicationPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Communication/EngineRequestCommunicationPlatformModel.swift rename to Sources/code/platform/Models/Communication/EnginePayloadCommunicationPlatformModel.swift index 363065d979..ed1649f1df 100644 --- a/Sources/code/platform/Models/Communication/EngineRequestCommunicationPlatformModel.swift +++ b/Sources/code/platform/Models/Communication/EnginePayloadCommunicationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Communication { /* - Model: EngineRequest + Model: EnginePayload Used By: Communication */ - class EngineRequest: Codable { + class EnginePayload: Codable { public var payload: PayloadStructure? @@ -84,11 +84,11 @@ public extension PlatformClient.Communication { public extension PlatformClient.ApplicationClient.Communication { /* - Model: EngineRequest + Model: EnginePayload Used By: Communication */ - class EngineRequest: Codable { + class EnginePayload: Codable { public var payload: PayloadStructure? diff --git a/Sources/code/platform/Models/Communication/EngineResponseCommunicationPlatformModel.swift b/Sources/code/platform/Models/Communication/EngineResultCommunicationPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Communication/EngineResponseCommunicationPlatformModel.swift rename to Sources/code/platform/Models/Communication/EngineResultCommunicationPlatformModel.swift index 477ddb471e..cc92919369 100644 --- a/Sources/code/platform/Models/Communication/EngineResponseCommunicationPlatformModel.swift +++ b/Sources/code/platform/Models/Communication/EngineResultCommunicationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Communication { /* - Model: EngineResponse + Model: EngineResult Used By: Communication */ - class EngineResponse: Codable { + class EngineResult: Codable { public var success: Bool? @@ -61,11 +61,11 @@ public extension PlatformClient.Communication { public extension PlatformClient.ApplicationClient.Communication { /* - Model: EngineResponse + Model: EngineResult Used By: Communication */ - class EngineResponse: Codable { + class EngineResult: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdateRequestCommunicationPlatformModel.swift b/Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdatePayloadCommunicationPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdateRequestCommunicationPlatformModel.swift rename to Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdatePayloadCommunicationPlatformModel.swift index 425d352692..4d7d19de1b 100644 --- a/Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdateRequestCommunicationPlatformModel.swift +++ b/Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdatePayloadCommunicationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Communication { /* - Model: EventSubscriptionsBulkUpdateRequest + Model: EventSubscriptionsBulkUpdatePayload Used By: Communication */ - class EventSubscriptionsBulkUpdateRequest: Codable { + class EventSubscriptionsBulkUpdatePayload: Codable { public var subscriptions: [SubscriptionsObject]? @@ -61,11 +61,11 @@ public extension PlatformClient.Communication { public extension PlatformClient.ApplicationClient.Communication { /* - Model: EventSubscriptionsBulkUpdateRequest + Model: EventSubscriptionsBulkUpdatePayload Used By: Communication */ - class EventSubscriptionsBulkUpdateRequest: Codable { + class EventSubscriptionsBulkUpdatePayload: Codable { public var subscriptions: [SubscriptionsObject]? diff --git a/Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdateResponseCommunicationPlatformModel.swift b/Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdateResultCommunicationPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdateResponseCommunicationPlatformModel.swift rename to Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdateResultCommunicationPlatformModel.swift index ff51ab3368..5444caa8a2 100644 --- a/Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdateResponseCommunicationPlatformModel.swift +++ b/Sources/code/platform/Models/Communication/EventSubscriptionsBulkUpdateResultCommunicationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Communication { /* - Model: EventSubscriptionsBulkUpdateResponse + Model: EventSubscriptionsBulkUpdateResult Used By: Communication */ - class EventSubscriptionsBulkUpdateResponse: Codable { + class EventSubscriptionsBulkUpdateResult: Codable { public var template: EventSubscriptionTemplate? @@ -245,11 +245,11 @@ public extension PlatformClient.Communication { public extension PlatformClient.ApplicationClient.Communication { /* - Model: EventSubscriptionsBulkUpdateResponse + Model: EventSubscriptionsBulkUpdateResult Used By: Communication */ - class EventSubscriptionsBulkUpdateResponse: Codable { + class EventSubscriptionsBulkUpdateResult: Codable { public var template: EventSubscriptionTemplate? diff --git a/Sources/code/platform/Models/Communication/GlobalVariablesGetResponseCommunicationPlatformModel.swift b/Sources/code/platform/Models/Communication/GetGlobalVariablesResultCommunicationPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Communication/GlobalVariablesGetResponseCommunicationPlatformModel.swift rename to Sources/code/platform/Models/Communication/GetGlobalVariablesResultCommunicationPlatformModel.swift index 0f4120fd41..08b0458741 100644 --- a/Sources/code/platform/Models/Communication/GlobalVariablesGetResponseCommunicationPlatformModel.swift +++ b/Sources/code/platform/Models/Communication/GetGlobalVariablesResultCommunicationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Communication { /* - Model: GlobalVariablesGetResponse + Model: GetGlobalVariablesResult Used By: Communication */ - class GlobalVariablesGetResponse: Codable { + class GetGlobalVariablesResult: Codable { public var readOnly: [String: Any]? @@ -84,11 +84,11 @@ public extension PlatformClient.Communication { public extension PlatformClient.ApplicationClient.Communication { /* - Model: GlobalVariablesGetResponse + Model: GetGlobalVariablesResult Used By: Communication */ - class GlobalVariablesGetResponse: Codable { + class GetGlobalVariablesResult: Codable { public var readOnly: [String: Any]? diff --git a/Sources/code/platform/Models/Communication/SmsProviderReqCommunicationPlatformModel.swift b/Sources/code/platform/Models/Communication/SmsProviderReqCommunicationPlatformModel.swift index 926207cf8f..a9549144af 100644 --- a/Sources/code/platform/Models/Communication/SmsProviderReqCommunicationPlatformModel.swift +++ b/Sources/code/platform/Models/Communication/SmsProviderReqCommunicationPlatformModel.swift @@ -52,6 +52,10 @@ public extension PlatformClient.Communication { public var apiKey: String? + public var tenantName1: String? + + public var tenantName2: String? + public enum CodingKeys: String, CodingKey { @@ -95,9 +99,13 @@ public extension PlatformClient.Communication { case apiKey = "api_key" + case tenantName1 = "tenant_name_1" + + case tenantName2 = "tenant_name_2" + } - public init(apikey: String? = nil, apiKey: String? = nil, authkey: String? = nil, description: String? = nil, entityid: String? = nil, entityId: String? = nil, feedid: String? = nil, host: String? = nil, name: String? = nil, overrideDnd: Bool? = nil, password: String? = nil, port: Int? = nil, provider: String? = nil, sender: String? = nil, senderid: String? = nil, senderId: String? = nil, token: String? = nil, type: String? = nil, username: String? = nil, versionId: Int? = nil) { + public init(apikey: String? = nil, apiKey: String? = nil, authkey: String? = nil, description: String? = nil, entityid: String? = nil, entityId: String? = nil, feedid: String? = nil, host: String? = nil, name: String? = nil, overrideDnd: Bool? = nil, password: String? = nil, port: Int? = nil, provider: String? = nil, sender: String? = nil, senderid: String? = nil, senderId: String? = nil, tenantName1: String? = nil, tenantName2: String? = nil, token: String? = nil, type: String? = nil, username: String? = nil, versionId: Int? = nil) { self.name = name @@ -139,6 +147,10 @@ public extension PlatformClient.Communication { self.apiKey = apiKey + self.tenantName1 = tenantName1 + + self.tenantName2 = tenantName2 + } required public init(from decoder: Decoder) throws { @@ -384,6 +396,30 @@ public extension PlatformClient.Communication { } + + do { + tenantName1 = try container.decode(String.self, forKey: .tenantName1) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + tenantName2 = try container.decode(String.self, forKey: .tenantName2) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -489,6 +525,16 @@ public extension PlatformClient.Communication { try? container.encodeIfPresent(apiKey, forKey: .apiKey) + + + try? container.encodeIfPresent(tenantName1, forKey: .tenantName1) + + + + + try? container.encodeIfPresent(tenantName2, forKey: .tenantName2) + + } } @@ -545,6 +591,10 @@ public extension PlatformClient.ApplicationClient.Communication { public var apiKey: String? + public var tenantName1: String? + + public var tenantName2: String? + public enum CodingKeys: String, CodingKey { @@ -588,9 +638,13 @@ public extension PlatformClient.ApplicationClient.Communication { case apiKey = "api_key" + case tenantName1 = "tenant_name_1" + + case tenantName2 = "tenant_name_2" + } - public init(apikey: String? = nil, apiKey: String? = nil, authkey: String? = nil, description: String? = nil, entityid: String? = nil, entityId: String? = nil, feedid: String? = nil, host: String? = nil, name: String? = nil, overrideDnd: Bool? = nil, password: String? = nil, port: Int? = nil, provider: String? = nil, sender: String? = nil, senderid: String? = nil, senderId: String? = nil, token: String? = nil, type: String? = nil, username: String? = nil, versionId: Int? = nil) { + public init(apikey: String? = nil, apiKey: String? = nil, authkey: String? = nil, description: String? = nil, entityid: String? = nil, entityId: String? = nil, feedid: String? = nil, host: String? = nil, name: String? = nil, overrideDnd: Bool? = nil, password: String? = nil, port: Int? = nil, provider: String? = nil, sender: String? = nil, senderid: String? = nil, senderId: String? = nil, tenantName1: String? = nil, tenantName2: String? = nil, token: String? = nil, type: String? = nil, username: String? = nil, versionId: Int? = nil) { self.name = name @@ -632,6 +686,10 @@ public extension PlatformClient.ApplicationClient.Communication { self.apiKey = apiKey + self.tenantName1 = tenantName1 + + self.tenantName2 = tenantName2 + } required public init(from decoder: Decoder) throws { @@ -877,6 +935,30 @@ public extension PlatformClient.ApplicationClient.Communication { } + + do { + tenantName1 = try container.decode(String.self, forKey: .tenantName1) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + tenantName2 = try container.decode(String.self, forKey: .tenantName2) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -982,6 +1064,16 @@ public extension PlatformClient.ApplicationClient.Communication { try? container.encodeIfPresent(apiKey, forKey: .apiKey) + + + try? container.encodeIfPresent(tenantName1, forKey: .tenantName1) + + + + + try? container.encodeIfPresent(tenantName2, forKey: .tenantName2) + + } } diff --git a/Sources/code/platform/Models/Communication/TriggerJobRequestCommunicationPlatformModel.swift b/Sources/code/platform/Models/Communication/TriggerJobPayloadCommunicationPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Communication/TriggerJobRequestCommunicationPlatformModel.swift rename to Sources/code/platform/Models/Communication/TriggerJobPayloadCommunicationPlatformModel.swift index 5bcfb7ec38..1dc5e7c0dd 100644 --- a/Sources/code/platform/Models/Communication/TriggerJobRequestCommunicationPlatformModel.swift +++ b/Sources/code/platform/Models/Communication/TriggerJobPayloadCommunicationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Communication { /* - Model: TriggerJobRequest + Model: TriggerJobPayload Used By: Communication */ - class TriggerJobRequest: Codable { + class TriggerJobPayload: Codable { public var jobId: String? @@ -61,11 +61,11 @@ public extension PlatformClient.Communication { public extension PlatformClient.ApplicationClient.Communication { /* - Model: TriggerJobRequest + Model: TriggerJobPayload Used By: Communication */ - class TriggerJobRequest: Codable { + class TriggerJobPayload: Codable { public var jobId: String? diff --git a/Sources/code/platform/Models/Communication/TriggerJobResponseCommunicationPlatformModel.swift b/Sources/code/platform/Models/Communication/TriggerJobResultCommunicationPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Communication/TriggerJobResponseCommunicationPlatformModel.swift rename to Sources/code/platform/Models/Communication/TriggerJobResultCommunicationPlatformModel.swift index 3528b4a4f4..ca8fb19758 100644 --- a/Sources/code/platform/Models/Communication/TriggerJobResponseCommunicationPlatformModel.swift +++ b/Sources/code/platform/Models/Communication/TriggerJobResultCommunicationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Communication { /* - Model: TriggerJobResponse + Model: TriggerJobResult Used By: Communication */ - class TriggerJobResponse: Codable { + class TriggerJobResult: Codable { public var status: Int? @@ -61,11 +61,11 @@ public extension PlatformClient.Communication { public extension PlatformClient.ApplicationClient.Communication { /* - Model: TriggerJobResponse + Model: TriggerJobResult Used By: Communication */ - class TriggerJobResponse: Codable { + class TriggerJobResult: Codable { public var status: Int? diff --git a/Sources/code/platform/Models/CompanyProfile/AddressSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/AddressSchemaCompanyProfilePlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/CompanyProfile/AddressSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/AddressSchemaCompanyProfilePlatformModel.swift index 3f69282fc4..8bbcf104ed 100644 --- a/Sources/code/platform/Models/CompanyProfile/AddressSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/AddressSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: AddressSerializer + Model: AddressSchema Used By: CompanyProfile */ - class AddressSerializer: Codable { + class AddressSchema: Codable { public var landmark: String? diff --git a/Sources/code/platform/Models/CompanyProfile/BrandBannerSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/BrandBannerSchemaCompanyProfilePlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/CompanyProfile/BrandBannerSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/BrandBannerSchemaCompanyProfilePlatformModel.swift index 03d98fbbc2..d9c3d2d8ef 100644 --- a/Sources/code/platform/Models/CompanyProfile/BrandBannerSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/BrandBannerSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: BrandBannerSerializer + Model: BrandBannerSchema Used By: CompanyProfile */ - class BrandBannerSerializer: Codable { + class BrandBannerSchema: Codable { public var portrait: String diff --git a/Sources/code/platform/Models/CompanyProfile/BulkLocationSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/BulkLocationSchemaCompanyProfilePlatformModel.swift similarity index 80% rename from Sources/code/platform/Models/CompanyProfile/BulkLocationSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/BulkLocationSchemaCompanyProfilePlatformModel.swift index 7823bcf50e..476eb0aa2f 100644 --- a/Sources/code/platform/Models/CompanyProfile/BulkLocationSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/BulkLocationSchemaCompanyProfilePlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: BulkLocationSerializer + Model: BulkLocationSchema Used By: CompanyProfile */ - class BulkLocationSerializer: Codable { + class BulkLocationSchema: Codable { - public var data: [LocationSerializer]? + public var data: [LocationSchema]? public enum CodingKeys: String, CodingKey { @@ -21,7 +21,7 @@ public extension PlatformClient.CompanyProfile { } - public init(data: [LocationSerializer]? = nil) { + public init(data: [LocationSchema]? = nil) { self.data = data @@ -32,7 +32,7 @@ public extension PlatformClient.CompanyProfile { do { - data = try container.decode([LocationSerializer].self, forKey: .data) + data = try container.decode([LocationSchema].self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/LocationListSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/CompanyBrandListSchemaCompanyProfilePlatformModel.swift similarity index 85% rename from Sources/code/platform/Models/CompanyProfile/LocationListSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/CompanyBrandListSchemaCompanyProfilePlatformModel.swift index e0e552908c..d23ebde0c0 100644 --- a/Sources/code/platform/Models/CompanyProfile/LocationListSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/CompanyBrandListSchemaCompanyProfilePlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: LocationListSerializer + Model: CompanyBrandListSchema Used By: CompanyProfile */ - class LocationListSerializer: Codable { + class CompanyBrandListSchema: Codable { - public var items: [GetLocationSerializer]? + public var items: [CompanyBrandSchema]? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.CompanyProfile { } - public init(items: [GetLocationSerializer]? = nil, page: Page? = nil) { + public init(items: [CompanyBrandSchema]? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.CompanyProfile { do { - items = try container.decode([GetLocationSerializer].self, forKey: .items) + items = try container.decode([CompanyBrandSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/CompanyBrandPostRequestSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/CompanyBrandPostRequestSchemaCompanyProfilePlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/CompanyProfile/CompanyBrandPostRequestSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/CompanyBrandPostRequestSchemaCompanyProfilePlatformModel.swift index 7c9085b114..1179e07da8 100644 --- a/Sources/code/platform/Models/CompanyProfile/CompanyBrandPostRequestSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/CompanyBrandPostRequestSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: CompanyBrandPostRequestSerializer + Model: CompanyBrandPostRequestSchema Used By: CompanyProfile */ - class CompanyBrandPostRequestSerializer: Codable { + class CompanyBrandPostRequestSchema: Codable { public var uid: Int? diff --git a/Sources/code/platform/Models/CompanyProfile/CompanyBrandSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/CompanyBrandSchemaCompanyProfilePlatformModel.swift similarity index 88% rename from Sources/code/platform/Models/CompanyProfile/CompanyBrandSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/CompanyBrandSchemaCompanyProfilePlatformModel.swift index 628e74c6a5..f73f5422ad 100644 --- a/Sources/code/platform/Models/CompanyProfile/CompanyBrandSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/CompanyBrandSchemaCompanyProfilePlatformModel.swift @@ -5,24 +5,24 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: CompanyBrandSerializer + Model: CompanyBrandSchema Used By: CompanyProfile */ - class CompanyBrandSerializer: Codable { + class CompanyBrandSchema: Codable { public var stage: String? public var verifiedOn: String? - public var verifiedBy: UserSerializer? + public var verifiedBy: UserSchema? public var createdOn: String? - public var createdBy: UserSerializer? + public var createdBy: UserSchema? - public var company: CompanySerializer? + public var company: CompanySchema? public var warnings: [String: Any]? @@ -32,9 +32,9 @@ public extension PlatformClient.CompanyProfile { public var rejectReason: String? - public var brand: GetBrandResponseSerializer? + public var brand: GetBrandResponseSchema? - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? public enum CodingKeys: String, CodingKey { @@ -65,7 +65,7 @@ public extension PlatformClient.CompanyProfile { } - public init(brand: GetBrandResponseSerializer? = nil, company: CompanySerializer? = nil, createdBy: UserSerializer? = nil, createdOn: String? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSerializer? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil) { + public init(brand: GetBrandResponseSchema? = nil, company: CompanySchema? = nil, createdBy: UserSchema? = nil, createdOn: String? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSchema? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil) { self.stage = stage @@ -122,7 +122,7 @@ public extension PlatformClient.CompanyProfile { do { - verifiedBy = try container.decode(UserSerializer.self, forKey: .verifiedBy) + verifiedBy = try container.decode(UserSchema.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient.CompanyProfile { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient.CompanyProfile { do { - company = try container.decode(CompanySerializer.self, forKey: .company) + company = try container.decode(CompanySchema.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +218,7 @@ public extension PlatformClient.CompanyProfile { do { - brand = try container.decode(GetBrandResponseSerializer.self, forKey: .brand) + brand = try container.decode(GetBrandResponseSchema.self, forKey: .brand) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,7 +230,7 @@ public extension PlatformClient.CompanyProfile { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/CompanySerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/CompanySchemaCompanyProfilePlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/CompanyProfile/CompanySerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/CompanySchemaCompanyProfilePlatformModel.swift index a992ed8cce..22b43a37cd 100644 --- a/Sources/code/platform/Models/CompanyProfile/CompanySerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/CompanySchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: CompanySerializer + Model: CompanySchema Used By: CompanyProfile */ - class CompanySerializer: Codable { + class CompanySchema: Codable { public var stage: String? @@ -18,11 +18,11 @@ public extension PlatformClient.CompanyProfile { public var verifiedOn: String? - public var verifiedBy: UserSerializer? + public var verifiedBy: UserSchema? public var createdOn: String? - public var createdBy: UserSerializer? + public var createdBy: UserSchema? public var companyType: String @@ -32,7 +32,7 @@ public extension PlatformClient.CompanyProfile { public var businessType: String - public var addresses: [GetAddressSerializer]? + public var addresses: [GetAddressSchema]? public var notificationEmails: [String]? @@ -46,7 +46,7 @@ public extension PlatformClient.CompanyProfile { public var name: String? - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? public enum CodingKeys: String, CodingKey { @@ -89,7 +89,7 @@ public extension PlatformClient.CompanyProfile { } - public init(addresses: [GetAddressSerializer]? = nil, businessCountryInfo: BusinessCountryInfo? = nil, businessType: String, companyType: String, createdBy: UserSerializer? = nil, createdOn: String? = nil, details: CompanyDetails? = nil, marketChannels: [String]? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, name: String? = nil, notificationEmails: [String]? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSerializer? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { + public init(addresses: [GetAddressSchema]? = nil, businessCountryInfo: BusinessCountryInfo? = nil, businessType: String, companyType: String, createdBy: UserSchema? = nil, createdOn: String? = nil, details: CompanyDetails? = nil, marketChannels: [String]? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, name: String? = nil, notificationEmails: [String]? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSchema? = nil, verifiedOn: String? = nil, customJson: [String: Any]? = nil) { self.stage = stage @@ -170,7 +170,7 @@ public extension PlatformClient.CompanyProfile { do { - verifiedBy = try container.decode(UserSerializer.self, forKey: .verifiedBy) + verifiedBy = try container.decode(UserSchema.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +194,7 @@ public extension PlatformClient.CompanyProfile { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -240,7 +240,7 @@ public extension PlatformClient.CompanyProfile { do { - addresses = try container.decode([GetAddressSerializer].self, forKey: .addresses) + addresses = try container.decode([GetAddressSchema].self, forKey: .addresses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -324,7 +324,7 @@ public extension PlatformClient.CompanyProfile { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/CompanyTaxesSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/CompanyTaxesSchemaCompanyProfilePlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/CompanyProfile/CompanyTaxesSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/CompanyTaxesSchemaCompanyProfilePlatformModel.swift index ec575e9579..e579f9431e 100644 --- a/Sources/code/platform/Models/CompanyProfile/CompanyTaxesSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/CompanyTaxesSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: CompanyTaxesSerializer + Model: CompanyTaxesSchema Used By: CompanyProfile */ - class CompanyTaxesSerializer: Codable { + class CompanyTaxesSchema: Codable { public var effectiveDate: String? diff --git a/Sources/code/platform/Models/CompanyProfile/CreateBrandRequestSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/CreateBrandRequestSchemaCompanyProfilePlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/CompanyProfile/CreateBrandRequestSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/CreateBrandRequestSchemaCompanyProfilePlatformModel.swift index febdad03a3..6b410e7840 100644 --- a/Sources/code/platform/Models/CompanyProfile/CreateBrandRequestSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/CreateBrandRequestSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: CreateBrandRequestSerializer + Model: CreateBrandRequestSchema Used By: CompanyProfile */ - class CreateBrandRequestSerializer: Codable { + class CreateBrandRequestSchema: Codable { public var customJson: [String: Any]? @@ -28,7 +28,7 @@ public extension PlatformClient.CompanyProfile { public var uid: Int? - public var banner: BrandBannerSerializer + public var banner: BrandBannerSchema public var name: String @@ -61,7 +61,7 @@ public extension PlatformClient.CompanyProfile { } - public init(banner: BrandBannerSerializer, brandTier: String? = nil, companyId: Int? = nil, description: String? = nil, logo: String, name: String, slugKey: String? = nil, synonyms: [String]? = nil, uid: Int? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil) { + public init(banner: BrandBannerSchema, brandTier: String? = nil, companyId: Int? = nil, description: String? = nil, logo: String, name: String, slugKey: String? = nil, synonyms: [String]? = nil, uid: Int? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil) { self.customJson = customJson @@ -180,7 +180,7 @@ public extension PlatformClient.CompanyProfile { - banner = try container.decode(BrandBannerSerializer.self, forKey: .banner) + banner = try container.decode(BrandBannerSchema.self, forKey: .banner) diff --git a/Sources/code/platform/Models/CompanyProfile/CreateUpdateAddressSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/CreateUpdateAddressSchemaCompanyProfilePlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/CompanyProfile/CreateUpdateAddressSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/CreateUpdateAddressSchemaCompanyProfilePlatformModel.swift index 823c62923e..0dc7eab908 100644 --- a/Sources/code/platform/Models/CompanyProfile/CreateUpdateAddressSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/CreateUpdateAddressSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: CreateUpdateAddressSerializer + Model: CreateUpdateAddressSchema Used By: CompanyProfile */ - class CreateUpdateAddressSerializer: Codable { + class CreateUpdateAddressSchema: Codable { public var landmark: String? diff --git a/Sources/code/platform/Models/CompanyProfile/ErrorResponseCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/ErrorResponseSchemaCompanyProfilePlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/CompanyProfile/ErrorResponseCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/ErrorResponseSchemaCompanyProfilePlatformModel.swift index abcac4ef47..f68998dd31 100644 --- a/Sources/code/platform/Models/CompanyProfile/ErrorResponseCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/ErrorResponseSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: ErrorResponse + Model: ErrorResponseSchema Used By: CompanyProfile */ - class ErrorResponse: Codable { + class ErrorResponseSchema: Codable { public var message: String? diff --git a/Sources/code/platform/Models/CompanyProfile/GetAddressSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/GetAddressSchemaCompanyProfilePlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/CompanyProfile/GetAddressSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/GetAddressSchemaCompanyProfilePlatformModel.swift index 09363b5462..1c7afbae9a 100644 --- a/Sources/code/platform/Models/CompanyProfile/GetAddressSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/GetAddressSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: GetAddressSerializer + Model: GetAddressSchema Used By: CompanyProfile */ - class GetAddressSerializer: Codable { + class GetAddressSchema: Codable { public var landmark: String? diff --git a/Sources/code/platform/Models/CompanyProfile/GetBrandResponseSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/GetBrandResponseSchemaCompanyProfilePlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/CompanyProfile/GetBrandResponseSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/GetBrandResponseSchemaCompanyProfilePlatformModel.swift index 2016a32d30..3c7d62d75d 100644 --- a/Sources/code/platform/Models/CompanyProfile/GetBrandResponseSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/GetBrandResponseSchemaCompanyProfilePlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: GetBrandResponseSerializer + Model: GetBrandResponseSchema Used By: CompanyProfile */ - class GetBrandResponseSerializer: Codable { + class GetBrandResponseSchema: Codable { - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? - public var banner: BrandBannerSerializer? + public var banner: BrandBannerSchema? public var name: String @@ -22,7 +22,7 @@ public extension PlatformClient.CompanyProfile { public var verifiedOn: String? - public var createdBy: UserSerializer? + public var createdBy: UserSchema? public var createdOn: String? @@ -42,7 +42,7 @@ public extension PlatformClient.CompanyProfile { public var stage: String? - public var verifiedBy: UserSerializer? + public var verifiedBy: UserSchema? public var slugKey: String? @@ -93,7 +93,7 @@ public extension PlatformClient.CompanyProfile { } - public init(banner: BrandBannerSerializer? = nil, createdBy: UserSerializer? = nil, createdOn: String? = nil, description: String? = nil, logo: String? = nil, mode: String? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, name: String, rejectReason: String? = nil, slugKey: String? = nil, stage: String? = nil, synonyms: [String]? = nil, uid: Int? = nil, verifiedBy: UserSerializer? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil) { + public init(banner: BrandBannerSchema? = nil, createdBy: UserSchema? = nil, createdOn: String? = nil, description: String? = nil, logo: String? = nil, mode: String? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, name: String, rejectReason: String? = nil, slugKey: String? = nil, stage: String? = nil, synonyms: [String]? = nil, uid: Int? = nil, verifiedBy: UserSchema? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil, localeLanguage: [String: Any]? = nil) { self.modifiedBy = modifiedBy @@ -140,7 +140,7 @@ public extension PlatformClient.CompanyProfile { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +152,7 @@ public extension PlatformClient.CompanyProfile { do { - banner = try container.decode(BrandBannerSerializer.self, forKey: .banner) + banner = try container.decode(BrandBannerSchema.self, forKey: .banner) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -193,7 +193,7 @@ public extension PlatformClient.CompanyProfile { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -313,7 +313,7 @@ public extension PlatformClient.CompanyProfile { do { - verifiedBy = try container.decode(UserSerializer.self, forKey: .verifiedBy) + verifiedBy = try container.decode(UserSchema.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/GetCompanyProfileSerializerResponseCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/GetCompanyProfileSerializerResponseSchemaCompanyProfilePlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/CompanyProfile/GetCompanyProfileSerializerResponseCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/GetCompanyProfileSerializerResponseSchemaCompanyProfilePlatformModel.swift index c9b1ddd030..b68e4d0eef 100644 --- a/Sources/code/platform/Models/CompanyProfile/GetCompanyProfileSerializerResponseCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/GetCompanyProfileSerializerResponseSchemaCompanyProfilePlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: GetCompanyProfileSerializerResponse + Model: GetCompanyProfileSerializerResponseSchema Used By: CompanyProfile */ - class GetCompanyProfileSerializerResponse: Codable { + class GetCompanyProfileSerializerResponseSchema: Codable { public var businessInfo: String? - public var taxes: [CompanyTaxesSerializer]? + public var taxes: [CompanyTaxesSchema]? public var businessType: String? @@ -24,7 +24,7 @@ public extension PlatformClient.CompanyProfile { public var verifiedOn: String? - public var createdBy: UserSerializer? + public var createdBy: UserSchema? public var createdOn: String? @@ -50,13 +50,13 @@ public extension PlatformClient.CompanyProfile { public var documents: [Document]? - public var addresses: [GetAddressSerializer]? + public var addresses: [GetAddressSchema]? - public var verifiedBy: UserSerializer? + public var verifiedBy: UserSchema? public var notificationEmails: [String]? - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? public enum CodingKeys: String, CodingKey { @@ -109,7 +109,7 @@ public extension PlatformClient.CompanyProfile { } - public init(addresses: [GetAddressSerializer]? = nil, businessCountryInfo: BusinessCountryInfo? = nil, businessDetails: BusinessDetails? = nil, businessInfo: String? = nil, businessType: String? = nil, 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: [CompanyTaxesSerializer]? = nil, uid: Int, verifiedBy: UserSerializer? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { + public init(addresses: [GetAddressSchema]? = nil, businessCountryInfo: BusinessCountryInfo? = nil, businessDetails: BusinessDetails? = nil, businessInfo: String? = nil, businessType: String? = nil, companyType: String, contactDetails: ContactDetails? = nil, createdBy: UserSchema? = nil, createdOn: String? = nil, documents: [Document]? = nil, franchiseEnabled: Bool? = nil, mode: String? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, name: String? = nil, notificationEmails: [String]? = nil, stage: String? = nil, taxes: [CompanyTaxesSchema]? = nil, uid: Int, verifiedBy: UserSchema? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { self.businessInfo = businessInfo @@ -176,7 +176,7 @@ public extension PlatformClient.CompanyProfile { do { - taxes = try container.decode([CompanyTaxesSerializer].self, forKey: .taxes) + taxes = try container.decode([CompanyTaxesSchema].self, forKey: .taxes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -236,7 +236,7 @@ public extension PlatformClient.CompanyProfile { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -378,7 +378,7 @@ public extension PlatformClient.CompanyProfile { do { - addresses = try container.decode([GetAddressSerializer].self, forKey: .addresses) + addresses = try container.decode([GetAddressSchema].self, forKey: .addresses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -390,7 +390,7 @@ public extension PlatformClient.CompanyProfile { do { - verifiedBy = try container.decode(UserSerializer.self, forKey: .verifiedBy) + verifiedBy = try container.decode(UserSchema.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -414,7 +414,7 @@ public extension PlatformClient.CompanyProfile { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/GetCompanySerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/GetCompanySchemaCompanyProfilePlatformModel.swift similarity index 90% rename from Sources/code/platform/Models/CompanyProfile/GetCompanySerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/GetCompanySchemaCompanyProfilePlatformModel.swift index 2fc582b3ed..d288f736e8 100644 --- a/Sources/code/platform/Models/CompanyProfile/GetCompanySerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/GetCompanySchemaCompanyProfilePlatformModel.swift @@ -5,22 +5,22 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: GetCompanySerializer + Model: GetCompanySchema Used By: CompanyProfile */ - class GetCompanySerializer: Codable { + class GetCompanySchema: Codable { public var stage: String? public var verifiedOn: String? - public var verifiedBy: UserSerializer? + public var verifiedBy: UserSchema? public var createdOn: String? - public var createdBy: UserSerializer? + public var createdBy: UserSchema? public var companyType: String? @@ -28,7 +28,7 @@ public extension PlatformClient.CompanyProfile { public var businessType: String? - public var addresses: [GetAddressSerializer]? + public var addresses: [GetAddressSchema]? public var uid: Int? @@ -36,7 +36,7 @@ public extension PlatformClient.CompanyProfile { public var name: String? - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? public enum CodingKeys: String, CodingKey { @@ -69,7 +69,7 @@ public extension PlatformClient.CompanyProfile { } - public init(addresses: [GetAddressSerializer]? = nil, businessType: String? = nil, companyType: String? = nil, createdBy: UserSerializer? = nil, createdOn: String? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, name: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSerializer? = nil, verifiedOn: String? = nil) { + public init(addresses: [GetAddressSchema]? = nil, businessType: String? = nil, companyType: String? = nil, createdBy: UserSchema? = nil, createdOn: String? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, name: String? = nil, rejectReason: String? = nil, stage: String? = nil, uid: Int? = nil, verifiedBy: UserSchema? = nil, verifiedOn: String? = nil) { self.stage = stage @@ -128,7 +128,7 @@ public extension PlatformClient.CompanyProfile { do { - verifiedBy = try container.decode(UserSerializer.self, forKey: .verifiedBy) + verifiedBy = try container.decode(UserSchema.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +152,7 @@ public extension PlatformClient.CompanyProfile { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -200,7 +200,7 @@ public extension PlatformClient.CompanyProfile { do { - addresses = try container.decode([GetAddressSerializer].self, forKey: .addresses) + addresses = try container.decode([GetAddressSchema].self, forKey: .addresses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -248,7 +248,7 @@ public extension PlatformClient.CompanyProfile { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/GetLocationSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/GetLocationSchemaCompanyProfilePlatformModel.swift similarity index 89% rename from Sources/code/platform/Models/CompanyProfile/GetLocationSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/GetLocationSchemaCompanyProfilePlatformModel.swift index ff76b26f78..4ca82711c8 100644 --- a/Sources/code/platform/Models/CompanyProfile/GetLocationSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/GetLocationSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: GetLocationSerializer + Model: GetLocationSchema Used By: CompanyProfile */ - class GetLocationSerializer: Codable { + class GetLocationSchema: Codable { public var code: String @@ -18,7 +18,7 @@ public extension PlatformClient.CompanyProfile { public var contactNumbers: [SellerPhoneNumber]? - public var gstCredentials: InvoiceDetailsSerializer? + public var gstCredentials: InvoiceDetailsSchema? public var name: String @@ -26,19 +26,19 @@ public extension PlatformClient.CompanyProfile { public var verifiedOn: String? - public var createdBy: UserSerializer? + public var createdBy: UserSchema? public var createdOn: String? - public var company: GetCompanySerializer? + public var company: GetCompanySchema? - public var address: GetAddressSerializer + public var address: GetAddressSchema public var warnings: [String: Any]? public var storeType: String? - public var manager: LocationManagerSerializer? + public var manager: LocationManagerSchema? public var autoInvoice: Bool? @@ -46,7 +46,7 @@ public extension PlatformClient.CompanyProfile { public var uid: Int? - public var timing: [LocationDayWiseSerializer]? + public var timing: [LocationDayWiseSchema]? public var stage: String? @@ -54,23 +54,23 @@ public extension PlatformClient.CompanyProfile { public var creditNote: Bool? - public var holiday: [HolidaySchemaSerializer]? + public var holiday: [HolidaySchemaSchema]? public var displayName: String - public var productReturnConfig: ProductReturnConfigSerializer? + public var productReturnConfig: ProductReturnConfigSchema? - public var verifiedBy: UserSerializer? + public var verifiedBy: UserSchema? public var notificationEmails: [String]? - public var modifiedBy: UserSerializer? + public var modifiedBy: UserSchema? public var tags: [String]? public var defaultOrderAcceptanceTiming: Bool? - public var orderAcceptanceTiming: [LocationDayWiseSerializer]? + public var orderAcceptanceTiming: [LocationDayWiseSchema]? public var avgOrderProcessingTime: AverageOrderProcessingTime? @@ -149,7 +149,7 @@ public extension PlatformClient.CompanyProfile { } - public init(address: GetAddressSerializer, autoAssignCourierPartner: Bool? = nil, autoInvoice: Bool? = nil, avgOrderProcessingTime: AverageOrderProcessingTime? = nil, bulkShipment: Bool? = nil, code: String, company: GetCompanySerializer? = nil, contactNumbers: [SellerPhoneNumber]? = nil, createdBy: UserSerializer? = nil, createdOn: String? = nil, creditNote: Bool? = nil, defaultOrderAcceptanceTiming: Bool? = nil, displayName: String, documents: [Document]? = nil, gstCredentials: InvoiceDetailsSerializer? = nil, holiday: [HolidaySchemaSerializer]? = nil, manager: LocationManagerSerializer? = nil, modifiedBy: UserSerializer? = nil, modifiedOn: String? = nil, name: String, notificationEmails: [String]? = nil, orderAcceptanceTiming: [LocationDayWiseSerializer]? = nil, phoneNumber: String? = nil, productReturnConfig: ProductReturnConfigSerializer? = nil, stage: String? = nil, storeType: String? = nil, tags: [String]? = nil, timing: [LocationDayWiseSerializer]? = nil, uid: Int? = nil, verifiedBy: UserSerializer? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { + public init(address: GetAddressSchema, autoAssignCourierPartner: Bool? = nil, autoInvoice: Bool? = nil, avgOrderProcessingTime: AverageOrderProcessingTime? = nil, bulkShipment: Bool? = nil, code: String, company: GetCompanySchema? = nil, contactNumbers: [SellerPhoneNumber]? = nil, createdBy: UserSchema? = nil, createdOn: String? = nil, creditNote: Bool? = nil, defaultOrderAcceptanceTiming: Bool? = nil, displayName: String, documents: [Document]? = nil, gstCredentials: InvoiceDetailsSchema? = nil, holiday: [HolidaySchemaSchema]? = nil, manager: LocationManagerSchema? = nil, modifiedBy: UserSchema? = nil, modifiedOn: String? = nil, name: String, notificationEmails: [String]? = nil, orderAcceptanceTiming: [LocationDayWiseSchema]? = nil, phoneNumber: String? = nil, productReturnConfig: ProductReturnConfigSchema? = nil, stage: String? = nil, storeType: String? = nil, tags: [String]? = nil, timing: [LocationDayWiseSchema]? = nil, uid: Int? = nil, verifiedBy: UserSchema? = nil, verifiedOn: String? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { self.code = code @@ -253,7 +253,7 @@ public extension PlatformClient.CompanyProfile { do { - gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) + gstCredentials = try container.decode(InvoiceDetailsSchema.self, forKey: .gstCredentials) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -294,7 +294,7 @@ public extension PlatformClient.CompanyProfile { do { - createdBy = try container.decode(UserSerializer.self, forKey: .createdBy) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -318,7 +318,7 @@ public extension PlatformClient.CompanyProfile { do { - company = try container.decode(GetCompanySerializer.self, forKey: .company) + company = try container.decode(GetCompanySchema.self, forKey: .company) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -329,7 +329,7 @@ public extension PlatformClient.CompanyProfile { - address = try container.decode(GetAddressSerializer.self, forKey: .address) + address = try container.decode(GetAddressSchema.self, forKey: .address) @@ -359,7 +359,7 @@ public extension PlatformClient.CompanyProfile { do { - manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) + manager = try container.decode(LocationManagerSchema.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -407,7 +407,7 @@ public extension PlatformClient.CompanyProfile { do { - timing = try container.decode([LocationDayWiseSerializer].self, forKey: .timing) + timing = try container.decode([LocationDayWiseSchema].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -455,7 +455,7 @@ public extension PlatformClient.CompanyProfile { do { - holiday = try container.decode([HolidaySchemaSerializer].self, forKey: .holiday) + holiday = try container.decode([HolidaySchemaSchema].self, forKey: .holiday) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -472,7 +472,7 @@ public extension PlatformClient.CompanyProfile { do { - productReturnConfig = try container.decode(ProductReturnConfigSerializer.self, forKey: .productReturnConfig) + productReturnConfig = try container.decode(ProductReturnConfigSchema.self, forKey: .productReturnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -484,7 +484,7 @@ public extension PlatformClient.CompanyProfile { do { - verifiedBy = try container.decode(UserSerializer.self, forKey: .verifiedBy) + verifiedBy = try container.decode(UserSchema.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -508,7 +508,7 @@ public extension PlatformClient.CompanyProfile { do { - modifiedBy = try container.decode(UserSerializer.self, forKey: .modifiedBy) + modifiedBy = try container.decode(UserSchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -544,7 +544,7 @@ public extension PlatformClient.CompanyProfile { do { - orderAcceptanceTiming = try container.decode([LocationDayWiseSerializer].self, forKey: .orderAcceptanceTiming) + orderAcceptanceTiming = try container.decode([LocationDayWiseSchema].self, forKey: .orderAcceptanceTiming) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/HolidayDateSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/HolidayDateSchemaCompanyProfilePlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/CompanyProfile/HolidayDateSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/HolidayDateSchemaCompanyProfilePlatformModel.swift index 03065c1368..e537520a9b 100644 --- a/Sources/code/platform/Models/CompanyProfile/HolidayDateSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/HolidayDateSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: HolidayDateSerializer + Model: HolidayDateSchema Used By: CompanyProfile */ - class HolidayDateSerializer: Codable { + class HolidayDateSchema: Codable { public var endDate: String diff --git a/Sources/code/platform/Models/CompanyProfile/HolidaySchemaSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/HolidaySchemaSchemaCompanyProfilePlatformModel.swift similarity index 84% rename from Sources/code/platform/Models/CompanyProfile/HolidaySchemaSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/HolidaySchemaSchemaCompanyProfilePlatformModel.swift index b69c33bec1..2e96d13cb6 100644 --- a/Sources/code/platform/Models/CompanyProfile/HolidaySchemaSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/HolidaySchemaSchemaCompanyProfilePlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: HolidaySchemaSerializer + Model: HolidaySchemaSchema Used By: CompanyProfile */ - class HolidaySchemaSerializer: Codable { + class HolidaySchemaSchema: Codable { - public var date: HolidayDateSerializer + public var date: HolidayDateSchema public var title: String @@ -29,7 +29,7 @@ public extension PlatformClient.CompanyProfile { } - public init(date: HolidayDateSerializer, holidayType: String, title: String) { + public init(date: HolidayDateSchema, holidayType: String, title: String) { self.date = date @@ -43,7 +43,7 @@ public extension PlatformClient.CompanyProfile { let container = try decoder.container(keyedBy: CodingKeys.self) - date = try container.decode(HolidayDateSerializer.self, forKey: .date) + date = try container.decode(HolidayDateSchema.self, forKey: .date) diff --git a/Sources/code/platform/Models/CompanyProfile/InvoiceCredSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/InvoiceCredSchemaCompanyProfilePlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/CompanyProfile/InvoiceCredSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/InvoiceCredSchemaCompanyProfilePlatformModel.swift index 301d0c78ac..dd707b4671 100644 --- a/Sources/code/platform/Models/CompanyProfile/InvoiceCredSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/InvoiceCredSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: InvoiceCredSerializer + Model: InvoiceCredSchema Used By: CompanyProfile */ - class InvoiceCredSerializer: Codable { + class InvoiceCredSchema: Codable { public var username: String? diff --git a/Sources/code/platform/Models/CompanyProfile/InvoiceDetailsSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/InvoiceDetailsSchemaCompanyProfilePlatformModel.swift similarity index 84% rename from Sources/code/platform/Models/CompanyProfile/InvoiceDetailsSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/InvoiceDetailsSchemaCompanyProfilePlatformModel.swift index 8784b46033..d727cd376f 100644 --- a/Sources/code/platform/Models/CompanyProfile/InvoiceDetailsSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/InvoiceDetailsSchemaCompanyProfilePlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: InvoiceDetailsSerializer + Model: InvoiceDetailsSchema Used By: CompanyProfile */ - class InvoiceDetailsSerializer: Codable { + class InvoiceDetailsSchema: Codable { - public var eInvoice: InvoiceCredSerializer? + public var eInvoice: InvoiceCredSchema? - public var eWaybill: InvoiceCredSerializer? + public var eWaybill: InvoiceCredSchema? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.CompanyProfile { } - public init(eInvoice: InvoiceCredSerializer? = nil, eWaybill: InvoiceCredSerializer? = nil) { + public init(eInvoice: InvoiceCredSchema? = nil, eWaybill: InvoiceCredSchema? = nil) { self.eInvoice = eInvoice @@ -38,7 +38,7 @@ public extension PlatformClient.CompanyProfile { do { - eInvoice = try container.decode(InvoiceCredSerializer.self, forKey: .eInvoice) + eInvoice = try container.decode(InvoiceCredSchema.self, forKey: .eInvoice) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient.CompanyProfile { do { - eWaybill = try container.decode(InvoiceCredSerializer.self, forKey: .eWaybill) + eWaybill = try container.decode(InvoiceCredSchema.self, forKey: .eWaybill) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/LocationDayWiseSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/LocationDayWiseSchemaCompanyProfilePlatformModel.swift similarity index 86% rename from Sources/code/platform/Models/CompanyProfile/LocationDayWiseSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/LocationDayWiseSchemaCompanyProfilePlatformModel.swift index 4744f0acd9..39e441f221 100644 --- a/Sources/code/platform/Models/CompanyProfile/LocationDayWiseSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/LocationDayWiseSchemaCompanyProfilePlatformModel.swift @@ -5,20 +5,20 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: LocationDayWiseSerializer + Model: LocationDayWiseSchema Used By: CompanyProfile */ - class LocationDayWiseSerializer: Codable { + class LocationDayWiseSchema: Codable { public var open: Bool public var weekday: String - public var opening: LocationTimingSerializer? + public var opening: LocationTimingSchema? - public var closing: LocationTimingSerializer? + public var closing: LocationTimingSchema? public enum CodingKeys: String, CodingKey { @@ -33,7 +33,7 @@ public extension PlatformClient.CompanyProfile { } - public init(closing: LocationTimingSerializer? = nil, open: Bool, opening: LocationTimingSerializer? = nil, weekday: String) { + public init(closing: LocationTimingSchema? = nil, open: Bool, opening: LocationTimingSchema? = nil, weekday: String) { self.open = open @@ -60,7 +60,7 @@ public extension PlatformClient.CompanyProfile { do { - opening = try container.decode(LocationTimingSerializer.self, forKey: .opening) + opening = try container.decode(LocationTimingSchema.self, forKey: .opening) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -72,7 +72,7 @@ public extension PlatformClient.CompanyProfile { do { - closing = try container.decode(LocationTimingSerializer.self, forKey: .closing) + closing = try container.decode(LocationTimingSchema.self, forKey: .closing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/CompanyBrandListSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/LocationListSchemaCompanyProfilePlatformModel.swift similarity index 85% rename from Sources/code/platform/Models/CompanyProfile/CompanyBrandListSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/LocationListSchemaCompanyProfilePlatformModel.swift index 7075182a2b..486c752593 100644 --- a/Sources/code/platform/Models/CompanyProfile/CompanyBrandListSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/LocationListSchemaCompanyProfilePlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: CompanyBrandListSerializer + Model: LocationListSchema Used By: CompanyProfile */ - class CompanyBrandListSerializer: Codable { + class LocationListSchema: Codable { - public var items: [CompanyBrandSerializer]? + public var items: [GetLocationSchema]? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.CompanyProfile { } - public init(items: [CompanyBrandSerializer]? = nil, page: Page? = nil) { + public init(items: [GetLocationSchema]? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.CompanyProfile { do { - items = try container.decode([CompanyBrandSerializer].self, forKey: .items) + items = try container.decode([GetLocationSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/LocationManagerSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/LocationManagerSchemaCompanyProfilePlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/CompanyProfile/LocationManagerSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/LocationManagerSchemaCompanyProfilePlatformModel.swift index 0186e7c5d8..652949387a 100644 --- a/Sources/code/platform/Models/CompanyProfile/LocationManagerSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/LocationManagerSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: LocationManagerSerializer + Model: LocationManagerSchema Used By: CompanyProfile */ - class LocationManagerSerializer: Codable { + class LocationManagerSchema: Codable { public var email: String? diff --git a/Sources/code/platform/Models/CompanyProfile/LocationSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/LocationSchemaCompanyProfilePlatformModel.swift similarity index 90% rename from Sources/code/platform/Models/CompanyProfile/LocationSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/LocationSchemaCompanyProfilePlatformModel.swift index b5af722397..4feea4ffaa 100644 --- a/Sources/code/platform/Models/CompanyProfile/LocationSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/LocationSchemaCompanyProfilePlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: LocationSerializer + Model: LocationSchema Used By: CompanyProfile */ - class LocationSerializer: Codable { + class LocationSchema: Codable { public var code: String - public var gstCredentials: InvoiceDetailsSerializer? + public var gstCredentials: InvoiceDetailsSchema? public var contactNumbers: [SellerPhoneNumber]? @@ -24,19 +24,19 @@ public extension PlatformClient.CompanyProfile { public var warnings: [String: Any]? - public var address: AddressSerializer + public var address: AddressSchema public var company: Int public var storeType: String? - public var manager: LocationManagerSerializer? + public var manager: LocationManagerSchema? public var autoInvoice: Bool? public var uid: Int? - public var timing: [LocationDayWiseSerializer]? + public var timing: [LocationDayWiseSchema]? public var stage: String? @@ -44,9 +44,9 @@ public extension PlatformClient.CompanyProfile { public var creditNote: Bool? - public var holiday: [HolidaySchemaSerializer]? + public var holiday: [HolidaySchemaSchema]? - public var productReturnConfig: ProductReturnConfigSerializer? + public var productReturnConfig: ProductReturnConfigSchema? public var displayName: String @@ -56,7 +56,7 @@ public extension PlatformClient.CompanyProfile { public var defaultOrderAcceptanceTiming: Bool? - public var orderAcceptanceTiming: [LocationDayWiseSerializer]? + public var orderAcceptanceTiming: [LocationDayWiseSchema]? public var avgOrderProcessingTime: AverageOrderProcessingTime? @@ -121,7 +121,7 @@ public extension PlatformClient.CompanyProfile { } - public init(address: AddressSerializer, autoAssignCourierPartner: Bool? = nil, autoInvoice: Bool? = nil, avgOrderProcessingTime: AverageOrderProcessingTime? = nil, bulkShipment: Bool? = nil, code: String, company: Int, contactNumbers: [SellerPhoneNumber]? = nil, creditNote: Bool? = nil, defaultOrderAcceptanceTiming: Bool? = nil, displayName: String, documents: [Document], gstCredentials: InvoiceDetailsSerializer? = nil, holiday: [HolidaySchemaSerializer]? = nil, manager: LocationManagerSerializer? = nil, name: String, notificationEmails: [String]? = nil, orderAcceptanceTiming: [LocationDayWiseSerializer]? = nil, productReturnConfig: ProductReturnConfigSerializer? = nil, stage: String? = nil, storeType: String? = nil, tags: [String]? = nil, timing: [LocationDayWiseSerializer]? = nil, uid: Int? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { + public init(address: AddressSchema, autoAssignCourierPartner: Bool? = nil, autoInvoice: Bool? = nil, avgOrderProcessingTime: AverageOrderProcessingTime? = nil, bulkShipment: Bool? = nil, code: String, company: Int, contactNumbers: [SellerPhoneNumber]? = nil, creditNote: Bool? = nil, defaultOrderAcceptanceTiming: Bool? = nil, displayName: String, documents: [Document], gstCredentials: InvoiceDetailsSchema? = nil, holiday: [HolidaySchemaSchema]? = nil, manager: LocationManagerSchema? = nil, name: String, notificationEmails: [String]? = nil, orderAcceptanceTiming: [LocationDayWiseSchema]? = nil, productReturnConfig: ProductReturnConfigSchema? = nil, stage: String? = nil, storeType: String? = nil, tags: [String]? = nil, timing: [LocationDayWiseSchema]? = nil, uid: Int? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { self.code = code @@ -187,7 +187,7 @@ public extension PlatformClient.CompanyProfile { do { - gstCredentials = try container.decode(InvoiceDetailsSerializer.self, forKey: .gstCredentials) + gstCredentials = try container.decode(InvoiceDetailsSchema.self, forKey: .gstCredentials) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -239,7 +239,7 @@ public extension PlatformClient.CompanyProfile { - address = try container.decode(AddressSerializer.self, forKey: .address) + address = try container.decode(AddressSchema.self, forKey: .address) @@ -262,7 +262,7 @@ public extension PlatformClient.CompanyProfile { do { - manager = try container.decode(LocationManagerSerializer.self, forKey: .manager) + manager = try container.decode(LocationManagerSchema.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -298,7 +298,7 @@ public extension PlatformClient.CompanyProfile { do { - timing = try container.decode([LocationDayWiseSerializer].self, forKey: .timing) + timing = try container.decode([LocationDayWiseSchema].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -339,7 +339,7 @@ public extension PlatformClient.CompanyProfile { do { - holiday = try container.decode([HolidaySchemaSerializer].self, forKey: .holiday) + holiday = try container.decode([HolidaySchemaSchema].self, forKey: .holiday) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -351,7 +351,7 @@ public extension PlatformClient.CompanyProfile { do { - productReturnConfig = try container.decode(ProductReturnConfigSerializer.self, forKey: .productReturnConfig) + productReturnConfig = try container.decode(ProductReturnConfigSchema.self, forKey: .productReturnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -404,7 +404,7 @@ public extension PlatformClient.CompanyProfile { do { - orderAcceptanceTiming = try container.decode([LocationDayWiseSerializer].self, forKey: .orderAcceptanceTiming) + orderAcceptanceTiming = try container.decode([LocationDayWiseSchema].self, forKey: .orderAcceptanceTiming) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/LocationTimingSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/LocationTimingSchemaCompanyProfilePlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/CompanyProfile/LocationTimingSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/LocationTimingSchemaCompanyProfilePlatformModel.swift index cfb7c3cace..45bc74a791 100644 --- a/Sources/code/platform/Models/CompanyProfile/LocationTimingSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/LocationTimingSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: LocationTimingSerializer + Model: LocationTimingSchema Used By: CompanyProfile */ - class LocationTimingSerializer: Codable { + class LocationTimingSchema: Codable { public var hour: Int diff --git a/Sources/code/platform/Models/CompanyProfile/MetricsSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/MetricsSchemaCompanyProfilePlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/CompanyProfile/MetricsSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/MetricsSchemaCompanyProfilePlatformModel.swift index 18eb38bf30..af3a8e99e3 100644 --- a/Sources/code/platform/Models/CompanyProfile/MetricsSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/MetricsSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: MetricsSerializer + Model: MetricsSchema Used By: CompanyProfile */ - class MetricsSerializer: Codable { + class MetricsSchema: Codable { public var stage: String? diff --git a/Sources/code/platform/Models/CompanyProfile/ProductReturnConfigSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/ProductReturnConfigSchemaCompanyProfilePlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/CompanyProfile/ProductReturnConfigSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/ProductReturnConfigSchemaCompanyProfilePlatformModel.swift index a7bf07f566..de6cdce485 100644 --- a/Sources/code/platform/Models/CompanyProfile/ProductReturnConfigSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/ProductReturnConfigSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: ProductReturnConfigSerializer + Model: ProductReturnConfigSchema Used By: CompanyProfile */ - class ProductReturnConfigSerializer: Codable { + class ProductReturnConfigSchema: Codable { public var onSameStore: Bool? diff --git a/Sources/code/platform/Models/CompanyProfile/ProfileSuccessResponseCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/ProfileSuccessResponseSchemaCompanyProfilePlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/CompanyProfile/ProfileSuccessResponseCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/ProfileSuccessResponseSchemaCompanyProfilePlatformModel.swift index 09dcbb1e1e..a0ed1d3379 100644 --- a/Sources/code/platform/Models/CompanyProfile/ProfileSuccessResponseCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/ProfileSuccessResponseSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: ProfileSuccessResponse + Model: ProfileSuccessResponseSchema Used By: CompanyProfile */ - class ProfileSuccessResponse: Codable { + class ProfileSuccessResponseSchema: Codable { public var uid: Int? diff --git a/Sources/code/platform/Models/CompanyProfile/UpdateBrandRequestSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/UpdateBrandRequestSchemaCompanyProfilePlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/CompanyProfile/UpdateBrandRequestSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/UpdateBrandRequestSchemaCompanyProfilePlatformModel.swift index 9453537c46..b9564453ec 100644 --- a/Sources/code/platform/Models/CompanyProfile/UpdateBrandRequestSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/UpdateBrandRequestSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: UpdateBrandRequestSerializer + Model: UpdateBrandRequestSchema Used By: CompanyProfile */ - class UpdateBrandRequestSerializer: Codable { + class UpdateBrandRequestSchema: Codable { public var customJson: [String: Any]? @@ -28,7 +28,7 @@ public extension PlatformClient.CompanyProfile { public var uid: Int? - public var banner: BrandBannerSerializer + public var banner: BrandBannerSchema public var name: String @@ -57,7 +57,7 @@ public extension PlatformClient.CompanyProfile { } - public init(banner: BrandBannerSerializer, 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) { + public init(banner: BrandBannerSchema, 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.customJson = customJson @@ -174,7 +174,7 @@ public extension PlatformClient.CompanyProfile { - banner = try container.decode(BrandBannerSerializer.self, forKey: .banner) + banner = try container.decode(BrandBannerSchema.self, forKey: .banner) diff --git a/Sources/code/platform/Models/CompanyProfile/UpdateCompanyCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/UpdateCompanyCompanyProfilePlatformModel.swift index d193f40d9b..6cdcee5ebb 100644 --- a/Sources/code/platform/Models/CompanyProfile/UpdateCompanyCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/UpdateCompanyCompanyProfilePlatformModel.swift @@ -30,7 +30,7 @@ public extension PlatformClient.CompanyProfile { public var businessType: String? - public var addresses: [CreateUpdateAddressSerializer]? + public var addresses: [CreateUpdateAddressSchema]? public var notificationEmails: [String]? @@ -73,7 +73,7 @@ public extension PlatformClient.CompanyProfile { } - 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: [CompanyTaxesSerializer1]? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { + public init(addresses: [CreateUpdateAddressSchema]? = 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: [CompanyTaxesSerializer1]? = nil, warnings: [String: Any]? = nil, customJson: [String: Any]? = nil) { self.franchiseEnabled = franchiseEnabled @@ -218,7 +218,7 @@ public extension PlatformClient.CompanyProfile { do { - addresses = try container.decode([CreateUpdateAddressSerializer].self, forKey: .addresses) + addresses = try container.decode([CreateUpdateAddressSchema].self, forKey: .addresses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/CompanyProfile/UserSerializerCompanyProfilePlatformModel.swift b/Sources/code/platform/Models/CompanyProfile/UserSchemaCompanyProfilePlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/CompanyProfile/UserSerializerCompanyProfilePlatformModel.swift rename to Sources/code/platform/Models/CompanyProfile/UserSchemaCompanyProfilePlatformModel.swift index d45cbe7cfd..7f3f0811db 100644 --- a/Sources/code/platform/Models/CompanyProfile/UserSerializerCompanyProfilePlatformModel.swift +++ b/Sources/code/platform/Models/CompanyProfile/UserSchemaCompanyProfilePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.CompanyProfile { /* - Model: UserSerializer + Model: UserSchema Used By: CompanyProfile */ - class UserSerializer: Codable { + class UserSchema: Codable { public var userId: String? diff --git a/Sources/code/platform/Models/Configuration/AppCurrencyResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/AppCurrencyResponseSchemaConfigurationPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Configuration/AppCurrencyResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/AppCurrencyResponseSchemaConfigurationPlatformModel.swift index b39dde140e..5b0e2ba7b1 100644 --- a/Sources/code/platform/Models/Configuration/AppCurrencyResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/AppCurrencyResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: AppCurrencyResponse + Model: AppCurrencyResponseSchema Used By: Configuration */ - class AppCurrencyResponse: Codable { + class AppCurrencyResponseSchema: Codable { public var id: String? @@ -176,11 +176,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: AppCurrencyResponse + Model: AppCurrencyResponseSchema Used By: Configuration */ - class AppCurrencyResponse: Codable { + class AppCurrencyResponseSchema: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Configuration/AppFeatureResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/AppFeatureRequestSchemaConfigurationPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Configuration/AppFeatureResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/AppFeatureRequestSchemaConfigurationPlatformModel.swift index fce6579066..2c87790ffa 100644 --- a/Sources/code/platform/Models/Configuration/AppFeatureResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/AppFeatureRequestSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: AppFeatureResponse + Model: AppFeatureRequestSchema Used By: Configuration */ - class AppFeatureResponse: Codable { + class AppFeatureRequestSchema: Codable { public var feature: AppFeature? @@ -61,11 +61,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: AppFeatureResponse + Model: AppFeatureRequestSchema Used By: Configuration */ - class AppFeatureResponse: Codable { + class AppFeatureRequestSchema: Codable { public var feature: AppFeature? diff --git a/Sources/code/platform/Models/Configuration/AppFeatureRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/AppFeatureResponseSchemaConfigurationPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Configuration/AppFeatureRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/AppFeatureResponseSchemaConfigurationPlatformModel.swift index 9edcd53d5d..65a032d54f 100644 --- a/Sources/code/platform/Models/Configuration/AppFeatureRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/AppFeatureResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: AppFeatureRequest + Model: AppFeatureResponseSchema Used By: Configuration */ - class AppFeatureRequest: Codable { + class AppFeatureResponseSchema: Codable { public var feature: AppFeature? @@ -61,11 +61,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: AppFeatureRequest + Model: AppFeatureResponseSchema Used By: Configuration */ - class AppFeatureRequest: Codable { + class AppFeatureResponseSchema: Codable { public var feature: AppFeature? diff --git a/Sources/code/platform/Models/Configuration/AppInventoryPartialUpdateConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/AppInventoryPartialUpdateConfigurationPlatformModel.swift index 3bd6765113..6e0ad7ce7e 100644 --- a/Sources/code/platform/Models/Configuration/AppInventoryPartialUpdateConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/AppInventoryPartialUpdateConfigurationPlatformModel.swift @@ -12,6 +12,8 @@ public extension PlatformClient.Configuration { class AppInventoryPartialUpdate: Codable { + public var search: SearchConfig? + public var rewardPoints: RewardPointsConfig? public var cart: AppCartConfig? @@ -27,6 +29,8 @@ public extension PlatformClient.Configuration { public enum CodingKeys: String, CodingKey { + case search = "search" + case rewardPoints = "reward_points" case cart = "cart" @@ -41,7 +45,9 @@ public extension PlatformClient.Configuration { } - public init(cart: AppCartConfig? = nil, commsEnabled: Bool? = nil, communication: CommunicationConfig? = nil, loyaltyPoints: LoyaltyPointsConfig? = nil, payment: AppPaymentConfig? = nil, rewardPoints: RewardPointsConfig? = nil) { + public init(cart: AppCartConfig? = nil, commsEnabled: Bool? = nil, communication: CommunicationConfig? = nil, loyaltyPoints: LoyaltyPointsConfig? = nil, payment: AppPaymentConfig? = nil, rewardPoints: RewardPointsConfig? = nil, search: SearchConfig? = nil) { + + self.search = search self.rewardPoints = rewardPoints @@ -61,6 +67,18 @@ public extension PlatformClient.Configuration { let container = try decoder.container(keyedBy: CodingKeys.self) + do { + search = try container.decode(SearchConfig.self, forKey: .search) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { rewardPoints = try container.decode(RewardPointsConfig.self, forKey: .rewardPoints) @@ -139,6 +157,11 @@ public extension PlatformClient.Configuration { + try? container.encodeIfPresent(search, forKey: .search) + + + + try? container.encodeIfPresent(rewardPoints, forKey: .rewardPoints) @@ -183,6 +206,8 @@ public extension PlatformClient.ApplicationClient.Configuration { class AppInventoryPartialUpdate: Codable { + public var search: SearchConfig? + public var rewardPoints: RewardPointsConfig? public var cart: AppCartConfig? @@ -198,6 +223,8 @@ public extension PlatformClient.ApplicationClient.Configuration { public enum CodingKeys: String, CodingKey { + case search = "search" + case rewardPoints = "reward_points" case cart = "cart" @@ -212,7 +239,9 @@ public extension PlatformClient.ApplicationClient.Configuration { } - public init(cart: AppCartConfig? = nil, commsEnabled: Bool? = nil, communication: CommunicationConfig? = nil, loyaltyPoints: LoyaltyPointsConfig? = nil, payment: AppPaymentConfig? = nil, rewardPoints: RewardPointsConfig? = nil) { + public init(cart: AppCartConfig? = nil, commsEnabled: Bool? = nil, communication: CommunicationConfig? = nil, loyaltyPoints: LoyaltyPointsConfig? = nil, payment: AppPaymentConfig? = nil, rewardPoints: RewardPointsConfig? = nil, search: SearchConfig? = nil) { + + self.search = search self.rewardPoints = rewardPoints @@ -232,6 +261,18 @@ public extension PlatformClient.ApplicationClient.Configuration { let container = try decoder.container(keyedBy: CodingKeys.self) + do { + search = try container.decode(SearchConfig.self, forKey: .search) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { rewardPoints = try container.decode(RewardPointsConfig.self, forKey: .rewardPoints) @@ -310,6 +351,11 @@ public extension PlatformClient.ApplicationClient.Configuration { + try? container.encodeIfPresent(search, forKey: .search) + + + + try? container.encodeIfPresent(rewardPoints, forKey: .rewardPoints) diff --git a/Sources/code/platform/Models/Configuration/ApplicationInventoryConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/ApplicationInventoryConfigurationPlatformModel.swift index 54718df9f1..38219a6193 100644 --- a/Sources/code/platform/Models/Configuration/ApplicationInventoryConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/ApplicationInventoryConfigurationPlatformModel.swift @@ -12,6 +12,8 @@ public extension PlatformClient.Configuration { class ApplicationInventory: Codable { + public var search: SearchConfig? + public var inventory: AppInventoryConfig? public var authentication: AuthenticationConfig? @@ -57,6 +59,8 @@ public extension PlatformClient.Configuration { public enum CodingKeys: String, CodingKey { + case search = "search" + case inventory = "inventory" case authentication = "authentication" @@ -101,7 +105,9 @@ public extension PlatformClient.Configuration { } - public init(app: String? = nil, articleAssignment: ArticleAssignmentConfig? = nil, authentication: AuthenticationConfig? = nil, business: String? = nil, cart: AppCartConfig? = nil, commsEnabled: Bool? = nil, communication: CommunicationConfig? = nil, createdAt: String? = nil, inventory: AppInventoryConfig? = nil, logistics: AppLogisticsConfig? = nil, loyaltyPoints: LoyaltyPointsConfig? = nil, modifiedAt: String? = nil, modifiedBy: String? = nil, order: AppOrderConfig? = nil, payment: AppPaymentConfig? = nil, piiMasking: PiiMasking? = nil, platforms: [String]? = nil, rewardPoints: RewardPointsConfig? = nil, tags: [String]? = nil, id: String? = nil, v: Int? = nil) { + public init(app: String? = nil, articleAssignment: ArticleAssignmentConfig? = nil, authentication: AuthenticationConfig? = nil, business: String? = nil, cart: AppCartConfig? = nil, commsEnabled: Bool? = nil, communication: CommunicationConfig? = nil, createdAt: String? = nil, inventory: AppInventoryConfig? = nil, logistics: AppLogisticsConfig? = nil, loyaltyPoints: LoyaltyPointsConfig? = nil, modifiedAt: String? = nil, modifiedBy: String? = nil, order: AppOrderConfig? = nil, payment: AppPaymentConfig? = nil, piiMasking: PiiMasking? = nil, platforms: [String]? = nil, rewardPoints: RewardPointsConfig? = nil, search: SearchConfig? = nil, tags: [String]? = nil, id: String? = nil, v: Int? = nil) { + + self.search = search self.inventory = inventory @@ -151,6 +157,18 @@ public extension PlatformClient.Configuration { let container = try decoder.container(keyedBy: CodingKeys.self) + do { + search = try container.decode(SearchConfig.self, forKey: .search) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { inventory = try container.decode(AppInventoryConfig.self, forKey: .inventory) @@ -409,6 +427,11 @@ public extension PlatformClient.Configuration { + try? container.encodeIfPresent(search, forKey: .search) + + + + try? container.encodeIfPresent(inventory, forKey: .inventory) @@ -528,6 +551,8 @@ public extension PlatformClient.ApplicationClient.Configuration { class ApplicationInventory: Codable { + public var search: SearchConfig? + public var inventory: AppInventoryConfig? public var authentication: AuthenticationConfig? @@ -573,6 +598,8 @@ public extension PlatformClient.ApplicationClient.Configuration { public enum CodingKeys: String, CodingKey { + case search = "search" + case inventory = "inventory" case authentication = "authentication" @@ -617,7 +644,9 @@ public extension PlatformClient.ApplicationClient.Configuration { } - public init(app: String? = nil, articleAssignment: ArticleAssignmentConfig? = nil, authentication: AuthenticationConfig? = nil, business: String? = nil, cart: AppCartConfig? = nil, commsEnabled: Bool? = nil, communication: CommunicationConfig? = nil, createdAt: String? = nil, inventory: AppInventoryConfig? = nil, logistics: AppLogisticsConfig? = nil, loyaltyPoints: LoyaltyPointsConfig? = nil, modifiedAt: String? = nil, modifiedBy: String? = nil, order: AppOrderConfig? = nil, payment: AppPaymentConfig? = nil, piiMasking: PiiMasking? = nil, platforms: [String]? = nil, rewardPoints: RewardPointsConfig? = nil, tags: [String]? = nil, id: String? = nil, v: Int? = nil) { + public init(app: String? = nil, articleAssignment: ArticleAssignmentConfig? = nil, authentication: AuthenticationConfig? = nil, business: String? = nil, cart: AppCartConfig? = nil, commsEnabled: Bool? = nil, communication: CommunicationConfig? = nil, createdAt: String? = nil, inventory: AppInventoryConfig? = nil, logistics: AppLogisticsConfig? = nil, loyaltyPoints: LoyaltyPointsConfig? = nil, modifiedAt: String? = nil, modifiedBy: String? = nil, order: AppOrderConfig? = nil, payment: AppPaymentConfig? = nil, piiMasking: PiiMasking? = nil, platforms: [String]? = nil, rewardPoints: RewardPointsConfig? = nil, search: SearchConfig? = nil, tags: [String]? = nil, id: String? = nil, v: Int? = nil) { + + self.search = search self.inventory = inventory @@ -667,6 +696,18 @@ public extension PlatformClient.ApplicationClient.Configuration { let container = try decoder.container(keyedBy: CodingKeys.self) + do { + search = try container.decode(SearchConfig.self, forKey: .search) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { inventory = try container.decode(AppInventoryConfig.self, forKey: .inventory) @@ -925,6 +966,11 @@ public extension PlatformClient.ApplicationClient.Configuration { + try? container.encodeIfPresent(search, forKey: .search) + + + + try? container.encodeIfPresent(inventory, forKey: .inventory) diff --git a/Sources/code/platform/Models/Configuration/ApplicationsResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/ApplicationsResponseSchemaConfigurationPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Configuration/ApplicationsResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/ApplicationsResponseSchemaConfigurationPlatformModel.swift index 5534d2fcc7..465ba7607b 100644 --- a/Sources/code/platform/Models/Configuration/ApplicationsResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/ApplicationsResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: ApplicationsResponse + Model: ApplicationsResponseSchema Used By: Configuration */ - class ApplicationsResponse: Codable { + class ApplicationsResponseSchema: Codable { public var items: [Application]? @@ -84,11 +84,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: ApplicationsResponse + Model: ApplicationsResponseSchema Used By: Configuration */ - class ApplicationsResponse: Codable { + class ApplicationsResponseSchema: Codable { public var items: [Application]? diff --git a/Sources/code/platform/Models/Configuration/BrandsByCompanyResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/BrandsByCompanyResponseSchemaConfigurationPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Configuration/BrandsByCompanyResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/BrandsByCompanyResponseSchemaConfigurationPlatformModel.swift index 0a76a6fc64..1167642f86 100644 --- a/Sources/code/platform/Models/Configuration/BrandsByCompanyResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/BrandsByCompanyResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: BrandsByCompanyResponse + Model: BrandsByCompanyResponseSchema Used By: Configuration */ - class BrandsByCompanyResponse: Codable { + class BrandsByCompanyResponseSchema: Codable { public var brands: [CompanyBrandInfo]? @@ -61,11 +61,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: BrandsByCompanyResponse + Model: BrandsByCompanyResponseSchema Used By: Configuration */ - class BrandsByCompanyResponse: Codable { + class BrandsByCompanyResponseSchema: Codable { public var brands: [CompanyBrandInfo]? diff --git a/Sources/code/platform/Models/Configuration/CompaniesResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/CompaniesResponseSchemaConfigurationPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Configuration/CompaniesResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/CompaniesResponseSchemaConfigurationPlatformModel.swift index 51619d491a..fcb5c70703 100644 --- a/Sources/code/platform/Models/Configuration/CompaniesResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/CompaniesResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: CompaniesResponse + Model: CompaniesResponseSchema Used By: Configuration */ - class CompaniesResponse: Codable { + class CompaniesResponseSchema: Codable { public var items: [AppInventoryCompanies]? @@ -84,11 +84,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: CompaniesResponse + Model: CompaniesResponseSchema Used By: Configuration */ - class CompaniesResponse: Codable { + class CompaniesResponseSchema: Codable { public var items: [AppInventoryCompanies]? diff --git a/Sources/code/platform/Models/Configuration/CompanyByBrandsRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/CompanyByBrandsRequestSchemaConfigurationPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Configuration/CompanyByBrandsRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/CompanyByBrandsRequestSchemaConfigurationPlatformModel.swift index 9031f409a0..494ff612a4 100644 --- a/Sources/code/platform/Models/Configuration/CompanyByBrandsRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/CompanyByBrandsRequestSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: CompanyByBrandsRequest + Model: CompanyByBrandsRequestSchema Used By: Configuration */ - class CompanyByBrandsRequest: Codable { + class CompanyByBrandsRequestSchema: Codable { public var brands: Int @@ -77,11 +77,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: CompanyByBrandsRequest + Model: CompanyByBrandsRequestSchema Used By: Configuration */ - class CompanyByBrandsRequest: Codable { + class CompanyByBrandsRequestSchema: Codable { public var brands: Int diff --git a/Sources/code/platform/Models/Configuration/CompanyByBrandsResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/CompanyByBrandsResponseSchemaConfigurationPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Configuration/CompanyByBrandsResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/CompanyByBrandsResponseSchemaConfigurationPlatformModel.swift index f06acc974c..7dc3981a52 100644 --- a/Sources/code/platform/Models/Configuration/CompanyByBrandsResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/CompanyByBrandsResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: CompanyByBrandsResponse + Model: CompanyByBrandsResponseSchema Used By: Configuration */ - class CompanyByBrandsResponse: Codable { + class CompanyByBrandsResponseSchema: Codable { public var items: [BrandCompanyInfo]? @@ -84,11 +84,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: CompanyByBrandsResponse + Model: CompanyByBrandsResponseSchema Used By: Configuration */ - class CompanyByBrandsResponse: Codable { + class CompanyByBrandsResponseSchema: Codable { public var items: [BrandCompanyInfo]? diff --git a/Sources/code/platform/Models/Configuration/CreateAppResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/CreateAppResponseSchemaConfigurationPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Configuration/CreateAppResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/CreateAppResponseSchemaConfigurationPlatformModel.swift index 4c7a70c55e..8a361a2474 100644 --- a/Sources/code/platform/Models/Configuration/CreateAppResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/CreateAppResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: CreateAppResponse + Model: CreateAppResponseSchema Used By: Configuration */ - class CreateAppResponse: Codable { + class CreateAppResponseSchema: Codable { public var app: Application? @@ -84,11 +84,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: CreateAppResponse + Model: CreateAppResponseSchema Used By: Configuration */ - class CreateAppResponse: Codable { + class CreateAppResponseSchema: Codable { public var app: Application? diff --git a/Sources/code/platform/Models/Configuration/CreateApplicationRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/CreateApplicationRequestSchemaConfigurationPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Configuration/CreateApplicationRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/CreateApplicationRequestSchemaConfigurationPlatformModel.swift index 68485889fc..c8f9ea7ae3 100644 --- a/Sources/code/platform/Models/Configuration/CreateApplicationRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/CreateApplicationRequestSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: CreateApplicationRequest + Model: CreateApplicationRequestSchema Used By: Configuration */ - class CreateApplicationRequest: Codable { + class CreateApplicationRequestSchema: Codable { public var app: App? @@ -107,11 +107,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: CreateApplicationRequest + Model: CreateApplicationRequestSchema Used By: Configuration */ - class CreateApplicationRequest: Codable { + class CreateApplicationRequestSchema: Codable { public var app: App? diff --git a/Sources/code/platform/Models/Configuration/CurrenciesResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/CurrenciesResponseSchemaConfigurationPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Configuration/CurrenciesResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/CurrenciesResponseSchemaConfigurationPlatformModel.swift index 0b2d9b672d..3049bdb5f2 100644 --- a/Sources/code/platform/Models/Configuration/CurrenciesResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/CurrenciesResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: CurrenciesResponse + Model: CurrenciesResponseSchema Used By: Configuration */ - class CurrenciesResponse: Codable { + class CurrenciesResponseSchema: Codable { public var items: [Currency]? @@ -61,11 +61,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: CurrenciesResponse + Model: CurrenciesResponseSchema Used By: Configuration */ - class CurrenciesResponse: Codable { + class CurrenciesResponseSchema: Codable { public var items: [Currency]? diff --git a/Sources/code/platform/Models/Configuration/CurrencyExchangeItemConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/CurrencyExchangeItemConfigurationPlatformModel.swift new file mode 100644 index 0000000000..5f052a5e7f --- /dev/null +++ b/Sources/code/platform/Models/Configuration/CurrencyExchangeItemConfigurationPlatformModel.swift @@ -0,0 +1,326 @@ + + +import Foundation + + +public extension PlatformClient.Configuration { + /* + Model: CurrencyExchangeItem + Used By: Configuration + */ + + class CurrencyExchangeItem: Codable { + + + public var currencyCode: String + + public var name: String + + public var rate: Double + + public var countryCode: String + + public var countryName: String + + public var subunit: String + + public var decimalDigits: Int + + public var symbol: String + + + public enum CodingKeys: String, CodingKey { + + case currencyCode = "currency_code" + + case name = "name" + + case rate = "rate" + + case countryCode = "country_code" + + case countryName = "country_name" + + case subunit = "subunit" + + case decimalDigits = "decimal_digits" + + case symbol = "symbol" + + } + + public init(countryCode: String, countryName: String, currencyCode: String, decimalDigits: Int, name: String, rate: Double, subunit: String, symbol: String) { + + self.currencyCode = currencyCode + + self.name = name + + self.rate = rate + + self.countryCode = countryCode + + self.countryName = countryName + + self.subunit = subunit + + self.decimalDigits = decimalDigits + + self.symbol = symbol + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + currencyCode = try container.decode(String.self, forKey: .currencyCode) + + + + + name = try container.decode(String.self, forKey: .name) + + + + + rate = try container.decode(Double.self, forKey: .rate) + + + + + countryCode = try container.decode(String.self, forKey: .countryCode) + + + + + countryName = try container.decode(String.self, forKey: .countryName) + + + + + subunit = try container.decode(String.self, forKey: .subunit) + + + + + decimalDigits = try container.decode(Int.self, forKey: .decimalDigits) + + + + + symbol = try container.decode(String.self, forKey: .symbol) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(rate, forKey: .rate) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(countryName, forKey: .countryName) + + + + + try? container.encodeIfPresent(subunit, forKey: .subunit) + + + + + try? container.encodeIfPresent(decimalDigits, forKey: .decimalDigits) + + + + + try? container.encodeIfPresent(symbol, forKey: .symbol) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Configuration { + /* + Model: CurrencyExchangeItem + Used By: Configuration + */ + + class CurrencyExchangeItem: Codable { + + + public var currencyCode: String + + public var name: String + + public var rate: Double + + public var countryCode: String + + public var countryName: String + + public var subunit: String + + public var decimalDigits: Int + + public var symbol: String + + + public enum CodingKeys: String, CodingKey { + + case currencyCode = "currency_code" + + case name = "name" + + case rate = "rate" + + case countryCode = "country_code" + + case countryName = "country_name" + + case subunit = "subunit" + + case decimalDigits = "decimal_digits" + + case symbol = "symbol" + + } + + public init(countryCode: String, countryName: String, currencyCode: String, decimalDigits: Int, name: String, rate: Double, subunit: String, symbol: String) { + + self.currencyCode = currencyCode + + self.name = name + + self.rate = rate + + self.countryCode = countryCode + + self.countryName = countryName + + self.subunit = subunit + + self.decimalDigits = decimalDigits + + self.symbol = symbol + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + currencyCode = try container.decode(String.self, forKey: .currencyCode) + + + + + name = try container.decode(String.self, forKey: .name) + + + + + rate = try container.decode(Double.self, forKey: .rate) + + + + + countryCode = try container.decode(String.self, forKey: .countryCode) + + + + + countryName = try container.decode(String.self, forKey: .countryName) + + + + + subunit = try container.decode(String.self, forKey: .subunit) + + + + + decimalDigits = try container.decode(Int.self, forKey: .decimalDigits) + + + + + symbol = try container.decode(String.self, forKey: .symbol) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(currencyCode, forKey: .currencyCode) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(rate, forKey: .rate) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(countryName, forKey: .countryName) + + + + + try? container.encodeIfPresent(subunit, forKey: .subunit) + + + + + try? container.encodeIfPresent(decimalDigits, forKey: .decimalDigits) + + + + + try? container.encodeIfPresent(symbol, forKey: .symbol) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Configuration/CurrencyExchangeResponseV2ConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/CurrencyExchangeResponseV2ConfigurationPlatformModel.swift new file mode 100644 index 0000000000..555dd742ba --- /dev/null +++ b/Sources/code/platform/Models/Configuration/CurrencyExchangeResponseV2ConfigurationPlatformModel.swift @@ -0,0 +1,230 @@ + + +import Foundation + + +public extension PlatformClient.Configuration { + /* + Model: CurrencyExchangeResponseV2 + Used By: Configuration + */ + + class CurrencyExchangeResponseV2: Codable { + + + public var base: String + + public var baseCurrencyName: String + + public var ttlSeconds: Int + + public var items: [CurrencyExchangeItem] + + public var total: Int + + + public enum CodingKeys: String, CodingKey { + + case base = "base" + + case baseCurrencyName = "base_currency_name" + + case ttlSeconds = "ttl_seconds" + + case items = "items" + + case total = "total" + + } + + public init(base: String, baseCurrencyName: String, items: [CurrencyExchangeItem], total: Int, ttlSeconds: Int) { + + self.base = base + + self.baseCurrencyName = baseCurrencyName + + self.ttlSeconds = ttlSeconds + + self.items = items + + self.total = total + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + base = try container.decode(String.self, forKey: .base) + + + + + baseCurrencyName = try container.decode(String.self, forKey: .baseCurrencyName) + + + + + ttlSeconds = try container.decode(Int.self, forKey: .ttlSeconds) + + + + + items = try container.decode([CurrencyExchangeItem].self, forKey: .items) + + + + + total = try container.decode(Int.self, forKey: .total) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(base, forKey: .base) + + + + + try? container.encodeIfPresent(baseCurrencyName, forKey: .baseCurrencyName) + + + + + try? container.encodeIfPresent(ttlSeconds, forKey: .ttlSeconds) + + + + + try? container.encodeIfPresent(items, forKey: .items) + + + + + try? container.encodeIfPresent(total, forKey: .total) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Configuration { + /* + Model: CurrencyExchangeResponseV2 + Used By: Configuration + */ + + class CurrencyExchangeResponseV2: Codable { + + + public var base: String + + public var baseCurrencyName: String + + public var ttlSeconds: Int + + public var items: [CurrencyExchangeItem] + + public var total: Int + + + public enum CodingKeys: String, CodingKey { + + case base = "base" + + case baseCurrencyName = "base_currency_name" + + case ttlSeconds = "ttl_seconds" + + case items = "items" + + case total = "total" + + } + + public init(base: String, baseCurrencyName: String, items: [CurrencyExchangeItem], total: Int, ttlSeconds: Int) { + + self.base = base + + self.baseCurrencyName = baseCurrencyName + + self.ttlSeconds = ttlSeconds + + self.items = items + + self.total = total + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + base = try container.decode(String.self, forKey: .base) + + + + + baseCurrencyName = try container.decode(String.self, forKey: .baseCurrencyName) + + + + + ttlSeconds = try container.decode(Int.self, forKey: .ttlSeconds) + + + + + items = try container.decode([CurrencyExchangeItem].self, forKey: .items) + + + + + total = try container.decode(Int.self, forKey: .total) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(base, forKey: .base) + + + + + try? container.encodeIfPresent(baseCurrencyName, forKey: .baseCurrencyName) + + + + + try? container.encodeIfPresent(ttlSeconds, forKey: .ttlSeconds) + + + + + try? container.encodeIfPresent(items, forKey: .items) + + + + + try? container.encodeIfPresent(total, forKey: .total) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Configuration/DomainAddRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/DomainAddRequestSchemaConfigurationPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Configuration/DomainAddRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/DomainAddRequestSchemaConfigurationPlatformModel.swift index 227d2c5ddc..20fb8692b4 100644 --- a/Sources/code/platform/Models/Configuration/DomainAddRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/DomainAddRequestSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: DomainAddRequest + Model: DomainAddRequestSchema Used By: Configuration */ - class DomainAddRequest: Codable { + class DomainAddRequestSchema: Codable { public var domain: DomainAdd? @@ -61,11 +61,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: DomainAddRequest + Model: DomainAddRequestSchema Used By: Configuration */ - class DomainAddRequest: Codable { + class DomainAddRequestSchema: Codable { public var domain: DomainAdd? diff --git a/Sources/code/platform/Models/Configuration/DomainStatusRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/DomainStatusRequestSchemaConfigurationPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Configuration/DomainStatusRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/DomainStatusRequestSchemaConfigurationPlatformModel.swift index d1f7243d4b..45d7e1b4d7 100644 --- a/Sources/code/platform/Models/Configuration/DomainStatusRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/DomainStatusRequestSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: DomainStatusRequest + Model: DomainStatusRequestSchema Used By: Configuration */ - class DomainStatusRequest: Codable { + class DomainStatusRequestSchema: Codable { public var domainUrl: String? @@ -61,11 +61,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: DomainStatusRequest + Model: DomainStatusRequestSchema Used By: Configuration */ - class DomainStatusRequest: Codable { + class DomainStatusRequestSchema: Codable { public var domainUrl: String? diff --git a/Sources/code/platform/Models/Configuration/DomainStatusResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/DomainStatusResponseSchemaConfigurationPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Configuration/DomainStatusResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/DomainStatusResponseSchemaConfigurationPlatformModel.swift index a8c3ae94f3..c1b259f876 100644 --- a/Sources/code/platform/Models/Configuration/DomainStatusResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/DomainStatusResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: DomainStatusResponse + Model: DomainStatusResponseSchema Used By: Configuration */ - class DomainStatusResponse: Codable { + class DomainStatusResponseSchema: Codable { public var connected: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: DomainStatusResponse + Model: DomainStatusResponseSchema Used By: Configuration */ - class DomainStatusResponse: Codable { + class DomainStatusResponseSchema: Codable { public var connected: Bool? diff --git a/Sources/code/platform/Models/Configuration/DomainSuggestionsRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/DomainSuggestionsRequestSchemaConfigurationPlatformModel.swift similarity index 78% rename from Sources/code/platform/Models/Configuration/DomainSuggestionsRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/DomainSuggestionsRequestSchemaConfigurationPlatformModel.swift index 6fc7ab15b6..5d496da1db 100644 --- a/Sources/code/platform/Models/Configuration/DomainSuggestionsRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/DomainSuggestionsRequestSchemaConfigurationPlatformModel.swift @@ -5,31 +5,31 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: DomainSuggestionsRequest + Model: DomainSuggestionsRequestSchema Used By: Configuration */ - class DomainSuggestionsRequest: Codable { + class DomainSuggestionsRequestSchema: Codable { public var domainUrl: String? - public var custom: Bool? + public var customDomain: Bool? public enum CodingKeys: String, CodingKey { case domainUrl = "domain_url" - case custom = "custom" + case customDomain = "custom_domain" } - public init(custom: Bool? = nil, domainUrl: String? = nil) { + public init(customDomain: Bool? = nil, domainUrl: String? = nil) { self.domainUrl = domainUrl - self.custom = custom + self.customDomain = customDomain } @@ -50,7 +50,7 @@ public extension PlatformClient.Configuration { do { - custom = try container.decode(Bool.self, forKey: .custom) + customDomain = try container.decode(Bool.self, forKey: .customDomain) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -72,7 +72,7 @@ public extension PlatformClient.Configuration { - try? container.encodeIfPresent(custom, forKey: .custom) + try? container.encodeIfPresent(customDomain, forKey: .customDomain) } @@ -84,31 +84,31 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: DomainSuggestionsRequest + Model: DomainSuggestionsRequestSchema Used By: Configuration */ - class DomainSuggestionsRequest: Codable { + class DomainSuggestionsRequestSchema: Codable { public var domainUrl: String? - public var custom: Bool? + public var customDomain: Bool? public enum CodingKeys: String, CodingKey { case domainUrl = "domain_url" - case custom = "custom" + case customDomain = "custom_domain" } - public init(custom: Bool? = nil, domainUrl: String? = nil) { + public init(customDomain: Bool? = nil, domainUrl: String? = nil) { self.domainUrl = domainUrl - self.custom = custom + self.customDomain = customDomain } @@ -129,7 +129,7 @@ public extension PlatformClient.ApplicationClient.Configuration { do { - custom = try container.decode(Bool.self, forKey: .custom) + customDomain = try container.decode(Bool.self, forKey: .customDomain) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -151,7 +151,7 @@ public extension PlatformClient.ApplicationClient.Configuration { - try? container.encodeIfPresent(custom, forKey: .custom) + try? container.encodeIfPresent(customDomain, forKey: .customDomain) } diff --git a/Sources/code/platform/Models/Configuration/DomainSuggestionsResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/DomainSuggestionsResponseSchemaConfigurationPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Configuration/DomainSuggestionsResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/DomainSuggestionsResponseSchemaConfigurationPlatformModel.swift index 48cd63a17a..bce7012105 100644 --- a/Sources/code/platform/Models/Configuration/DomainSuggestionsResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/DomainSuggestionsResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: DomainSuggestionsResponse + Model: DomainSuggestionsResponseSchema Used By: Configuration */ - class DomainSuggestionsResponse: Codable { + class DomainSuggestionsResponseSchema: Codable { public var domains: [DomainSuggestion]? @@ -61,11 +61,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: DomainSuggestionsResponse + Model: DomainSuggestionsResponseSchema Used By: Configuration */ - class DomainSuggestionsResponse: Codable { + class DomainSuggestionsResponseSchema: Codable { public var domains: [DomainSuggestion]? diff --git a/Sources/code/platform/Models/Configuration/DomainsResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/DomainsResponseSchemaConfigurationPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Configuration/DomainsResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/DomainsResponseSchemaConfigurationPlatformModel.swift index d10c5d6eb0..651a097195 100644 --- a/Sources/code/platform/Models/Configuration/DomainsResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/DomainsResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: DomainsResponse + Model: DomainsResponseSchema Used By: Configuration */ - class DomainsResponse: Codable { + class DomainsResponseSchema: Codable { public var domains: [Domain]? @@ -61,11 +61,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: DomainsResponse + Model: DomainsResponseSchema Used By: Configuration */ - class DomainsResponse: Codable { + class DomainsResponseSchema: Codable { public var domains: [Domain]? diff --git a/Sources/code/platform/Models/Configuration/FilterOrderingStoreRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/FilterOrderingStoreRequestSchemaConfigurationPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Configuration/FilterOrderingStoreRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/FilterOrderingStoreRequestSchemaConfigurationPlatformModel.swift index ef08e45d5b..523d90e7a1 100644 --- a/Sources/code/platform/Models/Configuration/FilterOrderingStoreRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/FilterOrderingStoreRequestSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: FilterOrderingStoreRequest + Model: FilterOrderingStoreRequestSchema Used By: Configuration */ - class FilterOrderingStoreRequest: Codable { + class FilterOrderingStoreRequestSchema: Codable { public var allStores: Bool? @@ -107,11 +107,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: FilterOrderingStoreRequest + Model: FilterOrderingStoreRequestSchema Used By: Configuration */ - class FilterOrderingStoreRequest: Codable { + class FilterOrderingStoreRequestSchema: Codable { public var allStores: Bool? diff --git a/Sources/code/platform/Models/Configuration/FstIdentificationConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/FstIdentificationConfigurationPlatformModel.swift new file mode 100644 index 0000000000..4b183b6c8f --- /dev/null +++ b/Sources/code/platform/Models/Configuration/FstIdentificationConfigurationPlatformModel.swift @@ -0,0 +1,116 @@ + + +import Foundation + + +public extension PlatformClient.Configuration { + /* + Model: FstIdentification + Used By: Configuration + */ + + class FstIdentification: Codable { + + + public var enabled: Bool? + + + public enum CodingKeys: String, CodingKey { + + case enabled = "enabled" + + } + + public init(enabled: Bool? = nil) { + + self.enabled = enabled + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + enabled = try container.decode(Bool.self, forKey: .enabled) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(enabled, forKey: .enabled) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Configuration { + /* + Model: FstIdentification + Used By: Configuration + */ + + class FstIdentification: Codable { + + + public var enabled: Bool? + + + public enum CodingKeys: String, CodingKey { + + case enabled = "enabled" + + } + + public init(enabled: Bool? = nil) { + + self.enabled = enabled + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + enabled = try container.decode(Bool.self, forKey: .enabled) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(enabled, forKey: .enabled) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Configuration/InvalidPayloadRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/InvalidPayloadRequestSchemaConfigurationPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Configuration/InvalidPayloadRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/InvalidPayloadRequestSchemaConfigurationPlatformModel.swift index 9e68ae6572..61cbaeb7da 100644 --- a/Sources/code/platform/Models/Configuration/InvalidPayloadRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/InvalidPayloadRequestSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: InvalidPayloadRequest + Model: InvalidPayloadRequestSchema Used By: Configuration */ - class InvalidPayloadRequest: Codable { + class InvalidPayloadRequestSchema: Codable { public var message: String? @@ -84,11 +84,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: InvalidPayloadRequest + Model: InvalidPayloadRequestSchema Used By: Configuration */ - class InvalidPayloadRequest: Codable { + class InvalidPayloadRequestSchema: Codable { public var message: String? diff --git a/Sources/code/platform/Models/Configuration/MobileAppConfigRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/MobileAppConfigRequestSchemaConfigurationPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Configuration/MobileAppConfigRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/MobileAppConfigRequestSchemaConfigurationPlatformModel.swift index 10d48c3047..c2137260fe 100644 --- a/Sources/code/platform/Models/Configuration/MobileAppConfigRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/MobileAppConfigRequestSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: MobileAppConfigRequest + Model: MobileAppConfigRequestSchema Used By: Configuration */ - class MobileAppConfigRequest: Codable { + class MobileAppConfigRequestSchema: Codable { public var appName: String? @@ -130,11 +130,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: MobileAppConfigRequest + Model: MobileAppConfigRequestSchema Used By: Configuration */ - class MobileAppConfigRequest: Codable { + class MobileAppConfigRequestSchema: Codable { public var appName: String? diff --git a/Sources/code/platform/Models/Configuration/OptedApplicationResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/OptedApplicationResponseSchemaConfigurationPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Configuration/OptedApplicationResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/OptedApplicationResponseSchemaConfigurationPlatformModel.swift index 5cc88ac6ac..6251db4f9f 100644 --- a/Sources/code/platform/Models/Configuration/OptedApplicationResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/OptedApplicationResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: OptedApplicationResponse + Model: OptedApplicationResponseSchema Used By: Configuration */ - class OptedApplicationResponse: Codable { + class OptedApplicationResponseSchema: Codable { public var name: String? @@ -199,11 +199,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: OptedApplicationResponse + Model: OptedApplicationResponseSchema Used By: Configuration */ - class OptedApplicationResponse: Codable { + class OptedApplicationResponseSchema: Codable { public var name: String? diff --git a/Sources/code/platform/Models/Configuration/OrderingStoreSelectRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/OrderingStoreSelectRequestSchemaConfigurationPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Configuration/OrderingStoreSelectRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/OrderingStoreSelectRequestSchemaConfigurationPlatformModel.swift index 22afdf6743..b0f8d0da96 100644 --- a/Sources/code/platform/Models/Configuration/OrderingStoreSelectRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/OrderingStoreSelectRequestSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: OrderingStoreSelectRequest + Model: OrderingStoreSelectRequestSchema Used By: Configuration */ - class OrderingStoreSelectRequest: Codable { + class OrderingStoreSelectRequestSchema: Codable { public var orderingStore: OrderingStoreSelect @@ -54,11 +54,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: OrderingStoreSelectRequest + Model: OrderingStoreSelectRequestSchema Used By: Configuration */ - class OrderingStoreSelectRequest: Codable { + class OrderingStoreSelectRequestSchema: Codable { public var orderingStore: OrderingStoreSelect diff --git a/Sources/code/platform/Models/Configuration/OrderingStoresResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/OrderingStoresResponseSchemaConfigurationPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Configuration/OrderingStoresResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/OrderingStoresResponseSchemaConfigurationPlatformModel.swift index ed62e7a38c..bddfc145f3 100644 --- a/Sources/code/platform/Models/Configuration/OrderingStoresResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/OrderingStoresResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: OrderingStoresResponse + Model: OrderingStoresResponseSchema Used By: Configuration */ - class OrderingStoresResponse: Codable { + class OrderingStoresResponseSchema: Codable { public var page: Page? @@ -84,11 +84,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: OrderingStoresResponse + Model: OrderingStoresResponseSchema Used By: Configuration */ - class OrderingStoresResponse: Codable { + class OrderingStoresResponseSchema: Codable { public var page: Page? diff --git a/Sources/code/platform/Models/Configuration/QuerySuggestionsConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/QuerySuggestionsConfigurationPlatformModel.swift new file mode 100644 index 0000000000..0a6c05c53a --- /dev/null +++ b/Sources/code/platform/Models/Configuration/QuerySuggestionsConfigurationPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Configuration { + /* + Model: QuerySuggestions + Used By: Configuration + */ + + class QuerySuggestions: Codable { + + + public var enabled: Bool? + + public var maxLimit: Int? + + + public enum CodingKeys: String, CodingKey { + + case enabled = "enabled" + + case maxLimit = "max_limit" + + } + + public init(enabled: Bool? = nil, maxLimit: Int? = nil) { + + self.enabled = enabled + + self.maxLimit = maxLimit + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + enabled = try container.decode(Bool.self, forKey: .enabled) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + maxLimit = try container.decode(Int.self, forKey: .maxLimit) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(enabled, forKey: .enabled) + + + + + try? container.encodeIfPresent(maxLimit, forKey: .maxLimit) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Configuration { + /* + Model: QuerySuggestions + Used By: Configuration + */ + + class QuerySuggestions: Codable { + + + public var enabled: Bool? + + public var maxLimit: Int? + + + public enum CodingKeys: String, CodingKey { + + case enabled = "enabled" + + case maxLimit = "max_limit" + + } + + public init(enabled: Bool? = nil, maxLimit: Int? = nil) { + + self.enabled = enabled + + self.maxLimit = maxLimit + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + enabled = try container.decode(Bool.self, forKey: .enabled) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + maxLimit = try container.decode(Int.self, forKey: .maxLimit) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(enabled, forKey: .enabled) + + + + + try? container.encodeIfPresent(maxLimit, forKey: .maxLimit) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Configuration/SearchConfigConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/SearchConfigConfigurationPlatformModel.swift new file mode 100644 index 0000000000..554eeb3a9f --- /dev/null +++ b/Sources/code/platform/Models/Configuration/SearchConfigConfigurationPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Configuration { + /* + Model: SearchConfig + Used By: Configuration + */ + + class SearchConfig: Codable { + + + public var fstIdentification: FstIdentification? + + public var querySuggestions: QuerySuggestions? + + + public enum CodingKeys: String, CodingKey { + + case fstIdentification = "fst_identification" + + case querySuggestions = "query_suggestions" + + } + + public init(fstIdentification: FstIdentification? = nil, querySuggestions: QuerySuggestions? = nil) { + + self.fstIdentification = fstIdentification + + self.querySuggestions = querySuggestions + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + fstIdentification = try container.decode(FstIdentification.self, forKey: .fstIdentification) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + querySuggestions = try container.decode(QuerySuggestions.self, forKey: .querySuggestions) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(fstIdentification, forKey: .fstIdentification) + + + + + try? container.encodeIfPresent(querySuggestions, forKey: .querySuggestions) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Configuration { + /* + Model: SearchConfig + Used By: Configuration + */ + + class SearchConfig: Codable { + + + public var fstIdentification: FstIdentification? + + public var querySuggestions: QuerySuggestions? + + + public enum CodingKeys: String, CodingKey { + + case fstIdentification = "fst_identification" + + case querySuggestions = "query_suggestions" + + } + + public init(fstIdentification: FstIdentification? = nil, querySuggestions: QuerySuggestions? = nil) { + + self.fstIdentification = fstIdentification + + self.querySuggestions = querySuggestions + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + fstIdentification = try container.decode(FstIdentification.self, forKey: .fstIdentification) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + querySuggestions = try container.decode(QuerySuggestions.self, forKey: .querySuggestions) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(fstIdentification, forKey: .fstIdentification) + + + + + try? container.encodeIfPresent(querySuggestions, forKey: .querySuggestions) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Configuration/StoreByBrandsRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/StoreByBrandsRequestSchemaConfigurationPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Configuration/StoreByBrandsRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/StoreByBrandsRequestSchemaConfigurationPlatformModel.swift index 952ee629bc..e3b4d88303 100644 --- a/Sources/code/platform/Models/Configuration/StoreByBrandsRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/StoreByBrandsRequestSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: StoreByBrandsRequest + Model: StoreByBrandsRequestSchema Used By: Configuration */ - class StoreByBrandsRequest: Codable { + class StoreByBrandsRequestSchema: Codable { public var companyId: Int? @@ -100,11 +100,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: StoreByBrandsRequest + Model: StoreByBrandsRequestSchema Used By: Configuration */ - class StoreByBrandsRequest: Codable { + class StoreByBrandsRequestSchema: Codable { public var companyId: Int? diff --git a/Sources/code/platform/Models/Configuration/StoreByBrandsResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/StoreByBrandsResponseSchemaConfigurationPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Configuration/StoreByBrandsResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/StoreByBrandsResponseSchemaConfigurationPlatformModel.swift index bfbf2e4abe..d863bf72d2 100644 --- a/Sources/code/platform/Models/Configuration/StoreByBrandsResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/StoreByBrandsResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: StoreByBrandsResponse + Model: StoreByBrandsResponseSchema Used By: Configuration */ - class StoreByBrandsResponse: Codable { + class StoreByBrandsResponseSchema: Codable { public var items: [BrandStoreInfo]? @@ -84,11 +84,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: StoreByBrandsResponse + Model: StoreByBrandsResponseSchema Used By: Configuration */ - class StoreByBrandsResponse: Codable { + class StoreByBrandsResponseSchema: Codable { public var items: [BrandStoreInfo]? diff --git a/Sources/code/platform/Models/Configuration/StoresResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/StoresResponseSchemaConfigurationPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Configuration/StoresResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/StoresResponseSchemaConfigurationPlatformModel.swift index 433eea023e..a20716c62b 100644 --- a/Sources/code/platform/Models/Configuration/StoresResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/StoresResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: StoresResponse + Model: StoresResponseSchema Used By: Configuration */ - class StoresResponse: Codable { + class StoresResponseSchema: Codable { public var items: [AppInventoryStores]? @@ -84,11 +84,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: StoresResponse + Model: StoresResponseSchema Used By: Configuration */ - class StoresResponse: Codable { + class StoresResponseSchema: Codable { public var items: [AppInventoryStores]? diff --git a/Sources/code/platform/Models/Configuration/SuccessMessageResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/SuccessMessageResponseSchemaConfigurationPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Configuration/SuccessMessageResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/SuccessMessageResponseSchemaConfigurationPlatformModel.swift index 002c3f81e5..ba379034b3 100644 --- a/Sources/code/platform/Models/Configuration/SuccessMessageResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/SuccessMessageResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: SuccessMessageResponse + Model: SuccessMessageResponseSchema Used By: Configuration */ - class SuccessMessageResponse: Codable { + class SuccessMessageResponseSchema: Codable { public var success: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: SuccessMessageResponse + Model: SuccessMessageResponseSchema Used By: Configuration */ - class SuccessMessageResponse: Codable { + class SuccessMessageResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Configuration/TokenResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/TokenResponseSchemaConfigurationPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Configuration/TokenResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/TokenResponseSchemaConfigurationPlatformModel.swift index c70eaa8b79..bcffe5b326 100644 --- a/Sources/code/platform/Models/Configuration/TokenResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/TokenResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: TokenResponse + Model: TokenResponseSchema Used By: Configuration */ - class TokenResponse: Codable { + class TokenResponseSchema: Codable { public var tokens: Tokens? @@ -176,11 +176,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: TokenResponse + Model: TokenResponseSchema Used By: Configuration */ - class TokenResponse: Codable { + class TokenResponseSchema: Codable { public var tokens: Tokens? diff --git a/Sources/code/platform/Models/Configuration/UpdateDomainTypeRequestConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/UpdateDomainTypeRequestSchemaConfigurationPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Configuration/UpdateDomainTypeRequestConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/UpdateDomainTypeRequestSchemaConfigurationPlatformModel.swift index ead9e1389c..c068c09f06 100644 --- a/Sources/code/platform/Models/Configuration/UpdateDomainTypeRequestConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/UpdateDomainTypeRequestSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: UpdateDomainTypeRequest + Model: UpdateDomainTypeRequestSchema Used By: Configuration */ - class UpdateDomainTypeRequest: Codable { + class UpdateDomainTypeRequestSchema: Codable { public var domain: UpdateDomain? @@ -84,11 +84,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: UpdateDomainTypeRequest + Model: UpdateDomainTypeRequestSchema Used By: Configuration */ - class UpdateDomainTypeRequest: Codable { + class UpdateDomainTypeRequestSchema: Codable { public var domain: UpdateDomain? diff --git a/Sources/code/platform/Models/Configuration/ValidationErrorConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/ValidationErrorConfigurationPlatformModel.swift new file mode 100644 index 0000000000..b8781e30ea --- /dev/null +++ b/Sources/code/platform/Models/Configuration/ValidationErrorConfigurationPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Configuration { + /* + Model: ValidationError + Used By: Configuration + */ + + class ValidationError: Codable { + + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Configuration { + /* + Model: ValidationError + Used By: Configuration + */ + + class ValidationError: Codable { + + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Configuration/ValidationErrorsConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/ValidationErrorsConfigurationPlatformModel.swift new file mode 100644 index 0000000000..c8526175a1 --- /dev/null +++ b/Sources/code/platform/Models/Configuration/ValidationErrorsConfigurationPlatformModel.swift @@ -0,0 +1,102 @@ + + +import Foundation + + +public extension PlatformClient.Configuration { + /* + Model: ValidationErrors + Used By: Configuration + */ + + class ValidationErrors: Codable { + + + public var errors: [ValidationError] + + + public enum CodingKeys: String, CodingKey { + + case errors = "errors" + + } + + public init(errors: [ValidationError]) { + + self.errors = errors + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + errors = try container.decode([ValidationError].self, forKey: .errors) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(errors, forKey: .errors) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Configuration { + /* + Model: ValidationErrors + Used By: Configuration + */ + + class ValidationErrors: Codable { + + + public var errors: [ValidationError] + + + public enum CodingKeys: String, CodingKey { + + case errors = "errors" + + } + + public init(errors: [ValidationError]) { + + self.errors = errors + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + errors = try container.decode([ValidationError].self, forKey: .errors) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(errors, forKey: .errors) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Configuration/ValidationFailedResponseConfigurationPlatformModel.swift b/Sources/code/platform/Models/Configuration/ValidationFailedResponseSchemaConfigurationPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Configuration/ValidationFailedResponseConfigurationPlatformModel.swift rename to Sources/code/platform/Models/Configuration/ValidationFailedResponseSchemaConfigurationPlatformModel.swift index 2f60c2329d..5d807d07ee 100644 --- a/Sources/code/platform/Models/Configuration/ValidationFailedResponseConfigurationPlatformModel.swift +++ b/Sources/code/platform/Models/Configuration/ValidationFailedResponseSchemaConfigurationPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Configuration { /* - Model: ValidationFailedResponse + Model: ValidationFailedResponseSchema Used By: Configuration */ - class ValidationFailedResponse: Codable { + class ValidationFailedResponseSchema: Codable { public var message: String? @@ -61,11 +61,11 @@ public extension PlatformClient.Configuration { public extension PlatformClient.ApplicationClient.Configuration { /* - Model: ValidationFailedResponse + Model: ValidationFailedResponseSchema Used By: Configuration */ - class ValidationFailedResponse: Codable { + class ValidationFailedResponseSchema: Codable { public var message: String? diff --git a/Sources/code/platform/Models/Content/BlogGetResponseContentPlatformModel.swift b/Sources/code/platform/Models/Content/BlogGetDetailsContentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Content/BlogGetResponseContentPlatformModel.swift rename to Sources/code/platform/Models/Content/BlogGetDetailsContentPlatformModel.swift index 03179b39e7..b07d4bbe12 100644 --- a/Sources/code/platform/Models/Content/BlogGetResponseContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/BlogGetDetailsContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: BlogGetResponse + Model: BlogGetDetails Used By: Content */ - class BlogGetResponse: Codable { + class BlogGetDetails: Codable { public var items: [BlogSchema]? @@ -107,11 +107,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: BlogGetResponse + Model: BlogGetDetails Used By: Content */ - class BlogGetResponse: Codable { + class BlogGetDetails: Codable { public var items: [BlogSchema]? diff --git a/Sources/code/platform/Models/Content/BlogRequestContentPlatformModel.swift b/Sources/code/platform/Models/Content/BlogPayloadContentPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Content/BlogRequestContentPlatformModel.swift rename to Sources/code/platform/Models/Content/BlogPayloadContentPlatformModel.swift index c0de52d6d9..4dda58f23e 100644 --- a/Sources/code/platform/Models/Content/BlogRequestContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/BlogPayloadContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: BlogRequest + Model: BlogPayload Used By: Content */ - class BlogRequest: Codable { + class BlogPayload: Codable { public var application: String? @@ -314,11 +314,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: BlogRequest + Model: BlogPayload Used By: Content */ - class BlogRequest: Codable { + class BlogPayload: Codable { public var application: String? diff --git a/Sources/code/platform/Models/Content/CustomFieldBulkEntryContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomFieldBulkEntryContentPlatformModel.swift new file mode 100644 index 0000000000..9861b23f27 --- /dev/null +++ b/Sources/code/platform/Models/Content/CustomFieldBulkEntryContentPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Content { + /* + Model: CustomFieldBulkEntry + Used By: Content + */ + + class CustomFieldBulkEntry: Codable { + + + public var items: [JobSchema]? + + public var page: Page? + + + public enum CodingKeys: String, CodingKey { + + case items = "items" + + case page = "page" + + } + + public init(items: [JobSchema]? = nil, page: Page? = nil) { + + self.items = items + + self.page = page + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + items = try container.decode([JobSchema].self, forKey: .items) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + page = try container.decode(Page.self, forKey: .page) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Content { + /* + Model: CustomFieldBulkEntry + Used By: Content + */ + + class CustomFieldBulkEntry: Codable { + + + public var items: [JobSchema]? + + public var page: Page? + + + public enum CodingKeys: String, CodingKey { + + case items = "items" + + case page = "page" + + } + + public init(items: [JobSchema]? = nil, page: Page? = nil) { + + self.items = items + + self.page = page + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + items = try container.decode([JobSchema].self, forKey: .items) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + page = try container.decode(Page.self, forKey: .page) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Content/CustomFieldContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomFieldContentPlatformModel.swift index 7385f52369..aecc5d74da 100644 --- a/Sources/code/platform/Models/Content/CustomFieldContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomFieldContentPlatformModel.swift @@ -14,22 +14,28 @@ public extension PlatformClient.Content { public var value: [[String: Any]]? - public var definitionId: String? + public var namespace: String? + + public var slug: String? public enum CodingKeys: String, CodingKey { case value = "value" - case definitionId = "definition_id" + case namespace = "namespace" + + case slug = "slug" } - public init(definitionId: String? = nil, value: [[String: Any]]? = nil) { + public init(namespace: String? = nil, slug: String? = nil, value: [[String: Any]]? = nil) { self.value = value - self.definitionId = definitionId + self.namespace = namespace + + self.slug = slug } @@ -50,7 +56,19 @@ public extension PlatformClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + namespace = try container.decode(String.self, forKey: .namespace) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -72,7 +90,12 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(namespace, forKey: .namespace) + + + + + try? container.encodeIfPresent(slug, forKey: .slug) } @@ -93,22 +116,28 @@ public extension PlatformClient.ApplicationClient.Content { public var value: [[String: Any]]? - public var definitionId: String? + public var namespace: String? + + public var slug: String? public enum CodingKeys: String, CodingKey { case value = "value" - case definitionId = "definition_id" + case namespace = "namespace" + + case slug = "slug" } - public init(definitionId: String? = nil, value: [[String: Any]]? = nil) { + public init(namespace: String? = nil, slug: String? = nil, value: [[String: Any]]? = nil) { self.value = value - self.definitionId = definitionId + self.namespace = namespace + + self.slug = slug } @@ -129,7 +158,19 @@ public extension PlatformClient.ApplicationClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + namespace = try container.decode(String.self, forKey: .namespace) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -151,7 +192,12 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(namespace, forKey: .namespace) + + + + + try? container.encodeIfPresent(slug, forKey: .slug) } diff --git a/Sources/code/platform/Models/Content/CustomFieldDefinitionDetailResSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomFieldDefinitionDetailResSchemaContentPlatformModel.swift index c5e5904d01..8fc9039e19 100644 --- a/Sources/code/platform/Models/Content/CustomFieldDefinitionDetailResSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomFieldDefinitionDetailResSchemaContentPlatformModel.swift @@ -12,15 +12,13 @@ public extension PlatformClient.Content { class CustomFieldDefinitionDetailResSchema: Codable { - public var creator: String? - public var resource: String? public var name: String? public var namespace: String? - public var key: String? + public var slug: String? public var description: String? @@ -32,10 +30,6 @@ public extension PlatformClient.Content { public var applicationId: String? - public var createdBy: String? - - public var updatedBy: String? - public var required: Bool? public var isDeleted: Bool? @@ -51,15 +45,13 @@ public extension PlatformClient.Content { public enum CodingKeys: String, CodingKey { - case creator = "creator" - case resource = "resource" case name = "name" case namespace = "namespace" - case key = "key" + case slug = "slug" case description = "description" @@ -71,15 +63,11 @@ public extension PlatformClient.Content { case applicationId = "application_id" - case createdBy = "created_by" - - case updatedBy = "updated_by" - case required = "required" case isDeleted = "is_deleted" - case id = "_id" + case id = "id" case validations = "validations" @@ -89,9 +77,7 @@ public extension PlatformClient.Content { } - public init(applicationId: String? = nil, companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, creator: String? = nil, description: String? = nil, isDeleted: Bool? = nil, key: String? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, type: String? = nil, updatedAt: String? = nil, updatedBy: String? = nil, validations: [[String: Any]]? = nil, id: String? = nil) { - - self.creator = creator + public init(applicationId: String? = nil, companyId: String? = nil, createdAt: String? = nil, description: String? = nil, id: String? = nil, isDeleted: Bool? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, slug: String? = nil, type: String? = nil, updatedAt: String? = nil, validations: [[String: Any]]? = nil) { self.resource = resource @@ -99,7 +85,7 @@ public extension PlatformClient.Content { self.namespace = namespace - self.key = key + self.slug = slug self.description = description @@ -111,10 +97,6 @@ public extension PlatformClient.Content { self.applicationId = applicationId - self.createdBy = createdBy - - self.updatedBy = updatedBy - self.required = required self.isDeleted = isDeleted @@ -133,18 +115,6 @@ public extension PlatformClient.Content { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { resource = try container.decode(String.self, forKey: .resource) @@ -182,7 +152,7 @@ public extension PlatformClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -253,30 +223,6 @@ public extension PlatformClient.Content { - do { - createdBy = try container.decode(String.self, forKey: .createdBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - updatedBy = try container.decode(String.self, forKey: .updatedBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { required = try container.decode(Bool.self, forKey: .required) @@ -355,11 +301,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - try? container.encodeIfPresent(resource, forKey: .resource) @@ -375,7 +316,7 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -405,16 +346,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - - - - try? container.encodeIfPresent(updatedBy, forKey: .updatedBy) - - - - try? container.encodeIfPresent(required, forKey: .required) @@ -459,15 +390,13 @@ public extension PlatformClient.ApplicationClient.Content { class CustomFieldDefinitionDetailResSchema: Codable { - public var creator: String? - public var resource: String? public var name: String? public var namespace: String? - public var key: String? + public var slug: String? public var description: String? @@ -479,10 +408,6 @@ public extension PlatformClient.ApplicationClient.Content { public var applicationId: String? - public var createdBy: String? - - public var updatedBy: String? - public var required: Bool? public var isDeleted: Bool? @@ -498,15 +423,13 @@ public extension PlatformClient.ApplicationClient.Content { public enum CodingKeys: String, CodingKey { - case creator = "creator" - case resource = "resource" case name = "name" case namespace = "namespace" - case key = "key" + case slug = "slug" case description = "description" @@ -518,15 +441,11 @@ public extension PlatformClient.ApplicationClient.Content { case applicationId = "application_id" - case createdBy = "created_by" - - case updatedBy = "updated_by" - case required = "required" case isDeleted = "is_deleted" - case id = "_id" + case id = "id" case validations = "validations" @@ -536,9 +455,7 @@ public extension PlatformClient.ApplicationClient.Content { } - public init(applicationId: String? = nil, companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, creator: String? = nil, description: String? = nil, isDeleted: Bool? = nil, key: String? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, type: String? = nil, updatedAt: String? = nil, updatedBy: String? = nil, validations: [[String: Any]]? = nil, id: String? = nil) { - - self.creator = creator + public init(applicationId: String? = nil, companyId: String? = nil, createdAt: String? = nil, description: String? = nil, id: String? = nil, isDeleted: Bool? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, slug: String? = nil, type: String? = nil, updatedAt: String? = nil, validations: [[String: Any]]? = nil) { self.resource = resource @@ -546,7 +463,7 @@ public extension PlatformClient.ApplicationClient.Content { self.namespace = namespace - self.key = key + self.slug = slug self.description = description @@ -558,10 +475,6 @@ public extension PlatformClient.ApplicationClient.Content { self.applicationId = applicationId - self.createdBy = createdBy - - self.updatedBy = updatedBy - self.required = required self.isDeleted = isDeleted @@ -580,18 +493,6 @@ public extension PlatformClient.ApplicationClient.Content { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { resource = try container.decode(String.self, forKey: .resource) @@ -629,7 +530,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -700,30 +601,6 @@ public extension PlatformClient.ApplicationClient.Content { - do { - createdBy = try container.decode(String.self, forKey: .createdBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - updatedBy = try container.decode(String.self, forKey: .updatedBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { required = try container.decode(Bool.self, forKey: .required) @@ -802,11 +679,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - try? container.encodeIfPresent(resource, forKey: .resource) @@ -822,7 +694,7 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -852,16 +724,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - - - - try? container.encodeIfPresent(updatedBy, forKey: .updatedBy) - - - - try? container.encodeIfPresent(required, forKey: .required) diff --git a/Sources/code/platform/Models/Content/CustomFieldDefinitionRequestSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomFieldDefinitionRequestSchemaContentPlatformModel.swift index 19f6b69a59..965fde747c 100644 --- a/Sources/code/platform/Models/Content/CustomFieldDefinitionRequestSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomFieldDefinitionRequestSchemaContentPlatformModel.swift @@ -12,11 +12,9 @@ public extension PlatformClient.Content { class CustomFieldDefinitionRequestSchema: Codable { - public var resource: String? - public var type: String? - public var key: String? + public var slug: String? public var namespace: String? @@ -31,11 +29,9 @@ public extension PlatformClient.Content { public enum CodingKeys: String, CodingKey { - case resource = "resource" - case type = "type" - case key = "key" + case slug = "slug" case namespace = "namespace" @@ -49,13 +45,11 @@ public extension PlatformClient.Content { } - public init(description: String? = nil, key: String? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, resource: String? = nil, type: String? = nil, validations: [FieldValidations]? = nil) { - - self.resource = resource + public init(description: String? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, slug: String? = nil, type: String? = nil, validations: [FieldValidations]? = nil) { self.type = type - self.key = key + self.slug = slug self.namespace = namespace @@ -73,18 +67,6 @@ public extension PlatformClient.Content { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - resource = try container.decode(String.self, forKey: .resource) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { type = try container.decode(String.self, forKey: .type) @@ -98,7 +80,7 @@ public extension PlatformClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -175,17 +157,12 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(resource, forKey: .resource) - - - - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -229,11 +206,9 @@ public extension PlatformClient.ApplicationClient.Content { class CustomFieldDefinitionRequestSchema: Codable { - public var resource: String? - public var type: String? - public var key: String? + public var slug: String? public var namespace: String? @@ -248,11 +223,9 @@ public extension PlatformClient.ApplicationClient.Content { public enum CodingKeys: String, CodingKey { - case resource = "resource" - case type = "type" - case key = "key" + case slug = "slug" case namespace = "namespace" @@ -266,13 +239,11 @@ public extension PlatformClient.ApplicationClient.Content { } - public init(description: String? = nil, key: String? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, resource: String? = nil, type: String? = nil, validations: [FieldValidations]? = nil) { - - self.resource = resource + public init(description: String? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, slug: String? = nil, type: String? = nil, validations: [FieldValidations]? = nil) { self.type = type - self.key = key + self.slug = slug self.namespace = namespace @@ -290,18 +261,6 @@ public extension PlatformClient.ApplicationClient.Content { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - resource = try container.decode(String.self, forKey: .resource) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { type = try container.decode(String.self, forKey: .type) @@ -315,7 +274,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -392,17 +351,12 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(resource, forKey: .resource) - - - - try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) diff --git a/Sources/code/platform/Models/Content/CustomFieldSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomFieldSchemaContentPlatformModel.swift index 24378dd72c..2c31545888 100644 --- a/Sources/code/platform/Models/Content/CustomFieldSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomFieldSchemaContentPlatformModel.swift @@ -16,15 +16,13 @@ public extension PlatformClient.Content { public var namespace: String? - public var key: String? + public var slug: String? public var resource: String? - public var creator: String? - public var value: [CustomFieldValue]? - public var resourceId: String? + public var resourceSlug: String? public var type: String? @@ -32,14 +30,10 @@ public extension PlatformClient.Content { public var companyId: String? - public var definitionId: String? - public var hasInvalidValues: Bool? public var invalidValueErrors: [[String: Any]]? - public var createdBy: String? - public var isDeleted: Bool? public var createdAt: String? @@ -49,19 +43,17 @@ public extension PlatformClient.Content { public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case namespace = "namespace" - case key = "key" + case slug = "slug" case resource = "resource" - case creator = "creator" - case value = "value" - case resourceId = "resource_id" + case resourceSlug = "resource_slug" case type = "type" @@ -69,14 +61,10 @@ public extension PlatformClient.Content { case companyId = "company_id" - case definitionId = "definition_id" - case hasInvalidValues = "has_invalid_values" case invalidValueErrors = "invalid_value_errors" - case createdBy = "created_by" - case isDeleted = "is_deleted" case createdAt = "created_at" @@ -85,21 +73,19 @@ public extension PlatformClient.Content { } - public init(companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, creator: String? = nil, definitionId: String? = nil, hasInvalidValues: Bool? = nil, invalidValueErrors: [[String: Any]]? = nil, isDeleted: Bool? = nil, key: String? = nil, multiValue: Bool? = nil, namespace: String? = nil, resource: String? = nil, resourceId: String? = nil, type: String? = nil, updatedAt: String? = nil, value: [CustomFieldValue]? = nil, id: String? = nil) { + public init(companyId: String? = nil, createdAt: String? = nil, hasInvalidValues: Bool? = nil, id: String? = nil, invalidValueErrors: [[String: Any]]? = nil, isDeleted: Bool? = nil, multiValue: Bool? = nil, namespace: String? = nil, resource: String? = nil, resourceSlug: String? = nil, slug: String? = nil, type: String? = nil, updatedAt: String? = nil, value: [CustomFieldValue]? = nil) { self.id = id self.namespace = namespace - self.key = key + self.slug = slug self.resource = resource - self.creator = creator - self.value = value - self.resourceId = resourceId + self.resourceSlug = resourceSlug self.type = type @@ -107,14 +93,10 @@ public extension PlatformClient.Content { self.companyId = companyId - self.definitionId = definitionId - self.hasInvalidValues = hasInvalidValues self.invalidValueErrors = invalidValueErrors - self.createdBy = createdBy - self.isDeleted = isDeleted self.createdAt = createdAt @@ -152,7 +134,7 @@ public extension PlatformClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -175,18 +157,6 @@ public extension PlatformClient.Content { - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { value = try container.decode([CustomFieldValue].self, forKey: .value) @@ -200,7 +170,7 @@ public extension PlatformClient.Content { do { - resourceId = try container.decode(String.self, forKey: .resourceId) + resourceSlug = try container.decode(String.self, forKey: .resourceSlug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -247,18 +217,6 @@ public extension PlatformClient.Content { - do { - definitionId = try container.decode(String.self, forKey: .definitionId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { hasInvalidValues = try container.decode(Bool.self, forKey: .hasInvalidValues) @@ -283,18 +241,6 @@ public extension PlatformClient.Content { - do { - createdBy = try container.decode(String.self, forKey: .createdBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { isDeleted = try container.decode(Bool.self, forKey: .isDeleted) @@ -347,7 +293,7 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -357,17 +303,12 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(resourceId, forKey: .resourceId) + try? container.encodeIfPresent(resourceSlug, forKey: .resourceSlug) @@ -387,11 +328,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(definitionId, forKey: .definitionId) - - - - try? container.encodeIfPresent(hasInvalidValues, forKey: .hasInvalidValues) @@ -402,11 +338,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - - - try? container.encodeIfPresent(isDeleted, forKey: .isDeleted) @@ -440,15 +371,13 @@ public extension PlatformClient.ApplicationClient.Content { public var namespace: String? - public var key: String? + public var slug: String? public var resource: String? - public var creator: String? - public var value: [CustomFieldValue]? - public var resourceId: String? + public var resourceSlug: String? public var type: String? @@ -456,14 +385,10 @@ public extension PlatformClient.ApplicationClient.Content { public var companyId: String? - public var definitionId: String? - public var hasInvalidValues: Bool? public var invalidValueErrors: [[String: Any]]? - public var createdBy: String? - public var isDeleted: Bool? public var createdAt: String? @@ -473,19 +398,17 @@ public extension PlatformClient.ApplicationClient.Content { public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case namespace = "namespace" - case key = "key" + case slug = "slug" case resource = "resource" - case creator = "creator" - case value = "value" - case resourceId = "resource_id" + case resourceSlug = "resource_slug" case type = "type" @@ -493,14 +416,10 @@ public extension PlatformClient.ApplicationClient.Content { case companyId = "company_id" - case definitionId = "definition_id" - case hasInvalidValues = "has_invalid_values" case invalidValueErrors = "invalid_value_errors" - case createdBy = "created_by" - case isDeleted = "is_deleted" case createdAt = "created_at" @@ -509,21 +428,19 @@ public extension PlatformClient.ApplicationClient.Content { } - public init(companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, creator: String? = nil, definitionId: String? = nil, hasInvalidValues: Bool? = nil, invalidValueErrors: [[String: Any]]? = nil, isDeleted: Bool? = nil, key: String? = nil, multiValue: Bool? = nil, namespace: String? = nil, resource: String? = nil, resourceId: String? = nil, type: String? = nil, updatedAt: String? = nil, value: [CustomFieldValue]? = nil, id: String? = nil) { + public init(companyId: String? = nil, createdAt: String? = nil, hasInvalidValues: Bool? = nil, id: String? = nil, invalidValueErrors: [[String: Any]]? = nil, isDeleted: Bool? = nil, multiValue: Bool? = nil, namespace: String? = nil, resource: String? = nil, resourceSlug: String? = nil, slug: String? = nil, type: String? = nil, updatedAt: String? = nil, value: [CustomFieldValue]? = nil) { self.id = id self.namespace = namespace - self.key = key + self.slug = slug self.resource = resource - self.creator = creator - self.value = value - self.resourceId = resourceId + self.resourceSlug = resourceSlug self.type = type @@ -531,14 +448,10 @@ public extension PlatformClient.ApplicationClient.Content { self.companyId = companyId - self.definitionId = definitionId - self.hasInvalidValues = hasInvalidValues self.invalidValueErrors = invalidValueErrors - self.createdBy = createdBy - self.isDeleted = isDeleted self.createdAt = createdAt @@ -576,7 +489,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -599,18 +512,6 @@ public extension PlatformClient.ApplicationClient.Content { - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { value = try container.decode([CustomFieldValue].self, forKey: .value) @@ -624,7 +525,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - resourceId = try container.decode(String.self, forKey: .resourceId) + resourceSlug = try container.decode(String.self, forKey: .resourceSlug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -671,18 +572,6 @@ public extension PlatformClient.ApplicationClient.Content { - do { - definitionId = try container.decode(String.self, forKey: .definitionId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { hasInvalidValues = try container.decode(Bool.self, forKey: .hasInvalidValues) @@ -707,18 +596,6 @@ public extension PlatformClient.ApplicationClient.Content { - do { - createdBy = try container.decode(String.self, forKey: .createdBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { isDeleted = try container.decode(Bool.self, forKey: .isDeleted) @@ -771,7 +648,7 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -781,17 +658,12 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(resourceId, forKey: .resourceId) + try? container.encodeIfPresent(resourceSlug, forKey: .resourceSlug) @@ -811,11 +683,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(definitionId, forKey: .definitionId) - - - - try? container.encodeIfPresent(hasInvalidValues, forKey: .hasInvalidValues) @@ -826,11 +693,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - - - try? container.encodeIfPresent(isDeleted, forKey: .isDeleted) diff --git a/Sources/code/platform/Models/Content/CustomFieldTypeSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomFieldTypeSchemaContentPlatformModel.swift index 0b8855372c..70e8308980 100644 --- a/Sources/code/platform/Models/Content/CustomFieldTypeSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomFieldTypeSchemaContentPlatformModel.swift @@ -38,6 +38,10 @@ public extension PlatformClient.Content { public var product: Product? + public var html: HTML? + + public var duration: Duration? + public enum CodingKeys: String, CodingKey { @@ -67,9 +71,13 @@ public extension PlatformClient.Content { case product = "product" + case html = "html" + + case duration = "duration" + } - public init(booleanType: BooleanType? = nil, date: Date? = nil, datetime: Datetime? = nil, dropdown: Dropdown? = nil, file: File? = nil, floatType: FloatType? = nil, integer: Integer? = nil, json: Json? = nil, metaobject: Metaobject? = nil, product: Product? = nil, stringMultiLine: StringMultiLine? = nil, stringSingleLine: StringSingleLine? = nil, url: Url? = nil) { + public init(booleanType: BooleanType? = nil, date: Date? = nil, datetime: Datetime? = nil, dropdown: Dropdown? = nil, duration: Duration? = nil, file: File? = nil, floatType: FloatType? = nil, html: HTML? = nil, integer: Integer? = nil, json: Json? = nil, metaobject: Metaobject? = nil, product: Product? = nil, stringMultiLine: StringMultiLine? = nil, stringSingleLine: StringSingleLine? = nil, url: Url? = nil) { self.stringSingleLine = stringSingleLine @@ -97,6 +105,10 @@ public extension PlatformClient.Content { self.product = product + self.html = html + + self.duration = duration + } required public init(from decoder: Decoder) throws { @@ -258,6 +270,30 @@ public extension PlatformClient.Content { } + + do { + html = try container.decode(HTML.self, forKey: .html) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + duration = try container.decode(Duration.self, forKey: .duration) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -328,6 +364,16 @@ public extension PlatformClient.Content { try? container.encodeIfPresent(product, forKey: .product) + + + try? container.encodeIfPresent(html, forKey: .html) + + + + + try? container.encodeIfPresent(duration, forKey: .duration) + + } } @@ -370,6 +416,10 @@ public extension PlatformClient.ApplicationClient.Content { public var product: Product? + public var html: HTML? + + public var duration: Duration? + public enum CodingKeys: String, CodingKey { @@ -399,9 +449,13 @@ public extension PlatformClient.ApplicationClient.Content { case product = "product" + case html = "html" + + case duration = "duration" + } - public init(booleanType: BooleanType? = nil, date: Date? = nil, datetime: Datetime? = nil, dropdown: Dropdown? = nil, file: File? = nil, floatType: FloatType? = nil, integer: Integer? = nil, json: Json? = nil, metaobject: Metaobject? = nil, product: Product? = nil, stringMultiLine: StringMultiLine? = nil, stringSingleLine: StringSingleLine? = nil, url: Url? = nil) { + public init(booleanType: BooleanType? = nil, date: Date? = nil, datetime: Datetime? = nil, dropdown: Dropdown? = nil, duration: Duration? = nil, file: File? = nil, floatType: FloatType? = nil, html: HTML? = nil, integer: Integer? = nil, json: Json? = nil, metaobject: Metaobject? = nil, product: Product? = nil, stringMultiLine: StringMultiLine? = nil, stringSingleLine: StringSingleLine? = nil, url: Url? = nil) { self.stringSingleLine = stringSingleLine @@ -429,6 +483,10 @@ public extension PlatformClient.ApplicationClient.Content { self.product = product + self.html = html + + self.duration = duration + } required public init(from decoder: Decoder) throws { @@ -590,6 +648,30 @@ public extension PlatformClient.ApplicationClient.Content { } + + do { + html = try container.decode(HTML.self, forKey: .html) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + duration = try container.decode(Duration.self, forKey: .duration) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -660,6 +742,16 @@ public extension PlatformClient.ApplicationClient.Content { try? container.encodeIfPresent(product, forKey: .product) + + + try? container.encodeIfPresent(html, forKey: .html) + + + + + try? container.encodeIfPresent(duration, forKey: .duration) + + } } diff --git a/Sources/code/platform/Models/Content/CustomFieldsDeleteSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomFieldsDeleteSchemaContentPlatformModel.swift new file mode 100644 index 0000000000..c07673ecaf --- /dev/null +++ b/Sources/code/platform/Models/Content/CustomFieldsDeleteSchemaContentPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Content { + /* + Model: CustomFieldsDeleteSchema + Used By: Content + */ + + class CustomFieldsDeleteSchema: Codable { + + + public var success: Bool? + + public var message: String? + + + public enum CodingKeys: String, CodingKey { + + case success = "success" + + case message = "message" + + } + + public init(message: String? = nil, success: Bool? = nil) { + + self.success = success + + self.message = message + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + message = try container.decode(String.self, forKey: .message) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Content { + /* + Model: CustomFieldsDeleteSchema + Used By: Content + */ + + class CustomFieldsDeleteSchema: Codable { + + + public var success: Bool? + + public var message: String? + + + public enum CodingKeys: String, CodingKey { + + case success = "success" + + case message = "message" + + } + + public init(message: String? = nil, success: Bool? = nil) { + + self.success = success + + self.message = message + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + message = try container.decode(String.self, forKey: .message) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Content/CustomObjectBulkEntryContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectBulkEntryContentPlatformModel.swift index 92ffce462a..03143b06bb 100644 --- a/Sources/code/platform/Models/Content/CustomObjectBulkEntryContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectBulkEntryContentPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Content { class CustomObjectBulkEntry: Codable { - public var items: [CustomObjectJobSchema]? + public var items: [JobSchema]? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.Content { } - public init(items: [CustomObjectJobSchema]? = nil, page: Page? = nil) { + public init(items: [JobSchema]? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.Content { do { - items = try container.decode([CustomObjectJobSchema].self, forKey: .items) + items = try container.decode([JobSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension PlatformClient.ApplicationClient.Content { class CustomObjectBulkEntry: Codable { - public var items: [CustomObjectJobSchema]? + public var items: [JobSchema]? public var page: Page? @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Content { } - public init(items: [CustomObjectJobSchema]? = nil, page: Page? = nil) { + public init(items: [JobSchema]? = nil, page: Page? = nil) { self.items = items @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - items = try container.decode([CustomObjectJobSchema].self, forKey: .items) + items = try container.decode([JobSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Content/CustomObjectByIdSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectBySlugSchemaContentPlatformModel.swift similarity index 69% rename from Sources/code/platform/Models/Content/CustomObjectByIdSchemaContentPlatformModel.swift rename to Sources/code/platform/Models/Content/CustomObjectBySlugSchemaContentPlatformModel.swift index c223126ae3..47ce06db9b 100644 --- a/Sources/code/platform/Models/Content/CustomObjectByIdSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectBySlugSchemaContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: CustomObjectByIdSchema + Model: CustomObjectBySlugSchema Used By: Content */ - class CustomObjectByIdSchema: Codable { + class CustomObjectBySlugSchema: Codable { public var id: String? @@ -18,16 +18,20 @@ public extension PlatformClient.Content { public var displayName: String? - public var definition: CustomObjectListItemDefinationSchema? + public var definition: CustomObjectListItemDefinitionModel? public var references: [[String: Any]]? - public var fields: [CustomObjectFieldSchema]? + public var slug: String? + + public var definitionSlug: String? + + public var fields: [CustomObjectFieldDefinition]? public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case status = "status" @@ -37,11 +41,15 @@ public extension PlatformClient.Content { case references = "references" + case slug = "slug" + + case definitionSlug = "definition_slug" + case fields = "fields" } - public init(definition: CustomObjectListItemDefinationSchema? = nil, displayName: String? = nil, fields: [CustomObjectFieldSchema]? = nil, references: [[String: Any]]? = nil, status: String? = nil, id: String? = nil) { + public init(definition: CustomObjectListItemDefinitionModel? = nil, definitionSlug: String? = nil, displayName: String? = nil, fields: [CustomObjectFieldDefinition]? = nil, id: String? = nil, references: [[String: Any]]? = nil, slug: String? = nil, status: String? = nil) { self.id = id @@ -53,6 +61,10 @@ public extension PlatformClient.Content { self.references = references + self.slug = slug + + self.definitionSlug = definitionSlug + self.fields = fields } @@ -98,7 +110,7 @@ public extension PlatformClient.Content { do { - definition = try container.decode(CustomObjectListItemDefinationSchema.self, forKey: .definition) + definition = try container.decode(CustomObjectListItemDefinitionModel.self, forKey: .definition) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +134,31 @@ public extension PlatformClient.Content { do { - fields = try container.decode([CustomObjectFieldSchema].self, forKey: .fields) + slug = try container.decode(String.self, forKey: .slug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + definitionSlug = try container.decode(String.self, forKey: .definitionSlug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + fields = try container.decode([CustomObjectFieldDefinition].self, forKey: .fields) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -164,6 +200,16 @@ public extension PlatformClient.Content { + try? container.encodeIfPresent(slug, forKey: .slug) + + + + + try? container.encodeIfPresent(definitionSlug, forKey: .definitionSlug) + + + + try? container.encodeIfPresent(fields, forKey: .fields) @@ -176,11 +222,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: CustomObjectByIdSchema + Model: CustomObjectBySlugSchema Used By: Content */ - class CustomObjectByIdSchema: Codable { + class CustomObjectBySlugSchema: Codable { public var id: String? @@ -189,16 +235,20 @@ public extension PlatformClient.ApplicationClient.Content { public var displayName: String? - public var definition: CustomObjectListItemDefinationSchema? + public var definition: CustomObjectListItemDefinitionModel? public var references: [[String: Any]]? - public var fields: [CustomObjectFieldSchema]? + public var slug: String? + + public var definitionSlug: String? + + public var fields: [CustomObjectFieldDefinition]? public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case status = "status" @@ -208,11 +258,15 @@ public extension PlatformClient.ApplicationClient.Content { case references = "references" + case slug = "slug" + + case definitionSlug = "definition_slug" + case fields = "fields" } - public init(definition: CustomObjectListItemDefinationSchema? = nil, displayName: String? = nil, fields: [CustomObjectFieldSchema]? = nil, references: [[String: Any]]? = nil, status: String? = nil, id: String? = nil) { + public init(definition: CustomObjectListItemDefinitionModel? = nil, definitionSlug: String? = nil, displayName: String? = nil, fields: [CustomObjectFieldDefinition]? = nil, id: String? = nil, references: [[String: Any]]? = nil, slug: String? = nil, status: String? = nil) { self.id = id @@ -224,6 +278,10 @@ public extension PlatformClient.ApplicationClient.Content { self.references = references + self.slug = slug + + self.definitionSlug = definitionSlug + self.fields = fields } @@ -269,7 +327,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - definition = try container.decode(CustomObjectListItemDefinationSchema.self, forKey: .definition) + definition = try container.decode(CustomObjectListItemDefinitionModel.self, forKey: .definition) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -293,7 +351,31 @@ public extension PlatformClient.ApplicationClient.Content { do { - fields = try container.decode([CustomObjectFieldSchema].self, forKey: .fields) + slug = try container.decode(String.self, forKey: .slug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + definitionSlug = try container.decode(String.self, forKey: .definitionSlug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + fields = try container.decode([CustomObjectFieldDefinition].self, forKey: .fields) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -335,6 +417,16 @@ public extension PlatformClient.ApplicationClient.Content { + try? container.encodeIfPresent(slug, forKey: .slug) + + + + + try? container.encodeIfPresent(definitionSlug, forKey: .definitionSlug) + + + + try? container.encodeIfPresent(fields, forKey: .fields) diff --git a/Sources/code/platform/Models/Content/CustomObjectCustomFieldDefinitionsContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectCustomFieldDefinitionsContentPlatformModel.swift index a11e8c3b66..ef8f250d6e 100644 --- a/Sources/code/platform/Models/Content/CustomObjectCustomFieldDefinitionsContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectCustomFieldDefinitionsContentPlatformModel.swift @@ -24,7 +24,7 @@ public extension PlatformClient.Content { public var required: Bool? - public var key: String? + public var slug: String? public var validations: [FieldValidations]? @@ -45,7 +45,7 @@ public extension PlatformClient.Content { case required = "required" - case key = "key" + case slug = "slug" case validations = "validations" @@ -53,7 +53,7 @@ public extension PlatformClient.Content { } - public init(action: String? = nil, description: String? = nil, id: String? = nil, key: String? = nil, multiValue: Bool? = nil, name: String? = nil, required: Bool? = nil, type: String? = nil, validations: [FieldValidations]? = nil) { + public init(action: String? = nil, description: String? = nil, id: String? = nil, multiValue: Bool? = nil, name: String? = nil, required: Bool? = nil, slug: String? = nil, type: String? = nil, validations: [FieldValidations]? = nil) { self.id = id @@ -67,7 +67,7 @@ public extension PlatformClient.Content { self.required = required - self.key = key + self.slug = slug self.validations = validations @@ -152,7 +152,7 @@ public extension PlatformClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -223,7 +223,7 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -264,7 +264,7 @@ public extension PlatformClient.ApplicationClient.Content { public var required: Bool? - public var key: String? + public var slug: String? public var validations: [FieldValidations]? @@ -285,7 +285,7 @@ public extension PlatformClient.ApplicationClient.Content { case required = "required" - case key = "key" + case slug = "slug" case validations = "validations" @@ -293,7 +293,7 @@ public extension PlatformClient.ApplicationClient.Content { } - public init(action: String? = nil, description: String? = nil, id: String? = nil, key: String? = nil, multiValue: Bool? = nil, name: String? = nil, required: Bool? = nil, type: String? = nil, validations: [FieldValidations]? = nil) { + public init(action: String? = nil, description: String? = nil, id: String? = nil, multiValue: Bool? = nil, name: String? = nil, required: Bool? = nil, slug: String? = nil, type: String? = nil, validations: [FieldValidations]? = nil) { self.id = id @@ -307,7 +307,7 @@ public extension PlatformClient.ApplicationClient.Content { self.required = required - self.key = key + self.slug = slug self.validations = validations @@ -392,7 +392,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -463,7 +463,7 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) diff --git a/Sources/code/platform/Models/Content/CustomObjectDefinitionRequestSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectDefinitionRequestSchemaContentPlatformModel.swift index f93f62b73c..b7989b5617 100644 --- a/Sources/code/platform/Models/Content/CustomObjectDefinitionRequestSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectDefinitionRequestSchemaContentPlatformModel.swift @@ -14,6 +14,8 @@ public extension PlatformClient.Content { public var type: String? + public var definitionSlug: String? + public var description: String? public var name: String? @@ -27,6 +29,8 @@ public extension PlatformClient.Content { case type = "type" + case definitionSlug = "definition_slug" + case description = "description" case name = "name" @@ -37,10 +41,12 @@ public extension PlatformClient.Content { } - public init(description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomObjectCustomFieldDefinitions]? = nil, name: String? = nil, type: String? = nil) { + public init(definitionSlug: String? = nil, description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomObjectCustomFieldDefinitions]? = nil, name: String? = nil, type: String? = nil) { self.type = type + self.definitionSlug = definitionSlug + self.description = description self.name = name @@ -67,6 +73,18 @@ public extension PlatformClient.Content { + do { + definitionSlug = try container.decode(String.self, forKey: .definitionSlug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { description = try container.decode(String.self, forKey: .description) @@ -126,6 +144,11 @@ public extension PlatformClient.Content { + try? container.encodeIfPresent(definitionSlug, forKey: .definitionSlug) + + + + try? container.encodeIfPresent(description, forKey: .description) @@ -162,6 +185,8 @@ public extension PlatformClient.ApplicationClient.Content { public var type: String? + public var definitionSlug: String? + public var description: String? public var name: String? @@ -175,6 +200,8 @@ public extension PlatformClient.ApplicationClient.Content { case type = "type" + case definitionSlug = "definition_slug" + case description = "description" case name = "name" @@ -185,10 +212,12 @@ public extension PlatformClient.ApplicationClient.Content { } - public init(description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomObjectCustomFieldDefinitions]? = nil, name: String? = nil, type: String? = nil) { + public init(definitionSlug: String? = nil, description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomObjectCustomFieldDefinitions]? = nil, name: String? = nil, type: String? = nil) { self.type = type + self.definitionSlug = definitionSlug + self.description = description self.name = name @@ -215,6 +244,18 @@ public extension PlatformClient.ApplicationClient.Content { + do { + definitionSlug = try container.decode(String.self, forKey: .definitionSlug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { description = try container.decode(String.self, forKey: .description) @@ -274,6 +315,11 @@ public extension PlatformClient.ApplicationClient.Content { + try? container.encodeIfPresent(definitionSlug, forKey: .definitionSlug) + + + + try? container.encodeIfPresent(description, forKey: .description) diff --git a/Sources/code/platform/Models/Content/CustomObjectDefinitionSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectDefinitionSlugSchemaContentPlatformModel.swift similarity index 69% rename from Sources/code/platform/Models/Content/CustomObjectDefinitionSchemaContentPlatformModel.swift rename to Sources/code/platform/Models/Content/CustomObjectDefinitionSlugSchemaContentPlatformModel.swift index 4e50de61ab..5212434060 100644 --- a/Sources/code/platform/Models/Content/CustomObjectDefinitionSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectDefinitionSlugSchemaContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: CustomObjectDefinitionSchema + Model: CustomObjectDefinitionSlugSchema Used By: Content */ - class CustomObjectDefinitionSchema: Codable { + class CustomObjectDefinitionSlugSchema: Codable { public var id: String? @@ -18,42 +18,34 @@ public extension PlatformClient.Content { public var type: String? + public var definitionSlug: String? + public var displayNameKey: String? public var description: String? - public var creator: String? - - public var createdBy: String? - - public var updatedBy: String? - - public var fieldDefinitions: [CustomObjectCustomFieldDefinitionResSchema]? + public var fieldDefinitions: [CustomFieldDefinitionDetailResSchema]? public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case name = "name" case type = "type" + case definitionSlug = "definition_slug" + case displayNameKey = "display_name_key" case description = "description" - case creator = "creator" - - case createdBy = "created_by" - - case updatedBy = "updated_by" - case fieldDefinitions = "field_definitions" } - public init(createdBy: String? = nil, creator: String? = nil, description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomObjectCustomFieldDefinitionResSchema]? = nil, name: String? = nil, type: String? = nil, updatedBy: String? = nil, id: String? = nil) { + public init(definitionSlug: String? = nil, description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomFieldDefinitionDetailResSchema]? = nil, id: String? = nil, name: String? = nil, type: String? = nil) { self.id = id @@ -61,16 +53,12 @@ public extension PlatformClient.Content { self.type = type + self.definitionSlug = definitionSlug + self.displayNameKey = displayNameKey self.description = description - self.creator = creator - - self.createdBy = createdBy - - self.updatedBy = updatedBy - self.fieldDefinitions = fieldDefinitions } @@ -116,31 +104,7 @@ public extension PlatformClient.Content { do { - displayNameKey = try container.decode(String.self, forKey: .displayNameKey) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - creator = try container.decode(String.self, forKey: .creator) + definitionSlug = try container.decode(String.self, forKey: .definitionSlug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -152,7 +116,7 @@ public extension PlatformClient.Content { do { - createdBy = try container.decode(String.self, forKey: .createdBy) + displayNameKey = try container.decode(String.self, forKey: .displayNameKey) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -164,7 +128,7 @@ public extension PlatformClient.Content { do { - updatedBy = try container.decode(String.self, forKey: .updatedBy) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +140,7 @@ public extension PlatformClient.Content { do { - fieldDefinitions = try container.decode([CustomObjectCustomFieldDefinitionResSchema].self, forKey: .fieldDefinitions) + fieldDefinitions = try container.decode([CustomFieldDefinitionDetailResSchema].self, forKey: .fieldDefinitions) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -208,27 +172,17 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(displayNameKey, forKey: .displayNameKey) - - - - - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(definitionSlug, forKey: .definitionSlug) - try? container.encodeIfPresent(creator, forKey: .creator) - - - - - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(displayNameKey, forKey: .displayNameKey) - try? container.encodeIfPresent(updatedBy, forKey: .updatedBy) + try? container.encodeIfPresent(description, forKey: .description) @@ -245,11 +199,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: CustomObjectDefinitionSchema + Model: CustomObjectDefinitionSlugSchema Used By: Content */ - class CustomObjectDefinitionSchema: Codable { + class CustomObjectDefinitionSlugSchema: Codable { public var id: String? @@ -258,42 +212,34 @@ public extension PlatformClient.ApplicationClient.Content { public var type: String? + public var definitionSlug: String? + public var displayNameKey: String? public var description: String? - public var creator: String? - - public var createdBy: String? - - public var updatedBy: String? - - public var fieldDefinitions: [CustomObjectCustomFieldDefinitionResSchema]? + public var fieldDefinitions: [CustomFieldDefinitionDetailResSchema]? public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case name = "name" case type = "type" + case definitionSlug = "definition_slug" + case displayNameKey = "display_name_key" case description = "description" - case creator = "creator" - - case createdBy = "created_by" - - case updatedBy = "updated_by" - case fieldDefinitions = "field_definitions" } - public init(createdBy: String? = nil, creator: String? = nil, description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomObjectCustomFieldDefinitionResSchema]? = nil, name: String? = nil, type: String? = nil, updatedBy: String? = nil, id: String? = nil) { + public init(definitionSlug: String? = nil, description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomFieldDefinitionDetailResSchema]? = nil, id: String? = nil, name: String? = nil, type: String? = nil) { self.id = id @@ -301,16 +247,12 @@ public extension PlatformClient.ApplicationClient.Content { self.type = type + self.definitionSlug = definitionSlug + self.displayNameKey = displayNameKey self.description = description - self.creator = creator - - self.createdBy = createdBy - - self.updatedBy = updatedBy - self.fieldDefinitions = fieldDefinitions } @@ -356,31 +298,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - displayNameKey = try container.decode(String.self, forKey: .displayNameKey) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - creator = try container.decode(String.self, forKey: .creator) + definitionSlug = try container.decode(String.self, forKey: .definitionSlug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -392,7 +310,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - createdBy = try container.decode(String.self, forKey: .createdBy) + displayNameKey = try container.decode(String.self, forKey: .displayNameKey) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -404,7 +322,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - updatedBy = try container.decode(String.self, forKey: .updatedBy) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -416,7 +334,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - fieldDefinitions = try container.decode([CustomObjectCustomFieldDefinitionResSchema].self, forKey: .fieldDefinitions) + fieldDefinitions = try container.decode([CustomFieldDefinitionDetailResSchema].self, forKey: .fieldDefinitions) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -448,27 +366,17 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(displayNameKey, forKey: .displayNameKey) - - - - - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(definitionSlug, forKey: .definitionSlug) - try? container.encodeIfPresent(creator, forKey: .creator) - - - - - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(displayNameKey, forKey: .displayNameKey) - try? container.encodeIfPresent(updatedBy, forKey: .updatedBy) + try? container.encodeIfPresent(description, forKey: .description) diff --git a/Sources/code/platform/Models/Content/CustomObjectDefinitionUpdateRequestSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectDefinitionUpdateRequestSchemaContentPlatformModel.swift index 05e20e24a8..15d30156e4 100644 --- a/Sources/code/platform/Models/Content/CustomObjectDefinitionUpdateRequestSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectDefinitionUpdateRequestSchemaContentPlatformModel.swift @@ -12,8 +12,6 @@ public extension PlatformClient.Content { class CustomObjectDefinitionUpdateRequestSchema: Codable { - public var type: String? - public var description: String? public var name: String? @@ -25,8 +23,6 @@ public extension PlatformClient.Content { public enum CodingKeys: String, CodingKey { - case type = "type" - case description = "description" case name = "name" @@ -37,9 +33,7 @@ public extension PlatformClient.Content { } - public init(description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomObjectCustomFieldDefinitions]? = nil, name: String? = nil, type: String? = nil) { - - self.type = type + public init(description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomObjectCustomFieldDefinitions]? = nil, name: String? = nil) { self.description = description @@ -55,18 +49,6 @@ public extension PlatformClient.Content { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - type = try container.decode(String.self, forKey: .type) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { description = try container.decode(String.self, forKey: .description) @@ -121,11 +103,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(type, forKey: .type) - - - - try? container.encodeIfPresent(description, forKey: .description) @@ -160,8 +137,6 @@ public extension PlatformClient.ApplicationClient.Content { class CustomObjectDefinitionUpdateRequestSchema: Codable { - public var type: String? - public var description: String? public var name: String? @@ -173,8 +148,6 @@ public extension PlatformClient.ApplicationClient.Content { public enum CodingKeys: String, CodingKey { - case type = "type" - case description = "description" case name = "name" @@ -185,9 +158,7 @@ public extension PlatformClient.ApplicationClient.Content { } - public init(description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomObjectCustomFieldDefinitions]? = nil, name: String? = nil, type: String? = nil) { - - self.type = type + public init(description: String? = nil, displayNameKey: String? = nil, fieldDefinitions: [CustomObjectCustomFieldDefinitions]? = nil, name: String? = nil) { self.description = description @@ -203,18 +174,6 @@ public extension PlatformClient.ApplicationClient.Content { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - type = try container.decode(String.self, forKey: .type) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { description = try container.decode(String.self, forKey: .description) @@ -269,11 +228,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(type, forKey: .type) - - - - try? container.encodeIfPresent(description, forKey: .description) diff --git a/Sources/code/platform/Models/Content/CustomObjectEntryBulkUploadResponseContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectEntryBulkUploadDetailsContentPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Content/CustomObjectEntryBulkUploadResponseContentPlatformModel.swift rename to Sources/code/platform/Models/Content/CustomObjectEntryBulkUploadDetailsContentPlatformModel.swift index f9a32f637b..fb72d506b5 100644 --- a/Sources/code/platform/Models/Content/CustomObjectEntryBulkUploadResponseContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectEntryBulkUploadDetailsContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: CustomObjectEntryBulkUploadResponse + Model: CustomObjectEntryBulkUploadDetails Used By: Content */ - class CustomObjectEntryBulkUploadResponse: Codable { + class CustomObjectEntryBulkUploadDetails: Codable { public var url: String? @@ -84,11 +84,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: CustomObjectEntryBulkUploadResponse + Model: CustomObjectEntryBulkUploadDetails Used By: Content */ - class CustomObjectEntryBulkUploadResponse: Codable { + class CustomObjectEntryBulkUploadDetails: Codable { public var url: String? diff --git a/Sources/code/platform/Models/Content/CustomObjectEntryContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectEntryContentPlatformModel.swift index e34d78cd83..f41d58aaca 100644 --- a/Sources/code/platform/Models/Content/CustomObjectEntryContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectEntryContentPlatformModel.swift @@ -27,7 +27,7 @@ public extension PlatformClient.Content { public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case name = "name" @@ -41,7 +41,7 @@ public extension PlatformClient.Content { } - public init(entriesCount: Int? = nil, fieldsCount: Int? = nil, name: String? = nil, type: String? = nil, updatedAt: String? = nil, id: String? = nil) { + public init(entriesCount: Int? = nil, fieldsCount: Int? = nil, id: String? = nil, name: String? = nil, type: String? = nil, updatedAt: String? = nil) { self.id = id @@ -198,7 +198,7 @@ public extension PlatformClient.ApplicationClient.Content { public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case name = "name" @@ -212,7 +212,7 @@ public extension PlatformClient.ApplicationClient.Content { } - public init(entriesCount: Int? = nil, fieldsCount: Int? = nil, name: String? = nil, type: String? = nil, updatedAt: String? = nil, id: String? = nil) { + public init(entriesCount: Int? = nil, fieldsCount: Int? = nil, id: String? = nil, name: String? = nil, type: String? = nil, updatedAt: String? = nil) { self.id = id diff --git a/Sources/code/platform/Models/Content/CustomObjectEntryFieldSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectEntryFieldSchemaContentPlatformModel.swift index 15f6e29961..9fc62e4958 100644 --- a/Sources/code/platform/Models/Content/CustomObjectEntryFieldSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectEntryFieldSchemaContentPlatformModel.swift @@ -12,24 +12,24 @@ public extension PlatformClient.Content { class CustomObjectEntryFieldSchema: Codable { - public var definitionId: String? + public var namespace: String? - public var value: [[String: Any]]? + public var slug: String? public enum CodingKeys: String, CodingKey { - case definitionId = "definition_id" + case namespace = "namespace" - case value = "value" + case slug = "slug" } - public init(definitionId: String? = nil, value: [[String: Any]]? = nil) { + public init(namespace: String? = nil, slug: String? = nil) { - self.definitionId = definitionId + self.namespace = namespace - self.value = value + self.slug = slug } @@ -38,7 +38,7 @@ public extension PlatformClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + namespace = try container.decode(String.self, forKey: .namespace) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient.Content { do { - value = try container.decode([[String: Any]].self, forKey: .value) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -67,12 +67,12 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(namespace, forKey: .namespace) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(slug, forKey: .slug) } @@ -91,24 +91,24 @@ public extension PlatformClient.ApplicationClient.Content { class CustomObjectEntryFieldSchema: Codable { - public var definitionId: String? + public var namespace: String? - public var value: [[String: Any]]? + public var slug: String? public enum CodingKeys: String, CodingKey { - case definitionId = "definition_id" + case namespace = "namespace" - case value = "value" + case slug = "slug" } - public init(definitionId: String? = nil, value: [[String: Any]]? = nil) { + public init(namespace: String? = nil, slug: String? = nil) { - self.definitionId = definitionId + self.namespace = namespace - self.value = value + self.slug = slug } @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + namespace = try container.decode(String.self, forKey: .namespace) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -129,7 +129,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - value = try container.decode([[String: Any]].self, forKey: .value) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,12 +146,12 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(namespace, forKey: .namespace) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(slug, forKey: .slug) } diff --git a/Sources/code/platform/Models/Order/AmountSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectEntryFieldSchemaWithoutIDContentPlatformModel.swift similarity index 71% rename from Sources/code/platform/Models/Order/AmountSchemaOrderPlatformModel.swift rename to Sources/code/platform/Models/Content/CustomObjectEntryFieldSchemaWithoutIDContentPlatformModel.swift index 32fbbdeb92..c709dec868 100644 --- a/Sources/code/platform/Models/Order/AmountSchemaOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectEntryFieldSchemaWithoutIDContentPlatformModel.swift @@ -3,31 +3,31 @@ import Foundation -public extension PlatformClient.Order { +public extension PlatformClient.Content { /* - Model: AmountSchema - Used By: Order + Model: CustomObjectEntryFieldSchemaWithoutID + Used By: Content */ - class AmountSchema: Codable { + class CustomObjectEntryFieldSchemaWithoutID: Codable { - public var currency: String? + public var slug: String? - public var value: Double? + public var value: [String: Any]? public enum CodingKeys: String, CodingKey { - case currency = "currency" + case slug = "slug" case value = "value" } - public init(currency: String? = nil, value: Double? = nil) { + public init(slug: String? = nil, value: [String: Any]? = nil) { - self.currency = currency + self.slug = slug self.value = value @@ -38,7 +38,7 @@ public extension PlatformClient.Order { do { - currency = try container.decode(String.self, forKey: .currency) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient.Order { do { - value = try container.decode(Double.self, forKey: .value) + value = try container.decode([String: Any].self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -67,7 +67,7 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -82,31 +82,31 @@ public extension PlatformClient.Order { -public extension PlatformClient.ApplicationClient.Order { +public extension PlatformClient.ApplicationClient.Content { /* - Model: AmountSchema - Used By: Order + Model: CustomObjectEntryFieldSchemaWithoutID + Used By: Content */ - class AmountSchema: Codable { + class CustomObjectEntryFieldSchemaWithoutID: Codable { - public var currency: String? + public var slug: String? - public var value: Double? + public var value: [String: Any]? public enum CodingKeys: String, CodingKey { - case currency = "currency" + case slug = "slug" case value = "value" } - public init(currency: String? = nil, value: Double? = nil) { + public init(slug: String? = nil, value: [String: Any]? = nil) { - self.currency = currency + self.slug = slug self.value = value @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - currency = try container.decode(String.self, forKey: .currency) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -129,7 +129,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - value = try container.decode(Double.self, forKey: .value) + value = try container.decode([String: Any].self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(currency, forKey: .currency) + try? container.encodeIfPresent(slug, forKey: .slug) diff --git a/Sources/code/platform/Models/Content/CustomObjectFieldSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectFieldDefinitionContentPlatformModel.swift similarity index 81% rename from Sources/code/platform/Models/Content/CustomObjectFieldSchemaContentPlatformModel.swift rename to Sources/code/platform/Models/Content/CustomObjectFieldDefinitionContentPlatformModel.swift index a4450a5845..93f3e4c595 100644 --- a/Sources/code/platform/Models/Content/CustomObjectFieldSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectFieldDefinitionContentPlatformModel.swift @@ -5,50 +5,50 @@ import Foundation public extension PlatformClient.Content { /* - Model: CustomObjectFieldSchema + Model: CustomObjectFieldDefinition Used By: Content */ - class CustomObjectFieldSchema: Codable { + class CustomObjectFieldDefinition: Codable { public var id: String? - public var key: String? + public var slug: String? + + public var namespace: String? public var value: [[String: Any]]? public var type: String? - public var definitionId: String? - public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" - case key = "key" + case slug = "slug" + + case namespace = "namespace" case value = "value" case type = "type" - case definitionId = "definition_id" - } - public init(definitionId: String? = nil, key: String? = nil, type: String? = nil, value: [[String: Any]]? = nil, id: String? = nil) { + public init(id: String? = nil, namespace: String? = nil, slug: String? = nil, type: String? = nil, value: [[String: Any]]? = nil) { self.id = id - self.key = key + self.slug = slug + + self.namespace = namespace self.value = value self.type = type - self.definitionId = definitionId - } required public init(from decoder: Decoder) throws { @@ -68,7 +68,7 @@ public extension PlatformClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -80,7 +80,7 @@ public extension PlatformClient.Content { do { - value = try container.decode([[String: Any]].self, forKey: .value) + namespace = try container.decode(String.self, forKey: .namespace) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +92,7 @@ public extension PlatformClient.Content { do { - type = try container.decode(String.self, forKey: .type) + value = try container.decode([[String: Any]].self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +104,7 @@ public extension PlatformClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -126,22 +126,22 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(namespace, forKey: .namespace) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(type, forKey: .type) } @@ -153,50 +153,50 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: CustomObjectFieldSchema + Model: CustomObjectFieldDefinition Used By: Content */ - class CustomObjectFieldSchema: Codable { + class CustomObjectFieldDefinition: Codable { public var id: String? - public var key: String? + public var slug: String? + + public var namespace: String? public var value: [[String: Any]]? public var type: String? - public var definitionId: String? - public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" - case key = "key" + case slug = "slug" + + case namespace = "namespace" case value = "value" case type = "type" - case definitionId = "definition_id" - } - public init(definitionId: String? = nil, key: String? = nil, type: String? = nil, value: [[String: Any]]? = nil, id: String? = nil) { + public init(id: String? = nil, namespace: String? = nil, slug: String? = nil, type: String? = nil, value: [[String: Any]]? = nil) { self.id = id - self.key = key + self.slug = slug + + self.namespace = namespace self.value = value self.type = type - self.definitionId = definitionId - } required public init(from decoder: Decoder) throws { @@ -216,7 +216,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -228,7 +228,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - value = try container.decode([[String: Any]].self, forKey: .value) + namespace = try container.decode(String.self, forKey: .namespace) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -240,7 +240,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - type = try container.decode(String.self, forKey: .type) + value = try container.decode([[String: Any]].self, forKey: .value) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -252,7 +252,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -274,22 +274,22 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(namespace, forKey: .namespace) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(value, forKey: .value) - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(type, forKey: .type) } diff --git a/Sources/code/platform/Models/Content/CustomObjectListItemDefinationSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectListItemDefinitionModelContentPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Content/CustomObjectListItemDefinationSchemaContentPlatformModel.swift rename to Sources/code/platform/Models/Content/CustomObjectListItemDefinitionModelContentPlatformModel.swift index 8d3c0e1253..f7d624a798 100644 --- a/Sources/code/platform/Models/Content/CustomObjectListItemDefinationSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectListItemDefinitionModelContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: CustomObjectListItemDefinationSchema + Model: CustomObjectListItemDefinitionModel Used By: Content */ - class CustomObjectListItemDefinationSchema: Codable { + class CustomObjectListItemDefinitionModel: Codable { public var id: String? @@ -21,7 +21,7 @@ public extension PlatformClient.Content { public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case name = "name" @@ -29,7 +29,7 @@ public extension PlatformClient.Content { } - public init(name: String? = nil, type: String? = nil, id: String? = nil) { + public init(id: String? = nil, name: String? = nil, type: String? = nil) { self.id = id @@ -107,11 +107,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: CustomObjectListItemDefinationSchema + Model: CustomObjectListItemDefinitionModel Used By: Content */ - class CustomObjectListItemDefinationSchema: Codable { + class CustomObjectListItemDefinitionModel: Codable { public var id: String? @@ -123,7 +123,7 @@ public extension PlatformClient.ApplicationClient.Content { public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case name = "name" @@ -131,7 +131,7 @@ public extension PlatformClient.ApplicationClient.Content { } - public init(name: String? = nil, type: String? = nil, id: String? = nil) { + public init(id: String? = nil, name: String? = nil, type: String? = nil) { self.id = id diff --git a/Sources/code/platform/Models/Content/CustomObjectListItemSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectListItemSchemaContentPlatformModel.swift index 8536e0d334..cd21885d78 100644 --- a/Sources/code/platform/Models/Content/CustomObjectListItemSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectListItemSchemaContentPlatformModel.swift @@ -14,27 +14,27 @@ public extension PlatformClient.Content { public var id: String? - public var definitionId: String? - public var status: String? + public var createdAt: String? + public var updatedAt: String? public var displayName: String? - public var definition: CustomObjectListItemDefinationSchema? + public var definition: CustomObjectListItemDefinitionModel? public var references: Int? public enum CodingKeys: String, CodingKey { - case id = "_id" - - case definitionId = "definition_id" + case id = "id" case status = "status" + case createdAt = "created_at" + case updatedAt = "updated_at" case displayName = "display_name" @@ -45,14 +45,14 @@ public extension PlatformClient.Content { } - public init(definition: CustomObjectListItemDefinationSchema? = nil, definitionId: String? = nil, displayName: String? = nil, references: Int? = nil, status: String? = nil, updatedAt: String? = nil, id: String? = nil) { + public init(createdAt: String? = nil, definition: CustomObjectListItemDefinitionModel? = nil, displayName: String? = nil, id: String? = nil, references: Int? = nil, status: String? = nil, updatedAt: String? = nil) { self.id = id - self.definitionId = definitionId - self.status = status + self.createdAt = createdAt + self.updatedAt = updatedAt self.displayName = displayName @@ -80,7 +80,7 @@ public extension PlatformClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + status = try container.decode(String.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +92,7 @@ public extension PlatformClient.Content { do { - status = try container.decode(String.self, forKey: .status) + createdAt = try container.decode(String.self, forKey: .createdAt) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +128,7 @@ public extension PlatformClient.Content { do { - definition = try container.decode(CustomObjectListItemDefinationSchema.self, forKey: .definition) + definition = try container.decode(CustomObjectListItemDefinitionModel.self, forKey: .definition) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,12 +162,12 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(createdAt, forKey: .createdAt) @@ -208,27 +208,27 @@ public extension PlatformClient.ApplicationClient.Content { public var id: String? - public var definitionId: String? - public var status: String? + public var createdAt: String? + public var updatedAt: String? public var displayName: String? - public var definition: CustomObjectListItemDefinationSchema? + public var definition: CustomObjectListItemDefinitionModel? public var references: Int? public enum CodingKeys: String, CodingKey { - case id = "_id" - - case definitionId = "definition_id" + case id = "id" case status = "status" + case createdAt = "created_at" + case updatedAt = "updated_at" case displayName = "display_name" @@ -239,14 +239,14 @@ public extension PlatformClient.ApplicationClient.Content { } - public init(definition: CustomObjectListItemDefinationSchema? = nil, definitionId: String? = nil, displayName: String? = nil, references: Int? = nil, status: String? = nil, updatedAt: String? = nil, id: String? = nil) { + public init(createdAt: String? = nil, definition: CustomObjectListItemDefinitionModel? = nil, displayName: String? = nil, id: String? = nil, references: Int? = nil, status: String? = nil, updatedAt: String? = nil) { self.id = id - self.definitionId = definitionId - self.status = status + self.createdAt = createdAt + self.updatedAt = updatedAt self.displayName = displayName @@ -274,7 +274,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + status = try container.decode(String.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -286,7 +286,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - status = try container.decode(String.self, forKey: .status) + createdAt = try container.decode(String.self, forKey: .createdAt) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -322,7 +322,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - definition = try container.decode(CustomObjectListItemDefinationSchema.self, forKey: .definition) + definition = try container.decode(CustomObjectListItemDefinitionModel.self, forKey: .definition) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -356,12 +356,12 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(createdAt, forKey: .createdAt) diff --git a/Sources/code/platform/Models/Content/CustomObjectRequestSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectRequestSchemaContentPlatformModel.swift index 254d25e03c..277268fcc2 100644 --- a/Sources/code/platform/Models/Content/CustomObjectRequestSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectRequestSchemaContentPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.Content { public var status: String? - public var definitionId: String? + public var slug: String? public var fields: [CustomObjectEntryFieldSchema]? @@ -23,17 +23,17 @@ public extension PlatformClient.Content { case status = "status" - case definitionId = "definition_id" + case slug = "slug" case fields = "fields" } - public init(definitionId: String? = nil, fields: [CustomObjectEntryFieldSchema]? = nil, status: String? = nil) { + public init(fields: [CustomObjectEntryFieldSchema]? = nil, slug: String? = nil, status: String? = nil) { self.status = status - self.definitionId = definitionId + self.slug = slug self.fields = fields @@ -56,7 +56,7 @@ public extension PlatformClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -90,7 +90,7 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -116,7 +116,7 @@ public extension PlatformClient.ApplicationClient.Content { public var status: String? - public var definitionId: String? + public var slug: String? public var fields: [CustomObjectEntryFieldSchema]? @@ -125,17 +125,17 @@ public extension PlatformClient.ApplicationClient.Content { case status = "status" - case definitionId = "definition_id" + case slug = "slug" case fields = "fields" } - public init(definitionId: String? = nil, fields: [CustomObjectEntryFieldSchema]? = nil, status: String? = nil) { + public init(fields: [CustomObjectEntryFieldSchema]? = nil, slug: String? = nil, status: String? = nil) { self.status = status - self.definitionId = definitionId + self.slug = slug self.fields = fields @@ -158,7 +158,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -192,7 +192,7 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(slug, forKey: .slug) diff --git a/Sources/code/platform/Models/Content/CustomObjectRequestSchemaWithoutIdContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectRequestSchemaWithoutIdContentPlatformModel.swift new file mode 100644 index 0000000000..49c9b0be6b --- /dev/null +++ b/Sources/code/platform/Models/Content/CustomObjectRequestSchemaWithoutIdContentPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Content { + /* + Model: CustomObjectRequestSchemaWithoutId + Used By: Content + */ + + class CustomObjectRequestSchemaWithoutId: Codable { + + + public var status: String? + + public var fields: [CustomObjectEntryFieldSchemaWithoutID]? + + + public enum CodingKeys: String, CodingKey { + + case status = "status" + + case fields = "fields" + + } + + public init(fields: [CustomObjectEntryFieldSchemaWithoutID]? = nil, status: String? = nil) { + + self.status = status + + self.fields = fields + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + fields = try container.decode([CustomObjectEntryFieldSchemaWithoutID].self, forKey: .fields) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(status, forKey: .status) + + + + + try? container.encodeIfPresent(fields, forKey: .fields) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Content { + /* + Model: CustomObjectRequestSchemaWithoutId + Used By: Content + */ + + class CustomObjectRequestSchemaWithoutId: Codable { + + + public var status: String? + + public var fields: [CustomObjectEntryFieldSchemaWithoutID]? + + + public enum CodingKeys: String, CodingKey { + + case status = "status" + + case fields = "fields" + + } + + public init(fields: [CustomObjectEntryFieldSchemaWithoutID]? = nil, status: String? = nil) { + + self.status = status + + self.fields = fields + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + fields = try container.decode([CustomObjectEntryFieldSchemaWithoutID].self, forKey: .fields) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(status, forKey: .status) + + + + + try? container.encodeIfPresent(fields, forKey: .fields) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Content/CustomObjectSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/CustomObjectSchemaContentPlatformModel.swift index f8b9c74099..e8753492bb 100644 --- a/Sources/code/platform/Models/Content/CustomObjectSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/CustomObjectSchemaContentPlatformModel.swift @@ -14,74 +14,56 @@ public extension PlatformClient.Content { public var id: String? - public var creator: String? - public var companyId: String? public var applicationId: String? - public var createdBy: String? - - public var updatedBy: String? - public var status: String? public var type: String? - public var displayName: String? + public var definitionSlug: String? - public var definitionId: String? + public var displayName: String? public var fields: [CustomFieldSchema]? public enum CodingKeys: String, CodingKey { - case id = "_id" - - case creator = "creator" + case id = "id" case companyId = "company_id" case applicationId = "application_id" - case createdBy = "created_by" - - case updatedBy = "updated_by" - case status = "status" case type = "type" - case displayName = "display_name" + case definitionSlug = "definition_slug" - case definitionId = "definition_id" + case displayName = "display_name" case fields = "fields" } - public init(applicationId: String? = nil, companyId: String? = nil, createdBy: String? = nil, creator: String? = nil, definitionId: String? = nil, displayName: String? = nil, fields: [CustomFieldSchema]? = nil, status: String? = nil, type: String? = nil, updatedBy: String? = nil, id: String? = nil) { + public init(applicationId: String? = nil, companyId: String? = nil, definitionSlug: String? = nil, displayName: String? = nil, fields: [CustomFieldSchema]? = nil, id: String? = nil, status: String? = nil, type: String? = nil) { self.id = id - self.creator = creator - self.companyId = companyId self.applicationId = applicationId - self.createdBy = createdBy - - self.updatedBy = updatedBy - self.status = status self.type = type - self.displayName = displayName + self.definitionSlug = definitionSlug - self.definitionId = definitionId + self.displayName = displayName self.fields = fields @@ -103,18 +85,6 @@ public extension PlatformClient.Content { - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { companyId = try container.decode(String.self, forKey: .companyId) @@ -139,30 +109,6 @@ public extension PlatformClient.Content { - do { - createdBy = try container.decode(String.self, forKey: .createdBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - updatedBy = try container.decode(String.self, forKey: .updatedBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { status = try container.decode(String.self, forKey: .status) @@ -188,7 +134,7 @@ public extension PlatformClient.Content { do { - displayName = try container.decode(String.self, forKey: .displayName) + definitionSlug = try container.decode(String.self, forKey: .definitionSlug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -200,7 +146,7 @@ public extension PlatformClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + displayName = try container.decode(String.self, forKey: .displayName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -234,11 +180,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) @@ -249,16 +190,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - - - - try? container.encodeIfPresent(updatedBy, forKey: .updatedBy) - - - - try? container.encodeIfPresent(status, forKey: .status) @@ -269,12 +200,12 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(definitionSlug, forKey: .definitionSlug) - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(displayName, forKey: .displayName) @@ -300,74 +231,56 @@ public extension PlatformClient.ApplicationClient.Content { public var id: String? - public var creator: String? - public var companyId: String? public var applicationId: String? - public var createdBy: String? - - public var updatedBy: String? - public var status: String? public var type: String? - public var displayName: String? + public var definitionSlug: String? - public var definitionId: String? + public var displayName: String? public var fields: [CustomFieldSchema]? public enum CodingKeys: String, CodingKey { - case id = "_id" - - case creator = "creator" + case id = "id" case companyId = "company_id" case applicationId = "application_id" - case createdBy = "created_by" - - case updatedBy = "updated_by" - case status = "status" case type = "type" - case displayName = "display_name" + case definitionSlug = "definition_slug" - case definitionId = "definition_id" + case displayName = "display_name" case fields = "fields" } - public init(applicationId: String? = nil, companyId: String? = nil, createdBy: String? = nil, creator: String? = nil, definitionId: String? = nil, displayName: String? = nil, fields: [CustomFieldSchema]? = nil, status: String? = nil, type: String? = nil, updatedBy: String? = nil, id: String? = nil) { + public init(applicationId: String? = nil, companyId: String? = nil, definitionSlug: String? = nil, displayName: String? = nil, fields: [CustomFieldSchema]? = nil, id: String? = nil, status: String? = nil, type: String? = nil) { self.id = id - self.creator = creator - self.companyId = companyId self.applicationId = applicationId - self.createdBy = createdBy - - self.updatedBy = updatedBy - self.status = status self.type = type - self.displayName = displayName + self.definitionSlug = definitionSlug - self.definitionId = definitionId + self.displayName = displayName self.fields = fields @@ -389,18 +302,6 @@ public extension PlatformClient.ApplicationClient.Content { - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { companyId = try container.decode(String.self, forKey: .companyId) @@ -425,30 +326,6 @@ public extension PlatformClient.ApplicationClient.Content { - do { - createdBy = try container.decode(String.self, forKey: .createdBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - updatedBy = try container.decode(String.self, forKey: .updatedBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { status = try container.decode(String.self, forKey: .status) @@ -474,7 +351,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - displayName = try container.decode(String.self, forKey: .displayName) + definitionSlug = try container.decode(String.self, forKey: .definitionSlug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -486,7 +363,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - definitionId = try container.decode(String.self, forKey: .definitionId) + displayName = try container.decode(String.self, forKey: .displayName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -520,11 +397,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) @@ -535,16 +407,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - - - - try? container.encodeIfPresent(updatedBy, forKey: .updatedBy) - - - - try? container.encodeIfPresent(status, forKey: .status) @@ -555,12 +417,12 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(definitionSlug, forKey: .definitionSlug) - try? container.encodeIfPresent(definitionId, forKey: .definitionId) + try? container.encodeIfPresent(displayName, forKey: .displayName) diff --git a/Sources/code/platform/Models/Content/DefaultNavigationResponseContentPlatformModel.swift b/Sources/code/platform/Models/Content/DefaultNavigationDetailsContentPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Content/DefaultNavigationResponseContentPlatformModel.swift rename to Sources/code/platform/Models/Content/DefaultNavigationDetailsContentPlatformModel.swift index ccb3089fab..0bf92e9f31 100644 --- a/Sources/code/platform/Models/Content/DefaultNavigationResponseContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/DefaultNavigationDetailsContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: DefaultNavigationResponse + Model: DefaultNavigationDetails Used By: Content */ - class DefaultNavigationResponse: Codable { + class DefaultNavigationDetails: Codable { public var items: [NavigationSchema]? @@ -61,11 +61,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: DefaultNavigationResponse + Model: DefaultNavigationDetails Used By: Content */ - class DefaultNavigationResponse: Codable { + class DefaultNavigationDetails: Codable { public var items: [NavigationSchema]? diff --git a/Sources/code/platform/Models/Content/DurationContentPlatformModel.swift b/Sources/code/platform/Models/Content/DurationContentPlatformModel.swift new file mode 100644 index 0000000000..33152635dc --- /dev/null +++ b/Sources/code/platform/Models/Content/DurationContentPlatformModel.swift @@ -0,0 +1,300 @@ + + +import Foundation + + +public extension PlatformClient.Content { + /* + Model: Duration + Used By: Content + */ + + class Duration: Codable { + + + public var name: String? + + public var listEnabled: Bool? + + public var type: String? + + public var category: String? + + public var supportedValidations: [SupportedValidationsSchema]? + + + public enum CodingKeys: String, CodingKey { + + case name = "name" + + case listEnabled = "list_enabled" + + case type = "type" + + case category = "category" + + case supportedValidations = "supported_validations" + + } + + public init(category: String? = nil, listEnabled: Bool? = nil, name: String? = nil, supportedValidations: [SupportedValidationsSchema]? = nil, type: String? = nil) { + + self.name = name + + self.listEnabled = listEnabled + + self.type = type + + self.category = category + + self.supportedValidations = supportedValidations + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + listEnabled = try container.decode(Bool.self, forKey: .listEnabled) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + category = try container.decode(String.self, forKey: .category) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + supportedValidations = try container.decode([SupportedValidationsSchema].self, forKey: .supportedValidations) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(listEnabled, forKey: .listEnabled) + + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(category, forKey: .category) + + + + + try? container.encodeIfPresent(supportedValidations, forKey: .supportedValidations) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Content { + /* + Model: Duration + Used By: Content + */ + + class Duration: Codable { + + + public var name: String? + + public var listEnabled: Bool? + + public var type: String? + + public var category: String? + + public var supportedValidations: [SupportedValidationsSchema]? + + + public enum CodingKeys: String, CodingKey { + + case name = "name" + + case listEnabled = "list_enabled" + + case type = "type" + + case category = "category" + + case supportedValidations = "supported_validations" + + } + + public init(category: String? = nil, listEnabled: Bool? = nil, name: String? = nil, supportedValidations: [SupportedValidationsSchema]? = nil, type: String? = nil) { + + self.name = name + + self.listEnabled = listEnabled + + self.type = type + + self.category = category + + self.supportedValidations = supportedValidations + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + listEnabled = try container.decode(Bool.self, forKey: .listEnabled) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + category = try container.decode(String.self, forKey: .category) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + supportedValidations = try container.decode([SupportedValidationsSchema].self, forKey: .supportedValidations) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(listEnabled, forKey: .listEnabled) + + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(category, forKey: .category) + + + + + try? container.encodeIfPresent(supportedValidations, forKey: .supportedValidations) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Content/FieldDefinitionSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/FieldDefinitionSchemaContentPlatformModel.swift index c516431a02..33386458c0 100644 --- a/Sources/code/platform/Models/Content/FieldDefinitionSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/FieldDefinitionSchemaContentPlatformModel.swift @@ -14,15 +14,13 @@ public extension PlatformClient.Content { public var id: String? - public var creator: String? - public var resource: String? public var name: String? public var namespace: String? - public var key: String? + public var slug: String? public var description: String? @@ -34,18 +32,10 @@ public extension PlatformClient.Content { public var companyId: String? - public var createdBy: String? - - public var updatedBy: String? - public var required: Bool? public var isDeleted: Bool? - public var createdAt: String? - - public var updatedAt: String? - public var typeName: String? public var invalidFieldsCount: Int? @@ -53,9 +43,7 @@ public extension PlatformClient.Content { public enum CodingKeys: String, CodingKey { - case id = "_id" - - case creator = "creator" + case id = "id" case resource = "resource" @@ -63,7 +51,7 @@ public extension PlatformClient.Content { case namespace = "namespace" - case key = "key" + case slug = "slug" case description = "description" @@ -75,37 +63,27 @@ public extension PlatformClient.Content { case companyId = "company_id" - case createdBy = "created_by" - - case updatedBy = "updated_by" - case required = "required" case isDeleted = "is_deleted" - case createdAt = "created_at" - - case updatedAt = "updated_at" - case typeName = "type_name" case invalidFieldsCount = "invalid_fields_count" } - public init(companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, creator: String? = nil, description: String? = nil, invalidFieldsCount: Int? = nil, isDeleted: Bool? = nil, key: String? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, type: String? = nil, typeName: String? = nil, updatedAt: String? = nil, updatedBy: String? = nil, validations: [FieldValidations]? = nil, id: String? = nil) { + public init(companyId: String? = nil, description: String? = nil, id: String? = nil, invalidFieldsCount: Int? = nil, isDeleted: Bool? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, slug: String? = nil, type: String? = nil, typeName: String? = nil, validations: [FieldValidations]? = nil) { self.id = id - self.creator = creator - self.resource = resource self.name = name self.namespace = namespace - self.key = key + self.slug = slug self.description = description @@ -117,18 +95,10 @@ public extension PlatformClient.Content { self.companyId = companyId - self.createdBy = createdBy - - self.updatedBy = updatedBy - self.required = required self.isDeleted = isDeleted - self.createdAt = createdAt - - self.updatedAt = updatedAt - self.typeName = typeName self.invalidFieldsCount = invalidFieldsCount @@ -151,18 +121,6 @@ public extension PlatformClient.Content { - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { resource = try container.decode(String.self, forKey: .resource) @@ -200,7 +158,7 @@ public extension PlatformClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -271,30 +229,6 @@ public extension PlatformClient.Content { - do { - createdBy = try container.decode(String.self, forKey: .createdBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - updatedBy = try container.decode(String.self, forKey: .updatedBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { required = try container.decode(Bool.self, forKey: .required) @@ -319,30 +253,6 @@ public extension PlatformClient.Content { - do { - createdAt = try container.decode(String.self, forKey: .createdAt) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - updatedAt = try container.decode(String.self, forKey: .updatedAt) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { typeName = try container.decode(String.self, forKey: .typeName) @@ -378,11 +288,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - try? container.encodeIfPresent(resource, forKey: .resource) @@ -398,7 +303,7 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -428,16 +333,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - - - - try? container.encodeIfPresent(updatedBy, forKey: .updatedBy) - - - - try? container.encodeIfPresent(required, forKey: .required) @@ -448,16 +343,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(createdAt, forKey: .createdAt) - - - - - try? container.encodeIfPresent(updatedAt, forKey: .updatedAt) - - - - try? container.encodeIfPresent(typeName, forKey: .typeName) @@ -484,15 +369,13 @@ public extension PlatformClient.ApplicationClient.Content { public var id: String? - public var creator: String? - public var resource: String? public var name: String? public var namespace: String? - public var key: String? + public var slug: String? public var description: String? @@ -504,18 +387,10 @@ public extension PlatformClient.ApplicationClient.Content { public var companyId: String? - public var createdBy: String? - - public var updatedBy: String? - public var required: Bool? public var isDeleted: Bool? - public var createdAt: String? - - public var updatedAt: String? - public var typeName: String? public var invalidFieldsCount: Int? @@ -523,9 +398,7 @@ public extension PlatformClient.ApplicationClient.Content { public enum CodingKeys: String, CodingKey { - case id = "_id" - - case creator = "creator" + case id = "id" case resource = "resource" @@ -533,7 +406,7 @@ public extension PlatformClient.ApplicationClient.Content { case namespace = "namespace" - case key = "key" + case slug = "slug" case description = "description" @@ -545,37 +418,27 @@ public extension PlatformClient.ApplicationClient.Content { case companyId = "company_id" - case createdBy = "created_by" - - case updatedBy = "updated_by" - case required = "required" case isDeleted = "is_deleted" - case createdAt = "created_at" - - case updatedAt = "updated_at" - case typeName = "type_name" case invalidFieldsCount = "invalid_fields_count" } - public init(companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, creator: String? = nil, description: String? = nil, invalidFieldsCount: Int? = nil, isDeleted: Bool? = nil, key: String? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, type: String? = nil, typeName: String? = nil, updatedAt: String? = nil, updatedBy: String? = nil, validations: [FieldValidations]? = nil, id: String? = nil) { + public init(companyId: String? = nil, description: String? = nil, id: String? = nil, invalidFieldsCount: Int? = nil, isDeleted: Bool? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, slug: String? = nil, type: String? = nil, typeName: String? = nil, validations: [FieldValidations]? = nil) { self.id = id - self.creator = creator - self.resource = resource self.name = name self.namespace = namespace - self.key = key + self.slug = slug self.description = description @@ -587,18 +450,10 @@ public extension PlatformClient.ApplicationClient.Content { self.companyId = companyId - self.createdBy = createdBy - - self.updatedBy = updatedBy - self.required = required self.isDeleted = isDeleted - self.createdAt = createdAt - - self.updatedAt = updatedAt - self.typeName = typeName self.invalidFieldsCount = invalidFieldsCount @@ -621,18 +476,6 @@ public extension PlatformClient.ApplicationClient.Content { - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { resource = try container.decode(String.self, forKey: .resource) @@ -670,7 +513,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -741,30 +584,6 @@ public extension PlatformClient.ApplicationClient.Content { - do { - createdBy = try container.decode(String.self, forKey: .createdBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - updatedBy = try container.decode(String.self, forKey: .updatedBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { required = try container.decode(Bool.self, forKey: .required) @@ -789,30 +608,6 @@ public extension PlatformClient.ApplicationClient.Content { - do { - createdAt = try container.decode(String.self, forKey: .createdAt) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - updatedAt = try container.decode(String.self, forKey: .updatedAt) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { typeName = try container.decode(String.self, forKey: .typeName) @@ -848,11 +643,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - try? container.encodeIfPresent(resource, forKey: .resource) @@ -868,7 +658,7 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -898,16 +688,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(createdBy, forKey: .createdBy) - - - - - try? container.encodeIfPresent(updatedBy, forKey: .updatedBy) - - - - try? container.encodeIfPresent(required, forKey: .required) @@ -918,16 +698,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(createdAt, forKey: .createdAt) - - - - - try? container.encodeIfPresent(updatedAt, forKey: .updatedAt) - - - - try? container.encodeIfPresent(typeName, forKey: .typeName) diff --git a/Sources/code/platform/Models/Content/HTMLContentPlatformModel.swift b/Sources/code/platform/Models/Content/HTMLContentPlatformModel.swift new file mode 100644 index 0000000000..0187e35493 --- /dev/null +++ b/Sources/code/platform/Models/Content/HTMLContentPlatformModel.swift @@ -0,0 +1,254 @@ + + +import Foundation + + +public extension PlatformClient.Content { + /* + Model: HTML + Used By: Content + */ + + class HTML: Codable { + + + public var name: String? + + public var listEnabled: Bool? + + public var type: String? + + public var supportedValidations: [SupportedValidationsSchema]? + + + public enum CodingKeys: String, CodingKey { + + case name = "name" + + case listEnabled = "list_enabled" + + case type = "type" + + case supportedValidations = "supported_validations" + + } + + public init(listEnabled: Bool? = nil, name: String? = nil, supportedValidations: [SupportedValidationsSchema]? = nil, type: String? = nil) { + + self.name = name + + self.listEnabled = listEnabled + + self.type = type + + self.supportedValidations = supportedValidations + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + listEnabled = try container.decode(Bool.self, forKey: .listEnabled) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + supportedValidations = try container.decode([SupportedValidationsSchema].self, forKey: .supportedValidations) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(listEnabled, forKey: .listEnabled) + + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(supportedValidations, forKey: .supportedValidations) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Content { + /* + Model: HTML + Used By: Content + */ + + class HTML: Codable { + + + public var name: String? + + public var listEnabled: Bool? + + public var type: String? + + public var supportedValidations: [SupportedValidationsSchema]? + + + public enum CodingKeys: String, CodingKey { + + case name = "name" + + case listEnabled = "list_enabled" + + case type = "type" + + case supportedValidations = "supported_validations" + + } + + public init(listEnabled: Bool? = nil, name: String? = nil, supportedValidations: [SupportedValidationsSchema]? = nil, type: String? = nil) { + + self.name = name + + self.listEnabled = listEnabled + + self.type = type + + self.supportedValidations = supportedValidations + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + listEnabled = try container.decode(Bool.self, forKey: .listEnabled) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + supportedValidations = try container.decode([SupportedValidationsSchema].self, forKey: .supportedValidations) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(listEnabled, forKey: .listEnabled) + + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(supportedValidations, forKey: .supportedValidations) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Content/CustomObjectJobSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/JobSchemaContentPlatformModel.swift similarity index 89% rename from Sources/code/platform/Models/Content/CustomObjectJobSchemaContentPlatformModel.swift rename to Sources/code/platform/Models/Content/JobSchemaContentPlatformModel.swift index e2fbae9527..39a8df961f 100644 --- a/Sources/code/platform/Models/Content/CustomObjectJobSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/JobSchemaContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: CustomObjectJobSchema + Model: JobSchema Used By: Content */ - class CustomObjectJobSchema: Codable { + class JobSchema: Codable { public var id: String? @@ -24,10 +24,6 @@ public extension PlatformClient.Content { public var companyId: String? - public var creator: String? - - public var url: String? - public var status: String? public var actionType: String? @@ -52,10 +48,12 @@ public extension PlatformClient.Content { public var updatedAt: String? + public var applicationId: String? + public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case jobs = "jobs" @@ -67,10 +65,6 @@ public extension PlatformClient.Content { case companyId = "company_id" - case creator = "creator" - - case url = "url" - case status = "status" case actionType = "action_type" @@ -95,9 +89,11 @@ public extension PlatformClient.Content { case updatedAt = "updated_at" + case applicationId = "application_id" + } - public init(actionType: String? = nil, companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, creator: String? = nil, entity: String? = nil, errorsOccured: [String]? = nil, errorCount: Int? = nil, errorJobs: [String]? = nil, errorUrl: String? = nil, finishedCount: Int? = nil, finishedJobs: [String]? = nil, jobs: [String]? = nil, meta: CustomObjectMetaSchema? = nil, status: String? = nil, successCount: Int? = nil, totalJobs: Int? = nil, updatedAt: String? = nil, url: String? = nil, id: String? = nil) { + public init(actionType: String? = nil, applicationId: String? = nil, companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, entity: String? = nil, errorsOccured: [String]? = nil, errorCount: Int? = nil, errorJobs: [String]? = nil, errorUrl: String? = nil, finishedCount: Int? = nil, finishedJobs: [String]? = nil, id: String? = nil, jobs: [String]? = nil, meta: CustomObjectMetaSchema? = nil, status: String? = nil, successCount: Int? = nil, totalJobs: Int? = nil, updatedAt: String? = nil) { self.id = id @@ -111,10 +107,6 @@ public extension PlatformClient.Content { self.companyId = companyId - self.creator = creator - - self.url = url - self.status = status self.actionType = actionType @@ -139,6 +131,8 @@ public extension PlatformClient.Content { self.updatedAt = updatedAt + self.applicationId = applicationId + } required public init(from decoder: Decoder) throws { @@ -217,30 +211,6 @@ public extension PlatformClient.Content { - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - url = try container.decode(String.self, forKey: .url) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { status = try container.decode(String.self, forKey: .status) @@ -384,6 +354,18 @@ public extension PlatformClient.Content { } + + do { + applicationId = try container.decode(String.self, forKey: .applicationId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -421,16 +403,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - - try? container.encodeIfPresent(url, forKey: .url) - - - - try? container.encodeIfPresent(status, forKey: .status) @@ -489,6 +461,11 @@ public extension PlatformClient.Content { try? container.encodeIfPresent(updatedAt, forKey: .updatedAt) + + + try? container.encodeIfPresent(applicationId, forKey: .applicationId) + + } } @@ -498,11 +475,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: CustomObjectJobSchema + Model: JobSchema Used By: Content */ - class CustomObjectJobSchema: Codable { + class JobSchema: Codable { public var id: String? @@ -517,10 +494,6 @@ public extension PlatformClient.ApplicationClient.Content { public var companyId: String? - public var creator: String? - - public var url: String? - public var status: String? public var actionType: String? @@ -545,10 +518,12 @@ public extension PlatformClient.ApplicationClient.Content { public var updatedAt: String? + public var applicationId: String? + public enum CodingKeys: String, CodingKey { - case id = "_id" + case id = "id" case jobs = "jobs" @@ -560,10 +535,6 @@ public extension PlatformClient.ApplicationClient.Content { case companyId = "company_id" - case creator = "creator" - - case url = "url" - case status = "status" case actionType = "action_type" @@ -588,9 +559,11 @@ public extension PlatformClient.ApplicationClient.Content { case updatedAt = "updated_at" + case applicationId = "application_id" + } - public init(actionType: String? = nil, companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, creator: String? = nil, entity: String? = nil, errorsOccured: [String]? = nil, errorCount: Int? = nil, errorJobs: [String]? = nil, errorUrl: String? = nil, finishedCount: Int? = nil, finishedJobs: [String]? = nil, jobs: [String]? = nil, meta: CustomObjectMetaSchema? = nil, status: String? = nil, successCount: Int? = nil, totalJobs: Int? = nil, updatedAt: String? = nil, url: String? = nil, id: String? = nil) { + public init(actionType: String? = nil, applicationId: String? = nil, companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, entity: String? = nil, errorsOccured: [String]? = nil, errorCount: Int? = nil, errorJobs: [String]? = nil, errorUrl: String? = nil, finishedCount: Int? = nil, finishedJobs: [String]? = nil, id: String? = nil, jobs: [String]? = nil, meta: CustomObjectMetaSchema? = nil, status: String? = nil, successCount: Int? = nil, totalJobs: Int? = nil, updatedAt: String? = nil) { self.id = id @@ -604,10 +577,6 @@ public extension PlatformClient.ApplicationClient.Content { self.companyId = companyId - self.creator = creator - - self.url = url - self.status = status self.actionType = actionType @@ -632,6 +601,8 @@ public extension PlatformClient.ApplicationClient.Content { self.updatedAt = updatedAt + self.applicationId = applicationId + } required public init(from decoder: Decoder) throws { @@ -710,30 +681,6 @@ public extension PlatformClient.ApplicationClient.Content { - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - url = try container.decode(String.self, forKey: .url) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { status = try container.decode(String.self, forKey: .status) @@ -877,6 +824,18 @@ public extension PlatformClient.ApplicationClient.Content { } + + do { + applicationId = try container.decode(String.self, forKey: .applicationId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -914,16 +873,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - - try? container.encodeIfPresent(url, forKey: .url) - - - - try? container.encodeIfPresent(status, forKey: .status) @@ -982,6 +931,11 @@ public extension PlatformClient.ApplicationClient.Content { try? container.encodeIfPresent(updatedAt, forKey: .updatedAt) + + + try? container.encodeIfPresent(applicationId, forKey: .applicationId) + + } } diff --git a/Sources/code/platform/Models/Content/LandingPageGetResponseContentPlatformModel.swift b/Sources/code/platform/Models/Content/LandingPageGetDetailsContentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Content/LandingPageGetResponseContentPlatformModel.swift rename to Sources/code/platform/Models/Content/LandingPageGetDetailsContentPlatformModel.swift index d1a830a1f6..c6675a21c5 100644 --- a/Sources/code/platform/Models/Content/LandingPageGetResponseContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/LandingPageGetDetailsContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: LandingPageGetResponse + Model: LandingPageGetDetails Used By: Content */ - class LandingPageGetResponse: Codable { + class LandingPageGetDetails: Codable { public var items: [LandingPageSchema]? @@ -84,11 +84,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: LandingPageGetResponse + Model: LandingPageGetDetails Used By: Content */ - class LandingPageGetResponse: Codable { + class LandingPageGetDetails: Codable { public var items: [LandingPageSchema]? diff --git a/Sources/code/platform/Models/Content/CustomObjectCustomFieldDefinitionResSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/MetaFieldDefinitionDetailResSchemaContentPlatformModel.swift similarity index 79% rename from Sources/code/platform/Models/Content/CustomObjectCustomFieldDefinitionResSchemaContentPlatformModel.swift rename to Sources/code/platform/Models/Content/MetaFieldDefinitionDetailResSchemaContentPlatformModel.swift index 2b6d216d39..7f8a2bee41 100644 --- a/Sources/code/platform/Models/Content/CustomObjectCustomFieldDefinitionResSchemaContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/MetaFieldDefinitionDetailResSchemaContentPlatformModel.swift @@ -5,22 +5,20 @@ import Foundation public extension PlatformClient.Content { /* - Model: CustomObjectCustomFieldDefinitionResSchema + Model: MetaFieldDefinitionDetailResSchema Used By: Content */ - class CustomObjectCustomFieldDefinitionResSchema: Codable { + class MetaFieldDefinitionDetailResSchema: Codable { - public var creator: String? - public var resource: String? public var name: String? public var namespace: String? - public var key: String? + public var slug: String? public var description: String? @@ -28,13 +26,9 @@ public extension PlatformClient.Content { public var multiValue: Bool? - public var validations: [FieldValidations]? - public var companyId: String? - public var createdBy: String? - - public var metaobjectDefinitionId: String? + public var applicationId: String? public var required: Bool? @@ -42,6 +36,8 @@ public extension PlatformClient.Content { public var id: String? + public var validations: [[String: Any]]? + public var createdAt: String? public var updatedAt: String? @@ -49,15 +45,13 @@ public extension PlatformClient.Content { public enum CodingKeys: String, CodingKey { - case creator = "creator" - case resource = "resource" case name = "name" case namespace = "namespace" - case key = "key" + case slug = "slug" case description = "description" @@ -65,19 +59,17 @@ public extension PlatformClient.Content { case multiValue = "multi_value" - case validations = "validations" - case companyId = "company_id" - case createdBy = "created_by" - - case metaobjectDefinitionId = "metaobject_definition_id" + case applicationId = "application_id" case required = "required" case isDeleted = "is_deleted" - case id = "_id" + case id = "id" + + case validations = "validations" case createdAt = "created_at" @@ -85,9 +77,7 @@ public extension PlatformClient.Content { } - public init(companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, creator: String? = nil, description: String? = nil, isDeleted: Bool? = nil, key: String? = nil, metaobjectDefinitionId: String? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, type: String? = nil, updatedAt: String? = nil, validations: [FieldValidations]? = nil, id: String? = nil) { - - self.creator = creator + public init(applicationId: String? = nil, companyId: String? = nil, createdAt: String? = nil, description: String? = nil, id: String? = nil, isDeleted: Bool? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, slug: String? = nil, type: String? = nil, updatedAt: String? = nil, validations: [[String: Any]]? = nil) { self.resource = resource @@ -95,7 +85,7 @@ public extension PlatformClient.Content { self.namespace = namespace - self.key = key + self.slug = slug self.description = description @@ -103,13 +93,9 @@ public extension PlatformClient.Content { self.multiValue = multiValue - self.validations = validations - self.companyId = companyId - self.createdBy = createdBy - - self.metaobjectDefinitionId = metaobjectDefinitionId + self.applicationId = applicationId self.required = required @@ -117,6 +103,8 @@ public extension PlatformClient.Content { self.id = id + self.validations = validations + self.createdAt = createdAt self.updatedAt = updatedAt @@ -127,18 +115,6 @@ public extension PlatformClient.Content { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { resource = try container.decode(String.self, forKey: .resource) @@ -176,7 +152,7 @@ public extension PlatformClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -223,18 +199,6 @@ public extension PlatformClient.Content { - do { - validations = try container.decode([FieldValidations].self, forKey: .validations) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { companyId = try container.decode(String.self, forKey: .companyId) @@ -248,7 +212,7 @@ public extension PlatformClient.Content { do { - createdBy = try container.decode(String.self, forKey: .createdBy) + applicationId = try container.decode(String.self, forKey: .applicationId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -260,7 +224,7 @@ public extension PlatformClient.Content { do { - metaobjectDefinitionId = try container.decode(String.self, forKey: .metaobjectDefinitionId) + required = try container.decode(Bool.self, forKey: .required) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -272,7 +236,7 @@ public extension PlatformClient.Content { do { - required = try container.decode(Bool.self, forKey: .required) + isDeleted = try container.decode(Bool.self, forKey: .isDeleted) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -284,7 +248,7 @@ public extension PlatformClient.Content { do { - isDeleted = try container.decode(Bool.self, forKey: .isDeleted) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -296,7 +260,7 @@ public extension PlatformClient.Content { do { - id = try container.decode(String.self, forKey: .id) + validations = try container.decode([[String: Any]].self, forKey: .validations) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -337,11 +301,6 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - try? container.encodeIfPresent(resource, forKey: .resource) @@ -357,7 +316,7 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -377,37 +336,32 @@ public extension PlatformClient.Content { - try? container.encodeIfPresent(validations, forKey: .validations) - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(applicationId, forKey: .applicationId) - try? container.encodeIfPresent(metaobjectDefinitionId, forKey: .metaobjectDefinitionId) + try? container.encodeIfPresent(required, forKey: .required) - try? container.encodeIfPresent(required, forKey: .required) + try? container.encodeIfPresent(isDeleted, forKey: .isDeleted) - try? container.encodeIfPresent(isDeleted, forKey: .isDeleted) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(validations, forKey: .validations) @@ -429,22 +383,20 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: CustomObjectCustomFieldDefinitionResSchema + Model: MetaFieldDefinitionDetailResSchema Used By: Content */ - class CustomObjectCustomFieldDefinitionResSchema: Codable { + class MetaFieldDefinitionDetailResSchema: Codable { - public var creator: String? - public var resource: String? public var name: String? public var namespace: String? - public var key: String? + public var slug: String? public var description: String? @@ -452,13 +404,9 @@ public extension PlatformClient.ApplicationClient.Content { public var multiValue: Bool? - public var validations: [FieldValidations]? - public var companyId: String? - public var createdBy: String? - - public var metaobjectDefinitionId: String? + public var applicationId: String? public var required: Bool? @@ -466,6 +414,8 @@ public extension PlatformClient.ApplicationClient.Content { public var id: String? + public var validations: [[String: Any]]? + public var createdAt: String? public var updatedAt: String? @@ -473,15 +423,13 @@ public extension PlatformClient.ApplicationClient.Content { public enum CodingKeys: String, CodingKey { - case creator = "creator" - case resource = "resource" case name = "name" case namespace = "namespace" - case key = "key" + case slug = "slug" case description = "description" @@ -489,19 +437,17 @@ public extension PlatformClient.ApplicationClient.Content { case multiValue = "multi_value" - case validations = "validations" - case companyId = "company_id" - case createdBy = "created_by" - - case metaobjectDefinitionId = "metaobject_definition_id" + case applicationId = "application_id" case required = "required" case isDeleted = "is_deleted" - case id = "_id" + case id = "id" + + case validations = "validations" case createdAt = "created_at" @@ -509,9 +455,7 @@ public extension PlatformClient.ApplicationClient.Content { } - public init(companyId: String? = nil, createdAt: String? = nil, createdBy: String? = nil, creator: String? = nil, description: String? = nil, isDeleted: Bool? = nil, key: String? = nil, metaobjectDefinitionId: String? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, type: String? = nil, updatedAt: String? = nil, validations: [FieldValidations]? = nil, id: String? = nil) { - - self.creator = creator + public init(applicationId: String? = nil, companyId: String? = nil, createdAt: String? = nil, description: String? = nil, id: String? = nil, isDeleted: Bool? = nil, multiValue: Bool? = nil, name: String? = nil, namespace: String? = nil, required: Bool? = nil, resource: String? = nil, slug: String? = nil, type: String? = nil, updatedAt: String? = nil, validations: [[String: Any]]? = nil) { self.resource = resource @@ -519,7 +463,7 @@ public extension PlatformClient.ApplicationClient.Content { self.namespace = namespace - self.key = key + self.slug = slug self.description = description @@ -527,13 +471,9 @@ public extension PlatformClient.ApplicationClient.Content { self.multiValue = multiValue - self.validations = validations - self.companyId = companyId - self.createdBy = createdBy - - self.metaobjectDefinitionId = metaobjectDefinitionId + self.applicationId = applicationId self.required = required @@ -541,6 +481,8 @@ public extension PlatformClient.ApplicationClient.Content { self.id = id + self.validations = validations + self.createdAt = createdAt self.updatedAt = updatedAt @@ -551,18 +493,6 @@ public extension PlatformClient.ApplicationClient.Content { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - creator = try container.decode(String.self, forKey: .creator) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { resource = try container.decode(String.self, forKey: .resource) @@ -600,7 +530,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - key = try container.decode(String.self, forKey: .key) + slug = try container.decode(String.self, forKey: .slug) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -647,18 +577,6 @@ public extension PlatformClient.ApplicationClient.Content { - do { - validations = try container.decode([FieldValidations].self, forKey: .validations) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { companyId = try container.decode(String.self, forKey: .companyId) @@ -672,7 +590,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - createdBy = try container.decode(String.self, forKey: .createdBy) + applicationId = try container.decode(String.self, forKey: .applicationId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -684,7 +602,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - metaobjectDefinitionId = try container.decode(String.self, forKey: .metaobjectDefinitionId) + required = try container.decode(Bool.self, forKey: .required) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -696,7 +614,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - required = try container.decode(Bool.self, forKey: .required) + isDeleted = try container.decode(Bool.self, forKey: .isDeleted) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -708,7 +626,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - isDeleted = try container.decode(Bool.self, forKey: .isDeleted) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -720,7 +638,7 @@ public extension PlatformClient.ApplicationClient.Content { do { - id = try container.decode(String.self, forKey: .id) + validations = try container.decode([[String: Any]].self, forKey: .validations) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -761,11 +679,6 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(creator, forKey: .creator) - - - - try? container.encodeIfPresent(resource, forKey: .resource) @@ -781,7 +694,7 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(key, forKey: .key) + try? container.encodeIfPresent(slug, forKey: .slug) @@ -801,37 +714,32 @@ public extension PlatformClient.ApplicationClient.Content { - try? container.encodeIfPresent(validations, forKey: .validations) - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(createdBy, forKey: .createdBy) + try? container.encodeIfPresent(applicationId, forKey: .applicationId) - try? container.encodeIfPresent(metaobjectDefinitionId, forKey: .metaobjectDefinitionId) + try? container.encodeIfPresent(required, forKey: .required) - try? container.encodeIfPresent(required, forKey: .required) + try? container.encodeIfPresent(isDeleted, forKey: .isDeleted) - try? container.encodeIfPresent(isDeleted, forKey: .isDeleted) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(validations, forKey: .validations) diff --git a/Sources/code/platform/Models/Content/MetafieldTypesSchemaContentPlatformModel.swift b/Sources/code/platform/Models/Content/MetafieldTypesSchemaContentPlatformModel.swift new file mode 100644 index 0000000000..ad30177fb1 --- /dev/null +++ b/Sources/code/platform/Models/Content/MetafieldTypesSchemaContentPlatformModel.swift @@ -0,0 +1,116 @@ + + +import Foundation + + +public extension PlatformClient.Content { + /* + Model: MetafieldTypesSchema + Used By: Content + */ + + class MetafieldTypesSchema: Codable { + + + public var metafieldTypes: CustomFieldTypeSchema? + + + public enum CodingKeys: String, CodingKey { + + case metafieldTypes = "metafield_types" + + } + + public init(metafieldTypes: CustomFieldTypeSchema? = nil) { + + self.metafieldTypes = metafieldTypes + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + metafieldTypes = try container.decode(CustomFieldTypeSchema.self, forKey: .metafieldTypes) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(metafieldTypes, forKey: .metafieldTypes) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Content { + /* + Model: MetafieldTypesSchema + Used By: Content + */ + + class MetafieldTypesSchema: Codable { + + + public var metafieldTypes: CustomFieldTypeSchema? + + + public enum CodingKeys: String, CodingKey { + + case metafieldTypes = "metafield_types" + + } + + public init(metafieldTypes: CustomFieldTypeSchema? = nil) { + + self.metafieldTypes = metafieldTypes + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + metafieldTypes = try container.decode(CustomFieldTypeSchema.self, forKey: .metafieldTypes) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(metafieldTypes, forKey: .metafieldTypes) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Content/NavigationGetResponseContentPlatformModel.swift b/Sources/code/platform/Models/Content/NavigationGetDetailsContentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Content/NavigationGetResponseContentPlatformModel.swift rename to Sources/code/platform/Models/Content/NavigationGetDetailsContentPlatformModel.swift index bd47927773..740376b890 100644 --- a/Sources/code/platform/Models/Content/NavigationGetResponseContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/NavigationGetDetailsContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: NavigationGetResponse + Model: NavigationGetDetails Used By: Content */ - class NavigationGetResponse: Codable { + class NavigationGetDetails: Codable { public var items: [NavigationSchema]? @@ -84,11 +84,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: NavigationGetResponse + Model: NavigationGetDetails Used By: Content */ - class NavigationGetResponse: Codable { + class NavigationGetDetails: Codable { public var items: [NavigationSchema]? diff --git a/Sources/code/platform/Models/Content/NavigationRequestContentPlatformModel.swift b/Sources/code/platform/Models/Content/NavigationPayloadContentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Content/NavigationRequestContentPlatformModel.swift rename to Sources/code/platform/Models/Content/NavigationPayloadContentPlatformModel.swift index 7dd2b75504..2410fb0320 100644 --- a/Sources/code/platform/Models/Content/NavigationRequestContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/NavigationPayloadContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: NavigationRequest + Model: NavigationPayload Used By: Content */ - class NavigationRequest: Codable { + class NavigationPayload: Codable { public var name: String? @@ -153,11 +153,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: NavigationRequest + Model: NavigationPayload Used By: Content */ - class NavigationRequest: Codable { + class NavigationPayload: Codable { public var name: String? diff --git a/Sources/code/platform/Models/Content/PageGetResponseContentPlatformModel.swift b/Sources/code/platform/Models/Content/PageGetDetailsContentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Content/PageGetResponseContentPlatformModel.swift rename to Sources/code/platform/Models/Content/PageGetDetailsContentPlatformModel.swift index 7b20f15abc..d12592e0e5 100644 --- a/Sources/code/platform/Models/Content/PageGetResponseContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/PageGetDetailsContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: PageGetResponse + Model: PageGetDetails Used By: Content */ - class PageGetResponse: Codable { + class PageGetDetails: Codable { public var items: [PageSchema]? @@ -84,11 +84,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: PageGetResponse + Model: PageGetDetails Used By: Content */ - class PageGetResponse: Codable { + class PageGetDetails: Codable { public var items: [PageSchema]? diff --git a/Sources/code/platform/Models/Content/PageRequestContentPlatformModel.swift b/Sources/code/platform/Models/Content/PagePayloadContentPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Content/PageRequestContentPlatformModel.swift rename to Sources/code/platform/Models/Content/PagePayloadContentPlatformModel.swift index 7383831be8..095e2d3b4c 100644 --- a/Sources/code/platform/Models/Content/PageRequestContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/PagePayloadContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: PageRequest + Model: PagePayload Used By: Content */ - class PageRequest: Codable { + class PagePayload: Codable { public var schedule: CronSchedule? @@ -337,11 +337,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: PageRequest + Model: PagePayload Used By: Content */ - class PageRequest: Codable { + class PagePayload: Codable { public var schedule: CronSchedule? diff --git a/Sources/code/platform/Models/Content/PagePublishRequestContentPlatformModel.swift b/Sources/code/platform/Models/Content/PagePublishPayloadContentPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Content/PagePublishRequestContentPlatformModel.swift rename to Sources/code/platform/Models/Content/PagePublishPayloadContentPlatformModel.swift index e8efa7a283..53cc80e461 100644 --- a/Sources/code/platform/Models/Content/PagePublishRequestContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/PagePublishPayloadContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: PagePublishRequest + Model: PagePublishPayload Used By: Content */ - class PagePublishRequest: Codable { + class PagePublishPayload: Codable { public var publish: Bool? @@ -61,11 +61,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: PagePublishRequest + Model: PagePublishPayload Used By: Content */ - class PagePublishRequest: Codable { + class PagePublishPayload: Codable { public var publish: Bool? diff --git a/Sources/code/platform/Models/Content/SlideshowGetResponseContentPlatformModel.swift b/Sources/code/platform/Models/Content/SlideshowGetDetailsContentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Content/SlideshowGetResponseContentPlatformModel.swift rename to Sources/code/platform/Models/Content/SlideshowGetDetailsContentPlatformModel.swift index a8db2bb2c9..48ce9cd0b8 100644 --- a/Sources/code/platform/Models/Content/SlideshowGetResponseContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/SlideshowGetDetailsContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: SlideshowGetResponse + Model: SlideshowGetDetails Used By: Content */ - class SlideshowGetResponse: Codable { + class SlideshowGetDetails: Codable { public var items: [SlideshowSchema]? @@ -84,11 +84,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: SlideshowGetResponse + Model: SlideshowGetDetails Used By: Content */ - class SlideshowGetResponse: Codable { + class SlideshowGetDetails: Codable { public var items: [SlideshowSchema]? diff --git a/Sources/code/platform/Models/Content/SlideshowRequestContentPlatformModel.swift b/Sources/code/platform/Models/Content/SlideshowPayloadContentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Content/SlideshowRequestContentPlatformModel.swift rename to Sources/code/platform/Models/Content/SlideshowPayloadContentPlatformModel.swift index 5c6f2fb075..950d9e764d 100644 --- a/Sources/code/platform/Models/Content/SlideshowRequestContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/SlideshowPayloadContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: SlideshowRequest + Model: SlideshowPayload Used By: Content */ - class SlideshowRequest: Codable { + class SlideshowPayload: Codable { public var slug: String? @@ -153,11 +153,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: SlideshowRequest + Model: SlideshowPayload Used By: Content */ - class SlideshowRequest: Codable { + class SlideshowPayload: Codable { public var slug: String? diff --git a/Sources/code/platform/Models/Content/TagDeleteSuccessResponseContentPlatformModel.swift b/Sources/code/platform/Models/Content/TagDeleteSuccessDetailsContentPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Content/TagDeleteSuccessResponseContentPlatformModel.swift rename to Sources/code/platform/Models/Content/TagDeleteSuccessDetailsContentPlatformModel.swift index b74b7d2f4c..910862636a 100644 --- a/Sources/code/platform/Models/Content/TagDeleteSuccessResponseContentPlatformModel.swift +++ b/Sources/code/platform/Models/Content/TagDeleteSuccessDetailsContentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Content { /* - Model: TagDeleteSuccessResponse + Model: TagDeleteSuccessDetails Used By: Content */ - class TagDeleteSuccessResponse: Codable { + class TagDeleteSuccessDetails: Codable { public var success: Bool? @@ -61,11 +61,11 @@ public extension PlatformClient.Content { public extension PlatformClient.ApplicationClient.Content { /* - Model: TagDeleteSuccessResponse + Model: TagDeleteSuccessDetails Used By: Content */ - class TagDeleteSuccessResponse: Codable { + class TagDeleteSuccessDetails: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Content/ValidationErrorContentPlatformModel.swift b/Sources/code/platform/Models/Content/ValidationErrorContentPlatformModel.swift new file mode 100644 index 0000000000..17afd588ac --- /dev/null +++ b/Sources/code/platform/Models/Content/ValidationErrorContentPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Content { + /* + Model: ValidationError + Used By: Content + */ + + class ValidationError: Codable { + + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Content { + /* + Model: ValidationError + Used By: Content + */ + + class ValidationError: Codable { + + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Discount/CancelJobResponseDiscountPlatformModel.swift b/Sources/code/platform/Models/Discount/CancelJobResponseSchemaDiscountPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Discount/CancelJobResponseDiscountPlatformModel.swift rename to Sources/code/platform/Models/Discount/CancelJobResponseSchemaDiscountPlatformModel.swift index 5488f51bdc..86e8903e38 100644 --- a/Sources/code/platform/Models/Discount/CancelJobResponseDiscountPlatformModel.swift +++ b/Sources/code/platform/Models/Discount/CancelJobResponseSchemaDiscountPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Discount { /* - Model: CancelJobResponse + Model: CancelJobResponseSchema Used By: Discount */ - class CancelJobResponse: Codable { + class CancelJobResponseSchema: Codable { public var success: Bool diff --git a/Sources/code/platform/Models/Discount/FileJobRequestDiscountPlatformModel.swift b/Sources/code/platform/Models/Discount/FileJobRequestSchemaDiscountPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Discount/FileJobRequestDiscountPlatformModel.swift rename to Sources/code/platform/Models/Discount/FileJobRequestSchemaDiscountPlatformModel.swift index e4fb81ff7f..cddd05671b 100644 --- a/Sources/code/platform/Models/Discount/FileJobRequestDiscountPlatformModel.swift +++ b/Sources/code/platform/Models/Discount/FileJobRequestSchemaDiscountPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Discount { /* - Model: FileJobRequest + Model: FileJobRequestSchema Used By: Discount */ - class FileJobRequest: Codable { + class FileJobRequestSchema: Codable { public var name: String diff --git a/Sources/code/platform/Models/Discount/FileJobResponseDiscountPlatformModel.swift b/Sources/code/platform/Models/Discount/FileJobResponseSchemaDiscountPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Discount/FileJobResponseDiscountPlatformModel.swift rename to Sources/code/platform/Models/Discount/FileJobResponseSchemaDiscountPlatformModel.swift index 58483e9240..e76603840c 100644 --- a/Sources/code/platform/Models/Discount/FileJobResponseDiscountPlatformModel.swift +++ b/Sources/code/platform/Models/Discount/FileJobResponseSchemaDiscountPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Discount { /* - Model: FileJobResponse + Model: FileJobResponseSchema Used By: Discount */ - class FileJobResponse: Codable { + class FileJobResponseSchema: Codable { public var stage: String diff --git a/Sources/code/platform/Models/FileStorage/CreateTemplateFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/CreateTemplateFileStoragePlatformModel.swift new file mode 100644 index 0000000000..28818d10ba --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/CreateTemplateFileStoragePlatformModel.swift @@ -0,0 +1,212 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: CreateTemplate + Used By: FileStorage + */ + + class CreateTemplate: Codable { + + + public var pdfTypeId: Int + + public var format: String + + public var countryCode: String + + public var template: String? + + + public enum CodingKeys: String, CodingKey { + + case pdfTypeId = "pdf_type_id" + + case format = "format" + + case countryCode = "country_code" + + case template = "template" + + } + + public init(countryCode: String, format: String, pdfTypeId: Int, template: String? = nil) { + + self.pdfTypeId = pdfTypeId + + self.format = format + + self.countryCode = countryCode + + self.template = template + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + + + + format = try container.decode(String.self, forKey: .format) + + + + + countryCode = try container.decode(String.self, forKey: .countryCode) + + + + + do { + template = try container.decode(String.self, forKey: .template) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(template, forKey: .template) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: CreateTemplate + Used By: FileStorage + */ + + class CreateTemplate: Codable { + + + public var pdfTypeId: Int + + public var format: String + + public var countryCode: String + + public var template: String? + + + public enum CodingKeys: String, CodingKey { + + case pdfTypeId = "pdf_type_id" + + case format = "format" + + case countryCode = "country_code" + + case template = "template" + + } + + public init(countryCode: String, format: String, pdfTypeId: Int, template: String? = nil) { + + self.pdfTypeId = pdfTypeId + + self.format = format + + self.countryCode = countryCode + + self.template = template + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + + + + format = try container.decode(String.self, forKey: .format) + + + + + countryCode = try container.decode(String.self, forKey: .countryCode) + + + + + do { + template = try container.decode(String.self, forKey: .template) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(template, forKey: .template) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/FileStorage/DeleteMapperByIdFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/DeleteMapperByIdFileStoragePlatformModel.swift new file mode 100644 index 0000000000..b3723b4e34 --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/DeleteMapperByIdFileStoragePlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: DeleteMapperById + Used By: FileStorage + */ + + class DeleteMapperById: Codable { + + + public var message: String? + + public var defaultTemplate: Bool? + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case defaultTemplate = "default_template" + + } + + public init(defaultTemplate: Bool? = nil, message: String? = nil) { + + self.message = message + + self.defaultTemplate = defaultTemplate + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + message = try container.decode(String.self, forKey: .message) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + defaultTemplate = try container.decode(Bool.self, forKey: .defaultTemplate) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(defaultTemplate, forKey: .defaultTemplate) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: DeleteMapperById + Used By: FileStorage + */ + + class DeleteMapperById: Codable { + + + public var message: String? + + public var defaultTemplate: Bool? + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case defaultTemplate = "default_template" + + } + + public init(defaultTemplate: Bool? = nil, message: String? = nil) { + + self.message = message + + self.defaultTemplate = defaultTemplate + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + message = try container.decode(String.self, forKey: .message) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + defaultTemplate = try container.decode(Bool.self, forKey: .defaultTemplate) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(defaultTemplate, forKey: .defaultTemplate) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/FileStorage/DummyTemplateDataFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/DummyTemplateDataFileStoragePlatformModel.swift index 97dffac955..56937a6224 100644 --- a/Sources/code/platform/Models/FileStorage/DummyTemplateDataFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/DummyTemplateDataFileStoragePlatformModel.swift @@ -16,7 +16,7 @@ public extension PlatformClient.FileStorage { public var pdfTypeId: Double? - public var payload: DummyTemplateDataPayload + public var payload: PdfPayloadDetails public var countryCode: String? @@ -37,7 +37,7 @@ public extension PlatformClient.FileStorage { } - public init(countryCode: String? = nil, payload: DummyTemplateDataPayload, pdfTypeId: Double? = nil, id: String? = nil, v: Int? = nil) { + public init(countryCode: String? = nil, payload: PdfPayloadDetails, pdfTypeId: Double? = nil, id: String? = nil, v: Int? = nil) { self.id = id @@ -79,7 +79,7 @@ public extension PlatformClient.FileStorage { - payload = try container.decode(DummyTemplateDataPayload.self, forKey: .payload) + payload = try container.decode(PdfPayloadDetails.self, forKey: .payload) @@ -157,7 +157,7 @@ public extension PlatformClient.ApplicationClient.FileStorage { public var pdfTypeId: Double? - public var payload: DummyTemplateDataPayload + public var payload: PdfPayloadDetails public var countryCode: String? @@ -178,7 +178,7 @@ public extension PlatformClient.ApplicationClient.FileStorage { } - public init(countryCode: String? = nil, payload: DummyTemplateDataPayload, pdfTypeId: Double? = nil, id: String? = nil, v: Int? = nil) { + public init(countryCode: String? = nil, payload: PdfPayloadDetails, pdfTypeId: Double? = nil, id: String? = nil, v: Int? = nil) { self.id = id @@ -220,7 +220,7 @@ public extension PlatformClient.ApplicationClient.FileStorage { - payload = try container.decode(DummyTemplateDataPayload.self, forKey: .payload) + payload = try container.decode(PdfPayloadDetails.self, forKey: .payload) diff --git a/Sources/code/platform/Models/FileStorage/FailedResponseFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/FailedBrowseFilesResultFileStoragePlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/FileStorage/FailedResponseFileStoragePlatformModel.swift rename to Sources/code/platform/Models/FileStorage/FailedBrowseFilesResultFileStoragePlatformModel.swift index 417fa2e4d4..6d0ed44ba1 100644 --- a/Sources/code/platform/Models/FileStorage/FailedResponseFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/FailedBrowseFilesResultFileStoragePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.FileStorage { /* - Model: FailedResponse + Model: FailedBrowseFilesResult Used By: FileStorage */ - class FailedResponse: Codable { + class FailedBrowseFilesResult: Codable { public var message: String @@ -54,11 +54,11 @@ public extension PlatformClient.FileStorage { public extension PlatformClient.ApplicationClient.FileStorage { /* - Model: FailedResponse + Model: FailedBrowseFilesResult Used By: FileStorage */ - class FailedResponse: Codable { + class FailedBrowseFilesResult: Codable { public var message: String diff --git a/Sources/code/platform/Models/FileStorage/CompleteResponseFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/FileUploadCompleteFileStoragePlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/FileStorage/CompleteResponseFileStoragePlatformModel.swift rename to Sources/code/platform/Models/FileStorage/FileUploadCompleteFileStoragePlatformModel.swift index 4b8ffd1853..1d89266e64 100644 --- a/Sources/code/platform/Models/FileStorage/CompleteResponseFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/FileUploadCompleteFileStoragePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.FileStorage { /* - Model: CompleteResponse + Model: FileUploadComplete Used By: FileStorage */ - class CompleteResponse: Codable { + class FileUploadComplete: Codable { public var id: String @@ -292,11 +292,11 @@ public extension PlatformClient.FileStorage { public extension PlatformClient.ApplicationClient.FileStorage { /* - Model: CompleteResponse + Model: FileUploadComplete Used By: FileStorage */ - class CompleteResponse: Codable { + class FileUploadComplete: Codable { public var id: String diff --git a/Sources/code/platform/Models/FileStorage/StartResponseFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/FileUploadFileStoragePlatformModel.swift similarity index 88% rename from Sources/code/platform/Models/FileStorage/StartResponseFileStoragePlatformModel.swift rename to Sources/code/platform/Models/FileStorage/FileUploadFileStoragePlatformModel.swift index f440d81f8e..4557a2eddf 100644 --- a/Sources/code/platform/Models/FileStorage/StartResponseFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/FileUploadFileStoragePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.FileStorage { /* - Model: StartResponse + Model: FileUpload Used By: FileStorage */ - class StartResponse: Codable { + class FileUpload: Codable { public var fileName: String @@ -28,8 +28,6 @@ public extension PlatformClient.FileStorage { public var upload: Upload - public var cdn: CDN - public var tags: [String]? @@ -51,13 +49,11 @@ public extension PlatformClient.FileStorage { case upload = "upload" - case cdn = "cdn" - case tags = "tags" } - public init(cdn: CDN, contentType: String, fileName: String, filePath: String, method: String? = nil, namespace: String, operation: String, size: Int, tags: [String]? = nil, upload: Upload) { + public init(contentType: String, fileName: String, filePath: String, method: String? = nil, namespace: String, operation: String, size: Int, tags: [String]? = nil, upload: Upload) { self.fileName = fileName @@ -75,8 +71,6 @@ public extension PlatformClient.FileStorage { self.upload = upload - self.cdn = cdn - self.tags = tags } @@ -132,11 +126,6 @@ public extension PlatformClient.FileStorage { - cdn = try container.decode(CDN.self, forKey: .cdn) - - - - do { tags = try container.decode([String].self, forKey: .tags) @@ -195,11 +184,6 @@ public extension PlatformClient.FileStorage { - try? container.encodeIfPresent(cdn, forKey: .cdn) - - - - try? container.encodeIfPresent(tags, forKey: .tags) @@ -212,11 +196,11 @@ public extension PlatformClient.FileStorage { public extension PlatformClient.ApplicationClient.FileStorage { /* - Model: StartResponse + Model: FileUpload Used By: FileStorage */ - class StartResponse: Codable { + class FileUpload: Codable { public var fileName: String @@ -235,8 +219,6 @@ public extension PlatformClient.ApplicationClient.FileStorage { public var upload: Upload - public var cdn: CDN - public var tags: [String]? @@ -258,13 +240,11 @@ public extension PlatformClient.ApplicationClient.FileStorage { case upload = "upload" - case cdn = "cdn" - case tags = "tags" } - public init(cdn: CDN, contentType: String, fileName: String, filePath: String, method: String? = nil, namespace: String, operation: String, size: Int, tags: [String]? = nil, upload: Upload) { + public init(contentType: String, fileName: String, filePath: String, method: String? = nil, namespace: String, operation: String, size: Int, tags: [String]? = nil, upload: Upload) { self.fileName = fileName @@ -282,8 +262,6 @@ public extension PlatformClient.ApplicationClient.FileStorage { self.upload = upload - self.cdn = cdn - self.tags = tags } @@ -339,11 +317,6 @@ public extension PlatformClient.ApplicationClient.FileStorage { - cdn = try container.decode(CDN.self, forKey: .cdn) - - - - do { tags = try container.decode([String].self, forKey: .tags) @@ -402,11 +375,6 @@ public extension PlatformClient.ApplicationClient.FileStorage { - try? container.encodeIfPresent(cdn, forKey: .cdn) - - - - try? container.encodeIfPresent(tags, forKey: .tags) diff --git a/Sources/code/platform/Models/FileStorage/StartRequestFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/FileUploadStartFileStoragePlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/FileStorage/StartRequestFileStoragePlatformModel.swift rename to Sources/code/platform/Models/FileStorage/FileUploadStartFileStoragePlatformModel.swift index a66656ba68..ec4aab6b9d 100644 --- a/Sources/code/platform/Models/FileStorage/StartRequestFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/FileUploadStartFileStoragePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.FileStorage { /* - Model: StartRequest + Model: FileUploadStart Used By: FileStorage */ - class StartRequest: Codable { + class FileUploadStart: Codable { public var fileName: String @@ -132,11 +132,11 @@ public extension PlatformClient.FileStorage { public extension PlatformClient.ApplicationClient.FileStorage { /* - Model: StartRequest + Model: FileUploadStart Used By: FileStorage */ - class StartRequest: Codable { + class FileUploadStart: Codable { public var fileName: String diff --git a/Sources/code/platform/Models/FileStorage/InvoiceTypesDataResponseFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/InvoiceTypesDataFileStoragePlatformModel.swift similarity index 87% rename from Sources/code/platform/Models/FileStorage/InvoiceTypesDataResponseFileStoragePlatformModel.swift rename to Sources/code/platform/Models/FileStorage/InvoiceTypesDataFileStoragePlatformModel.swift index 5a4554e12f..52e1789871 100644 --- a/Sources/code/platform/Models/FileStorage/InvoiceTypesDataResponseFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/InvoiceTypesDataFileStoragePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.FileStorage { /* - Model: InvoiceTypesDataResponse + Model: InvoiceTypesData Used By: FileStorage */ - class InvoiceTypesDataResponse: Codable { + class InvoiceTypesData: Codable { public var status: Bool? @@ -26,6 +26,8 @@ public extension PlatformClient.FileStorage { public var visibility: Bool + public var storeOs: Bool + public var countryCode: String @@ -45,11 +47,13 @@ public extension PlatformClient.FileStorage { case visibility = "visibility" + case storeOs = "store_os" + case countryCode = "country_code" } - public init(countryCode: String, format: [String], name: String, pdfTypeId: Int, status: Bool? = nil, visibility: Bool, id: String, v: Int) { + public init(countryCode: String, format: [String], name: String, pdfTypeId: Int, status: Bool? = nil, storeOs: Bool, visibility: Bool, id: String, v: Int) { self.status = status @@ -65,6 +69,8 @@ public extension PlatformClient.FileStorage { self.visibility = visibility + self.storeOs = storeOs + self.countryCode = countryCode } @@ -115,6 +121,11 @@ public extension PlatformClient.FileStorage { + storeOs = try container.decode(Bool.self, forKey: .storeOs) + + + + countryCode = try container.decode(String.self, forKey: .countryCode) @@ -161,6 +172,11 @@ public extension PlatformClient.FileStorage { + try? container.encodeIfPresent(storeOs, forKey: .storeOs) + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) @@ -173,11 +189,11 @@ public extension PlatformClient.FileStorage { public extension PlatformClient.ApplicationClient.FileStorage { /* - Model: InvoiceTypesDataResponse + Model: InvoiceTypesData Used By: FileStorage */ - class InvoiceTypesDataResponse: Codable { + class InvoiceTypesData: Codable { public var status: Bool? @@ -194,6 +210,8 @@ public extension PlatformClient.ApplicationClient.FileStorage { public var visibility: Bool + public var storeOs: Bool + public var countryCode: String @@ -213,11 +231,13 @@ public extension PlatformClient.ApplicationClient.FileStorage { case visibility = "visibility" + case storeOs = "store_os" + case countryCode = "country_code" } - public init(countryCode: String, format: [String], name: String, pdfTypeId: Int, status: Bool? = nil, visibility: Bool, id: String, v: Int) { + public init(countryCode: String, format: [String], name: String, pdfTypeId: Int, status: Bool? = nil, storeOs: Bool, visibility: Bool, id: String, v: Int) { self.status = status @@ -233,6 +253,8 @@ public extension PlatformClient.ApplicationClient.FileStorage { self.visibility = visibility + self.storeOs = storeOs + self.countryCode = countryCode } @@ -283,6 +305,11 @@ public extension PlatformClient.ApplicationClient.FileStorage { + storeOs = try container.decode(Bool.self, forKey: .storeOs) + + + + countryCode = try container.decode(String.self, forKey: .countryCode) @@ -329,6 +356,11 @@ public extension PlatformClient.ApplicationClient.FileStorage { + try? container.encodeIfPresent(storeOs, forKey: .storeOs) + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) diff --git a/Sources/code/platform/Models/FileStorage/InvoiceTypesResponseFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/InvoiceTypesFileStoragePlatformModel.swift similarity index 80% rename from Sources/code/platform/Models/FileStorage/InvoiceTypesResponseFileStoragePlatformModel.swift rename to Sources/code/platform/Models/FileStorage/InvoiceTypesFileStoragePlatformModel.swift index d3214a4369..c551d8d689 100644 --- a/Sources/code/platform/Models/FileStorage/InvoiceTypesResponseFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/InvoiceTypesFileStoragePlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.FileStorage { /* - Model: InvoiceTypesResponse + Model: InvoiceTypes Used By: FileStorage */ - class InvoiceTypesResponse: Codable { + class InvoiceTypes: Codable { - public var data: [InvoiceTypesDataResponse] + public var data: [InvoiceTypesData] public var success: Bool @@ -25,7 +25,7 @@ public extension PlatformClient.FileStorage { } - public init(data: [InvoiceTypesDataResponse], success: Bool) { + public init(data: [InvoiceTypesData], success: Bool) { self.data = data @@ -37,7 +37,7 @@ public extension PlatformClient.FileStorage { let container = try decoder.container(keyedBy: CodingKeys.self) - data = try container.decode([InvoiceTypesDataResponse].self, forKey: .data) + data = try container.decode([InvoiceTypesData].self, forKey: .data) @@ -70,14 +70,14 @@ public extension PlatformClient.FileStorage { public extension PlatformClient.ApplicationClient.FileStorage { /* - Model: InvoiceTypesResponse + Model: InvoiceTypes Used By: FileStorage */ - class InvoiceTypesResponse: Codable { + class InvoiceTypes: Codable { - public var data: [InvoiceTypesDataResponse] + public var data: [InvoiceTypesData] public var success: Bool @@ -90,7 +90,7 @@ public extension PlatformClient.ApplicationClient.FileStorage { } - public init(data: [InvoiceTypesDataResponse], success: Bool) { + public init(data: [InvoiceTypesData], success: Bool) { self.data = data @@ -102,7 +102,7 @@ public extension PlatformClient.ApplicationClient.FileStorage { let container = try decoder.container(keyedBy: CodingKeys.self) - data = try container.decode([InvoiceTypesDataResponse].self, forKey: .data) + data = try container.decode([InvoiceTypesData].self, forKey: .data) diff --git a/Sources/code/platform/Models/FileStorage/MapperDetailsFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/MapperDetailsFileStoragePlatformModel.swift new file mode 100644 index 0000000000..8a75da8792 --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/MapperDetailsFileStoragePlatformModel.swift @@ -0,0 +1,300 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: MapperDetails + Used By: FileStorage + */ + + class MapperDetails: Codable { + + + public var id: String? + + public var pdfTypeId: Double? + + public var payload: PdfPayloadDetails? + + public var countryCode: String? + + public var v: Int? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case pdfTypeId = "pdf_type_id" + + case payload = "payload" + + case countryCode = "country_code" + + case v = "__v" + + } + + public init(countryCode: String? = nil, payload: PdfPayloadDetails? = nil, pdfTypeId: Double? = nil, id: String? = nil, v: Int? = nil) { + + self.id = id + + self.pdfTypeId = pdfTypeId + + self.payload = payload + + self.countryCode = countryCode + + self.v = v + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + pdfTypeId = try container.decode(Double.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + payload = try container.decode(PdfPayloadDetails.self, forKey: .payload) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + v = try container.decode(Int.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(payload, forKey: .payload) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(v, forKey: .v) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: MapperDetails + Used By: FileStorage + */ + + class MapperDetails: Codable { + + + public var id: String? + + public var pdfTypeId: Double? + + public var payload: PdfPayloadDetails? + + public var countryCode: String? + + public var v: Int? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case pdfTypeId = "pdf_type_id" + + case payload = "payload" + + case countryCode = "country_code" + + case v = "__v" + + } + + public init(countryCode: String? = nil, payload: PdfPayloadDetails? = nil, pdfTypeId: Double? = nil, id: String? = nil, v: Int? = nil) { + + self.id = id + + self.pdfTypeId = pdfTypeId + + self.payload = payload + + self.countryCode = countryCode + + self.v = v + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + pdfTypeId = try container.decode(Double.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + payload = try container.decode(PdfPayloadDetails.self, forKey: .payload) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + v = try container.decode(Int.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(payload, forKey: .payload) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(v, forKey: .v) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/FileStorage/ParamsFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/ParamsFileStoragePlatformModel.swift deleted file mode 100644 index f4017d5ddb..0000000000 --- a/Sources/code/platform/Models/FileStorage/ParamsFileStoragePlatformModel.swift +++ /dev/null @@ -1,116 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.FileStorage { - /* - Model: Params - Used By: FileStorage - */ - - class Params: Codable { - - - public var subpath: String? - - - public enum CodingKeys: String, CodingKey { - - case subpath = "subpath" - - } - - public init(subpath: String? = nil) { - - self.subpath = subpath - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - subpath = try container.decode(String.self, forKey: .subpath) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(subpath, forKey: .subpath) - - - } - - } -} - - - -public extension PlatformClient.ApplicationClient.FileStorage { - /* - Model: Params - Used By: FileStorage - */ - - class Params: Codable { - - - public var subpath: String? - - - public enum CodingKeys: String, CodingKey { - - case subpath = "subpath" - - } - - public init(subpath: String? = nil) { - - self.subpath = subpath - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - subpath = try container.decode(String.self, forKey: .subpath) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(subpath, forKey: .subpath) - - - } - - } -} - - diff --git a/Sources/code/platform/Models/FileStorage/PdfConfigFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/PdfConfigFileStoragePlatformModel.swift index b0cfe2e34c..0515cf69b8 100644 --- a/Sources/code/platform/Models/FileStorage/PdfConfigFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/PdfConfigFileStoragePlatformModel.swift @@ -18,6 +18,10 @@ public extension PlatformClient.FileStorage { public var pdfTypeId: Int? + public var countryCode: String? + + public var defaultTemplate: Bool? + public enum CodingKeys: String, CodingKey { @@ -27,9 +31,13 @@ public extension PlatformClient.FileStorage { case pdfTypeId = "pdf_type_id" + case countryCode = "country_code" + + case defaultTemplate = "default_template" + } - public init(format: String? = nil, pdfTypeId: Int? = nil, template: String? = nil) { + public init(countryCode: String? = nil, defaultTemplate: Bool? = nil, format: String? = nil, pdfTypeId: Int? = nil, template: String? = nil) { self.format = format @@ -37,6 +45,10 @@ public extension PlatformClient.FileStorage { self.pdfTypeId = pdfTypeId + self.countryCode = countryCode + + self.defaultTemplate = defaultTemplate + } required public init(from decoder: Decoder) throws { @@ -78,6 +90,30 @@ public extension PlatformClient.FileStorage { } + + do { + 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 { + + } + + + + do { + defaultTemplate = try container.decode(Bool.self, forKey: .defaultTemplate) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -98,6 +134,16 @@ public extension PlatformClient.FileStorage { try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(defaultTemplate, forKey: .defaultTemplate) + + } } @@ -120,6 +166,10 @@ public extension PlatformClient.ApplicationClient.FileStorage { public var pdfTypeId: Int? + public var countryCode: String? + + public var defaultTemplate: Bool? + public enum CodingKeys: String, CodingKey { @@ -129,9 +179,13 @@ public extension PlatformClient.ApplicationClient.FileStorage { case pdfTypeId = "pdf_type_id" + case countryCode = "country_code" + + case defaultTemplate = "default_template" + } - public init(format: String? = nil, pdfTypeId: Int? = nil, template: String? = nil) { + public init(countryCode: String? = nil, defaultTemplate: Bool? = nil, format: String? = nil, pdfTypeId: Int? = nil, template: String? = nil) { self.format = format @@ -139,6 +193,10 @@ public extension PlatformClient.ApplicationClient.FileStorage { self.pdfTypeId = pdfTypeId + self.countryCode = countryCode + + self.defaultTemplate = defaultTemplate + } required public init(from decoder: Decoder) throws { @@ -180,6 +238,30 @@ public extension PlatformClient.ApplicationClient.FileStorage { } + + do { + 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 { + + } + + + + do { + defaultTemplate = try container.decode(Bool.self, forKey: .defaultTemplate) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -200,6 +282,16 @@ public extension PlatformClient.ApplicationClient.FileStorage { try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(defaultTemplate, forKey: .defaultTemplate) + + } } diff --git a/Sources/code/platform/Models/FileStorage/PdfConfigurationDataFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/PdfConfigurationDataFileStoragePlatformModel.swift new file mode 100644 index 0000000000..d076f9ca6b --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/PdfConfigurationDataFileStoragePlatformModel.swift @@ -0,0 +1,346 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: PdfConfigurationData + Used By: FileStorage + */ + + class PdfConfigurationData: Codable { + + + public var id: String? + + public var pdfTypeId: Int? + + public var format: String? + + public var template: String? + + public var countryCode: String? + + public var v: Int? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case pdfTypeId = "pdf_type_id" + + case format = "format" + + case template = "template" + + case countryCode = "country_code" + + case v = "__v" + + } + + public init(countryCode: String? = nil, format: String? = nil, pdfTypeId: Int? = nil, template: String? = nil, id: String? = nil, v: Int? = nil) { + + self.id = id + + self.pdfTypeId = pdfTypeId + + self.format = format + + self.template = template + + self.countryCode = countryCode + + self.v = v + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + format = try container.decode(String.self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + template = try container.decode(String.self, forKey: .template) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + v = try container.decode(Int.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(template, forKey: .template) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(v, forKey: .v) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: PdfConfigurationData + Used By: FileStorage + */ + + class PdfConfigurationData: Codable { + + + public var id: String? + + public var pdfTypeId: Int? + + public var format: String? + + public var template: String? + + public var countryCode: String? + + public var v: Int? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case pdfTypeId = "pdf_type_id" + + case format = "format" + + case template = "template" + + case countryCode = "country_code" + + case v = "__v" + + } + + public init(countryCode: String? = nil, format: String? = nil, pdfTypeId: Int? = nil, template: String? = nil, id: String? = nil, v: Int? = nil) { + + self.id = id + + self.pdfTypeId = pdfTypeId + + self.format = format + + self.template = template + + self.countryCode = countryCode + + self.v = v + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + format = try container.decode(String.self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + template = try container.decode(String.self, forKey: .template) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + v = try container.decode(Int.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(template, forKey: .template) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(v, forKey: .v) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/FileStorage/DummyTemplateDataItemsFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/PdfDataItemsDetailsFileStoragePlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/FileStorage/DummyTemplateDataItemsFileStoragePlatformModel.swift rename to Sources/code/platform/Models/FileStorage/PdfDataItemsDetailsFileStoragePlatformModel.swift index 49ea5bbf66..0c7f05c232 100644 --- a/Sources/code/platform/Models/FileStorage/DummyTemplateDataItemsFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/PdfDataItemsDetailsFileStoragePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.FileStorage { /* - Model: DummyTemplateDataItems + Model: PdfDataItemsDetails Used By: FileStorage */ - class DummyTemplateDataItems: Codable { + class PdfDataItemsDetails: Codable { public var data: [DummyTemplateData] @@ -70,11 +70,11 @@ public extension PlatformClient.FileStorage { public extension PlatformClient.ApplicationClient.FileStorage { /* - Model: DummyTemplateDataItems + Model: PdfDataItemsDetails Used By: FileStorage */ - class DummyTemplateDataItems: Codable { + class PdfDataItemsDetails: Codable { public var data: [DummyTemplateData] diff --git a/Sources/code/platform/Models/FileStorage/PdfDefaultTemplateByIdFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/PdfDefaultTemplateByIdFileStoragePlatformModel.swift new file mode 100644 index 0000000000..f18d2c61fe --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/PdfDefaultTemplateByIdFileStoragePlatformModel.swift @@ -0,0 +1,346 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: PdfDefaultTemplateById + Used By: FileStorage + */ + + class PdfDefaultTemplateById: Codable { + + + public var id: String? + + public var countryCode: String? + + public var format: String? + + public var pdfTypeId: Int? + + public var v: Int? + + public var template: String? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case countryCode = "country_code" + + case format = "format" + + case pdfTypeId = "pdf_type_id" + + case v = "__v" + + case template = "template" + + } + + public init(countryCode: String? = nil, format: String? = nil, pdfTypeId: Int? = nil, template: String? = nil, id: String? = nil, v: Int? = nil) { + + self.id = id + + self.countryCode = countryCode + + self.format = format + + self.pdfTypeId = pdfTypeId + + self.v = v + + self.template = template + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + 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 { + + } + + + + do { + format = try container.decode(String.self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + v = try container.decode(Int.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + template = try container.decode(String.self, forKey: .template) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(v, forKey: .v) + + + + + try? container.encodeIfPresent(template, forKey: .template) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: PdfDefaultTemplateById + Used By: FileStorage + */ + + class PdfDefaultTemplateById: Codable { + + + public var id: String? + + public var countryCode: String? + + public var format: String? + + public var pdfTypeId: Int? + + public var v: Int? + + public var template: String? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case countryCode = "country_code" + + case format = "format" + + case pdfTypeId = "pdf_type_id" + + case v = "__v" + + case template = "template" + + } + + public init(countryCode: String? = nil, format: String? = nil, pdfTypeId: Int? = nil, template: String? = nil, id: String? = nil, v: Int? = nil) { + + self.id = id + + self.countryCode = countryCode + + self.format = format + + self.pdfTypeId = pdfTypeId + + self.v = v + + self.template = template + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + 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 { + + } + + + + do { + format = try container.decode(String.self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + v = try container.decode(Int.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + template = try container.decode(String.self, forKey: .template) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(v, forKey: .v) + + + + + try? container.encodeIfPresent(template, forKey: .template) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/FileStorage/DummyTemplateDataPayloadFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/PdfPayloadDetailsFileStoragePlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/FileStorage/DummyTemplateDataPayloadFileStoragePlatformModel.swift rename to Sources/code/platform/Models/FileStorage/PdfPayloadDetailsFileStoragePlatformModel.swift index 2d29300b4c..3c644a2837 100644 --- a/Sources/code/platform/Models/FileStorage/DummyTemplateDataPayloadFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/PdfPayloadDetailsFileStoragePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.FileStorage { /* - Model: DummyTemplateDataPayload + Model: PdfPayloadDetails Used By: FileStorage */ - class DummyTemplateDataPayload: Codable { + class PdfPayloadDetails: Codable { public var isExport: Bool? @@ -78,10 +78,6 @@ public extension PlatformClient.FileStorage { public var isSelfPickup: Bool? - public var shipmentMeta: [String: Any]? - - public var orderMeta: [String: Any]? - public var platformName: String? public var amountToBeCollected: Double? @@ -175,10 +171,6 @@ public extension PlatformClient.FileStorage { case isSelfPickup = "is_self_pickup" - case shipmentMeta = "shipment_meta" - - case orderMeta = "order_meta" - case platformName = "platform_name" case amountToBeCollected = "amount_to_be_collected" @@ -205,7 +197,7 @@ public extension PlatformClient.FileStorage { } - public init(amountPaid: Double? = nil, amountToBeCollected: Double? = nil, appDomainName: String? = nil, awbNumberBarcode: String? = nil, b2BBuyerDetails: [String: Any]? = nil, brandLogo: String? = nil, companyDetail: CompanyDetail? = nil, conversionRate: ConversionRate? = nil, creditNoteId: String? = nil, currencyCode: String? = nil, currentDate: String? = nil, customerBillingDetail: CustomerBillingDetail? = nil, customerShippingDetail: CustomerShippingDetail? = nil, declarationTexts: [String]? = nil, deliveryPartnerDetail: DeliveryPartnerDetail? = nil, digitalsignature: String? = nil, disclaimer: String? = nil, image: Image? = nil, invoiceDetail: InvoiceDetail? = nil, isExport: Bool? = nil, isExportShipment: Bool? = nil, isQwik: [String: Any]? = nil, isSelfPickup: Bool? = nil, isSelfShip: Bool? = nil, meta: Meta? = nil, mode: String? = nil, orderMeta: [String: Any]? = nil, orderType: String? = nil, payments: [PaymentData]? = nil, platformName: String? = nil, poNumber: String? = nil, productTable: ProductTable? = nil, registeredCompanyDetail: RegisteredCompanyDetail? = nil, returnDetail: ReturnDetail? = nil, shipmentId: String? = nil, shipmentIdBarcode: String? = nil, shipmentMeta: [String: Any]? = nil, signedQrcode: String? = nil, storeDetail: StoreDetail? = nil, taxTable: TaxTable? = nil, totalItems: Double? = nil, totalValueOfGoods: Double? = nil, txnId: String? = nil, uid: String? = nil, upiQrcode: String? = nil, utr: String? = nil, waybills: [[String: Any]]? = nil) { + public init(amountPaid: Double? = nil, amountToBeCollected: Double? = nil, appDomainName: String? = nil, awbNumberBarcode: String? = nil, b2BBuyerDetails: [String: Any]? = nil, brandLogo: String? = nil, companyDetail: CompanyDetail? = nil, conversionRate: ConversionRate? = nil, creditNoteId: String? = nil, currencyCode: String? = nil, currentDate: String? = nil, customerBillingDetail: CustomerBillingDetail? = nil, customerShippingDetail: CustomerShippingDetail? = nil, declarationTexts: [String]? = nil, deliveryPartnerDetail: DeliveryPartnerDetail? = nil, digitalsignature: String? = nil, disclaimer: String? = nil, image: Image? = nil, invoiceDetail: InvoiceDetail? = nil, isExport: Bool? = nil, isExportShipment: Bool? = nil, isQwik: [String: Any]? = nil, isSelfPickup: Bool? = nil, isSelfShip: Bool? = nil, meta: Meta? = nil, mode: String? = nil, orderType: String? = nil, payments: [PaymentData]? = nil, platformName: String? = nil, poNumber: String? = nil, productTable: ProductTable? = nil, registeredCompanyDetail: RegisteredCompanyDetail? = nil, returnDetail: ReturnDetail? = nil, shipmentId: String? = nil, shipmentIdBarcode: String? = nil, signedQrcode: String? = nil, storeDetail: StoreDetail? = nil, taxTable: TaxTable? = nil, totalItems: Double? = nil, totalValueOfGoods: Double? = nil, txnId: String? = nil, uid: String? = nil, upiQrcode: String? = nil, utr: String? = nil, waybills: [[String: Any]]? = nil) { self.isExport = isExport @@ -273,10 +265,6 @@ public extension PlatformClient.FileStorage { self.isSelfPickup = isSelfPickup - self.shipmentMeta = shipmentMeta - - self.orderMeta = orderMeta - self.platformName = platformName self.amountToBeCollected = amountToBeCollected @@ -703,30 +691,6 @@ public extension PlatformClient.FileStorage { - do { - shipmentMeta = try container.decode([String: Any].self, forKey: .shipmentMeta) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - orderMeta = try container.decode([String: Any].self, forKey: .orderMeta) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { platformName = try container.decode(String.self, forKey: .platformName) @@ -1042,16 +1006,6 @@ public extension PlatformClient.FileStorage { - try? container.encodeIfPresent(shipmentMeta, forKey: .shipmentMeta) - - - - - try? container.encodeIfPresent(orderMeta, forKey: .orderMeta) - - - - try? container.encodeIfPresent(platformName, forKey: .platformName) @@ -1119,11 +1073,11 @@ public extension PlatformClient.FileStorage { public extension PlatformClient.ApplicationClient.FileStorage { /* - Model: DummyTemplateDataPayload + Model: PdfPayloadDetails Used By: FileStorage */ - class DummyTemplateDataPayload: Codable { + class PdfPayloadDetails: Codable { public var isExport: Bool? @@ -1192,10 +1146,6 @@ public extension PlatformClient.ApplicationClient.FileStorage { public var isSelfPickup: Bool? - public var shipmentMeta: [String: Any]? - - public var orderMeta: [String: Any]? - public var platformName: String? public var amountToBeCollected: Double? @@ -1289,10 +1239,6 @@ public extension PlatformClient.ApplicationClient.FileStorage { case isSelfPickup = "is_self_pickup" - case shipmentMeta = "shipment_meta" - - case orderMeta = "order_meta" - case platformName = "platform_name" case amountToBeCollected = "amount_to_be_collected" @@ -1319,7 +1265,7 @@ public extension PlatformClient.ApplicationClient.FileStorage { } - public init(amountPaid: Double? = nil, amountToBeCollected: Double? = nil, appDomainName: String? = nil, awbNumberBarcode: String? = nil, b2BBuyerDetails: [String: Any]? = nil, brandLogo: String? = nil, companyDetail: CompanyDetail? = nil, conversionRate: ConversionRate? = nil, creditNoteId: String? = nil, currencyCode: String? = nil, currentDate: String? = nil, customerBillingDetail: CustomerBillingDetail? = nil, customerShippingDetail: CustomerShippingDetail? = nil, declarationTexts: [String]? = nil, deliveryPartnerDetail: DeliveryPartnerDetail? = nil, digitalsignature: String? = nil, disclaimer: String? = nil, image: Image? = nil, invoiceDetail: InvoiceDetail? = nil, isExport: Bool? = nil, isExportShipment: Bool? = nil, isQwik: [String: Any]? = nil, isSelfPickup: Bool? = nil, isSelfShip: Bool? = nil, meta: Meta? = nil, mode: String? = nil, orderMeta: [String: Any]? = nil, orderType: String? = nil, payments: [PaymentData]? = nil, platformName: String? = nil, poNumber: String? = nil, productTable: ProductTable? = nil, registeredCompanyDetail: RegisteredCompanyDetail? = nil, returnDetail: ReturnDetail? = nil, shipmentId: String? = nil, shipmentIdBarcode: String? = nil, shipmentMeta: [String: Any]? = nil, signedQrcode: String? = nil, storeDetail: StoreDetail? = nil, taxTable: TaxTable? = nil, totalItems: Double? = nil, totalValueOfGoods: Double? = nil, txnId: String? = nil, uid: String? = nil, upiQrcode: String? = nil, utr: String? = nil, waybills: [[String: Any]]? = nil) { + public init(amountPaid: Double? = nil, amountToBeCollected: Double? = nil, appDomainName: String? = nil, awbNumberBarcode: String? = nil, b2BBuyerDetails: [String: Any]? = nil, brandLogo: String? = nil, companyDetail: CompanyDetail? = nil, conversionRate: ConversionRate? = nil, creditNoteId: String? = nil, currencyCode: String? = nil, currentDate: String? = nil, customerBillingDetail: CustomerBillingDetail? = nil, customerShippingDetail: CustomerShippingDetail? = nil, declarationTexts: [String]? = nil, deliveryPartnerDetail: DeliveryPartnerDetail? = nil, digitalsignature: String? = nil, disclaimer: String? = nil, image: Image? = nil, invoiceDetail: InvoiceDetail? = nil, isExport: Bool? = nil, isExportShipment: Bool? = nil, isQwik: [String: Any]? = nil, isSelfPickup: Bool? = nil, isSelfShip: Bool? = nil, meta: Meta? = nil, mode: String? = nil, orderType: String? = nil, payments: [PaymentData]? = nil, platformName: String? = nil, poNumber: String? = nil, productTable: ProductTable? = nil, registeredCompanyDetail: RegisteredCompanyDetail? = nil, returnDetail: ReturnDetail? = nil, shipmentId: String? = nil, shipmentIdBarcode: String? = nil, signedQrcode: String? = nil, storeDetail: StoreDetail? = nil, taxTable: TaxTable? = nil, totalItems: Double? = nil, totalValueOfGoods: Double? = nil, txnId: String? = nil, uid: String? = nil, upiQrcode: String? = nil, utr: String? = nil, waybills: [[String: Any]]? = nil) { self.isExport = isExport @@ -1387,10 +1333,6 @@ public extension PlatformClient.ApplicationClient.FileStorage { self.isSelfPickup = isSelfPickup - self.shipmentMeta = shipmentMeta - - self.orderMeta = orderMeta - self.platformName = platformName self.amountToBeCollected = amountToBeCollected @@ -1817,30 +1759,6 @@ public extension PlatformClient.ApplicationClient.FileStorage { - do { - shipmentMeta = try container.decode([String: Any].self, forKey: .shipmentMeta) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - orderMeta = try container.decode([String: Any].self, forKey: .orderMeta) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { platformName = try container.decode(String.self, forKey: .platformName) @@ -2156,16 +2074,6 @@ public extension PlatformClient.ApplicationClient.FileStorage { - try? container.encodeIfPresent(shipmentMeta, forKey: .shipmentMeta) - - - - - try? container.encodeIfPresent(orderMeta, forKey: .orderMeta) - - - - try? container.encodeIfPresent(platformName, forKey: .platformName) diff --git a/Sources/code/platform/Models/FileStorage/PdfTemplateCreateSuccessDataFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/PdfTemplateCreateSuccessDataFileStoragePlatformModel.swift new file mode 100644 index 0000000000..c2831c5099 --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/PdfTemplateCreateSuccessDataFileStoragePlatformModel.swift @@ -0,0 +1,346 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: PdfTemplateCreateSuccessData + Used By: FileStorage + */ + + class PdfTemplateCreateSuccessData: Codable { + + + public var id: String? + + public var pdfTypeId: Int? + + public var format: String? + + public var template: String? + + public var countryCode: String? + + public var v: Int? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case pdfTypeId = "pdf_type_id" + + case format = "format" + + case template = "template" + + case countryCode = "country_code" + + case v = "__v" + + } + + public init(countryCode: String? = nil, format: String? = nil, pdfTypeId: Int? = nil, template: String? = nil, id: String? = nil, v: Int? = nil) { + + self.id = id + + self.pdfTypeId = pdfTypeId + + self.format = format + + self.template = template + + self.countryCode = countryCode + + self.v = v + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + format = try container.decode(String.self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + template = try container.decode(String.self, forKey: .template) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + v = try container.decode(Int.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(template, forKey: .template) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(v, forKey: .v) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: PdfTemplateCreateSuccessData + Used By: FileStorage + */ + + class PdfTemplateCreateSuccessData: Codable { + + + public var id: String? + + public var pdfTypeId: Int? + + public var format: String? + + public var template: String? + + public var countryCode: String? + + public var v: Int? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case pdfTypeId = "pdf_type_id" + + case format = "format" + + case template = "template" + + case countryCode = "country_code" + + case v = "__v" + + } + + public init(countryCode: String? = nil, format: String? = nil, pdfTypeId: Int? = nil, template: String? = nil, id: String? = nil, v: Int? = nil) { + + self.id = id + + self.pdfTypeId = pdfTypeId + + self.format = format + + self.template = template + + self.countryCode = countryCode + + self.v = v + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + format = try container.decode(String.self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + template = try container.decode(String.self, forKey: .template) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + v = try container.decode(Int.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(template, forKey: .template) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(v, forKey: .v) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/FileStorage/PdfTemplateCreateSuccessFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/PdfTemplateCreateSuccessFileStoragePlatformModel.swift new file mode 100644 index 0000000000..4c324b0b4b --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/PdfTemplateCreateSuccessFileStoragePlatformModel.swift @@ -0,0 +1,208 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: PdfTemplateCreateSuccess + Used By: FileStorage + */ + + class PdfTemplateCreateSuccess: Codable { + + + public var code: Int? + + public var success: Bool? + + public var data: PdfTemplateCreateSuccessData? + + + public enum CodingKeys: String, CodingKey { + + case code = "code" + + case success = "success" + + case data = "data" + + } + + public init(code: Int? = nil, data: PdfTemplateCreateSuccessData? = nil, success: Bool? = nil) { + + self.code = code + + self.success = success + + self.data = data + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + code = try container.decode(Int.self, forKey: .code) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + data = try container.decode(PdfTemplateCreateSuccessData.self, forKey: .data) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(code, forKey: .code) + + + + + try? container.encodeIfPresent(success, forKey: .success) + + + + + try? container.encodeIfPresent(data, forKey: .data) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: PdfTemplateCreateSuccess + Used By: FileStorage + */ + + class PdfTemplateCreateSuccess: Codable { + + + public var code: Int? + + public var success: Bool? + + public var data: PdfTemplateCreateSuccessData? + + + public enum CodingKeys: String, CodingKey { + + case code = "code" + + case success = "success" + + case data = "data" + + } + + public init(code: Int? = nil, data: PdfTemplateCreateSuccessData? = nil, success: Bool? = nil) { + + self.code = code + + self.success = success + + self.data = data + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + code = try container.decode(Int.self, forKey: .code) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + data = try container.decode(PdfTemplateCreateSuccessData.self, forKey: .data) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(code, forKey: .code) + + + + + try? container.encodeIfPresent(success, forKey: .success) + + + + + try? container.encodeIfPresent(data, forKey: .data) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/FileStorage/PdfTypeByIdDetailsFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/PdfTypeByIdDetailsFileStoragePlatformModel.swift new file mode 100644 index 0000000000..3dc34a0c35 --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/PdfTypeByIdDetailsFileStoragePlatformModel.swift @@ -0,0 +1,438 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: PdfTypeByIdDetails + Used By: FileStorage + */ + + class PdfTypeByIdDetails: Codable { + + + public var storeOs: Bool? + + public var countryCode: String? + + public var pdfTypeId: Int? + + public var v: Int? + + public var id: String? + + public var format: [String]? + + public var name: String? + + public var visibility: Bool? + + + public enum CodingKeys: String, CodingKey { + + case storeOs = "store_os" + + case countryCode = "country_code" + + case pdfTypeId = "pdf_type_id" + + case v = "__v" + + case id = "_id" + + case format = "format" + + case name = "name" + + case visibility = "visibility" + + } + + public init(countryCode: String? = nil, format: [String]? = nil, name: String? = nil, pdfTypeId: Int? = nil, storeOs: Bool? = nil, visibility: Bool? = nil, id: String? = nil, v: Int? = nil) { + + self.storeOs = storeOs + + self.countryCode = countryCode + + self.pdfTypeId = pdfTypeId + + self.v = v + + self.id = id + + self.format = format + + self.name = name + + self.visibility = visibility + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + storeOs = try container.decode(Bool.self, forKey: .storeOs) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + v = try container.decode(Int.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + format = try container.decode([String].self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + visibility = try container.decode(Bool.self, forKey: .visibility) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(storeOs, forKey: .storeOs) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(v, forKey: .v) + + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(visibility, forKey: .visibility) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: PdfTypeByIdDetails + Used By: FileStorage + */ + + class PdfTypeByIdDetails: Codable { + + + public var storeOs: Bool? + + public var countryCode: String? + + public var pdfTypeId: Int? + + public var v: Int? + + public var id: String? + + public var format: [String]? + + public var name: String? + + public var visibility: Bool? + + + public enum CodingKeys: String, CodingKey { + + case storeOs = "store_os" + + case countryCode = "country_code" + + case pdfTypeId = "pdf_type_id" + + case v = "__v" + + case id = "_id" + + case format = "format" + + case name = "name" + + case visibility = "visibility" + + } + + public init(countryCode: String? = nil, format: [String]? = nil, name: String? = nil, pdfTypeId: Int? = nil, storeOs: Bool? = nil, visibility: Bool? = nil, id: String? = nil, v: Int? = nil) { + + self.storeOs = storeOs + + self.countryCode = countryCode + + self.pdfTypeId = pdfTypeId + + self.v = v + + self.id = id + + self.format = format + + self.name = name + + self.visibility = visibility + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + storeOs = try container.decode(Bool.self, forKey: .storeOs) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + v = try container.decode(Int.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + format = try container.decode([String].self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + visibility = try container.decode(Bool.self, forKey: .visibility) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(storeOs, forKey: .storeOs) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(v, forKey: .v) + + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(visibility, forKey: .visibility) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/FileStorage/ProxyResponseFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/ProxyFileAccessFileStoragePlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/FileStorage/ProxyResponseFileStoragePlatformModel.swift rename to Sources/code/platform/Models/FileStorage/ProxyFileAccessFileStoragePlatformModel.swift index 21ab346edd..6c7e516701 100644 --- a/Sources/code/platform/Models/FileStorage/ProxyResponseFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/ProxyFileAccessFileStoragePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.FileStorage { /* - Model: ProxyResponse + Model: ProxyFileAccess Used By: FileStorage */ - class ProxyResponse: Codable { + class ProxyFileAccess: Codable { public var data: [String: Any]? @@ -84,11 +84,11 @@ public extension PlatformClient.FileStorage { public extension PlatformClient.ApplicationClient.FileStorage { /* - Model: ProxyResponse + Model: ProxyFileAccess Used By: FileStorage */ - class ProxyResponse: Codable { + class ProxyFileAccess: Codable { public var data: [String: Any]? diff --git a/Sources/code/platform/Models/FileStorage/SignUrlRequestFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/SignUrlFileStoragePlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/FileStorage/SignUrlRequestFileStoragePlatformModel.swift rename to Sources/code/platform/Models/FileStorage/SignUrlFileStoragePlatformModel.swift index 7862fe5270..fb55518596 100644 --- a/Sources/code/platform/Models/FileStorage/SignUrlRequestFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/SignUrlFileStoragePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.FileStorage { /* - Model: SignUrlRequest + Model: SignUrl Used By: FileStorage */ - class SignUrlRequest: Codable { + class SignUrl: Codable { public var expiry: Int @@ -70,11 +70,11 @@ public extension PlatformClient.FileStorage { public extension PlatformClient.ApplicationClient.FileStorage { /* - Model: SignUrlRequest + Model: SignUrl Used By: FileStorage */ - class SignUrlRequest: Codable { + class SignUrl: Codable { public var expiry: Int diff --git a/Sources/code/platform/Models/FileStorage/SignUrlResponseFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/SignUrlResultFileStoragePlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/FileStorage/SignUrlResponseFileStoragePlatformModel.swift rename to Sources/code/platform/Models/FileStorage/SignUrlResultFileStoragePlatformModel.swift index 13dd3a35dd..b219c45715 100644 --- a/Sources/code/platform/Models/FileStorage/SignUrlResponseFileStoragePlatformModel.swift +++ b/Sources/code/platform/Models/FileStorage/SignUrlResultFileStoragePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.FileStorage { /* - Model: SignUrlResponse + Model: SignUrlResult Used By: FileStorage */ - class SignUrlResponse: Codable { + class SignUrlResult: Codable { public var urls: [Urls] @@ -54,11 +54,11 @@ public extension PlatformClient.FileStorage { public extension PlatformClient.ApplicationClient.FileStorage { /* - Model: SignUrlResponse + Model: SignUrlResult Used By: FileStorage */ - class SignUrlResponse: Codable { + class SignUrlResult: Codable { public var urls: [Urls] diff --git a/Sources/code/platform/Models/FileStorage/UpdatePdfTypeFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/UpdatePdfTypeFileStoragePlatformModel.swift new file mode 100644 index 0000000000..21b2ee59e9 --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/UpdatePdfTypeFileStoragePlatformModel.swift @@ -0,0 +1,392 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: UpdatePdfType + Used By: FileStorage + */ + + class UpdatePdfType: Codable { + + + public var pdfTypeId: Int? + + public var name: String? + + public var format: [String]? + + public var visibility: Bool? + + public var schema: [String: Any]? + + public var storeOs: Bool? + + public var countryCode: String? + + + public enum CodingKeys: String, CodingKey { + + case pdfTypeId = "pdf_type_id" + + case name = "name" + + case format = "format" + + case visibility = "visibility" + + case schema = "schema" + + case storeOs = "store_os" + + case countryCode = "country_code" + + } + + public init(countryCode: String? = nil, format: [String]? = nil, name: String? = nil, pdfTypeId: Int? = nil, schema: [String: Any]? = nil, storeOs: Bool? = nil, visibility: Bool? = nil) { + + self.pdfTypeId = pdfTypeId + + self.name = name + + self.format = format + + self.visibility = visibility + + self.schema = schema + + self.storeOs = storeOs + + self.countryCode = countryCode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + format = try container.decode([String].self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + visibility = try container.decode(Bool.self, forKey: .visibility) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + schema = try container.decode([String: Any].self, forKey: .schema) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + storeOs = try container.decode(Bool.self, forKey: .storeOs) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(visibility, forKey: .visibility) + + + + + try? container.encodeIfPresent(schema, forKey: .schema) + + + + + try? container.encodeIfPresent(storeOs, forKey: .storeOs) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: UpdatePdfType + Used By: FileStorage + */ + + class UpdatePdfType: Codable { + + + public var pdfTypeId: Int? + + public var name: String? + + public var format: [String]? + + public var visibility: Bool? + + public var schema: [String: Any]? + + public var storeOs: Bool? + + public var countryCode: String? + + + public enum CodingKeys: String, CodingKey { + + case pdfTypeId = "pdf_type_id" + + case name = "name" + + case format = "format" + + case visibility = "visibility" + + case schema = "schema" + + case storeOs = "store_os" + + case countryCode = "country_code" + + } + + public init(countryCode: String? = nil, format: [String]? = nil, name: String? = nil, pdfTypeId: Int? = nil, schema: [String: Any]? = nil, storeOs: Bool? = nil, visibility: Bool? = nil) { + + self.pdfTypeId = pdfTypeId + + self.name = name + + self.format = format + + self.visibility = visibility + + self.schema = schema + + self.storeOs = storeOs + + self.countryCode = countryCode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + format = try container.decode([String].self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + visibility = try container.decode(Bool.self, forKey: .visibility) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + schema = try container.decode([String: Any].self, forKey: .schema) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + storeOs = try container.decode(Bool.self, forKey: .storeOs) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(visibility, forKey: .visibility) + + + + + try? container.encodeIfPresent(schema, forKey: .schema) + + + + + try? container.encodeIfPresent(storeOs, forKey: .storeOs) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/FileStorage/UpdateTemplateFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/UpdateTemplateFileStoragePlatformModel.swift new file mode 100644 index 0000000000..f34e9fdbac --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/UpdateTemplateFileStoragePlatformModel.swift @@ -0,0 +1,300 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: UpdateTemplate + Used By: FileStorage + */ + + class UpdateTemplate: Codable { + + + public var pdfTypeId: Int? + + public var format: String? + + public var countryCode: String? + + public var template: String? + + public var storeOs: Bool? + + + public enum CodingKeys: String, CodingKey { + + case pdfTypeId = "pdf_type_id" + + case format = "format" + + case countryCode = "country_code" + + case template = "template" + + case storeOs = "store_os" + + } + + public init(countryCode: String? = nil, format: String? = nil, pdfTypeId: Int? = nil, storeOs: Bool? = nil, template: String? = nil) { + + self.pdfTypeId = pdfTypeId + + self.format = format + + self.countryCode = countryCode + + self.template = template + + self.storeOs = storeOs + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + format = try container.decode(String.self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + template = try container.decode(String.self, forKey: .template) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + storeOs = try container.decode(Bool.self, forKey: .storeOs) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(template, forKey: .template) + + + + + try? container.encodeIfPresent(storeOs, forKey: .storeOs) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: UpdateTemplate + Used By: FileStorage + */ + + class UpdateTemplate: Codable { + + + public var pdfTypeId: Int? + + public var format: String? + + public var countryCode: String? + + public var template: String? + + public var storeOs: Bool? + + + public enum CodingKeys: String, CodingKey { + + case pdfTypeId = "pdf_type_id" + + case format = "format" + + case countryCode = "country_code" + + case template = "template" + + case storeOs = "store_os" + + } + + public init(countryCode: String? = nil, format: String? = nil, pdfTypeId: Int? = nil, storeOs: Bool? = nil, template: String? = nil) { + + self.pdfTypeId = pdfTypeId + + self.format = format + + self.countryCode = countryCode + + self.template = template + + self.storeOs = storeOs + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pdfTypeId = try container.decode(Int.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + format = try container.decode(String.self, forKey: .format) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + template = try container.decode(String.self, forKey: .template) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + storeOs = try container.decode(Bool.self, forKey: .storeOs) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(format, forKey: .format) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + + + try? container.encodeIfPresent(template, forKey: .template) + + + + + try? container.encodeIfPresent(storeOs, forKey: .storeOs) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/FileStorage/UpdatedDefaultTemplateByIdFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/UpdatedDefaultTemplateByIdFileStoragePlatformModel.swift new file mode 100644 index 0000000000..6f997eee92 --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/UpdatedDefaultTemplateByIdFileStoragePlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: UpdatedDefaultTemplateById + Used By: FileStorage + */ + + class UpdatedDefaultTemplateById: Codable { + + + public var data: PdfConfigurationData? + + public var success: Bool? + + + public enum CodingKeys: String, CodingKey { + + case data = "data" + + case success = "success" + + } + + public init(data: PdfConfigurationData? = nil, success: Bool? = nil) { + + self.data = data + + self.success = success + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + data = try container.decode(PdfConfigurationData.self, forKey: .data) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: UpdatedDefaultTemplateById + Used By: FileStorage + */ + + class UpdatedDefaultTemplateById: Codable { + + + public var data: PdfConfigurationData? + + public var success: Bool? + + + public enum CodingKeys: String, CodingKey { + + case data = "data" + + case success = "success" + + } + + public init(data: PdfConfigurationData? = nil, success: Bool? = nil) { + + self.data = data + + self.success = success + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + data = try container.decode(PdfConfigurationData.self, forKey: .data) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/FileStorage/savePdfPayloadFileStoragePlatformModel.swift b/Sources/code/platform/Models/FileStorage/savePdfPayloadFileStoragePlatformModel.swift new file mode 100644 index 0000000000..f9042c79cf --- /dev/null +++ b/Sources/code/platform/Models/FileStorage/savePdfPayloadFileStoragePlatformModel.swift @@ -0,0 +1,208 @@ + + +import Foundation + + +public extension PlatformClient.FileStorage { + /* + Model: savePdfPayload + Used By: FileStorage + */ + + class savePdfPayload: Codable { + + + public var pdfTypeId: Double? + + public var payload: PdfPayloadDetails? + + public var countryCode: String? + + + public enum CodingKeys: String, CodingKey { + + case pdfTypeId = "pdf_type_id" + + case payload = "payload" + + case countryCode = "country_code" + + } + + public init(countryCode: String? = nil, payload: PdfPayloadDetails? = nil, pdfTypeId: Double? = nil) { + + self.pdfTypeId = pdfTypeId + + self.payload = payload + + self.countryCode = countryCode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pdfTypeId = try container.decode(Double.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + payload = try container.decode(PdfPayloadDetails.self, forKey: .payload) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(payload, forKey: .payload) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.FileStorage { + /* + Model: savePdfPayload + Used By: FileStorage + */ + + class savePdfPayload: Codable { + + + public var pdfTypeId: Double? + + public var payload: PdfPayloadDetails? + + public var countryCode: String? + + + public enum CodingKeys: String, CodingKey { + + case pdfTypeId = "pdf_type_id" + + case payload = "payload" + + case countryCode = "country_code" + + } + + public init(countryCode: String? = nil, payload: PdfPayloadDetails? = nil, pdfTypeId: Double? = nil) { + + self.pdfTypeId = pdfTypeId + + self.payload = payload + + self.countryCode = countryCode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pdfTypeId = try container.decode(Double.self, forKey: .pdfTypeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + payload = try container.decode(PdfPayloadDetails.self, forKey: .payload) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pdfTypeId, forKey: .pdfTypeId) + + + + + try? container.encodeIfPresent(payload, forKey: .payload) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Finance/ChannelDisplayNameResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/ChannelDisplayNameResponseFinancePlatformModel.swift deleted file mode 100644 index 80e658946f..0000000000 --- a/Sources/code/platform/Models/Finance/ChannelDisplayNameResponseFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: ChannelDisplayNameResponse - Used By: Finance - */ - - class ChannelDisplayNameResponse: Codable { - - - public var success: Bool? - - public var items: [ChannelDisplayNameItems]? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case items = "items" - - } - - public init(items: [ChannelDisplayNameItems]? = nil, success: Bool? = nil) { - - self.success = success - - self.items = items - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - items = try container.decode([ChannelDisplayNameItems].self, forKey: .items) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(success, forKey: .success) - - - - - try? container.encodeIfPresent(items, forKey: .items) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CnDetailsFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CnDetailsFinancePlatformModel.swift deleted file mode 100644 index f6558128f0..0000000000 --- a/Sources/code/platform/Models/Finance/CnDetailsFinancePlatformModel.swift +++ /dev/null @@ -1,246 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CnDetails - Used By: Finance - */ - - class CnDetails: Codable { - - - public var staffId: String? - - public var expiryDate: String? - - public var channelOfIssuance: String? - - public var orderId: String? - - public var dateIssued: String? - - public var orderingChannel: String? - - public var shipmentId: String? - - public var storeId: String? - - public var invoiceNumber: String? - - - public enum CodingKeys: String, CodingKey { - - case staffId = "staff_id" - - case expiryDate = "expiry_date" - - case channelOfIssuance = "channel_of_issuance" - - case orderId = "order_id" - - case dateIssued = "date_issued" - - case orderingChannel = "ordering_channel" - - case shipmentId = "shipment_id" - - case storeId = "store_id" - - case invoiceNumber = "invoice_number" - - } - - public init(channelOfIssuance: String? = nil, dateIssued: String? = nil, expiryDate: String? = nil, invoiceNumber: String? = nil, orderingChannel: String? = nil, orderId: String? = nil, shipmentId: String? = nil, staffId: String? = nil, storeId: String? = nil) { - - self.staffId = staffId - - self.expiryDate = expiryDate - - self.channelOfIssuance = channelOfIssuance - - self.orderId = orderId - - self.dateIssued = dateIssued - - self.orderingChannel = orderingChannel - - self.shipmentId = shipmentId - - self.storeId = storeId - - self.invoiceNumber = invoiceNumber - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - staffId = try container.decode(String.self, forKey: .staffId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - expiryDate = try container.decode(String.self, forKey: .expiryDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - channelOfIssuance = try container.decode(String.self, forKey: .channelOfIssuance) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - orderId = try container.decode(String.self, forKey: .orderId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - dateIssued = try container.decode(String.self, forKey: .dateIssued) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - orderingChannel = try container.decode(String.self, forKey: .orderingChannel) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - shipmentId = try container.decode(String.self, forKey: .shipmentId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - storeId = try container.decode(String.self, forKey: .storeId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - invoiceNumber = try container.decode(String.self, forKey: .invoiceNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(staffId, forKey: .staffId) - - - - - try? container.encodeIfPresent(expiryDate, forKey: .expiryDate) - - - - - try? container.encodeIfPresent(channelOfIssuance, forKey: .channelOfIssuance) - - - - - try? container.encodeIfPresent(orderId, forKey: .orderId) - - - - - try? container.encodeIfPresent(dateIssued, forKey: .dateIssued) - - - - - try? container.encodeIfPresent(orderingChannel, forKey: .orderingChannel) - - - - - try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) - - - - - try? container.encodeIfPresent(storeId, forKey: .storeId) - - - - - try? container.encodeIfPresent(invoiceNumber, forKey: .invoiceNumber) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CnGenerateReportFiltersFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CnGenerateReportFiltersFinancePlatformModel.swift deleted file mode 100644 index b22efde995..0000000000 --- a/Sources/code/platform/Models/Finance/CnGenerateReportFiltersFinancePlatformModel.swift +++ /dev/null @@ -1,200 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CnGenerateReportFilters - Used By: Finance - */ - - class CnGenerateReportFilters: Codable { - - - public var staffId: [String]? - - public var channelOfIssuance: [String]? - - public var utilisation: [String]? - - public var orderingChannel: [String]? - - public var storeId: [Int]? - - public var typeOfTransaction: [String]? - - public var issuanceChannel: [String]? - - - public enum CodingKeys: String, CodingKey { - - case staffId = "staff_id" - - case channelOfIssuance = "channel_of_issuance" - - case utilisation = "utilisation" - - case orderingChannel = "ordering_channel" - - case storeId = "store_id" - - case typeOfTransaction = "type_of_transaction" - - case issuanceChannel = "issuance_channel" - - } - - public init(channelOfIssuance: [String]? = nil, issuanceChannel: [String]? = nil, orderingChannel: [String]? = nil, staffId: [String]? = nil, storeId: [Int]? = nil, typeOfTransaction: [String]? = nil, utilisation: [String]? = nil) { - - self.staffId = staffId - - self.channelOfIssuance = channelOfIssuance - - self.utilisation = utilisation - - self.orderingChannel = orderingChannel - - self.storeId = storeId - - self.typeOfTransaction = typeOfTransaction - - self.issuanceChannel = issuanceChannel - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - staffId = try container.decode([String].self, forKey: .staffId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - channelOfIssuance = try container.decode([String].self, forKey: .channelOfIssuance) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - utilisation = try container.decode([String].self, forKey: .utilisation) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - orderingChannel = try container.decode([String].self, forKey: .orderingChannel) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - storeId = try container.decode([Int].self, forKey: .storeId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - typeOfTransaction = try container.decode([String].self, forKey: .typeOfTransaction) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - issuanceChannel = try container.decode([String].self, forKey: .issuanceChannel) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(staffId, forKey: .staffId) - - - - - try? container.encodeIfPresent(channelOfIssuance, forKey: .channelOfIssuance) - - - - - try? container.encodeIfPresent(utilisation, forKey: .utilisation) - - - - - try? container.encodeIfPresent(orderingChannel, forKey: .orderingChannel) - - - - - try? container.encodeIfPresent(storeId, forKey: .storeId) - - - - - try? container.encodeIfPresent(typeOfTransaction, forKey: .typeOfTransaction) - - - - - try? container.encodeIfPresent(issuanceChannel, forKey: .issuanceChannel) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CnGenerateReportFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CnGenerateReportFinancePlatformModel.swift deleted file mode 100644 index 61e00b1e54..0000000000 --- a/Sources/code/platform/Models/Finance/CnGenerateReportFinancePlatformModel.swift +++ /dev/null @@ -1,269 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CnGenerateReport - Used By: Finance - */ - - class CnGenerateReport: Codable { - - - public var page: Int? - - public var endDate: String? - - public var pageSize: Int? - - public var filters: CnGenerateReportFilters? - - public var affiliateId: String? - - public var meta: GenerateReportFilters? - - public var search: String? - - public var reportId: String? - - public var searchType: String? - - public var startDate: String? - - - public enum CodingKeys: String, CodingKey { - - case page = "page" - - case endDate = "end_date" - - case pageSize = "page_size" - - case filters = "filters" - - case affiliateId = "affiliate_id" - - case meta = "meta" - - case search = "search" - - case reportId = "report_id" - - case searchType = "search_type" - - case startDate = "start_date" - - } - - public init(affiliateId: String? = nil, endDate: String? = nil, filters: CnGenerateReportFilters? = nil, meta: GenerateReportFilters? = nil, page: Int? = nil, pageSize: Int? = nil, reportId: String? = nil, search: String? = nil, searchType: String? = nil, startDate: String? = nil) { - - self.page = page - - self.endDate = endDate - - self.pageSize = pageSize - - self.filters = filters - - self.affiliateId = affiliateId - - self.meta = meta - - self.search = search - - self.reportId = reportId - - self.searchType = searchType - - self.startDate = startDate - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - page = try container.decode(Int.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - endDate = try container.decode(String.self, forKey: .endDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - pageSize = try container.decode(Int.self, forKey: .pageSize) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - filters = try container.decode(CnGenerateReportFilters.self, forKey: .filters) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - affiliateId = try container.decode(String.self, forKey: .affiliateId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - meta = try container.decode(GenerateReportFilters.self, forKey: .meta) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - search = try container.decode(String.self, forKey: .search) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - reportId = try container.decode(String.self, forKey: .reportId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - searchType = try container.decode(String.self, forKey: .searchType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - startDate = try container.decode(String.self, forKey: .startDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(page, forKey: .page) - - - - - try? container.encodeIfPresent(endDate, forKey: .endDate) - - - - - try? container.encodeIfPresent(pageSize, forKey: .pageSize) - - - - - try? container.encodeIfPresent(filters, forKey: .filters) - - - - - try? container.encodeIfPresent(affiliateId, forKey: .affiliateId) - - - - - try? container.encodeIfPresent(meta, forKey: .meta) - - - - - try? container.encodeIfPresent(search, forKey: .search) - - - - - try? container.encodeIfPresent(reportId, forKey: .reportId) - - - - - try? container.encodeIfPresent(searchType, forKey: .searchType) - - - - - try? container.encodeIfPresent(startDate, forKey: .startDate) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CnReferenceNumberFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CnReferenceNumberFinancePlatformModel.swift deleted file mode 100644 index c11beae709..0000000000 --- a/Sources/code/platform/Models/Finance/CnReferenceNumberFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CnReferenceNumber - Used By: Finance - */ - - class CnReferenceNumber: Codable { - - - public var cnReferenceNumber: String? - - - public enum CodingKeys: String, CodingKey { - - case cnReferenceNumber = "cn_reference_number" - - } - - public init(cnReferenceNumber: String? = nil) { - - self.cnReferenceNumber = cnReferenceNumber - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - cnReferenceNumber = try container.decode(String.self, forKey: .cnReferenceNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(cnReferenceNumber, forKey: .cnReferenceNumber) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigFinancePlatformModel.swift deleted file mode 100644 index db5795d7ea..0000000000 --- a/Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigFinancePlatformModel.swift +++ /dev/null @@ -1,269 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CreateSellerCreditNoteConfig - Used By: Finance - */ - - class CreateSellerCreditNoteConfig: Codable { - - - public var isCnAsRefundMethod: Bool? - - public var affiliateId: String? - - public var sourceChannel: [String]? - - public var sellerId: Int? - - public var notificationEvents: CreditNoteConfigNotificationEvents? - - public var salesChannelName: String? - - public var orderingChannel: [String]? - - public var validity: Int? - - public var currencyType: String? - - public var slugValues: [String]? - - - public enum CodingKeys: String, CodingKey { - - case isCnAsRefundMethod = "is_cn_as_refund_method" - - case affiliateId = "affiliate_id" - - case sourceChannel = "source_channel" - - case sellerId = "seller_id" - - case notificationEvents = "notification_events" - - case salesChannelName = "sales_channel_name" - - case orderingChannel = "ordering_channel" - - case validity = "validity" - - case currencyType = "currency_type" - - case slugValues = "slug_values" - - } - - public init(affiliateId: String? = nil, currencyType: String? = nil, isCnAsRefundMethod: Bool? = nil, notificationEvents: CreditNoteConfigNotificationEvents? = nil, orderingChannel: [String]? = nil, salesChannelName: String? = nil, sellerId: Int? = nil, slugValues: [String]? = nil, sourceChannel: [String]? = nil, validity: Int? = nil) { - - self.isCnAsRefundMethod = isCnAsRefundMethod - - self.affiliateId = affiliateId - - self.sourceChannel = sourceChannel - - self.sellerId = sellerId - - self.notificationEvents = notificationEvents - - self.salesChannelName = salesChannelName - - self.orderingChannel = orderingChannel - - self.validity = validity - - self.currencyType = currencyType - - self.slugValues = slugValues - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - isCnAsRefundMethod = try container.decode(Bool.self, forKey: .isCnAsRefundMethod) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - affiliateId = try container.decode(String.self, forKey: .affiliateId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - sourceChannel = try container.decode([String].self, forKey: .sourceChannel) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - sellerId = try container.decode(Int.self, forKey: .sellerId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - notificationEvents = try container.decode(CreditNoteConfigNotificationEvents.self, forKey: .notificationEvents) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - salesChannelName = try container.decode(String.self, forKey: .salesChannelName) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - orderingChannel = try container.decode([String].self, forKey: .orderingChannel) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - validity = try container.decode(Int.self, forKey: .validity) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - currencyType = try container.decode(String.self, forKey: .currencyType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - slugValues = try container.decode([String].self, forKey: .slugValues) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(isCnAsRefundMethod, forKey: .isCnAsRefundMethod) - - - - - try? container.encodeIfPresent(affiliateId, forKey: .affiliateId) - - - - - try? container.encodeIfPresent(sourceChannel, forKey: .sourceChannel) - - - - - try? container.encodeIfPresent(sellerId, forKey: .sellerId) - - - - - try? container.encodeIfPresent(notificationEvents, forKey: .notificationEvents) - - - - - try? container.encodeIfPresent(salesChannelName, forKey: .salesChannelName) - - - - - try? container.encodeIfPresent(orderingChannel, forKey: .orderingChannel) - - - - - try? container.encodeIfPresent(validity, forKey: .validity) - - - - - try? container.encodeIfPresent(currencyType, forKey: .currencyType) - - - - - try? container.encodeIfPresent(slugValues, forKey: .slugValues) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigReqFinancePlatformModel.swift deleted file mode 100644 index f67eb31351..0000000000 --- a/Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CreateSellerCreditNoteConfigReq - Used By: Finance - */ - - class CreateSellerCreditNoteConfigReq: Codable { - - - public var data: CreateSellerCreditNoteConfig? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: CreateSellerCreditNoteConfig? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(CreateSellerCreditNoteConfig.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigResponseFinancePlatformModel.swift deleted file mode 100644 index d830dedafa..0000000000 --- a/Sources/code/platform/Models/Finance/CreateSellerCreditNoteConfigResponseFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CreateSellerCreditNoteConfigResponse - Used By: Finance - */ - - class CreateSellerCreditNoteConfigResponse: Codable { - - - public var success: Bool? - - public var message: String? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case message = "message" - - } - - public init(message: String? = nil, success: Bool? = nil) { - - self.success = success - - self.message = message - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CreditNoteConfigNotificationEventsFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CreditNoteConfigNotificationEventsFinancePlatformModel.swift deleted file mode 100644 index b97594ee59..0000000000 --- a/Sources/code/platform/Models/Finance/CreditNoteConfigNotificationEventsFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CreditNoteConfigNotificationEvents - Used By: Finance - */ - - class CreditNoteConfigNotificationEvents: Codable { - - - public var expirationReminderToCustomer: Int? - - - public enum CodingKeys: String, CodingKey { - - case expirationReminderToCustomer = "expiration_reminder_to_customer" - - } - - public init(expirationReminderToCustomer: Int? = nil) { - - self.expirationReminderToCustomer = expirationReminderToCustomer - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - expirationReminderToCustomer = try container.decode(Int.self, forKey: .expirationReminderToCustomer) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(expirationReminderToCustomer, forKey: .expirationReminderToCustomer) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CreditNoteDetailsFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CreditNoteDetailsFinancePlatformModel.swift deleted file mode 100644 index 84947b8885..0000000000 --- a/Sources/code/platform/Models/Finance/CreditNoteDetailsFinancePlatformModel.swift +++ /dev/null @@ -1,269 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CreditNoteDetails - Used By: Finance - */ - - class CreditNoteDetails: Codable { - - - public var currency: String? - - public var currentAmountUsed: Double? - - public var cnStatus: String? - - public var customerMobileNumber: String? - - public var cnReferenceNumber: String? - - public var cnDetails: CnDetails? - - public var redemptionDetails: [RedemptionDetails]? - - public var remainingCnAmount: Int? - - public var availableCnBalance: Int? - - public var cnAmount: Int? - - - public enum CodingKeys: String, CodingKey { - - case currency = "currency" - - case currentAmountUsed = "current_amount_used" - - case cnStatus = "cn_status" - - case customerMobileNumber = "customer_mobile_number" - - case cnReferenceNumber = "cn_reference_number" - - case cnDetails = "cn_details" - - case redemptionDetails = "redemption_details" - - case remainingCnAmount = "remaining_cn_amount" - - case availableCnBalance = "available_cn_balance" - - case cnAmount = "cn_amount" - - } - - public init(availableCnBalance: Int? = nil, cnAmount: Int? = nil, cnDetails: CnDetails? = nil, cnReferenceNumber: String? = nil, cnStatus: String? = nil, currency: String? = nil, currentAmountUsed: Double? = nil, customerMobileNumber: String? = nil, redemptionDetails: [RedemptionDetails]? = nil, remainingCnAmount: Int? = nil) { - - self.currency = currency - - self.currentAmountUsed = currentAmountUsed - - self.cnStatus = cnStatus - - self.customerMobileNumber = customerMobileNumber - - self.cnReferenceNumber = cnReferenceNumber - - self.cnDetails = cnDetails - - self.redemptionDetails = redemptionDetails - - self.remainingCnAmount = remainingCnAmount - - self.availableCnBalance = availableCnBalance - - self.cnAmount = cnAmount - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - currency = try container.decode(String.self, forKey: .currency) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - currentAmountUsed = try container.decode(Double.self, forKey: .currentAmountUsed) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - cnStatus = try container.decode(String.self, forKey: .cnStatus) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - customerMobileNumber = try container.decode(String.self, forKey: .customerMobileNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - cnReferenceNumber = try container.decode(String.self, forKey: .cnReferenceNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - cnDetails = try container.decode(CnDetails.self, forKey: .cnDetails) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - redemptionDetails = try container.decode([RedemptionDetails].self, forKey: .redemptionDetails) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - remainingCnAmount = try container.decode(Int.self, forKey: .remainingCnAmount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - availableCnBalance = try container.decode(Int.self, forKey: .availableCnBalance) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - cnAmount = try container.decode(Int.self, forKey: .cnAmount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(currency, forKey: .currency) - - - - - try? container.encodeIfPresent(currentAmountUsed, forKey: .currentAmountUsed) - - - - - try? container.encodeIfPresent(cnStatus, forKey: .cnStatus) - - - - - try? container.encodeIfPresent(customerMobileNumber, forKey: .customerMobileNumber) - - - - - try? container.encodeIfPresent(cnReferenceNumber, forKey: .cnReferenceNumber) - - - - - try? container.encodeIfPresent(cnDetails, forKey: .cnDetails) - - - - - try? container.encodeIfPresent(redemptionDetails, forKey: .redemptionDetails) - - - - - try? container.encodeIfPresent(remainingCnAmount, forKey: .remainingCnAmount) - - - - - try? container.encodeIfPresent(availableCnBalance, forKey: .availableCnBalance) - - - - - try? container.encodeIfPresent(cnAmount, forKey: .cnAmount) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CreditNoteDetailsReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CreditNoteDetailsReqFinancePlatformModel.swift deleted file mode 100644 index 9b868b6e5a..0000000000 --- a/Sources/code/platform/Models/Finance/CreditNoteDetailsReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CreditNoteDetailsReq - Used By: Finance - */ - - class CreditNoteDetailsReq: Codable { - - - public var data: CnReferenceNumber? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: CnReferenceNumber? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(CnReferenceNumber.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CreditNoteDetailsResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CreditNoteDetailsResponseFinancePlatformModel.swift deleted file mode 100644 index 3a71da6f31..0000000000 --- a/Sources/code/platform/Models/Finance/CreditNoteDetailsResponseFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CreditNoteDetailsResponse - Used By: Finance - */ - - class CreditNoteDetailsResponse: Codable { - - - public var success: Bool? - - public var data: CreditNoteDetails? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case data = "data" - - } - - public init(data: CreditNoteDetails? = nil, success: Bool? = nil) { - - self.success = success - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - data = try container.decode(CreditNoteDetails.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CreditlineDataPlatformReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CreditlineDataPlatformReqFinancePlatformModel.swift deleted file mode 100644 index 28c2e2569a..0000000000 --- a/Sources/code/platform/Models/Finance/CreditlineDataPlatformReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CreditlineDataPlatformReq - Used By: Finance - */ - - class CreditlineDataPlatformReq: Codable { - - - public var data: CreditlineDataPlatformPayload? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: CreditlineDataPlatformPayload? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(CreditlineDataPlatformPayload.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/CreditlineDataPlatformResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/CreditlineDataPlatformResponseFinancePlatformModel.swift deleted file mode 100644 index 23989e79f0..0000000000 --- a/Sources/code/platform/Models/Finance/CreditlineDataPlatformResponseFinancePlatformModel.swift +++ /dev/null @@ -1,200 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: CreditlineDataPlatformResponse - Used By: Finance - */ - - class CreditlineDataPlatformResponse: Codable { - - - public var items: [[String: Any]]? - - public var code: Int? - - public var showMr: Bool? - - public var page: Page? - - public var message: String? - - public var headers: [String]? - - public var itemCount: Int? - - - public enum CodingKeys: String, CodingKey { - - case items = "items" - - case code = "code" - - case showMr = "show_mr" - - case page = "page" - - case message = "message" - - case headers = "headers" - - case itemCount = "item_count" - - } - - public init(code: Int? = nil, headers: [String]? = nil, items: [[String: Any]]? = nil, itemCount: Int? = nil, message: String? = nil, page: Page? = nil, showMr: Bool? = nil) { - - self.items = items - - self.code = code - - self.showMr = showMr - - self.page = page - - self.message = message - - self.headers = headers - - self.itemCount = itemCount - - } - - 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) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - code = try container.decode(Int.self, forKey: .code) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - showMr = try container.decode(Bool.self, forKey: .showMr) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - page = try container.decode(Page.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - headers = try container.decode([String].self, forKey: .headers) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - itemCount = try container.decode(Int.self, forKey: .itemCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(items, forKey: .items) - - - - - try? container.encodeIfPresent(code, forKey: .code) - - - - - try? container.encodeIfPresent(showMr, forKey: .showMr) - - - - - try? container.encodeIfPresent(page, forKey: .page) - - - - - try? container.encodeIfPresent(message, forKey: .message) - - - - - try? container.encodeIfPresent(headers, forKey: .headers) - - - - - try? container.encodeIfPresent(itemCount, forKey: .itemCount) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DeleteConfigFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DeleteConfigFinancePlatformModel.swift deleted file mode 100644 index 68a4ec6d68..0000000000 --- a/Sources/code/platform/Models/Finance/DeleteConfigFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DeleteConfig - Used By: Finance - */ - - class DeleteConfig: Codable { - - - public var affiliateId: String? - - public var slugValues: [String]? - - public var sellerId: Int? - - - public enum CodingKeys: String, CodingKey { - - case affiliateId = "affiliate_id" - - case slugValues = "slug_values" - - case sellerId = "seller_id" - - } - - public init(affiliateId: String? = nil, sellerId: Int? = nil, slugValues: [String]? = nil) { - - self.affiliateId = affiliateId - - self.slugValues = slugValues - - self.sellerId = sellerId - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - affiliateId = try container.decode(String.self, forKey: .affiliateId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - slugValues = try container.decode([String].self, forKey: .slugValues) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - sellerId = try container.decode(Int.self, forKey: .sellerId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(affiliateId, forKey: .affiliateId) - - - - - try? container.encodeIfPresent(slugValues, forKey: .slugValues) - - - - - try? container.encodeIfPresent(sellerId, forKey: .sellerId) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DeleteConfigReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DeleteConfigReqFinancePlatformModel.swift deleted file mode 100644 index aa1208f42c..0000000000 --- a/Sources/code/platform/Models/Finance/DeleteConfigReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DeleteConfigReq - Used By: Finance - */ - - class DeleteConfigReq: Codable { - - - public var data: DeleteConfig? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: DeleteConfig? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(DeleteConfig.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DeleteConfigResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DeleteConfigResponseFinancePlatformModel.swift deleted file mode 100644 index a5cc54883d..0000000000 --- a/Sources/code/platform/Models/Finance/DeleteConfigResponseFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DeleteConfigResponse - Used By: Finance - */ - - class DeleteConfigResponse: Codable { - - - public var success: Bool? - - public var message: String? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case message = "message" - - } - - public init(message: String? = nil, success: Bool? = nil) { - - self.success = success - - self.message = message - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteFinancePlatformModel.swift deleted file mode 100644 index b00cb455ee..0000000000 --- a/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DownloadCreditDebitNote - Used By: Finance - */ - - class DownloadCreditDebitNote: Codable { - - - public var noteId: [String]? - - - public enum CodingKeys: String, CodingKey { - - case noteId = "note_id" - - } - - public init(noteId: [String]? = nil) { - - self.noteId = noteId - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - noteId = try container.decode([String].self, forKey: .noteId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(noteId, forKey: .noteId) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteReqFinancePlatformModel.swift deleted file mode 100644 index c29d45c293..0000000000 --- a/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DownloadCreditDebitNoteReq - Used By: Finance - */ - - class DownloadCreditDebitNoteReq: Codable { - - - public var data: DownloadCreditDebitNote? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: DownloadCreditDebitNote? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(DownloadCreditDebitNote.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteResponseDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteResponseDataFinancePlatformModel.swift deleted file mode 100644 index 7399c32d1c..0000000000 --- a/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteResponseDataFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DownloadCreditDebitNoteResponseData - Used By: Finance - */ - - class DownloadCreditDebitNoteResponseData: Codable { - - - public var id: String? - - public var pdfS3Url: String? - - - public enum CodingKeys: String, CodingKey { - - case id = "id" - - case pdfS3Url = "pdf_s3_url" - - } - - public init(id: String? = nil, pdfS3Url: String? = nil) { - - self.id = id - - self.pdfS3Url = pdfS3Url - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - 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 { - - } - - - - do { - pdfS3Url = try container.decode(String.self, forKey: .pdfS3Url) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(id, forKey: .id) - - - - - try? container.encodeIfPresent(pdfS3Url, forKey: .pdfS3Url) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteResponseFinancePlatformModel.swift deleted file mode 100644 index 7696f8cab4..0000000000 --- a/Sources/code/platform/Models/Finance/DownloadCreditDebitNoteResponseFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DownloadCreditDebitNoteResponse - Used By: Finance - */ - - class DownloadCreditDebitNoteResponse: Codable { - - - public var success: Bool? - - public var data: [DownloadCreditDebitNoteResponseData]? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case data = "data" - - } - - public init(data: [DownloadCreditDebitNoteResponseData]? = nil, success: Bool? = nil) { - - self.success = success - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - data = try container.decode([DownloadCreditDebitNoteResponseData].self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DownloadReportCustomerCnReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DownloadReportCustomerCnReqFinancePlatformModel.swift deleted file mode 100644 index a92cf23ab7..0000000000 --- a/Sources/code/platform/Models/Finance/DownloadReportCustomerCnReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DownloadReportCustomerCnReq - Used By: Finance - */ - - class DownloadReportCustomerCnReq: Codable { - - - public var data: CnDownloadReport? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: CnDownloadReport? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(CnDownloadReport.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DownloadReportCustomerCnResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DownloadReportCustomerCnResponseFinancePlatformModel.swift deleted file mode 100644 index e8c1cde631..0000000000 --- a/Sources/code/platform/Models/Finance/DownloadReportCustomerCnResponseFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DownloadReportCustomerCnResponse - Used By: Finance - */ - - class DownloadReportCustomerCnResponse: Codable { - - - public var items: [DownloadReportResponseData]? - - public var itemCount: Int? - - public var page: Page? - - - public enum CodingKeys: String, CodingKey { - - case items = "items" - - case itemCount = "item_count" - - case page = "page" - - } - - public init(items: [DownloadReportResponseData]? = nil, itemCount: Int? = nil, page: Page? = nil) { - - self.items = items - - self.itemCount = itemCount - - self.page = page - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - items = try container.decode([DownloadReportResponseData].self, forKey: .items) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - itemCount = try container.decode(Int.self, forKey: .itemCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - page = try container.decode(Page.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(items, forKey: .items) - - - - - try? container.encodeIfPresent(itemCount, forKey: .itemCount) - - - - - try? container.encodeIfPresent(page, forKey: .page) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DownloadReportDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DownloadReportDataFinancePlatformModel.swift deleted file mode 100644 index 794a95a966..0000000000 --- a/Sources/code/platform/Models/Finance/DownloadReportDataFinancePlatformModel.swift +++ /dev/null @@ -1,131 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DownloadReportData - Used By: Finance - */ - - class DownloadReportData: Codable { - - - public var page: Int? - - public var pageSize: Int? - - public var startDate: String? - - public var endDate: String? - - - public enum CodingKeys: String, CodingKey { - - case page = "page" - - case pageSize = "page_size" - - case startDate = "start_date" - - case endDate = "end_date" - - } - - public init(endDate: String? = nil, page: Int? = nil, pageSize: Int? = nil, startDate: String? = nil) { - - self.page = page - - self.pageSize = pageSize - - self.startDate = startDate - - self.endDate = endDate - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - page = try container.decode(Int.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - pageSize = try container.decode(Int.self, forKey: .pageSize) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - startDate = try container.decode(String.self, forKey: .startDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - endDate = try container.decode(String.self, forKey: .endDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(page, forKey: .page) - - - - - try? container.encodeIfPresent(pageSize, forKey: .pageSize) - - - - - try? container.encodeIfPresent(startDate, forKey: .startDate) - - - - - try? container.encodeIfPresent(endDate, forKey: .endDate) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DownloadReportFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DownloadReportFinancePlatformModel.swift deleted file mode 100644 index 6170314b6d..0000000000 --- a/Sources/code/platform/Models/Finance/DownloadReportFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DownloadReport - Used By: Finance - */ - - class DownloadReport: Codable { - - - public var data: DownloadReportData? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: DownloadReportData? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(DownloadReportData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/DownloadReportListFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/DownloadReportListFinancePlatformModel.swift deleted file mode 100644 index c296cd8f29..0000000000 --- a/Sources/code/platform/Models/Finance/DownloadReportListFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: DownloadReportList - Used By: Finance - */ - - class DownloadReportList: Codable { - - - public var items: [DownloadReportItems]? - - public var page: Page? - - public var itemCount: Int? - - - public enum CodingKeys: String, CodingKey { - - case items = "items" - - case page = "page" - - case itemCount = "item_count" - - } - - public init(items: [DownloadReportItems]? = nil, itemCount: Int? = nil, page: Page? = nil) { - - self.items = items - - self.page = page - - self.itemCount = itemCount - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - items = try container.decode([DownloadReportItems].self, forKey: .items) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - page = try container.decode(Page.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - itemCount = try container.decode(Int.self, forKey: .itemCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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(itemCount, forKey: .itemCount) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/ErrorFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/ErrorFinancePlatformModel.swift deleted file mode 100644 index 36a5cf67f6..0000000000 --- a/Sources/code/platform/Models/Finance/ErrorFinancePlatformModel.swift +++ /dev/null @@ -1,269 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: Error - Used By: Finance - */ - - class Error: Codable { - - - public var status: Int? - - public var reason: String? - - public var success: Bool? - - public var message: String? - - public var code: String? - - public var exception: String? - - public var info: String? - - public var requestId: String? - - public var stackTrace: String? - - public var meta: ErrorMeta? - - - public enum CodingKeys: String, CodingKey { - - case status = "status" - - case reason = "reason" - - case success = "success" - - case message = "message" - - case code = "code" - - case exception = "exception" - - case info = "info" - - case requestId = "request_id" - - case stackTrace = "stack_trace" - - case meta = "meta" - - } - - public init(code: String? = nil, exception: String? = nil, info: String? = nil, message: String? = nil, meta: ErrorMeta? = nil, reason: String? = nil, requestId: String? = nil, stackTrace: String? = nil, status: Int? = nil, success: Bool? = nil) { - - self.status = status - - self.reason = reason - - self.success = success - - self.message = message - - self.code = code - - self.exception = exception - - self.info = info - - self.requestId = requestId - - self.stackTrace = stackTrace - - self.meta = meta - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - status = try container.decode(Int.self, forKey: .status) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - reason = try container.decode(String.self, forKey: .reason) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - code = try container.decode(String.self, forKey: .code) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - exception = try container.decode(String.self, forKey: .exception) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - info = try container.decode(String.self, forKey: .info) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - stackTrace = try container.decode(String.self, forKey: .stackTrace) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - meta = try container.decode(ErrorMeta.self, forKey: .meta) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(reason, forKey: .reason) - - - - - try? container.encodeIfPresent(success, forKey: .success) - - - - - try? container.encodeIfPresent(message, forKey: .message) - - - - - try? container.encodeIfPresent(code, forKey: .code) - - - - - try? container.encodeIfPresent(exception, forKey: .exception) - - - - - try? container.encodeIfPresent(info, forKey: .info) - - - - - try? container.encodeIfPresent(requestId, forKey: .requestId) - - - - - try? container.encodeIfPresent(stackTrace, forKey: .stackTrace) - - - - - try? container.encodeIfPresent(meta, forKey: .meta) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GenerateReportCustomerCnReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GenerateReportCustomerCnReqFinancePlatformModel.swift deleted file mode 100644 index 665095afcd..0000000000 --- a/Sources/code/platform/Models/Finance/GenerateReportCustomerCnReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GenerateReportCustomerCnReq - Used By: Finance - */ - - class GenerateReportCustomerCnReq: Codable { - - - public var data: CnGenerateReport? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: CnGenerateReport? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(CnGenerateReport.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GenerateReportCustomerCnResponseDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GenerateReportCustomerCnResponseDataFinancePlatformModel.swift deleted file mode 100644 index a859b85194..0000000000 --- a/Sources/code/platform/Models/Finance/GenerateReportCustomerCnResponseDataFinancePlatformModel.swift +++ /dev/null @@ -1,292 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GenerateReportCustomerCnResponseData - Used By: Finance - */ - - class GenerateReportCustomerCnResponseData: Codable { - - - public var success: Bool? - - public var message: String? - - public var items: [CnGenerateReportItems]? - - public var rowHeaderDisplayOrder: [String: Any]? - - public var endDate: String? - - public var page: Page? - - public var headers: [String]? - - public var primaryHeaders: [String]? - - public var allowedFilters: [String]? - - public var startDate: String? - - public var itemCount: Int? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case message = "message" - - case items = "items" - - case rowHeaderDisplayOrder = "row_header_display_order" - - case endDate = "end_date" - - case page = "page" - - case headers = "headers" - - case primaryHeaders = "primary_headers" - - case allowedFilters = "allowed_filters" - - case startDate = "start_date" - - case itemCount = "item_count" - - } - - public init(allowedFilters: [String]? = nil, endDate: String? = nil, headers: [String]? = nil, items: [CnGenerateReportItems]? = nil, itemCount: Int? = nil, message: String? = nil, page: Page? = nil, primaryHeaders: [String]? = nil, rowHeaderDisplayOrder: [String: Any]? = nil, startDate: String? = nil, success: Bool? = nil) { - - self.success = success - - self.message = message - - self.items = items - - self.rowHeaderDisplayOrder = rowHeaderDisplayOrder - - self.endDate = endDate - - self.page = page - - self.headers = headers - - self.primaryHeaders = primaryHeaders - - self.allowedFilters = allowedFilters - - self.startDate = startDate - - self.itemCount = itemCount - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - items = try container.decode([CnGenerateReportItems].self, forKey: .items) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - rowHeaderDisplayOrder = try container.decode([String: Any].self, forKey: .rowHeaderDisplayOrder) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - endDate = try container.decode(String.self, forKey: .endDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - page = try container.decode(Page.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - headers = try container.decode([String].self, forKey: .headers) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - primaryHeaders = try container.decode([String].self, forKey: .primaryHeaders) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - allowedFilters = try container.decode([String].self, forKey: .allowedFilters) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - startDate = try container.decode(String.self, forKey: .startDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - itemCount = try container.decode(Int.self, forKey: .itemCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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(items, forKey: .items) - - - - - try? container.encodeIfPresent(rowHeaderDisplayOrder, forKey: .rowHeaderDisplayOrder) - - - - - try? container.encodeIfPresent(endDate, forKey: .endDate) - - - - - try? container.encodeIfPresent(page, forKey: .page) - - - - - try? container.encodeIfPresent(headers, forKey: .headers) - - - - - try? container.encodeIfPresent(primaryHeaders, forKey: .primaryHeaders) - - - - - try? container.encodeIfPresent(allowedFilters, forKey: .allowedFilters) - - - - - try? container.encodeIfPresent(startDate, forKey: .startDate) - - - - - try? container.encodeIfPresent(itemCount, forKey: .itemCount) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GenerateReportCustomerCnResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GenerateReportCustomerCnResponseFinancePlatformModel.swift deleted file mode 100644 index 2f18e37d05..0000000000 --- a/Sources/code/platform/Models/Finance/GenerateReportCustomerCnResponseFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GenerateReportCustomerCnResponse - Used By: Finance - */ - - class GenerateReportCustomerCnResponse: Codable { - - - public var data: GenerateReportCustomerCnResponseData? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: GenerateReportCustomerCnResponseData? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(GenerateReportCustomerCnResponseData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GenerateReportFiltersFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GenerateReportFiltersFinancePlatformModel.swift deleted file mode 100644 index 6f30432af3..0000000000 --- a/Sources/code/platform/Models/Finance/GenerateReportFiltersFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GenerateReportFilters - Used By: Finance - */ - - class GenerateReportFilters: Codable { - - - public var brand: [String]? - - public var company: [String]? - - public var channel: [String]? - - - public enum CodingKeys: String, CodingKey { - - case brand = "brand" - - case company = "company" - - case channel = "channel" - - } - - public init(brand: [String]? = nil, channel: [String]? = nil, company: [String]? = nil) { - - self.brand = brand - - self.company = company - - self.channel = channel - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - brand = try container.decode([String].self, forKey: .brand) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - company = try container.decode([String].self, forKey: .company) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - channel = try container.decode([String].self, forKey: .channel) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(brand, forKey: .brand) - - - - - try? container.encodeIfPresent(company, forKey: .company) - - - - - try? container.encodeIfPresent(channel, forKey: .channel) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GenerateReportJsonFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GenerateReportJsonFinancePlatformModel.swift deleted file mode 100644 index fb28ceddba..0000000000 --- a/Sources/code/platform/Models/Finance/GenerateReportJsonFinancePlatformModel.swift +++ /dev/null @@ -1,200 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GenerateReportJson - Used By: Finance - */ - - class GenerateReportJson: Codable { - - - public var data: [String: Any]? - - public var itemCount: Int? - - public var page: Page? - - public var endDate: String? - - public var startDate: String? - - public var items: [[String]]? - - public var headers: [String]? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - case itemCount = "item_count" - - case page = "page" - - case endDate = "end_date" - - case startDate = "start_date" - - case items = "items" - - case headers = "headers" - - } - - public init(data: [String: Any]? = nil, endDate: String? = nil, headers: [String]? = nil, items: [[String]]? = nil, itemCount: Int? = nil, page: Page? = nil, startDate: String? = nil) { - - self.data = data - - self.itemCount = itemCount - - self.page = page - - self.endDate = endDate - - self.startDate = startDate - - self.items = items - - self.headers = headers - - } - - 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) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - itemCount = try container.decode(Int.self, forKey: .itemCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - page = try container.decode(Page.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - endDate = try container.decode(String.self, forKey: .endDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - startDate = try container.decode(String.self, forKey: .startDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - items = try container.decode([[String]].self, forKey: .items) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - headers = try container.decode([String].self, forKey: .headers) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - - - try? container.encodeIfPresent(itemCount, forKey: .itemCount) - - - - - try? container.encodeIfPresent(page, forKey: .page) - - - - - try? container.encodeIfPresent(endDate, forKey: .endDate) - - - - - try? container.encodeIfPresent(startDate, forKey: .startDate) - - - - - try? container.encodeIfPresent(items, forKey: .items) - - - - - try? container.encodeIfPresent(headers, forKey: .headers) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GenerateReportMetaFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GenerateReportMetaFinancePlatformModel.swift deleted file mode 100644 index a3eeeb014c..0000000000 --- a/Sources/code/platform/Models/Finance/GenerateReportMetaFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GenerateReportMeta - Used By: Finance - */ - - class GenerateReportMeta: Codable { - - - public var brand: String? - - public var company: String? - - public var channel: String? - - - public enum CodingKeys: String, CodingKey { - - case brand = "brand" - - case company = "company" - - case channel = "channel" - - } - - public init(brand: String? = nil, channel: String? = nil, company: String? = nil) { - - self.brand = brand - - self.company = company - - self.channel = channel - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - brand = try container.decode(String.self, forKey: .brand) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - company = try container.decode(String.self, forKey: .company) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - channel = try container.decode(String.self, forKey: .channel) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(brand, forKey: .brand) - - - - - try? container.encodeIfPresent(company, forKey: .company) - - - - - try? container.encodeIfPresent(channel, forKey: .channel) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GenerateReportPlatformFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GenerateReportPlatformFinancePlatformModel.swift deleted file mode 100644 index b37810e123..0000000000 --- a/Sources/code/platform/Models/Finance/GenerateReportPlatformFinancePlatformModel.swift +++ /dev/null @@ -1,154 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GenerateReportPlatform - Used By: Finance - */ - - class GenerateReportPlatform: Codable { - - - public var startDate: String? - - public var endDate: String? - - public var meta: GenerateReportMeta? - - public var reportId: String? - - public var filters: GenerateReportFilters? - - - public enum CodingKeys: String, CodingKey { - - case startDate = "start_date" - - case endDate = "end_date" - - case meta = "meta" - - case reportId = "report_id" - - case filters = "filters" - - } - - public init(endDate: String? = nil, filters: GenerateReportFilters? = nil, meta: GenerateReportMeta? = nil, reportId: String? = nil, startDate: String? = nil) { - - self.startDate = startDate - - self.endDate = endDate - - self.meta = meta - - self.reportId = reportId - - self.filters = filters - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - startDate = try container.decode(String.self, forKey: .startDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - endDate = try container.decode(String.self, forKey: .endDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - meta = try container.decode(GenerateReportMeta.self, forKey: .meta) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - reportId = try container.decode(String.self, forKey: .reportId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - filters = try container.decode(GenerateReportFilters.self, forKey: .filters) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(startDate, forKey: .startDate) - - - - - try? container.encodeIfPresent(endDate, forKey: .endDate) - - - - - try? container.encodeIfPresent(meta, forKey: .meta) - - - - - try? container.encodeIfPresent(reportId, forKey: .reportId) - - - - - try? container.encodeIfPresent(filters, forKey: .filters) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GenerateReportReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GenerateReportReqFinancePlatformModel.swift deleted file mode 100644 index 3a100ae051..0000000000 --- a/Sources/code/platform/Models/Finance/GenerateReportReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GenerateReportReq - Used By: Finance - */ - - class GenerateReportReq: Codable { - - - public var data: GenerateReportPlatform? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: GenerateReportPlatform? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(GenerateReportPlatform.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetAffiliateFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetAffiliateFinancePlatformModel.swift deleted file mode 100644 index f9b17bb517..0000000000 --- a/Sources/code/platform/Models/Finance/GetAffiliateFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetAffiliate - Used By: Finance - */ - - class GetAffiliate: Codable { - - - public var companyId: Int? - - - public enum CodingKeys: String, CodingKey { - - case companyId = "company_id" - - } - - public init(companyId: Int? = nil) { - - self.companyId = companyId - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - 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 { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetAffiliateResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetAffiliateResponseFinancePlatformModel.swift deleted file mode 100644 index f6d688fbd0..0000000000 --- a/Sources/code/platform/Models/Finance/GetAffiliateResponseFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetAffiliateResponse - Used By: Finance - */ - - class GetAffiliateResponse: Codable { - - - public var reason: String? - - public var success: Bool? - - public var docs: [[String: Any]]? - - - public enum CodingKeys: String, CodingKey { - - case reason = "reason" - - case success = "success" - - case docs = "docs" - - } - - public init(docs: [[String: Any]]? = nil, reason: String? = nil, success: Bool? = nil) { - - self.reason = reason - - self.success = success - - self.docs = docs - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - reason = try container.decode(String.self, forKey: .reason) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - docs = try container.decode([[String: Any]].self, forKey: .docs) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(reason, forKey: .reason) - - - - - try? container.encodeIfPresent(success, forKey: .success) - - - - - try? container.encodeIfPresent(docs, forKey: .docs) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetCnConfigReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetCnConfigReqFinancePlatformModel.swift deleted file mode 100644 index e83346ed23..0000000000 --- a/Sources/code/platform/Models/Finance/GetCnConfigReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetCnConfigReq - Used By: Finance - */ - - class GetCnConfigReq: Codable { - - - public var data: DeleteConfig? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: DeleteConfig? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(DeleteConfig.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetCnConfigResponseDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetCnConfigResponseDataFinancePlatformModel.swift deleted file mode 100644 index b3926f0855..0000000000 --- a/Sources/code/platform/Models/Finance/GetCnConfigResponseDataFinancePlatformModel.swift +++ /dev/null @@ -1,223 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetCnConfigResponseData - Used By: Finance - */ - - class GetCnConfigResponseData: Codable { - - - public var isCnAsRefundMethod: Bool? - - public var affiliateId: String? - - public var meta: [String: Any]? - - public var sellerId: Int? - - public var notificationEvents: CreditNoteConfigNotificationEvents? - - public var validity: Int? - - public var redemptionOrderingChannel: [String]? - - public var currencyType: String? - - - public enum CodingKeys: String, CodingKey { - - case isCnAsRefundMethod = "is_cn_as_refund_method" - - case affiliateId = "affiliate_id" - - case meta = "meta" - - case sellerId = "seller_id" - - case notificationEvents = "notification_events" - - case validity = "validity" - - case redemptionOrderingChannel = "redemption_ordering_channel" - - case currencyType = "currency_type" - - } - - public init(affiliateId: String? = nil, currencyType: String? = nil, isCnAsRefundMethod: Bool? = nil, meta: [String: Any]? = nil, notificationEvents: CreditNoteConfigNotificationEvents? = nil, redemptionOrderingChannel: [String]? = nil, sellerId: Int? = nil, validity: Int? = nil) { - - self.isCnAsRefundMethod = isCnAsRefundMethod - - self.affiliateId = affiliateId - - self.meta = meta - - self.sellerId = sellerId - - self.notificationEvents = notificationEvents - - self.validity = validity - - self.redemptionOrderingChannel = redemptionOrderingChannel - - self.currencyType = currencyType - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - isCnAsRefundMethod = try container.decode(Bool.self, forKey: .isCnAsRefundMethod) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - affiliateId = try container.decode(String.self, forKey: .affiliateId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - sellerId = try container.decode(Int.self, forKey: .sellerId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - notificationEvents = try container.decode(CreditNoteConfigNotificationEvents.self, forKey: .notificationEvents) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - validity = try container.decode(Int.self, forKey: .validity) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - redemptionOrderingChannel = try container.decode([String].self, forKey: .redemptionOrderingChannel) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - currencyType = try container.decode(String.self, forKey: .currencyType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(isCnAsRefundMethod, forKey: .isCnAsRefundMethod) - - - - - try? container.encodeIfPresent(affiliateId, forKey: .affiliateId) - - - - - try? container.encodeIfPresent(meta, forKey: .meta) - - - - - try? container.encodeIfPresent(sellerId, forKey: .sellerId) - - - - - try? container.encodeIfPresent(notificationEvents, forKey: .notificationEvents) - - - - - try? container.encodeIfPresent(validity, forKey: .validity) - - - - - try? container.encodeIfPresent(redemptionOrderingChannel, forKey: .redemptionOrderingChannel) - - - - - try? container.encodeIfPresent(currencyType, forKey: .currencyType) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetCnConfigResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetCnConfigResponseFinancePlatformModel.swift deleted file mode 100644 index 040c2daeaf..0000000000 --- a/Sources/code/platform/Models/Finance/GetCnConfigResponseFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetCnConfigResponse - Used By: Finance - */ - - class GetCnConfigResponse: Codable { - - - public var success: Bool? - - public var data: GetCnConfigResponseData? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case data = "data" - - } - - public init(data: GetCnConfigResponseData? = nil, success: Bool? = nil) { - - self.success = success - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - data = try container.decode(GetCnConfigResponseData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetCnConfigResponseMetaFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetCnConfigResponseMetaFinancePlatformModel.swift deleted file mode 100644 index e2ea9c77e9..0000000000 --- a/Sources/code/platform/Models/Finance/GetCnConfigResponseMetaFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetCnConfigResponseMeta - Used By: Finance - */ - - class GetCnConfigResponseMeta: Codable { - - - public var reason: String? - - public var sourceChannel: [String]? - - - public enum CodingKeys: String, CodingKey { - - case reason = "reason" - - case sourceChannel = "source_channel" - - } - - public init(reason: String? = nil, sourceChannel: [String]? = nil) { - - self.reason = reason - - self.sourceChannel = sourceChannel - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - reason = try container.decode(String.self, forKey: .reason) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - sourceChannel = try container.decode([String].self, forKey: .sourceChannel) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(reason, forKey: .reason) - - - - - try? container.encodeIfPresent(sourceChannel, forKey: .sourceChannel) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceFinancePlatformModel.swift deleted file mode 100644 index 428d15fb5d..0000000000 --- a/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetCustomerCreditBalance - Used By: Finance - */ - - class GetCustomerCreditBalance: Codable { - - - public var affiliateId: String? - - public var sellerId: Int? - - public var customerMobileNumber: String? - - - public enum CodingKeys: String, CodingKey { - - case affiliateId = "affiliate_id" - - case sellerId = "seller_id" - - case customerMobileNumber = "customer_mobile_number" - - } - - public init(affiliateId: String? = nil, customerMobileNumber: String? = nil, sellerId: Int? = nil) { - - self.affiliateId = affiliateId - - self.sellerId = sellerId - - self.customerMobileNumber = customerMobileNumber - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - affiliateId = try container.decode(String.self, forKey: .affiliateId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - sellerId = try container.decode(Int.self, forKey: .sellerId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - customerMobileNumber = try container.decode(String.self, forKey: .customerMobileNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(affiliateId, forKey: .affiliateId) - - - - - try? container.encodeIfPresent(sellerId, forKey: .sellerId) - - - - - try? container.encodeIfPresent(customerMobileNumber, forKey: .customerMobileNumber) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceReqFinancePlatformModel.swift deleted file mode 100644 index 3f66c4d0af..0000000000 --- a/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetCustomerCreditBalanceReq - Used By: Finance - */ - - class GetCustomerCreditBalanceReq: Codable { - - - public var data: GetCustomerCreditBalance? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: GetCustomerCreditBalance? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(GetCustomerCreditBalance.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceResponseDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceResponseDataFinancePlatformModel.swift deleted file mode 100644 index 16a020db8f..0000000000 --- a/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceResponseDataFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetCustomerCreditBalanceResponseData - Used By: Finance - */ - - class GetCustomerCreditBalanceResponseData: Codable { - - - public var customerMobileNumber: String? - - public var totalCreditedBalance: Int? - - - public enum CodingKeys: String, CodingKey { - - case customerMobileNumber = "customer_mobile_number" - - case totalCreditedBalance = "total_credited_balance" - - } - - public init(customerMobileNumber: String? = nil, totalCreditedBalance: Int? = nil) { - - self.customerMobileNumber = customerMobileNumber - - self.totalCreditedBalance = totalCreditedBalance - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - customerMobileNumber = try container.decode(String.self, forKey: .customerMobileNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - totalCreditedBalance = try container.decode(Int.self, forKey: .totalCreditedBalance) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(customerMobileNumber, forKey: .customerMobileNumber) - - - - - try? container.encodeIfPresent(totalCreditedBalance, forKey: .totalCreditedBalance) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceResponseFinancePlatformModel.swift deleted file mode 100644 index 32b2ede08c..0000000000 --- a/Sources/code/platform/Models/Finance/GetCustomerCreditBalanceResponseFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetCustomerCreditBalanceResponse - Used By: Finance - */ - - class GetCustomerCreditBalanceResponse: Codable { - - - public var success: Bool? - - public var data: GetCustomerCreditBalanceResponseData? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case data = "data" - - } - - public init(data: GetCustomerCreditBalanceResponseData? = nil, success: Bool? = nil) { - - self.success = success - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - data = try container.decode(GetCustomerCreditBalanceResponseData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetEngineFiltersFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetEngineFiltersFinancePlatformModel.swift deleted file mode 100644 index 1da3914ab2..0000000000 --- a/Sources/code/platform/Models/Finance/GetEngineFiltersFinancePlatformModel.swift +++ /dev/null @@ -1,131 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetEngineFilters - Used By: Finance - */ - - class GetEngineFilters: Codable { - - - public var configField: String? - - public var status: String? - - public var isActive: Bool? - - public var sellerId: String? - - - public enum CodingKeys: String, CodingKey { - - case configField = "config_field" - - case status = "status" - - case isActive = "is_active" - - case sellerId = "seller_id" - - } - - public init(configField: String? = nil, isActive: Bool? = nil, sellerId: String? = nil, status: String? = nil) { - - self.configField = configField - - self.status = status - - self.isActive = isActive - - self.sellerId = sellerId - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - configField = try container.decode(String.self, forKey: .configField) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - sellerId = try container.decode(String.self, forKey: .sellerId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(configField, forKey: .configField) - - - - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(isActive, forKey: .isActive) - - - - - try? container.encodeIfPresent(sellerId, forKey: .sellerId) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetEngineReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetEngineReqFinancePlatformModel.swift deleted file mode 100644 index e4498f561d..0000000000 --- a/Sources/code/platform/Models/Finance/GetEngineReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetEngineReq - Used By: Finance - */ - - class GetEngineReq: Codable { - - - public var data: GetEngineData? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: GetEngineData? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(GetEngineData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetPdfUrlViewReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetPdfUrlViewReqFinancePlatformModel.swift deleted file mode 100644 index d6af54d9b1..0000000000 --- a/Sources/code/platform/Models/Finance/GetPdfUrlViewReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetPdfUrlViewReq - Used By: Finance - */ - - class GetPdfUrlViewReq: Codable { - - - public var data: CnReferenceNumber? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: CnReferenceNumber? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(CnReferenceNumber.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetPdfUrlViewResponseDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetPdfUrlViewResponseDataFinancePlatformModel.swift deleted file mode 100644 index 4dea59d322..0000000000 --- a/Sources/code/platform/Models/Finance/GetPdfUrlViewResponseDataFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetPdfUrlViewResponseData - Used By: Finance - */ - - class GetPdfUrlViewResponseData: Codable { - - - public var s3PdfLink: String? - - public var cnReferenceNumber: String? - - - public enum CodingKeys: String, CodingKey { - - case s3PdfLink = "s3_pdf_link" - - case cnReferenceNumber = "cn_reference_number" - - } - - public init(cnReferenceNumber: String? = nil, s3PdfLink: String? = nil) { - - self.s3PdfLink = s3PdfLink - - self.cnReferenceNumber = cnReferenceNumber - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - s3PdfLink = try container.decode(String.self, forKey: .s3PdfLink) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - cnReferenceNumber = try container.decode(String.self, forKey: .cnReferenceNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(s3PdfLink, forKey: .s3PdfLink) - - - - - try? container.encodeIfPresent(cnReferenceNumber, forKey: .cnReferenceNumber) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetPdfUrlViewResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetPdfUrlViewResponseFinancePlatformModel.swift deleted file mode 100644 index d42664744a..0000000000 --- a/Sources/code/platform/Models/Finance/GetPdfUrlViewResponseFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetPdfUrlViewResponse - Used By: Finance - */ - - class GetPdfUrlViewResponse: Codable { - - - public var success: Bool? - - public var data: GetPdfUrlViewResponseData? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case data = "data" - - } - - public init(data: GetPdfUrlViewResponseData? = nil, success: Bool? = nil) { - - self.success = success - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - data = try container.decode(GetPdfUrlViewResponseData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetReasonFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetReasonFinancePlatformModel.swift deleted file mode 100644 index 6be3497c82..0000000000 --- a/Sources/code/platform/Models/Finance/GetReasonFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetReason - Used By: Finance - */ - - class GetReason: Codable { - - - public var reasonType: String? - - - public enum CodingKeys: String, CodingKey { - - case reasonType = "reason_type" - - } - - public init(reasonType: String? = nil) { - - self.reasonType = reasonType - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - reasonType = try container.decode(String.self, forKey: .reasonType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(reasonType, forKey: .reasonType) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetReasonResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetReasonResponseFinancePlatformModel.swift deleted file mode 100644 index 0766b1bac7..0000000000 --- a/Sources/code/platform/Models/Finance/GetReasonResponseFinancePlatformModel.swift +++ /dev/null @@ -1,131 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetReasonResponse - Used By: Finance - */ - - class GetReasonResponse: Codable { - - - public var success: Bool? - - public var itemList: [ReasonItem]? - - public var itemCount: Int? - - public var page: Page? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case itemList = "item_list" - - case itemCount = "item_count" - - case page = "page" - - } - - public init(itemCount: Int? = nil, itemList: [ReasonItem]? = nil, page: Page? = nil, success: Bool? = nil) { - - self.success = success - - self.itemList = itemList - - self.itemCount = itemCount - - self.page = page - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - itemList = try container.decode([ReasonItem].self, forKey: .itemList) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - itemCount = try container.decode(Int.self, forKey: .itemCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - page = try container.decode(Page.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(success, forKey: .success) - - - - - try? container.encodeIfPresent(itemList, forKey: .itemList) - - - - - try? container.encodeIfPresent(itemCount, forKey: .itemCount) - - - - - try? container.encodeIfPresent(page, forKey: .page) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetReportListDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetReportListDataFinancePlatformModel.swift deleted file mode 100644 index acd16c85aa..0000000000 --- a/Sources/code/platform/Models/Finance/GetReportListDataFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetReportListData - Used By: Finance - */ - - class GetReportListData: Codable { - - - public var roleName: String? - - public var listingEnabled: Bool? - - - public enum CodingKeys: String, CodingKey { - - case roleName = "role_name" - - case listingEnabled = "listing_enabled" - - } - - public init(listingEnabled: Bool? = nil, roleName: String? = nil) { - - self.roleName = roleName - - self.listingEnabled = listingEnabled - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - roleName = try container.decode(String.self, forKey: .roleName) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - listingEnabled = try container.decode(Bool.self, forKey: .listingEnabled) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(roleName, forKey: .roleName) - - - - - try? container.encodeIfPresent(listingEnabled, forKey: .listingEnabled) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetReportListReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetReportListReqFinancePlatformModel.swift deleted file mode 100644 index c4829c757c..0000000000 --- a/Sources/code/platform/Models/Finance/GetReportListReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetReportListReq - Used By: Finance - */ - - class GetReportListReq: Codable { - - - public var data: GetReportListData? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: GetReportListData? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(GetReportListData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetReportListResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetReportListResponseFinancePlatformModel.swift deleted file mode 100644 index 63e80fc065..0000000000 --- a/Sources/code/platform/Models/Finance/GetReportListResponseFinancePlatformModel.swift +++ /dev/null @@ -1,131 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetReportListResponse - Used By: Finance - */ - - class GetReportListResponse: Codable { - - - public var success: Bool? - - public var items: [ReportItem]? - - public var page: Page? - - public var totalCount: Int? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case items = "items" - - case page = "page" - - case totalCount = "total_count" - - } - - public init(items: [ReportItem]? = nil, page: Page? = nil, success: Bool? = nil, totalCount: Int? = nil) { - - self.success = success - - self.items = items - - self.page = page - - self.totalCount = totalCount - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - items = try container.decode([ReportItem].self, forKey: .items) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - page = try container.decode(Page.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - totalCount = try container.decode(Int.self, forKey: .totalCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(success, forKey: .success) - - - - - try? container.encodeIfPresent(items, forKey: .items) - - - - - try? container.encodeIfPresent(page, forKey: .page) - - - - - try? container.encodeIfPresent(totalCount, forKey: .totalCount) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetReportingFiltersReasonFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetReportingFiltersReasonFinancePlatformModel.swift deleted file mode 100644 index ccd9a68005..0000000000 --- a/Sources/code/platform/Models/Finance/GetReportingFiltersReasonFinancePlatformModel.swift +++ /dev/null @@ -1,131 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetReportingFiltersReason - Used By: Finance - */ - - class GetReportingFiltersReason: Codable { - - - public var text: String? - - public var type: String? - - public var value: String? - - public var options: [GetReportingFiltersReasonOptions]? - - - public enum CodingKeys: String, CodingKey { - - case text = "text" - - case type = "type" - - case value = "value" - - case options = "options" - - } - - public init(options: [GetReportingFiltersReasonOptions]? = nil, text: String? = nil, type: String? = nil, value: String? = nil) { - - self.text = text - - self.type = type - - self.value = value - - self.options = options - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - text = try container.decode(String.self, forKey: .text) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - type = try container.decode(String.self, forKey: .type) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - value = try container.decode(String.self, forKey: .value) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - options = try container.decode([GetReportingFiltersReasonOptions].self, forKey: .options) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(text, forKey: .text) - - - - - try? container.encodeIfPresent(type, forKey: .type) - - - - - try? container.encodeIfPresent(value, forKey: .value) - - - - - try? container.encodeIfPresent(options, forKey: .options) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetReportingFiltersReasonOptionsFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetReportingFiltersReasonOptionsFinancePlatformModel.swift deleted file mode 100644 index bf9be70b50..0000000000 --- a/Sources/code/platform/Models/Finance/GetReportingFiltersReasonOptionsFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetReportingFiltersReasonOptions - Used By: Finance - */ - - class GetReportingFiltersReasonOptions: Codable { - - - public var text: String? - - public var value: String? - - public var placeholderText: String? - - - public enum CodingKeys: String, CodingKey { - - case text = "text" - - case value = "value" - - case placeholderText = "placeholder_text" - - } - - public init(placeholderText: String? = nil, text: String? = nil, value: String? = nil) { - - self.text = text - - self.value = value - - self.placeholderText = placeholderText - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - text = try container.decode(String.self, forKey: .text) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - value = try container.decode(String.self, forKey: .value) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - placeholderText = try container.decode(String.self, forKey: .placeholderText) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(text, forKey: .text) - - - - - try? container.encodeIfPresent(value, forKey: .value) - - - - - try? container.encodeIfPresent(placeholderText, forKey: .placeholderText) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/GetReportingFiltersResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/GetReportingFiltersResponseFinancePlatformModel.swift deleted file mode 100644 index 86f0c32ca5..0000000000 --- a/Sources/code/platform/Models/Finance/GetReportingFiltersResponseFinancePlatformModel.swift +++ /dev/null @@ -1,131 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: GetReportingFiltersResponse - Used By: Finance - */ - - class GetReportingFiltersResponse: Codable { - - - public var reason: GetReportingFiltersReason? - - public var search: GetReportingFilters? - - public var filters: [GetReportingNestedFilters]? - - public var status: GetReportingFilters? - - - public enum CodingKeys: String, CodingKey { - - case reason = "reason" - - case search = "search" - - case filters = "filters" - - case status = "status" - - } - - public init(filters: [GetReportingNestedFilters]? = nil, reason: GetReportingFiltersReason? = nil, search: GetReportingFilters? = nil, status: GetReportingFilters? = nil) { - - self.reason = reason - - self.search = search - - self.filters = filters - - self.status = status - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - reason = try container.decode(GetReportingFiltersReason.self, forKey: .reason) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - search = try container.decode(GetReportingFilters.self, forKey: .search) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - filters = try container.decode([GetReportingNestedFilters].self, forKey: .filters) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - status = try container.decode(GetReportingFilters.self, forKey: .status) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(reason, forKey: .reason) - - - - - try? container.encodeIfPresent(search, forKey: .search) - - - - - try? container.encodeIfPresent(filters, forKey: .filters) - - - - - try? container.encodeIfPresent(status, forKey: .status) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InoviceListingPayloadDataFiltersFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InoviceListingPayloadDataFiltersFinancePlatformModel.swift deleted file mode 100644 index b8d906db44..0000000000 --- a/Sources/code/platform/Models/Finance/InoviceListingPayloadDataFiltersFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InoviceListingPayloadDataFilters - Used By: Finance - */ - - class InoviceListingPayloadDataFilters: Codable { - - - public var paymentStatus: [String]? - - public var invoiceType: [String]? - - public var companyId: [String]? - - - public enum CodingKeys: String, CodingKey { - - case paymentStatus = "payment_status" - - case invoiceType = "invoice_type" - - case companyId = "company_id" - - } - - public init(companyId: [String]? = nil, invoiceType: [String]? = nil, paymentStatus: [String]? = nil) { - - self.paymentStatus = paymentStatus - - self.invoiceType = invoiceType - - self.companyId = companyId - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - paymentStatus = try container.decode([String].self, forKey: .paymentStatus) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - invoiceType = try container.decode([String].self, forKey: .invoiceType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - companyId = try container.decode([String].self, forKey: .companyId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(paymentStatus, forKey: .paymentStatus) - - - - - try? container.encodeIfPresent(invoiceType, forKey: .invoiceType) - - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoiceActivityLogErrorFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoiceActivityLogErrorFinancePlatformModel.swift deleted file mode 100644 index 69db1d7cfa..0000000000 --- a/Sources/code/platform/Models/Finance/InvoiceActivityLogErrorFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoiceActivityLogError - Used By: Finance - */ - - class InvoiceActivityLogError: Codable { - - - public var reason: String? - - - public enum CodingKeys: String, CodingKey { - - case reason = "reason" - - } - - public init(reason: String? = nil) { - - self.reason = reason - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - reason = try container.decode(String.self, forKey: .reason) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(reason, forKey: .reason) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoiceActivityLogsResponseDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoiceActivityLogsResponseDataFinancePlatformModel.swift deleted file mode 100644 index dc0dcd46b4..0000000000 --- a/Sources/code/platform/Models/Finance/InvoiceActivityLogsResponseDataFinancePlatformModel.swift +++ /dev/null @@ -1,177 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoiceActivityLogsResponseData - Used By: Finance - */ - - class InvoiceActivityLogsResponseData: Codable { - - - public var performedBy: String? - - public var status: String? - - public var reason: String? - - public var isResolved: Bool? - - public var retryAttempts: Double? - - public var maxRetryAttempts: Double? - - - public enum CodingKeys: String, CodingKey { - - case performedBy = "performed_by" - - case status = "status" - - case reason = "reason" - - case isResolved = "is_resolved" - - case retryAttempts = "retry_attempts" - - case maxRetryAttempts = "max_retry_attempts" - - } - - public init(isResolved: Bool? = nil, maxRetryAttempts: Double? = nil, performedBy: String? = nil, reason: String? = nil, retryAttempts: Double? = nil, status: String? = nil) { - - self.performedBy = performedBy - - self.status = status - - self.reason = reason - - self.isResolved = isResolved - - self.retryAttempts = retryAttempts - - self.maxRetryAttempts = maxRetryAttempts - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - performedBy = try container.decode(String.self, forKey: .performedBy) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - reason = try container.decode(String.self, forKey: .reason) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - isResolved = try container.decode(Bool.self, forKey: .isResolved) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - retryAttempts = try container.decode(Double.self, forKey: .retryAttempts) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - maxRetryAttempts = try container.decode(Double.self, forKey: .maxRetryAttempts) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(performedBy, forKey: .performedBy) - - - - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(reason, forKey: .reason) - - - - - try? container.encodeIfPresent(isResolved, forKey: .isResolved) - - - - - try? container.encodeIfPresent(retryAttempts, forKey: .retryAttempts) - - - - - try? container.encodeIfPresent(maxRetryAttempts, forKey: .maxRetryAttempts) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoiceActivityLogsResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoiceActivityLogsResponseFinancePlatformModel.swift deleted file mode 100644 index 3a9d54dfc7..0000000000 --- a/Sources/code/platform/Models/Finance/InvoiceActivityLogsResponseFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoiceActivityLogsResponse - Used By: Finance - */ - - class InvoiceActivityLogsResponse: Codable { - - - public var data: [InvoiceActivityLogsResponseData]? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: [InvoiceActivityLogsResponseData]? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode([InvoiceActivityLogsResponseData].self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoiceBillingItemFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoiceBillingItemFinancePlatformModel.swift deleted file mode 100644 index 3dedc9b539..0000000000 --- a/Sources/code/platform/Models/Finance/InvoiceBillingItemFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoiceBillingItem - Used By: Finance - */ - - class InvoiceBillingItem: Codable { - - - public var invoiceNumber: String? - - public var amount: Double? - - - public enum CodingKeys: String, CodingKey { - - case invoiceNumber = "invoice_number" - - case amount = "amount" - - } - - public init(amount: Double? = nil, invoiceNumber: String? = nil) { - - self.invoiceNumber = invoiceNumber - - self.amount = amount - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - invoiceNumber = try container.decode(String.self, forKey: .invoiceNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - amount = try container.decode(Double.self, forKey: .amount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(invoiceNumber, forKey: .invoiceNumber) - - - - - try? container.encodeIfPresent(amount, forKey: .amount) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoiceListingReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoiceListingReqFinancePlatformModel.swift deleted file mode 100644 index 696eeb6f1b..0000000000 --- a/Sources/code/platform/Models/Finance/InvoiceListingReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoiceListingReq - Used By: Finance - */ - - class InvoiceListingReq: Codable { - - - public var data: InvoiceListingPayloadData? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: InvoiceListingPayloadData? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(InvoiceListingPayloadData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoiceListingResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoiceListingResponseFinancePlatformModel.swift deleted file mode 100644 index b781d5cf3b..0000000000 --- a/Sources/code/platform/Models/Finance/InvoiceListingResponseFinancePlatformModel.swift +++ /dev/null @@ -1,177 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoiceListingResponse - Used By: Finance - */ - - class InvoiceListingResponse: Codable { - - - public var success: Bool? - - public var headers: [String]? - - public var unpaidInvoiceData: UnpaidInvoiceDataItems? - - public var items: [InvoiceListingResponseItems]? - - public var page: Page? - - public var itemCount: Int? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case headers = "headers" - - case unpaidInvoiceData = "unpaid_invoice_data" - - case items = "items" - - case page = "page" - - case itemCount = "item_count" - - } - - public init(headers: [String]? = nil, items: [InvoiceListingResponseItems]? = nil, itemCount: Int? = nil, page: Page? = nil, success: Bool? = nil, unpaidInvoiceData: UnpaidInvoiceDataItems? = nil) { - - self.success = success - - self.headers = headers - - self.unpaidInvoiceData = unpaidInvoiceData - - self.items = items - - self.page = page - - self.itemCount = itemCount - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - headers = try container.decode([String].self, forKey: .headers) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - unpaidInvoiceData = try container.decode(UnpaidInvoiceDataItems.self, forKey: .unpaidInvoiceData) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - items = try container.decode([InvoiceListingResponseItems].self, forKey: .items) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - page = try container.decode(Page.self, forKey: .page) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - itemCount = try container.decode(Int.self, forKey: .itemCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(success, forKey: .success) - - - - - try? container.encodeIfPresent(headers, forKey: .headers) - - - - - try? container.encodeIfPresent(unpaidInvoiceData, forKey: .unpaidInvoiceData) - - - - - try? container.encodeIfPresent(items, forKey: .items) - - - - - try? container.encodeIfPresent(page, forKey: .page) - - - - - try? container.encodeIfPresent(itemCount, forKey: .itemCount) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoiceListingResponseItemsFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoiceListingResponseItemsFinancePlatformModel.swift deleted file mode 100644 index d9ca541fb5..0000000000 --- a/Sources/code/platform/Models/Finance/InvoiceListingResponseItemsFinancePlatformModel.swift +++ /dev/null @@ -1,292 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoiceListingResponseItems - Used By: Finance - */ - - class InvoiceListingResponseItems: Codable { - - - public var amount: Double? - - public var company: String? - - public var status: String? - - public var dueDate: String? - - public var invoiceDate: String? - - public var invoiceType: String? - - public var period: String? - - public var invoiceNumber: String? - - public var isDownloadable: Bool? - - public var invoiceId: String? - - public var currency: Currency? - - - public enum CodingKeys: String, CodingKey { - - case amount = "amount" - - case company = "company" - - case status = "status" - - case dueDate = "due_date" - - case invoiceDate = "invoice_date" - - case invoiceType = "invoice_type" - - case period = "period" - - case invoiceNumber = "invoice_number" - - case isDownloadable = "is_downloadable" - - case invoiceId = "invoice_id" - - case currency = "currency" - - } - - public init(amount: Double? = nil, company: String? = nil, currency: Currency? = nil, dueDate: String? = nil, invoiceDate: String? = nil, invoiceId: String? = nil, invoiceNumber: String? = nil, invoiceType: String? = nil, isDownloadable: Bool? = nil, period: String? = nil, status: String? = nil) { - - self.amount = amount - - self.company = company - - self.status = status - - self.dueDate = dueDate - - self.invoiceDate = invoiceDate - - self.invoiceType = invoiceType - - self.period = period - - self.invoiceNumber = invoiceNumber - - self.isDownloadable = isDownloadable - - self.invoiceId = invoiceId - - self.currency = currency - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - amount = try container.decode(Double.self, forKey: .amount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - company = try container.decode(String.self, forKey: .company) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - dueDate = try container.decode(String.self, forKey: .dueDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - invoiceDate = try container.decode(String.self, forKey: .invoiceDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - invoiceType = try container.decode(String.self, forKey: .invoiceType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - period = try container.decode(String.self, forKey: .period) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - invoiceNumber = try container.decode(String.self, forKey: .invoiceNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - isDownloadable = try container.decode(Bool.self, forKey: .isDownloadable) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - invoiceId = try container.decode(String.self, forKey: .invoiceId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - currency = try container.decode(Currency.self, forKey: .currency) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(amount, forKey: .amount) - - - - - try? container.encodeIfPresent(company, forKey: .company) - - - - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(dueDate, forKey: .dueDate) - - - - - try? container.encodeIfPresent(invoiceDate, forKey: .invoiceDate) - - - - - try? container.encodeIfPresent(invoiceType, forKey: .invoiceType) - - - - - try? container.encodeIfPresent(period, forKey: .period) - - - - - try? container.encodeIfPresent(invoiceNumber, forKey: .invoiceNumber) - - - - - try? container.encodeIfPresent(isDownloadable, forKey: .isDownloadable) - - - - - try? container.encodeIfPresent(invoiceId, forKey: .invoiceId) - - - - - try? container.encodeIfPresent(currency, forKey: .currency) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoicePaymentDetailsResponseDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoicePaymentDetailsResponseDataFinancePlatformModel.swift deleted file mode 100644 index e0fa52d491..0000000000 --- a/Sources/code/platform/Models/Finance/InvoicePaymentDetailsResponseDataFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoicePaymentDetailsResponseData - Used By: Finance - */ - - class InvoicePaymentDetailsResponseData: Codable { - - - public var paidInvoicePaymentDetails: [PaidInvoicePaymentDetail]? - - public var failedAttemptsDetails: [[String: Any]]? - - - public enum CodingKeys: String, CodingKey { - - case paidInvoicePaymentDetails = "paid_invoice_payment_details" - - case failedAttemptsDetails = "failed_attempts_details" - - } - - public init(failedAttemptsDetails: [[String: Any]]? = nil, paidInvoicePaymentDetails: [PaidInvoicePaymentDetail]? = nil) { - - self.paidInvoicePaymentDetails = paidInvoicePaymentDetails - - self.failedAttemptsDetails = failedAttemptsDetails - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - paidInvoicePaymentDetails = try container.decode([PaidInvoicePaymentDetail].self, forKey: .paidInvoicePaymentDetails) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - failedAttemptsDetails = try container.decode([[String: Any]].self, forKey: .failedAttemptsDetails) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(paidInvoicePaymentDetails, forKey: .paidInvoicePaymentDetails) - - - - - try? container.encodeIfPresent(failedAttemptsDetails, forKey: .failedAttemptsDetails) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoicePaymentDetailsResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoicePaymentDetailsResponseFinancePlatformModel.swift deleted file mode 100644 index 30541177f0..0000000000 --- a/Sources/code/platform/Models/Finance/InvoicePaymentDetailsResponseFinancePlatformModel.swift +++ /dev/null @@ -1,131 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoicePaymentDetailsResponse - Used By: Finance - */ - - class InvoicePaymentDetailsResponse: Codable { - - - public var reason: String? - - public var data: InvoicePaymentDetailsResponseData? - - public var success: Bool? - - public var paymentDetailsVisible: Bool? - - - public enum CodingKeys: String, CodingKey { - - case reason = "reason" - - case data = "data" - - case success = "success" - - case paymentDetailsVisible = "payment_details_visible" - - } - - public init(data: InvoicePaymentDetailsResponseData? = nil, paymentDetailsVisible: Bool? = nil, reason: String? = nil, success: Bool? = nil) { - - self.reason = reason - - self.data = data - - self.success = success - - self.paymentDetailsVisible = paymentDetailsVisible - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - reason = try container.decode(String.self, forKey: .reason) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - data = try container.decode(InvoicePaymentDetailsResponseData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - paymentDetailsVisible = try container.decode(Bool.self, forKey: .paymentDetailsVisible) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(reason, forKey: .reason) - - - - - try? container.encodeIfPresent(data, forKey: .data) - - - - - try? container.encodeIfPresent(success, forKey: .success) - - - - - try? container.encodeIfPresent(paymentDetailsVisible, forKey: .paymentDetailsVisible) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsPayloadDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoicePaymentOptionsPayloadDataFinancePlatformModel.swift deleted file mode 100644 index 274bc93a25..0000000000 --- a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsPayloadDataFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoicePaymentOptionsPayloadData - Used By: Finance - */ - - class InvoicePaymentOptionsPayloadData: Codable { - - - public var invoiceNumbers: [String]? - - - public enum CodingKeys: String, CodingKey { - - case invoiceNumbers = "invoice_numbers" - - } - - public init(invoiceNumbers: [String]? = nil) { - - self.invoiceNumbers = invoiceNumbers - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - invoiceNumbers = try container.decode([String].self, forKey: .invoiceNumbers) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(invoiceNumbers, forKey: .invoiceNumbers) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoicePaymentOptionsReqFinancePlatformModel.swift deleted file mode 100644 index 6882b6a6bc..0000000000 --- a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoicePaymentOptionsReq - Used By: Finance - */ - - class InvoicePaymentOptionsReq: Codable { - - - public var data: InvoicePaymentOptionsPayloadData? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: InvoicePaymentOptionsPayloadData? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(InvoicePaymentOptionsPayloadData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseDataFinancePlatformModel.swift deleted file mode 100644 index 4c91a08d75..0000000000 --- a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseDataFinancePlatformModel.swift +++ /dev/null @@ -1,200 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoicePaymentOptionsResponseData - Used By: Finance - */ - - class InvoicePaymentOptionsResponseData: Codable { - - - public var invoiceNumber: String? - - public var invoiceType: String? - - public var displayAmounts: [InvoicePaymentOptionsResponsePayableAmounts]? - - public var totalAmount: [String: Any]? - - public var deductedAmounts: [String: Any]? - - public var payableAmounts: [InvoicePaymentOptionsResponsePayableAmounts]? - - public var currency: Currency? - - - public enum CodingKeys: String, CodingKey { - - case invoiceNumber = "invoice_number" - - case invoiceType = "invoice_type" - - case displayAmounts = "display_amounts" - - case totalAmount = "total_amount" - - case deductedAmounts = "deducted_amounts" - - case payableAmounts = "payable_amounts" - - case currency = "currency" - - } - - public init(currency: Currency? = nil, deductedAmounts: [String: Any]? = nil, displayAmounts: [InvoicePaymentOptionsResponsePayableAmounts]? = nil, invoiceNumber: String? = nil, invoiceType: String? = nil, payableAmounts: [InvoicePaymentOptionsResponsePayableAmounts]? = nil, totalAmount: [String: Any]? = nil) { - - self.invoiceNumber = invoiceNumber - - self.invoiceType = invoiceType - - self.displayAmounts = displayAmounts - - self.totalAmount = totalAmount - - self.deductedAmounts = deductedAmounts - - self.payableAmounts = payableAmounts - - self.currency = currency - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - invoiceNumber = try container.decode(String.self, forKey: .invoiceNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - invoiceType = try container.decode(String.self, forKey: .invoiceType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - displayAmounts = try container.decode([InvoicePaymentOptionsResponsePayableAmounts].self, forKey: .displayAmounts) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - totalAmount = try container.decode([String: Any].self, forKey: .totalAmount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - deductedAmounts = try container.decode([String: Any].self, forKey: .deductedAmounts) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - payableAmounts = try container.decode([InvoicePaymentOptionsResponsePayableAmounts].self, forKey: .payableAmounts) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - currency = try container.decode(Currency.self, forKey: .currency) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(invoiceNumber, forKey: .invoiceNumber) - - - - - try? container.encodeIfPresent(invoiceType, forKey: .invoiceType) - - - - - try? container.encodeIfPresent(displayAmounts, forKey: .displayAmounts) - - - - - try? container.encodeIfPresent(totalAmount, forKey: .totalAmount) - - - - - try? container.encodeIfPresent(deductedAmounts, forKey: .deductedAmounts) - - - - - try? container.encodeIfPresent(payableAmounts, forKey: .payableAmounts) - - - - - try? container.encodeIfPresent(currency, forKey: .currency) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseDeductedAmountsFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseDeductedAmountsFinancePlatformModel.swift deleted file mode 100644 index 24e335e038..0000000000 --- a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseDeductedAmountsFinancePlatformModel.swift +++ /dev/null @@ -1,154 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoicePaymentOptionsResponseDeductedAmounts - Used By: Finance - */ - - class InvoicePaymentOptionsResponseDeductedAmounts: Codable { - - - public var amount: Double? - - public var header: String? - - public var amountKey: String? - - public var isPayable: Bool? - - public var symbol: String? - - - public enum CodingKeys: String, CodingKey { - - case amount = "amount" - - case header = "header" - - case amountKey = "amount_key" - - case isPayable = "is_payable" - - case symbol = "symbol" - - } - - public init(amount: Double? = nil, amountKey: String? = nil, header: String? = nil, isPayable: Bool? = nil, symbol: String? = nil) { - - self.amount = amount - - self.header = header - - self.amountKey = amountKey - - self.isPayable = isPayable - - self.symbol = symbol - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - amount = try container.decode(Double.self, forKey: .amount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - header = try container.decode(String.self, forKey: .header) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - amountKey = try container.decode(String.self, forKey: .amountKey) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - isPayable = try container.decode(Bool.self, forKey: .isPayable) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - symbol = try container.decode(String.self, forKey: .symbol) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(amount, forKey: .amount) - - - - - try? container.encodeIfPresent(header, forKey: .header) - - - - - try? container.encodeIfPresent(amountKey, forKey: .amountKey) - - - - - try? container.encodeIfPresent(isPayable, forKey: .isPayable) - - - - - try? container.encodeIfPresent(symbol, forKey: .symbol) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseFinancePlatformModel.swift deleted file mode 100644 index e59c5c9e45..0000000000 --- a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponseFinancePlatformModel.swift +++ /dev/null @@ -1,154 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoicePaymentOptionsResponse - Used By: Finance - */ - - class InvoicePaymentOptionsResponse: Codable { - - - public var reason: String? - - public var data: [InvoicePaymentOptionsResponseData]? - - public var totalPayableAmount: Double? - - public var invoiceCount: Int? - - public var success: Bool? - - - public enum CodingKeys: String, CodingKey { - - case reason = "reason" - - case data = "data" - - case totalPayableAmount = "total_payable_amount" - - case invoiceCount = "invoice_count" - - case success = "success" - - } - - public init(data: [InvoicePaymentOptionsResponseData]? = nil, invoiceCount: Int? = nil, reason: String? = nil, success: Bool? = nil, totalPayableAmount: Double? = nil) { - - self.reason = reason - - self.data = data - - self.totalPayableAmount = totalPayableAmount - - self.invoiceCount = invoiceCount - - self.success = success - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - reason = try container.decode(String.self, forKey: .reason) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - data = try container.decode([InvoicePaymentOptionsResponseData].self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - totalPayableAmount = try container.decode(Double.self, forKey: .totalPayableAmount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - invoiceCount = try container.decode(Int.self, forKey: .invoiceCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(reason, forKey: .reason) - - - - - try? container.encodeIfPresent(data, forKey: .data) - - - - - try? container.encodeIfPresent(totalPayableAmount, forKey: .totalPayableAmount) - - - - - try? container.encodeIfPresent(invoiceCount, forKey: .invoiceCount) - - - - - try? container.encodeIfPresent(success, forKey: .success) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponsePayableAmountsFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponsePayableAmountsFinancePlatformModel.swift deleted file mode 100644 index aaef0b9704..0000000000 --- a/Sources/code/platform/Models/Finance/InvoicePaymentOptionsResponsePayableAmountsFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoicePaymentOptionsResponsePayableAmounts - Used By: Finance - */ - - class InvoicePaymentOptionsResponsePayableAmounts: Codable { - - - public var amount: Double? - - public var amountKey: String? - - public var header: String? - - - public enum CodingKeys: String, CodingKey { - - case amount = "amount" - - case amountKey = "amount_key" - - case header = "header" - - } - - public init(amount: Double? = nil, amountKey: String? = nil, header: String? = nil) { - - self.amount = amount - - self.amountKey = amountKey - - self.header = header - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - amount = try container.decode(Double.self, forKey: .amount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - amountKey = try container.decode(String.self, forKey: .amountKey) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - header = try container.decode(String.self, forKey: .header) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(amount, forKey: .amount) - - - - - try? container.encodeIfPresent(amountKey, forKey: .amountKey) - - - - - try? container.encodeIfPresent(header, forKey: .header) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoicePdfPayloadDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoicePdfPayloadDataFinancePlatformModel.swift deleted file mode 100644 index 16f08eb241..0000000000 --- a/Sources/code/platform/Models/Finance/InvoicePdfPayloadDataFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoicePdfPayloadData - Used By: Finance - */ - - class InvoicePdfPayloadData: Codable { - - - public var invoiceNumber: [String]? - - - public enum CodingKeys: String, CodingKey { - - case invoiceNumber = "invoice_number" - - } - - public init(invoiceNumber: [String]? = nil) { - - self.invoiceNumber = invoiceNumber - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - invoiceNumber = try container.decode([String].self, forKey: .invoiceNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(invoiceNumber, forKey: .invoiceNumber) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoicePdfReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoicePdfReqFinancePlatformModel.swift deleted file mode 100644 index a6f4e21f37..0000000000 --- a/Sources/code/platform/Models/Finance/InvoicePdfReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoicePdfReq - Used By: Finance - */ - - class InvoicePdfReq: Codable { - - - public var data: InvoicePdfPayloadData? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: InvoicePdfPayloadData? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(InvoicePdfPayloadData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoiceTypePayloadDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoiceTypePayloadDataFinancePlatformModel.swift deleted file mode 100644 index dadd7e7707..0000000000 --- a/Sources/code/platform/Models/Finance/InvoiceTypePayloadDataFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoiceTypePayloadData - Used By: Finance - */ - - class InvoiceTypePayloadData: Codable { - - - public var isActive: Bool? - - - public enum CodingKeys: String, CodingKey { - - case isActive = "is_active" - - } - - public init(isActive: Bool? = nil) { - - self.isActive = isActive - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - 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 { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(isActive, forKey: .isActive) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoiceTypeReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoiceTypeReqFinancePlatformModel.swift deleted file mode 100644 index e850a42ecd..0000000000 --- a/Sources/code/platform/Models/Finance/InvoiceTypeReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoiceTypeReq - Used By: Finance - */ - - class InvoiceTypeReq: Codable { - - - public var data: InvoiceTypePayloadData? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: InvoiceTypePayloadData? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(InvoiceTypePayloadData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/InvoiceTypeResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/InvoiceTypeResponseFinancePlatformModel.swift deleted file mode 100644 index 26fa5e6369..0000000000 --- a/Sources/code/platform/Models/Finance/InvoiceTypeResponseFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: InvoiceTypeResponse - Used By: Finance - */ - - class InvoiceTypeResponse: Codable { - - - public var success: Bool? - - public var invoiceTypeList: [InvoiceTypeResponseItems]? - - public var paymentStatusList: [InvoiceTypeResponseItems]? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case invoiceTypeList = "invoice_type_list" - - case paymentStatusList = "payment_status_list" - - } - - public init(invoiceTypeList: [InvoiceTypeResponseItems]? = nil, paymentStatusList: [InvoiceTypeResponseItems]? = nil, success: Bool? = nil) { - - self.success = success - - self.invoiceTypeList = invoiceTypeList - - self.paymentStatusList = paymentStatusList - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - invoiceTypeList = try container.decode([InvoiceTypeResponseItems].self, forKey: .invoiceTypeList) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - paymentStatusList = try container.decode([InvoiceTypeResponseItems].self, forKey: .paymentStatusList) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(success, forKey: .success) - - - - - try? container.encodeIfPresent(invoiceTypeList, forKey: .invoiceTypeList) - - - - - try? container.encodeIfPresent(paymentStatusList, forKey: .paymentStatusList) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/IsCnRefundMethodDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/IsCnRefundMethodDataFinancePlatformModel.swift deleted file mode 100644 index 50770f8170..0000000000 --- a/Sources/code/platform/Models/Finance/IsCnRefundMethodDataFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: IsCnRefundMethodData - Used By: Finance - */ - - class IsCnRefundMethodData: Codable { - - - public var affiliateId: String? - - public var toggleEditRequired: Bool? - - public var sellerId: Int? - - - public enum CodingKeys: String, CodingKey { - - case affiliateId = "affiliate_id" - - case toggleEditRequired = "toggle_edit_required" - - case sellerId = "seller_id" - - } - - public init(affiliateId: String? = nil, sellerId: Int? = nil, toggleEditRequired: Bool? = nil) { - - self.affiliateId = affiliateId - - self.toggleEditRequired = toggleEditRequired - - self.sellerId = sellerId - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - affiliateId = try container.decode(String.self, forKey: .affiliateId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - toggleEditRequired = try container.decode(Bool.self, forKey: .toggleEditRequired) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - sellerId = try container.decode(Int.self, forKey: .sellerId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(affiliateId, forKey: .affiliateId) - - - - - try? container.encodeIfPresent(toggleEditRequired, forKey: .toggleEditRequired) - - - - - try? container.encodeIfPresent(sellerId, forKey: .sellerId) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/IsCnRefundMethodReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/IsCnRefundMethodReqFinancePlatformModel.swift deleted file mode 100644 index b722d1fddc..0000000000 --- a/Sources/code/platform/Models/Finance/IsCnRefundMethodReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: IsCnRefundMethodReq - Used By: Finance - */ - - class IsCnRefundMethodReq: Codable { - - - public var data: IsCnRefundMethodData? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: IsCnRefundMethodData? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(IsCnRefundMethodData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/IsCnRefundMethodResponseDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/IsCnRefundMethodResponseDataFinancePlatformModel.swift deleted file mode 100644 index 9691f41f0d..0000000000 --- a/Sources/code/platform/Models/Finance/IsCnRefundMethodResponseDataFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: IsCnRefundMethodResponseData - Used By: Finance - */ - - class IsCnRefundMethodResponseData: Codable { - - - public var isFirstTimeUser: Bool? - - - public enum CodingKeys: String, CodingKey { - - case isFirstTimeUser = "is_first_time_user" - - } - - public init(isFirstTimeUser: Bool? = nil) { - - self.isFirstTimeUser = isFirstTimeUser - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - isFirstTimeUser = try container.decode(Bool.self, forKey: .isFirstTimeUser) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(isFirstTimeUser, forKey: .isFirstTimeUser) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/IsCnRefundMethodResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/IsCnRefundMethodResponseFinancePlatformModel.swift deleted file mode 100644 index d8d530c527..0000000000 --- a/Sources/code/platform/Models/Finance/IsCnRefundMethodResponseFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: IsCnRefundMethodResponse - Used By: Finance - */ - - class IsCnRefundMethodResponse: Codable { - - - public var success: Bool? - - public var data: IsCnRefundMethodResponseData? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case data = "data" - - } - - public init(data: IsCnRefundMethodResponseData? = nil, success: Bool? = nil) { - - self.success = success - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - data = try container.decode(IsCnRefundMethodResponseData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/IsCreditlinePayloadFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/IsCreditlinePayloadFinancePlatformModel.swift deleted file mode 100644 index 0b6afec0da..0000000000 --- a/Sources/code/platform/Models/Finance/IsCreditlinePayloadFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: IsCreditlinePayload - Used By: Finance - */ - - class IsCreditlinePayload: Codable { - - - public var sellerId: String? - - - public enum CodingKeys: String, CodingKey { - - case sellerId = "seller_id" - - } - - public init(sellerId: String? = nil) { - - self.sellerId = sellerId - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - sellerId = try container.decode(String.self, forKey: .sellerId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(sellerId, forKey: .sellerId) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/IsCreditlinePlatformReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/IsCreditlinePlatformReqFinancePlatformModel.swift deleted file mode 100644 index 1fa1a8e1e8..0000000000 --- a/Sources/code/platform/Models/Finance/IsCreditlinePlatformReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: IsCreditlinePlatformReq - Used By: Finance - */ - - class IsCreditlinePlatformReq: Codable { - - - public var data: IsCreditlinePayload? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: IsCreditlinePayload? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(IsCreditlinePayload.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/IsCreditlinePlatformResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/IsCreditlinePlatformResponseFinancePlatformModel.swift deleted file mode 100644 index bee5b42e7c..0000000000 --- a/Sources/code/platform/Models/Finance/IsCreditlinePlatformResponseFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: IsCreditlinePlatformResponse - Used By: Finance - */ - - class IsCreditlinePlatformResponse: Codable { - - - public var isCreditlineOpted: Bool? - - public var code: Int? - - - public enum CodingKeys: String, CodingKey { - - case isCreditlineOpted = "is_creditline_opted" - - case code = "code" - - } - - public init(code: Int? = nil, isCreditlineOpted: Bool? = nil) { - - self.isCreditlineOpted = isCreditlineOpted - - self.code = code - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - isCreditlineOpted = try container.decode(Bool.self, forKey: .isCreditlineOpted) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - code = try container.decode(Int.self, forKey: .code) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(isCreditlineOpted, forKey: .isCreditlineOpted) - - - - - try? container.encodeIfPresent(code, forKey: .code) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/OrederFreezeResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/OrederFreezeResponseFinancePlatformModel.swift deleted file mode 100644 index 2dbb850f7e..0000000000 --- a/Sources/code/platform/Models/Finance/OrederFreezeResponseFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: OrederFreezeResponse - Used By: Finance - */ - - class OrederFreezeResponse: Codable { - - - public var success: Bool? - - public var omsFreeze: Bool? - - public var source: String? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case omsFreeze = "oms_freeze" - - case source = "source" - - } - - public init(omsFreeze: Bool? = nil, source: String? = nil, success: Bool? = nil) { - - self.success = success - - self.omsFreeze = omsFreeze - - self.source = source - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - omsFreeze = try container.decode(Bool.self, forKey: .omsFreeze) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - source = try container.decode(String.self, forKey: .source) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(success, forKey: .success) - - - - - try? container.encodeIfPresent(omsFreeze, forKey: .omsFreeze) - - - - - try? container.encodeIfPresent(source, forKey: .source) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/PaidInvoicePaymentDetailFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/PaidInvoicePaymentDetailFinancePlatformModel.swift deleted file mode 100644 index 063cb639e1..0000000000 --- a/Sources/code/platform/Models/Finance/PaidInvoicePaymentDetailFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: PaidInvoicePaymentDetail - Used By: Finance - */ - - class PaidInvoicePaymentDetail: Codable { - - - public var paymentDetails: [PaymentDetail]? - - public var dateOfPayment: String? - - public var amount: Double? - - - public enum CodingKeys: String, CodingKey { - - case paymentDetails = "payment_details" - - case dateOfPayment = "date_of_payment" - - case amount = "amount" - - } - - public init(amount: Double? = nil, dateOfPayment: String? = nil, paymentDetails: [PaymentDetail]? = nil) { - - self.paymentDetails = paymentDetails - - self.dateOfPayment = dateOfPayment - - self.amount = amount - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - paymentDetails = try container.decode([PaymentDetail].self, forKey: .paymentDetails) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - dateOfPayment = try container.decode(String.self, forKey: .dateOfPayment) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - amount = try container.decode(Double.self, forKey: .amount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(paymentDetails, forKey: .paymentDetails) - - - - - try? container.encodeIfPresent(dateOfPayment, forKey: .dateOfPayment) - - - - - try? container.encodeIfPresent(amount, forKey: .amount) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/PaymentProcessPayloadFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/PaymentProcessPayloadFinancePlatformModel.swift deleted file mode 100644 index 82795bcf63..0000000000 --- a/Sources/code/platform/Models/Finance/PaymentProcessPayloadFinancePlatformModel.swift +++ /dev/null @@ -1,269 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: PaymentProcessPayload - Used By: Finance - */ - - class PaymentProcessPayload: Codable { - - - public var platform: String? - - public var amount: Double? - - public var transactionType: String? - - public var sourceReference: String? - - public var totalAmount: Double? - - public var meta: [String: Any]? - - public var currency: String? - - public var sellerId: String? - - public var modeOfPayment: String? - - public var invoiceBillingItems: [InvoiceBillingItem]? - - - public enum CodingKeys: String, CodingKey { - - case platform = "platform" - - case amount = "amount" - - case transactionType = "transaction_type" - - case sourceReference = "source_reference" - - case totalAmount = "total_amount" - - case meta = "meta" - - case currency = "currency" - - case sellerId = "seller_id" - - case modeOfPayment = "mode_of_payment" - - case invoiceBillingItems = "invoice_billing_items" - - } - - public init(amount: Double? = nil, currency: String? = nil, invoiceBillingItems: [InvoiceBillingItem]? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, platform: String? = nil, sellerId: String? = nil, sourceReference: String? = nil, totalAmount: Double? = nil, transactionType: String? = nil) { - - self.platform = platform - - self.amount = amount - - self.transactionType = transactionType - - self.sourceReference = sourceReference - - self.totalAmount = totalAmount - - self.meta = meta - - self.currency = currency - - self.sellerId = sellerId - - self.modeOfPayment = modeOfPayment - - self.invoiceBillingItems = invoiceBillingItems - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - platform = try container.decode(String.self, forKey: .platform) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - amount = try container.decode(Double.self, forKey: .amount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - transactionType = try container.decode(String.self, forKey: .transactionType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - sourceReference = try container.decode(String.self, forKey: .sourceReference) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - totalAmount = try container.decode(Double.self, forKey: .totalAmount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - currency = try container.decode(String.self, forKey: .currency) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - sellerId = try container.decode(String.self, forKey: .sellerId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - modeOfPayment = try container.decode(String.self, forKey: .modeOfPayment) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - invoiceBillingItems = try container.decode([InvoiceBillingItem].self, forKey: .invoiceBillingItems) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(platform, forKey: .platform) - - - - - try? container.encodeIfPresent(amount, forKey: .amount) - - - - - try? container.encodeIfPresent(transactionType, forKey: .transactionType) - - - - - try? container.encodeIfPresent(sourceReference, forKey: .sourceReference) - - - - - try? container.encodeIfPresent(totalAmount, forKey: .totalAmount) - - - - - try? container.encodeIfPresent(meta, forKey: .meta) - - - - - try? container.encodeIfPresent(currency, forKey: .currency) - - - - - try? container.encodeIfPresent(sellerId, forKey: .sellerId) - - - - - try? container.encodeIfPresent(modeOfPayment, forKey: .modeOfPayment) - - - - - try? container.encodeIfPresent(invoiceBillingItems, forKey: .invoiceBillingItems) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/PaymentProcessReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/PaymentProcessReqFinancePlatformModel.swift deleted file mode 100644 index 86038f5099..0000000000 --- a/Sources/code/platform/Models/Finance/PaymentProcessReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: PaymentProcessReq - Used By: Finance - */ - - class PaymentProcessReq: Codable { - - - public var data: PaymentProcessPayload? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: PaymentProcessPayload? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(PaymentProcessPayload.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/PaymentProcessResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/PaymentProcessResponseFinancePlatformModel.swift deleted file mode 100644 index 7e287cc810..0000000000 --- a/Sources/code/platform/Models/Finance/PaymentProcessResponseFinancePlatformModel.swift +++ /dev/null @@ -1,154 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: PaymentProcessResponse - Used By: Finance - */ - - class PaymentProcessResponse: Codable { - - - public var code: Int? - - public var message: String? - - public var meta: [String: Any]? - - public var transactionId: String? - - public var redirectUrl: String? - - - public enum CodingKeys: String, CodingKey { - - case code = "code" - - case message = "message" - - case meta = "meta" - - case transactionId = "transaction_id" - - case redirectUrl = "redirect_url" - - } - - public init(code: Int? = nil, message: String? = nil, meta: [String: Any]? = nil, redirectUrl: String? = nil, transactionId: String? = nil) { - - self.code = code - - self.message = message - - self.meta = meta - - self.transactionId = transactionId - - self.redirectUrl = redirectUrl - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - code = try container.decode(Int.self, forKey: .code) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - transactionId = try container.decode(String.self, forKey: .transactionId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - redirectUrl = try container.decode(String.self, forKey: .redirectUrl) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(code, forKey: .code) - - - - - try? container.encodeIfPresent(message, forKey: .message) - - - - - try? container.encodeIfPresent(meta, forKey: .meta) - - - - - try? container.encodeIfPresent(transactionId, forKey: .transactionId) - - - - - try? container.encodeIfPresent(redirectUrl, forKey: .redirectUrl) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/RedemptionDetailsFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/RedemptionDetailsFinancePlatformModel.swift deleted file mode 100644 index 26c194997d..0000000000 --- a/Sources/code/platform/Models/Finance/RedemptionDetailsFinancePlatformModel.swift +++ /dev/null @@ -1,246 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: RedemptionDetails - Used By: Finance - */ - - class RedemptionDetails: Codable { - - - public var meta: [String: Any]? - - public var staffId: String? - - public var createdAt: String? - - public var orderId: String? - - public var storeId: String? - - public var shipmentId: String? - - public var orderingChannel: String? - - public var amountDebited: Int? - - public var invoiceNumber: String? - - - public enum CodingKeys: String, CodingKey { - - case meta = "meta" - - case staffId = "staff_id" - - case createdAt = "created_at" - - case orderId = "order_id" - - case storeId = "store_id" - - case shipmentId = "shipment_id" - - case orderingChannel = "ordering_channel" - - case amountDebited = "amount_debited" - - case invoiceNumber = "invoice_number" - - } - - public init(amountDebited: Int? = nil, createdAt: String? = nil, invoiceNumber: String? = nil, meta: [String: Any]? = nil, orderingChannel: String? = nil, orderId: String? = nil, shipmentId: String? = nil, staffId: String? = nil, storeId: String? = nil) { - - self.meta = meta - - self.staffId = staffId - - self.createdAt = createdAt - - self.orderId = orderId - - self.storeId = storeId - - self.shipmentId = shipmentId - - self.orderingChannel = orderingChannel - - self.amountDebited = amountDebited - - self.invoiceNumber = invoiceNumber - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - 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 { - - } - - - - do { - staffId = try container.decode(String.self, forKey: .staffId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - createdAt = try container.decode(String.self, forKey: .createdAt) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - orderId = try container.decode(String.self, forKey: .orderId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - storeId = try container.decode(String.self, forKey: .storeId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - shipmentId = try container.decode(String.self, forKey: .shipmentId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - orderingChannel = try container.decode(String.self, forKey: .orderingChannel) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - amountDebited = try container.decode(Int.self, forKey: .amountDebited) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - invoiceNumber = try container.decode(String.self, forKey: .invoiceNumber) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(meta, forKey: .meta) - - - - - try? container.encodeIfPresent(staffId, forKey: .staffId) - - - - - try? container.encodeIfPresent(createdAt, forKey: .createdAt) - - - - - try? container.encodeIfPresent(orderId, forKey: .orderId) - - - - - try? container.encodeIfPresent(storeId, forKey: .storeId) - - - - - try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) - - - - - try? container.encodeIfPresent(orderingChannel, forKey: .orderingChannel) - - - - - try? container.encodeIfPresent(amountDebited, forKey: .amountDebited) - - - - - try? container.encodeIfPresent(invoiceNumber, forKey: .invoiceNumber) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/ReportItemFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/ReportItemFinancePlatformModel.swift deleted file mode 100644 index 64198e4162..0000000000 --- a/Sources/code/platform/Models/Finance/ReportItemFinancePlatformModel.swift +++ /dev/null @@ -1,200 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: ReportItem - Used By: Finance - */ - - class ReportItem: Codable { - - - public var id: String? - - public var name: String? - - public var description: String? - - public var allowedFilters: [String]? - - public var configMeta: [String: Any]? - - public var reportType: String? - - public var displayDate: String? - - - public enum CodingKeys: String, CodingKey { - - case id = "id" - - case name = "name" - - case description = "description" - - case allowedFilters = "allowed_filters" - - case configMeta = "config_meta" - - case reportType = "report_type" - - case displayDate = "display_date" - - } - - public init(allowedFilters: [String]? = nil, configMeta: [String: Any]? = nil, description: String? = nil, displayDate: String? = nil, id: String? = nil, name: String? = nil, reportType: String? = nil) { - - self.id = id - - self.name = name - - self.description = description - - self.allowedFilters = allowedFilters - - self.configMeta = configMeta - - self.reportType = reportType - - self.displayDate = displayDate - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - 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 { - - } - - - - do { - allowedFilters = try container.decode([String].self, forKey: .allowedFilters) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - configMeta = try container.decode([String: Any].self, forKey: .configMeta) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - reportType = try container.decode(String.self, forKey: .reportType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - displayDate = try container.decode(String.self, forKey: .displayDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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(description, forKey: .description) - - - - - try? container.encodeIfPresent(allowedFilters, forKey: .allowedFilters) - - - - - try? container.encodeIfPresent(configMeta, forKey: .configMeta) - - - - - try? container.encodeIfPresent(reportType, forKey: .reportType) - - - - - try? container.encodeIfPresent(displayDate, forKey: .displayDate) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/UnlockCreditNoteReqFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/UnlockCreditNoteReqFinancePlatformModel.swift deleted file mode 100644 index 313c3c67d9..0000000000 --- a/Sources/code/platform/Models/Finance/UnlockCreditNoteReqFinancePlatformModel.swift +++ /dev/null @@ -1,62 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: UnlockCreditNoteReq - Used By: Finance - */ - - class UnlockCreditNoteReq: Codable { - - - public var data: UnlockCreditNoteRequestData? - - - public enum CodingKeys: String, CodingKey { - - case data = "data" - - } - - public init(data: UnlockCreditNoteRequestData? = nil) { - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - data = try container.decode(UnlockCreditNoteRequestData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(data, forKey: .data) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/UnlockCreditNoteRequestDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/UnlockCreditNoteRequestDataFinancePlatformModel.swift deleted file mode 100644 index d82e1929ca..0000000000 --- a/Sources/code/platform/Models/Finance/UnlockCreditNoteRequestDataFinancePlatformModel.swift +++ /dev/null @@ -1,131 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: UnlockCreditNoteRequestData - Used By: Finance - */ - - class UnlockCreditNoteRequestData: Codable { - - - public var sellerId: String? - - public var lockedCreditNotes: [String]? - - public var unlockReason: String? - - public var description: String? - - - public enum CodingKeys: String, CodingKey { - - case sellerId = "seller_id" - - case lockedCreditNotes = "locked_credit_notes" - - case unlockReason = "unlock_reason" - - case description = "description" - - } - - public init(description: String? = nil, lockedCreditNotes: [String]? = nil, sellerId: String? = nil, unlockReason: String? = nil) { - - self.sellerId = sellerId - - self.lockedCreditNotes = lockedCreditNotes - - self.unlockReason = unlockReason - - self.description = description - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - sellerId = try container.decode(String.self, forKey: .sellerId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - lockedCreditNotes = try container.decode([String].self, forKey: .lockedCreditNotes) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - unlockReason = try container.decode(String.self, forKey: .unlockReason) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(sellerId, forKey: .sellerId) - - - - - try? container.encodeIfPresent(lockedCreditNotes, forKey: .lockedCreditNotes) - - - - - try? container.encodeIfPresent(unlockReason, forKey: .unlockReason) - - - - - try? container.encodeIfPresent(description, forKey: .description) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/UnlockCreditNoteResponseDataFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/UnlockCreditNoteResponseDataFinancePlatformModel.swift deleted file mode 100644 index 70c59c69af..0000000000 --- a/Sources/code/platform/Models/Finance/UnlockCreditNoteResponseDataFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: UnlockCreditNoteResponseData - Used By: Finance - */ - - class UnlockCreditNoteResponseData: Codable { - - - public var isCnUnlocked: Bool? - - public var status: String? - - - public enum CodingKeys: String, CodingKey { - - case isCnUnlocked = "is_cn_unlocked" - - case status = "status" - - } - - public init(isCnUnlocked: Bool? = nil, status: String? = nil) { - - self.isCnUnlocked = isCnUnlocked - - self.status = status - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - isCnUnlocked = try container.decode(Bool.self, forKey: .isCnUnlocked) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(isCnUnlocked, forKey: .isCnUnlocked) - - - - - try? container.encodeIfPresent(status, forKey: .status) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/UnlockCreditNoteResponseFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/UnlockCreditNoteResponseFinancePlatformModel.swift deleted file mode 100644 index bc022b7964..0000000000 --- a/Sources/code/platform/Models/Finance/UnlockCreditNoteResponseFinancePlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: UnlockCreditNoteResponse - Used By: Finance - */ - - class UnlockCreditNoteResponse: Codable { - - - public var success: Bool? - - public var data: UnlockCreditNoteResponseData? - - - public enum CodingKeys: String, CodingKey { - - case success = "success" - - case data = "data" - - } - - public init(data: UnlockCreditNoteResponseData? = nil, success: Bool? = nil) { - - self.success = success - - self.data = data - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - success = try container.decode(Bool.self, forKey: .success) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - data = try container.decode(UnlockCreditNoteResponseData.self, forKey: .data) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - 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) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Finance/UnpaidInvoiceDataItemsFinancePlatformModel.swift b/Sources/code/platform/Models/Finance/UnpaidInvoiceDataItemsFinancePlatformModel.swift deleted file mode 100644 index cc2b1c6f31..0000000000 --- a/Sources/code/platform/Models/Finance/UnpaidInvoiceDataItemsFinancePlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Finance { - /* - Model: UnpaidInvoiceDataItems - Used By: Finance - */ - - class UnpaidInvoiceDataItems: Codable { - - - public var totalUnpaidInvoiceCount: Int? - - public var currency: String? - - public var totalUnpaidAmount: Double? - - - public enum CodingKeys: String, CodingKey { - - case totalUnpaidInvoiceCount = "total_unpaid_invoice_count" - - case currency = "currency" - - case totalUnpaidAmount = "total_unpaid_amount" - - } - - public init(currency: String? = nil, totalUnpaidAmount: Double? = nil, totalUnpaidInvoiceCount: Int? = nil) { - - self.totalUnpaidInvoiceCount = totalUnpaidInvoiceCount - - self.currency = currency - - self.totalUnpaidAmount = totalUnpaidAmount - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - totalUnpaidInvoiceCount = try container.decode(Int.self, forKey: .totalUnpaidInvoiceCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - currency = try container.decode(String.self, forKey: .currency) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - totalUnpaidAmount = try container.decode(Double.self, forKey: .totalUnpaidAmount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(totalUnpaidInvoiceCount, forKey: .totalUnpaidInvoiceCount) - - - - - try? container.encodeIfPresent(currency, forKey: .currency) - - - - - try? container.encodeIfPresent(totalUnpaidAmount, forKey: .totalUnpaidAmount) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Lead/GeneralConfigResponseLeadPlatformModel.swift b/Sources/code/platform/Models/Lead/GeneralConfigDetailsLeadPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Lead/GeneralConfigResponseLeadPlatformModel.swift rename to Sources/code/platform/Models/Lead/GeneralConfigDetailsLeadPlatformModel.swift index f05ab96da0..77da20c267 100644 --- a/Sources/code/platform/Models/Lead/GeneralConfigResponseLeadPlatformModel.swift +++ b/Sources/code/platform/Models/Lead/GeneralConfigDetailsLeadPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Lead { /* - Model: GeneralConfigResponse + Model: GeneralConfigDetails Used By: Lead */ - class GeneralConfigResponse: Codable { + class GeneralConfigDetails: Codable { public var id: String? @@ -337,11 +337,11 @@ public extension PlatformClient.Lead { public extension PlatformClient.ApplicationClient.Lead { /* - Model: GeneralConfigResponse + Model: GeneralConfigDetails Used By: Lead */ - class GeneralConfigResponse: Codable { + class GeneralConfigDetails: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Order/ActionDetailSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ActionDetailSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..fee338fc55 --- /dev/null +++ b/Sources/code/platform/Models/Order/ActionDetailSchemaOrderPlatformModel.swift @@ -0,0 +1,212 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ActionDetailSchema + Used By: Order + */ + + class ActionDetailSchema: Codable { + + + public var name: [String: Any] + + public var currentMode: String + + public var currentIdentifier: String + + public var refundTo: String? + + + public enum CodingKeys: String, CodingKey { + + case name = "name" + + case currentMode = "current_mode" + + case currentIdentifier = "current_identifier" + + case refundTo = "refund_to" + + } + + public init(currentIdentifier: String, currentMode: String, name: [String: Any], refundTo: String? = nil) { + + self.name = name + + self.currentMode = currentMode + + self.currentIdentifier = currentIdentifier + + self.refundTo = refundTo + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + name = try container.decode([String: Any].self, forKey: .name) + + + + + currentMode = try container.decode(String.self, forKey: .currentMode) + + + + + currentIdentifier = try container.decode(String.self, forKey: .currentIdentifier) + + + + + do { + refundTo = try container.decode(String.self, forKey: .refundTo) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(currentMode, forKey: .currentMode) + + + + + try? container.encodeIfPresent(currentIdentifier, forKey: .currentIdentifier) + + + + + try? container.encodeIfPresent(refundTo, forKey: .refundTo) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ActionDetailSchema + Used By: Order + */ + + class ActionDetailSchema: Codable { + + + public var name: [String: Any] + + public var currentMode: String + + public var currentIdentifier: String + + public var refundTo: String? + + + public enum CodingKeys: String, CodingKey { + + case name = "name" + + case currentMode = "current_mode" + + case currentIdentifier = "current_identifier" + + case refundTo = "refund_to" + + } + + public init(currentIdentifier: String, currentMode: String, name: [String: Any], refundTo: String? = nil) { + + self.name = name + + self.currentMode = currentMode + + self.currentIdentifier = currentIdentifier + + self.refundTo = refundTo + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + name = try container.decode([String: Any].self, forKey: .name) + + + + + currentMode = try container.decode(String.self, forKey: .currentMode) + + + + + currentIdentifier = try container.decode(String.self, forKey: .currentIdentifier) + + + + + do { + refundTo = try container.decode(String.self, forKey: .refundTo) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(currentMode, forKey: .currentMode) + + + + + try? container.encodeIfPresent(currentIdentifier, forKey: .currentIdentifier) + + + + + try? container.encodeIfPresent(refundTo, forKey: .refundTo) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/PlatformDeliveryAddressOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AddressOrderPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Order/PlatformDeliveryAddressOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/AddressOrderPlatformModel.swift index 02485b2303..e3b256d6d1 100644 --- a/Sources/code/platform/Models/Order/PlatformDeliveryAddressOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/AddressOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: PlatformDeliveryAddress + Model: Address Used By: Order */ - class PlatformDeliveryAddress: Codable { + class Address: Codable { public var phone: String? @@ -475,11 +475,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: PlatformDeliveryAddress + Model: Address Used By: Order */ - class PlatformDeliveryAddress: Codable { + class Address: Codable { public var phone: String? diff --git a/Sources/code/platform/Models/Order/AffiliateAppConfigMetaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateAppConfigMetaOrderPlatformModel.swift new file mode 100644 index 0000000000..d0cbe83771 --- /dev/null +++ b/Sources/code/platform/Models/Order/AffiliateAppConfigMetaOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: AffiliateAppConfigMeta + Used By: Order + */ + + class AffiliateAppConfigMeta: Codable { + + + public var value: String + + public var name: String + + + public enum CodingKeys: String, CodingKey { + + case value = "value" + + case name = "name" + + } + + public init(name: String, value: String) { + + self.value = value + + self.name = name + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + value = try container.decode(String.self, forKey: .value) + + + + + 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(value, forKey: .value) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: AffiliateAppConfigMeta + Used By: Order + */ + + class AffiliateAppConfigMeta: Codable { + + + public var value: String + + public var name: String + + + public enum CodingKeys: String, CodingKey { + + case value = "value" + + case name = "name" + + } + + public init(name: String, value: String) { + + self.value = value + + self.name = name + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + value = try container.decode(String.self, forKey: .value) + + + + + 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(value, forKey: .value) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AffiliateAppConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateAppConfigOrderPlatformModel.swift new file mode 100644 index 0000000000..0e4677dd77 --- /dev/null +++ b/Sources/code/platform/Models/Order/AffiliateAppConfigOrderPlatformModel.swift @@ -0,0 +1,386 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: AffiliateAppConfig + Used By: Order + */ + + class AffiliateAppConfig: Codable { + + + public var id: String + + public var description: String? + + public var updatedAt: String + + public var name: String + + public var token: String + + public var meta: [AffiliateAppConfigMeta]? + + public var owner: String + + public var secret: String + + public var createdAt: String + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case description = "description" + + case updatedAt = "updated_at" + + case name = "name" + + case token = "token" + + case meta = "meta" + + case owner = "owner" + + case secret = "secret" + + case createdAt = "created_at" + + } + + public init(createdAt: String, description: String? = nil, id: String, meta: [AffiliateAppConfigMeta]? = nil, name: String, owner: String, secret: String, token: String, updatedAt: String) { + + self.id = id + + self.description = description + + self.updatedAt = updatedAt + + self.name = name + + self.token = token + + self.meta = meta + + self.owner = owner + + self.secret = secret + + self.createdAt = createdAt + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + id = try container.decode(String.self, forKey: .id) + + + + + do { + 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 { + + } + + + + updatedAt = try container.decode(String.self, forKey: .updatedAt) + + + + + name = try container.decode(String.self, forKey: .name) + + + + + token = try container.decode(String.self, forKey: .token) + + + + + do { + meta = try container.decode([AffiliateAppConfigMeta].self, forKey: .meta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + owner = try container.decode(String.self, forKey: .owner) + + + + + secret = try container.decode(String.self, forKey: .secret) + + + + + createdAt = try container.decode(String.self, forKey: .createdAt) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(description, forKey: .description) + + + + + try? container.encodeIfPresent(updatedAt, forKey: .updatedAt) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(token, forKey: .token) + + + + + try? container.encodeIfPresent(meta, forKey: .meta) + + + + + try? container.encodeIfPresent(owner, forKey: .owner) + + + + + try? container.encodeIfPresent(secret, forKey: .secret) + + + + + try? container.encodeIfPresent(createdAt, forKey: .createdAt) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: AffiliateAppConfig + Used By: Order + */ + + class AffiliateAppConfig: Codable { + + + public var id: String + + public var description: String? + + public var updatedAt: String + + public var name: String + + public var token: String + + public var meta: [AffiliateAppConfigMeta]? + + public var owner: String + + public var secret: String + + public var createdAt: String + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case description = "description" + + case updatedAt = "updated_at" + + case name = "name" + + case token = "token" + + case meta = "meta" + + case owner = "owner" + + case secret = "secret" + + case createdAt = "created_at" + + } + + public init(createdAt: String, description: String? = nil, id: String, meta: [AffiliateAppConfigMeta]? = nil, name: String, owner: String, secret: String, token: String, updatedAt: String) { + + self.id = id + + self.description = description + + self.updatedAt = updatedAt + + self.name = name + + self.token = token + + self.meta = meta + + self.owner = owner + + self.secret = secret + + self.createdAt = createdAt + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + id = try container.decode(String.self, forKey: .id) + + + + + do { + 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 { + + } + + + + updatedAt = try container.decode(String.self, forKey: .updatedAt) + + + + + name = try container.decode(String.self, forKey: .name) + + + + + token = try container.decode(String.self, forKey: .token) + + + + + do { + meta = try container.decode([AffiliateAppConfigMeta].self, forKey: .meta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + owner = try container.decode(String.self, forKey: .owner) + + + + + secret = try container.decode(String.self, forKey: .secret) + + + + + createdAt = try container.decode(String.self, forKey: .createdAt) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(description, forKey: .description) + + + + + try? container.encodeIfPresent(updatedAt, forKey: .updatedAt) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(token, forKey: .token) + + + + + try? container.encodeIfPresent(meta, forKey: .meta) + + + + + try? container.encodeIfPresent(owner, forKey: .owner) + + + + + try? container.encodeIfPresent(secret, forKey: .secret) + + + + + try? container.encodeIfPresent(createdAt, forKey: .createdAt) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AffiliateBagOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateBagOrderPlatformModel.swift new file mode 100644 index 0000000000..44f2d21143 --- /dev/null +++ b/Sources/code/platform/Models/Order/AffiliateBagOrderPlatformModel.swift @@ -0,0 +1,820 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: AffiliateBag + Used By: Order + */ + + class AffiliateBag: Codable { + + + public var pdfLinks: MarketPlacePdf? + + public var storeId: Int + + public var sku: String + + public var discount: Double + + public var unitPrice: Double + + public var priceEffective: Double + + public var affiliateStoreId: String + + public var identifier: [String: Any] + + public var sellerIdentifier: String + + public var itemSize: String + + public var amountPaid: Double + + public var fyndStoreId: String + + public var itemId: Int + + public var deliveryCharge: Double + + public var avlQty: Int + + public var priceMarked: Double + + public var quantity: Int + + public var companyId: Int + + public var hsnCodeId: String + + public var id: String + + public var affiliateMeta: [String: Any] + + public var modifiedOn: String + + public var transferPrice: Int + + + public enum CodingKeys: String, CodingKey { + + case pdfLinks = "pdf_links" + + case storeId = "store_id" + + case sku = "sku" + + case discount = "discount" + + case unitPrice = "unit_price" + + case priceEffective = "price_effective" + + case affiliateStoreId = "affiliate_store_id" + + case identifier = "identifier" + + case sellerIdentifier = "seller_identifier" + + case itemSize = "item_size" + + case amountPaid = "amount_paid" + + case fyndStoreId = "fynd_store_id" + + case itemId = "item_id" + + case deliveryCharge = "delivery_charge" + + case avlQty = "avl_qty" + + case priceMarked = "price_marked" + + case quantity = "quantity" + + case companyId = "company_id" + + case hsnCodeId = "hsn_code_id" + + case id = "_id" + + case affiliateMeta = "affiliate_meta" + + case modifiedOn = "modified_on" + + case transferPrice = "transfer_price" + + } + + public init(affiliateMeta: [String: Any], affiliateStoreId: String, amountPaid: Double, avlQty: Int, companyId: Int, deliveryCharge: Double, discount: Double, fyndStoreId: String, hsnCodeId: String, identifier: [String: Any], itemId: Int, itemSize: String, modifiedOn: String, pdfLinks: MarketPlacePdf? = nil, priceEffective: Double, priceMarked: Double, quantity: Int, sellerIdentifier: String, sku: String, storeId: Int, transferPrice: Int, unitPrice: Double, id: String) { + + self.pdfLinks = pdfLinks + + self.storeId = storeId + + self.sku = sku + + self.discount = discount + + self.unitPrice = unitPrice + + self.priceEffective = priceEffective + + self.affiliateStoreId = affiliateStoreId + + self.identifier = identifier + + self.sellerIdentifier = sellerIdentifier + + self.itemSize = itemSize + + self.amountPaid = amountPaid + + self.fyndStoreId = fyndStoreId + + self.itemId = itemId + + self.deliveryCharge = deliveryCharge + + self.avlQty = avlQty + + self.priceMarked = priceMarked + + self.quantity = quantity + + self.companyId = companyId + + self.hsnCodeId = hsnCodeId + + self.id = id + + self.affiliateMeta = affiliateMeta + + self.modifiedOn = modifiedOn + + self.transferPrice = transferPrice + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pdfLinks = try container.decode(MarketPlacePdf.self, forKey: .pdfLinks) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + storeId = try container.decode(Int.self, forKey: .storeId) + + + + + sku = try container.decode(String.self, forKey: .sku) + + + + + discount = try container.decode(Double.self, forKey: .discount) + + + + + unitPrice = try container.decode(Double.self, forKey: .unitPrice) + + + + + priceEffective = try container.decode(Double.self, forKey: .priceEffective) + + + + + affiliateStoreId = try container.decode(String.self, forKey: .affiliateStoreId) + + + + + identifier = try container.decode([String: Any].self, forKey: .identifier) + + + + + sellerIdentifier = try container.decode(String.self, forKey: .sellerIdentifier) + + + + + itemSize = try container.decode(String.self, forKey: .itemSize) + + + + + amountPaid = try container.decode(Double.self, forKey: .amountPaid) + + + + + fyndStoreId = try container.decode(String.self, forKey: .fyndStoreId) + + + + + itemId = try container.decode(Int.self, forKey: .itemId) + + + + + deliveryCharge = try container.decode(Double.self, forKey: .deliveryCharge) + + + + + avlQty = try container.decode(Int.self, forKey: .avlQty) + + + + + priceMarked = try container.decode(Double.self, forKey: .priceMarked) + + + + + quantity = try container.decode(Int.self, forKey: .quantity) + + + + + companyId = try container.decode(Int.self, forKey: .companyId) + + + + + hsnCodeId = try container.decode(String.self, forKey: .hsnCodeId) + + + + + id = try container.decode(String.self, forKey: .id) + + + + + affiliateMeta = try container.decode([String: Any].self, forKey: .affiliateMeta) + + + + + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + + + + + transferPrice = try container.decode(Int.self, forKey: .transferPrice) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pdfLinks, forKey: .pdfLinks) + + + + + try? container.encodeIfPresent(storeId, forKey: .storeId) + + + + + try? container.encodeIfPresent(sku, forKey: .sku) + + + + + try? container.encodeIfPresent(discount, forKey: .discount) + + + + + try? container.encodeIfPresent(unitPrice, forKey: .unitPrice) + + + + + try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + + + + + try? container.encodeIfPresent(affiliateStoreId, forKey: .affiliateStoreId) + + + + + try? container.encodeIfPresent(identifier, forKey: .identifier) + + + + + try? container.encodeIfPresent(sellerIdentifier, forKey: .sellerIdentifier) + + + + + try? container.encodeIfPresent(itemSize, forKey: .itemSize) + + + + + try? container.encodeIfPresent(amountPaid, forKey: .amountPaid) + + + + + try? container.encodeIfPresent(fyndStoreId, forKey: .fyndStoreId) + + + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + + try? container.encodeIfPresent(deliveryCharge, forKey: .deliveryCharge) + + + + + try? container.encodeIfPresent(avlQty, forKey: .avlQty) + + + + + try? container.encodeIfPresent(priceMarked, forKey: .priceMarked) + + + + + try? container.encodeIfPresent(quantity, forKey: .quantity) + + + + + try? container.encodeIfPresent(companyId, forKey: .companyId) + + + + + try? container.encodeIfPresent(hsnCodeId, forKey: .hsnCodeId) + + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(affiliateMeta, forKey: .affiliateMeta) + + + + + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + + + + try? container.encodeIfPresent(transferPrice, forKey: .transferPrice) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: AffiliateBag + Used By: Order + */ + + class AffiliateBag: Codable { + + + public var pdfLinks: MarketPlacePdf? + + public var storeId: Int + + public var sku: String + + public var discount: Double + + public var unitPrice: Double + + public var priceEffective: Double + + public var affiliateStoreId: String + + public var identifier: [String: Any] + + public var sellerIdentifier: String + + public var itemSize: String + + public var amountPaid: Double + + public var fyndStoreId: String + + public var itemId: Int + + public var deliveryCharge: Double + + public var avlQty: Int + + public var priceMarked: Double + + public var quantity: Int + + public var companyId: Int + + public var hsnCodeId: String + + public var id: String + + public var affiliateMeta: [String: Any] + + public var modifiedOn: String + + public var transferPrice: Int + + + public enum CodingKeys: String, CodingKey { + + case pdfLinks = "pdf_links" + + case storeId = "store_id" + + case sku = "sku" + + case discount = "discount" + + case unitPrice = "unit_price" + + case priceEffective = "price_effective" + + case affiliateStoreId = "affiliate_store_id" + + case identifier = "identifier" + + case sellerIdentifier = "seller_identifier" + + case itemSize = "item_size" + + case amountPaid = "amount_paid" + + case fyndStoreId = "fynd_store_id" + + case itemId = "item_id" + + case deliveryCharge = "delivery_charge" + + case avlQty = "avl_qty" + + case priceMarked = "price_marked" + + case quantity = "quantity" + + case companyId = "company_id" + + case hsnCodeId = "hsn_code_id" + + case id = "_id" + + case affiliateMeta = "affiliate_meta" + + case modifiedOn = "modified_on" + + case transferPrice = "transfer_price" + + } + + public init(affiliateMeta: [String: Any], affiliateStoreId: String, amountPaid: Double, avlQty: Int, companyId: Int, deliveryCharge: Double, discount: Double, fyndStoreId: String, hsnCodeId: String, identifier: [String: Any], itemId: Int, itemSize: String, modifiedOn: String, pdfLinks: MarketPlacePdf? = nil, priceEffective: Double, priceMarked: Double, quantity: Int, sellerIdentifier: String, sku: String, storeId: Int, transferPrice: Int, unitPrice: Double, id: String) { + + self.pdfLinks = pdfLinks + + self.storeId = storeId + + self.sku = sku + + self.discount = discount + + self.unitPrice = unitPrice + + self.priceEffective = priceEffective + + self.affiliateStoreId = affiliateStoreId + + self.identifier = identifier + + self.sellerIdentifier = sellerIdentifier + + self.itemSize = itemSize + + self.amountPaid = amountPaid + + self.fyndStoreId = fyndStoreId + + self.itemId = itemId + + self.deliveryCharge = deliveryCharge + + self.avlQty = avlQty + + self.priceMarked = priceMarked + + self.quantity = quantity + + self.companyId = companyId + + self.hsnCodeId = hsnCodeId + + self.id = id + + self.affiliateMeta = affiliateMeta + + self.modifiedOn = modifiedOn + + self.transferPrice = transferPrice + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pdfLinks = try container.decode(MarketPlacePdf.self, forKey: .pdfLinks) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + storeId = try container.decode(Int.self, forKey: .storeId) + + + + + sku = try container.decode(String.self, forKey: .sku) + + + + + discount = try container.decode(Double.self, forKey: .discount) + + + + + unitPrice = try container.decode(Double.self, forKey: .unitPrice) + + + + + priceEffective = try container.decode(Double.self, forKey: .priceEffective) + + + + + affiliateStoreId = try container.decode(String.self, forKey: .affiliateStoreId) + + + + + identifier = try container.decode([String: Any].self, forKey: .identifier) + + + + + sellerIdentifier = try container.decode(String.self, forKey: .sellerIdentifier) + + + + + itemSize = try container.decode(String.self, forKey: .itemSize) + + + + + amountPaid = try container.decode(Double.self, forKey: .amountPaid) + + + + + fyndStoreId = try container.decode(String.self, forKey: .fyndStoreId) + + + + + itemId = try container.decode(Int.self, forKey: .itemId) + + + + + deliveryCharge = try container.decode(Double.self, forKey: .deliveryCharge) + + + + + avlQty = try container.decode(Int.self, forKey: .avlQty) + + + + + priceMarked = try container.decode(Double.self, forKey: .priceMarked) + + + + + quantity = try container.decode(Int.self, forKey: .quantity) + + + + + companyId = try container.decode(Int.self, forKey: .companyId) + + + + + hsnCodeId = try container.decode(String.self, forKey: .hsnCodeId) + + + + + id = try container.decode(String.self, forKey: .id) + + + + + affiliateMeta = try container.decode([String: Any].self, forKey: .affiliateMeta) + + + + + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) + + + + + transferPrice = try container.decode(Int.self, forKey: .transferPrice) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pdfLinks, forKey: .pdfLinks) + + + + + try? container.encodeIfPresent(storeId, forKey: .storeId) + + + + + try? container.encodeIfPresent(sku, forKey: .sku) + + + + + try? container.encodeIfPresent(discount, forKey: .discount) + + + + + try? container.encodeIfPresent(unitPrice, forKey: .unitPrice) + + + + + try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + + + + + try? container.encodeIfPresent(affiliateStoreId, forKey: .affiliateStoreId) + + + + + try? container.encodeIfPresent(identifier, forKey: .identifier) + + + + + try? container.encodeIfPresent(sellerIdentifier, forKey: .sellerIdentifier) + + + + + try? container.encodeIfPresent(itemSize, forKey: .itemSize) + + + + + try? container.encodeIfPresent(amountPaid, forKey: .amountPaid) + + + + + try? container.encodeIfPresent(fyndStoreId, forKey: .fyndStoreId) + + + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + + try? container.encodeIfPresent(deliveryCharge, forKey: .deliveryCharge) + + + + + try? container.encodeIfPresent(avlQty, forKey: .avlQty) + + + + + try? container.encodeIfPresent(priceMarked, forKey: .priceMarked) + + + + + try? container.encodeIfPresent(quantity, forKey: .quantity) + + + + + try? container.encodeIfPresent(companyId, forKey: .companyId) + + + + + try? container.encodeIfPresent(hsnCodeId, forKey: .hsnCodeId) + + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(affiliateMeta, forKey: .affiliateMeta) + + + + + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + + + + try? container.encodeIfPresent(transferPrice, forKey: .transferPrice) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AffiliateConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateConfigOrderPlatformModel.swift index 12231f8f36..febd7876f3 100644 --- a/Sources/code/platform/Models/Order/AffiliateConfigOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/AffiliateConfigOrderPlatformModel.swift @@ -12,16 +12,28 @@ public extension PlatformClient.Order { class AffiliateConfig: Codable { + public var app: AffiliateAppConfig? + + public var inventory: AffiliateInventoryConfig? + public var appCompanyId: Int? public enum CodingKeys: String, CodingKey { + case app = "app" + + case inventory = "inventory" + case appCompanyId = "app_company_id" } - public init(appCompanyId: Int? = nil) { + public init(app: AffiliateAppConfig? = nil, appCompanyId: Int? = nil, inventory: AffiliateInventoryConfig? = nil) { + + self.app = app + + self.inventory = inventory self.appCompanyId = appCompanyId @@ -31,6 +43,30 @@ public extension PlatformClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) + do { + app = try container.decode(AffiliateAppConfig.self, forKey: .app) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + inventory = try container.decode(AffiliateInventoryConfig.self, forKey: .inventory) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { appCompanyId = try container.decode(Int.self, forKey: .appCompanyId) @@ -49,6 +85,16 @@ public extension PlatformClient.Order { + try? container.encodeIfPresent(app, forKey: .app) + + + + + try? container.encodeIfPresent(inventory, forKey: .inventory) + + + + try? container.encodeIfPresent(appCompanyId, forKey: .appCompanyId) @@ -68,16 +114,28 @@ public extension PlatformClient.ApplicationClient.Order { class AffiliateConfig: Codable { + public var app: AffiliateAppConfig? + + public var inventory: AffiliateInventoryConfig? + public var appCompanyId: Int? public enum CodingKeys: String, CodingKey { + case app = "app" + + case inventory = "inventory" + case appCompanyId = "app_company_id" } - public init(appCompanyId: Int? = nil) { + public init(app: AffiliateAppConfig? = nil, appCompanyId: Int? = nil, inventory: AffiliateInventoryConfig? = nil) { + + self.app = app + + self.inventory = inventory self.appCompanyId = appCompanyId @@ -87,6 +145,30 @@ public extension PlatformClient.ApplicationClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) + do { + app = try container.decode(AffiliateAppConfig.self, forKey: .app) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + inventory = try container.decode(AffiliateInventoryConfig.self, forKey: .inventory) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { appCompanyId = try container.decode(Int.self, forKey: .appCompanyId) @@ -105,6 +187,16 @@ public extension PlatformClient.ApplicationClient.Order { + try? container.encodeIfPresent(app, forKey: .app) + + + + + try? container.encodeIfPresent(inventory, forKey: .inventory) + + + + try? container.encodeIfPresent(appCompanyId, forKey: .appCompanyId) diff --git a/Sources/code/platform/Models/Order/AffiliateInventoryArticleAssignmentConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateInventoryArticleAssignmentConfigOrderPlatformModel.swift new file mode 100644 index 0000000000..b0d1dd551f --- /dev/null +++ b/Sources/code/platform/Models/Order/AffiliateInventoryArticleAssignmentConfigOrderPlatformModel.swift @@ -0,0 +1,116 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: AffiliateInventoryArticleAssignmentConfig + Used By: Order + */ + + class AffiliateInventoryArticleAssignmentConfig: Codable { + + + public var postOrderReassignment: Bool? + + + public enum CodingKeys: String, CodingKey { + + case postOrderReassignment = "post_order_reassignment" + + } + + public init(postOrderReassignment: Bool? = nil) { + + self.postOrderReassignment = postOrderReassignment + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + postOrderReassignment = try container.decode(Bool.self, forKey: .postOrderReassignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(postOrderReassignment, forKey: .postOrderReassignment) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: AffiliateInventoryArticleAssignmentConfig + Used By: Order + */ + + class AffiliateInventoryArticleAssignmentConfig: Codable { + + + public var postOrderReassignment: Bool? + + + public enum CodingKeys: String, CodingKey { + + case postOrderReassignment = "post_order_reassignment" + + } + + public init(postOrderReassignment: Bool? = nil) { + + self.postOrderReassignment = postOrderReassignment + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + postOrderReassignment = try container.decode(Bool.self, forKey: .postOrderReassignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(postOrderReassignment, forKey: .postOrderReassignment) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AffiliateInventoryConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateInventoryConfigOrderPlatformModel.swift new file mode 100644 index 0000000000..50a601bc1e --- /dev/null +++ b/Sources/code/platform/Models/Order/AffiliateInventoryConfigOrderPlatformModel.swift @@ -0,0 +1,300 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: AffiliateInventoryConfig + Used By: Order + */ + + class AffiliateInventoryConfig: Codable { + + + public var articleAssignment: AffiliateInventoryArticleAssignmentConfig? + + public var payment: AffiliateInventoryPaymentConfig? + + public var inventory: AffiliateInventoryStoreConfig? + + public var order: AffiliateInventoryOrderConfig? + + public var logistics: AffiliateInventoryLogisticsConfig? + + + public enum CodingKeys: String, CodingKey { + + case articleAssignment = "article_assignment" + + case payment = "payment" + + case inventory = "inventory" + + case order = "order" + + case logistics = "logistics" + + } + + public init(articleAssignment: AffiliateInventoryArticleAssignmentConfig? = nil, inventory: AffiliateInventoryStoreConfig? = nil, logistics: AffiliateInventoryLogisticsConfig? = nil, order: AffiliateInventoryOrderConfig? = nil, payment: AffiliateInventoryPaymentConfig? = nil) { + + self.articleAssignment = articleAssignment + + self.payment = payment + + self.inventory = inventory + + self.order = order + + self.logistics = logistics + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + articleAssignment = try container.decode(AffiliateInventoryArticleAssignmentConfig.self, forKey: .articleAssignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + payment = try container.decode(AffiliateInventoryPaymentConfig.self, forKey: .payment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + inventory = try container.decode(AffiliateInventoryStoreConfig.self, forKey: .inventory) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + order = try container.decode(AffiliateInventoryOrderConfig.self, forKey: .order) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + logistics = try container.decode(AffiliateInventoryLogisticsConfig.self, forKey: .logistics) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(articleAssignment, forKey: .articleAssignment) + + + + + try? container.encodeIfPresent(payment, forKey: .payment) + + + + + try? container.encodeIfPresent(inventory, forKey: .inventory) + + + + + try? container.encodeIfPresent(order, forKey: .order) + + + + + try? container.encodeIfPresent(logistics, forKey: .logistics) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: AffiliateInventoryConfig + Used By: Order + */ + + class AffiliateInventoryConfig: Codable { + + + public var articleAssignment: AffiliateInventoryArticleAssignmentConfig? + + public var payment: AffiliateInventoryPaymentConfig? + + public var inventory: AffiliateInventoryStoreConfig? + + public var order: AffiliateInventoryOrderConfig? + + public var logistics: AffiliateInventoryLogisticsConfig? + + + public enum CodingKeys: String, CodingKey { + + case articleAssignment = "article_assignment" + + case payment = "payment" + + case inventory = "inventory" + + case order = "order" + + case logistics = "logistics" + + } + + public init(articleAssignment: AffiliateInventoryArticleAssignmentConfig? = nil, inventory: AffiliateInventoryStoreConfig? = nil, logistics: AffiliateInventoryLogisticsConfig? = nil, order: AffiliateInventoryOrderConfig? = nil, payment: AffiliateInventoryPaymentConfig? = nil) { + + self.articleAssignment = articleAssignment + + self.payment = payment + + self.inventory = inventory + + self.order = order + + self.logistics = logistics + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + articleAssignment = try container.decode(AffiliateInventoryArticleAssignmentConfig.self, forKey: .articleAssignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + payment = try container.decode(AffiliateInventoryPaymentConfig.self, forKey: .payment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + inventory = try container.decode(AffiliateInventoryStoreConfig.self, forKey: .inventory) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + order = try container.decode(AffiliateInventoryOrderConfig.self, forKey: .order) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + logistics = try container.decode(AffiliateInventoryLogisticsConfig.self, forKey: .logistics) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(articleAssignment, forKey: .articleAssignment) + + + + + try? container.encodeIfPresent(payment, forKey: .payment) + + + + + try? container.encodeIfPresent(inventory, forKey: .inventory) + + + + + try? container.encodeIfPresent(order, forKey: .order) + + + + + try? container.encodeIfPresent(logistics, forKey: .logistics) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AffiliateInventoryLogisticsConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateInventoryLogisticsConfigOrderPlatformModel.swift new file mode 100644 index 0000000000..e7e5852af2 --- /dev/null +++ b/Sources/code/platform/Models/Order/AffiliateInventoryLogisticsConfigOrderPlatformModel.swift @@ -0,0 +1,116 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: AffiliateInventoryLogisticsConfig + Used By: Order + */ + + class AffiliateInventoryLogisticsConfig: Codable { + + + public var dpAssignment: Bool? + + + public enum CodingKeys: String, CodingKey { + + case dpAssignment = "dp_assignment" + + } + + public init(dpAssignment: Bool? = nil) { + + self.dpAssignment = dpAssignment + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + dpAssignment = try container.decode(Bool.self, forKey: .dpAssignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(dpAssignment, forKey: .dpAssignment) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: AffiliateInventoryLogisticsConfig + Used By: Order + */ + + class AffiliateInventoryLogisticsConfig: Codable { + + + public var dpAssignment: Bool? + + + public enum CodingKeys: String, CodingKey { + + case dpAssignment = "dp_assignment" + + } + + public init(dpAssignment: Bool? = nil) { + + self.dpAssignment = dpAssignment + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + dpAssignment = try container.decode(Bool.self, forKey: .dpAssignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(dpAssignment, forKey: .dpAssignment) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AffiliateInventoryOrderConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateInventoryOrderConfigOrderPlatformModel.swift new file mode 100644 index 0000000000..be72e7f02a --- /dev/null +++ b/Sources/code/platform/Models/Order/AffiliateInventoryOrderConfigOrderPlatformModel.swift @@ -0,0 +1,116 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: AffiliateInventoryOrderConfig + Used By: Order + */ + + class AffiliateInventoryOrderConfig: Codable { + + + public var forceReassignment: Bool? + + + public enum CodingKeys: String, CodingKey { + + case forceReassignment = "force_reassignment" + + } + + public init(forceReassignment: Bool? = nil) { + + self.forceReassignment = forceReassignment + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + forceReassignment = try container.decode(Bool.self, forKey: .forceReassignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(forceReassignment, forKey: .forceReassignment) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: AffiliateInventoryOrderConfig + Used By: Order + */ + + class AffiliateInventoryOrderConfig: Codable { + + + public var forceReassignment: Bool? + + + public enum CodingKeys: String, CodingKey { + + case forceReassignment = "force_reassignment" + + } + + public init(forceReassignment: Bool? = nil) { + + self.forceReassignment = forceReassignment + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + forceReassignment = try container.decode(Bool.self, forKey: .forceReassignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(forceReassignment, forKey: .forceReassignment) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AffiliateInventoryPaymentConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateInventoryPaymentConfigOrderPlatformModel.swift new file mode 100644 index 0000000000..976f7c8103 --- /dev/null +++ b/Sources/code/platform/Models/Order/AffiliateInventoryPaymentConfigOrderPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: AffiliateInventoryPaymentConfig + Used By: Order + */ + + class AffiliateInventoryPaymentConfig: Codable { + + + public var source: String? + + public var modeOfPayment: String? + + + public enum CodingKeys: String, CodingKey { + + case source = "source" + + case modeOfPayment = "mode_of_payment" + + } + + public init(modeOfPayment: String? = nil, source: String? = nil) { + + self.source = source + + self.modeOfPayment = modeOfPayment + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + source = try container.decode(String.self, forKey: .source) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + modeOfPayment = try container.decode(String.self, forKey: .modeOfPayment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(source, forKey: .source) + + + + + try? container.encodeIfPresent(modeOfPayment, forKey: .modeOfPayment) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: AffiliateInventoryPaymentConfig + Used By: Order + */ + + class AffiliateInventoryPaymentConfig: Codable { + + + public var source: String? + + public var modeOfPayment: String? + + + public enum CodingKeys: String, CodingKey { + + case source = "source" + + case modeOfPayment = "mode_of_payment" + + } + + public init(modeOfPayment: String? = nil, source: String? = nil) { + + self.source = source + + self.modeOfPayment = modeOfPayment + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + source = try container.decode(String.self, forKey: .source) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + modeOfPayment = try container.decode(String.self, forKey: .modeOfPayment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(source, forKey: .source) + + + + + try? container.encodeIfPresent(modeOfPayment, forKey: .modeOfPayment) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AffiliateInventoryStoreConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateInventoryStoreConfigOrderPlatformModel.swift new file mode 100644 index 0000000000..40b38640b0 --- /dev/null +++ b/Sources/code/platform/Models/Order/AffiliateInventoryStoreConfigOrderPlatformModel.swift @@ -0,0 +1,116 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: AffiliateInventoryStoreConfig + Used By: Order + */ + + class AffiliateInventoryStoreConfig: Codable { + + + public var store: [String: Any]? + + + public enum CodingKeys: String, CodingKey { + + case store = "store" + + } + + public init(store: [String: Any]? = nil) { + + self.store = store + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + store = try container.decode([String: Any].self, forKey: .store) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(store, forKey: .store) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: AffiliateInventoryStoreConfig + Used By: Order + */ + + class AffiliateInventoryStoreConfig: Codable { + + + public var store: [String: Any]? + + + public enum CodingKeys: String, CodingKey { + + case store = "store" + + } + + public init(store: [String: Any]? = nil) { + + self.store = store + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + store = try container.decode([String: Any].self, forKey: .store) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(store, forKey: .store) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AffiliateOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateOrderPlatformModel.swift new file mode 100644 index 0000000000..7ac57f5498 --- /dev/null +++ b/Sources/code/platform/Models/Order/AffiliateOrderPlatformModel.swift @@ -0,0 +1,180 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: Affiliate + Used By: Order + */ + + class Affiliate: Codable { + + + public var id: String + + public var config: AffiliateConfig? + + public var token: String + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case config = "config" + + case token = "token" + + } + + public init(config: AffiliateConfig? = nil, id: String, token: String) { + + self.id = id + + self.config = config + + self.token = token + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + id = try container.decode(String.self, forKey: .id) + + + + + do { + config = try container.decode(AffiliateConfig.self, forKey: .config) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + token = try container.decode(String.self, forKey: .token) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(config, forKey: .config) + + + + + try? container.encodeIfPresent(token, forKey: .token) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: Affiliate + Used By: Order + */ + + class Affiliate: Codable { + + + public var id: String + + public var config: AffiliateConfig? + + public var token: String + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case config = "config" + + case token = "token" + + } + + public init(config: AffiliateConfig? = nil, id: String, token: String) { + + self.id = id + + self.config = config + + self.token = token + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + id = try container.decode(String.self, forKey: .id) + + + + + do { + config = try container.decode(AffiliateConfig.self, forKey: .config) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + token = try container.decode(String.self, forKey: .token) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(config, forKey: .config) + + + + + try? container.encodeIfPresent(token, forKey: .token) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AffiliateStoreIdMappingOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AffiliateStoreIdMappingOrderPlatformModel.swift new file mode 100644 index 0000000000..c8170c9876 --- /dev/null +++ b/Sources/code/platform/Models/Order/AffiliateStoreIdMappingOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: AffiliateStoreIdMapping + Used By: Order + */ + + class AffiliateStoreIdMapping: Codable { + + + public var storeId: Int + + public var marketplaceStoreId: String + + + public enum CodingKeys: String, CodingKey { + + case storeId = "store_id" + + case marketplaceStoreId = "marketplace_store_id" + + } + + public init(marketplaceStoreId: String, storeId: Int) { + + self.storeId = storeId + + self.marketplaceStoreId = marketplaceStoreId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + storeId = try container.decode(Int.self, forKey: .storeId) + + + + + marketplaceStoreId = try container.decode(String.self, forKey: .marketplaceStoreId) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(storeId, forKey: .storeId) + + + + + try? container.encodeIfPresent(marketplaceStoreId, forKey: .marketplaceStoreId) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: AffiliateStoreIdMapping + Used By: Order + */ + + class AffiliateStoreIdMapping: Codable { + + + public var storeId: Int + + public var marketplaceStoreId: String + + + public enum CodingKeys: String, CodingKey { + + case storeId = "store_id" + + case marketplaceStoreId = "marketplace_store_id" + + } + + public init(marketplaceStoreId: String, storeId: Int) { + + self.storeId = storeId + + self.marketplaceStoreId = marketplaceStoreId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + storeId = try container.decode(Int.self, forKey: .storeId) + + + + + marketplaceStoreId = try container.decode(String.self, forKey: .marketplaceStoreId) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(storeId, forKey: .storeId) + + + + + try? container.encodeIfPresent(marketplaceStoreId, forKey: .marketplaceStoreId) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AllowedTemplatesResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AllowedTemplatesResponseSchemaOrderPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Order/AllowedTemplatesResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/AllowedTemplatesResponseSchemaOrderPlatformModel.swift index a8d8ce9a1c..c66f84e865 100644 --- a/Sources/code/platform/Models/Order/AllowedTemplatesResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/AllowedTemplatesResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: AllowedTemplatesResponse + Model: AllowedTemplatesResponseSchema Used By: Order */ - class AllowedTemplatesResponse: Codable { + class AllowedTemplatesResponseSchema: Codable { public var templateXSlug: [Templates]? @@ -61,11 +61,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: AllowedTemplatesResponse + Model: AllowedTemplatesResponseSchema Used By: Order */ - class AllowedTemplatesResponse: Codable { + class AllowedTemplatesResponseSchema: Codable { public var templateXSlug: [Templates]? diff --git a/Sources/code/platform/Models/Order/AnnouncementResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AnnouncementResponseSchemaOrderPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Order/AnnouncementResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/AnnouncementResponseSchemaOrderPlatformModel.swift index 018d608de7..9a77a54f05 100644 --- a/Sources/code/platform/Models/Order/AnnouncementResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/AnnouncementResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: AnnouncementResponse + Model: AnnouncementResponseSchema Used By: Order */ - class AnnouncementResponse: Codable { + class AnnouncementResponseSchema: Codable { public var toDatetime: String? @@ -261,11 +261,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: AnnouncementResponse + Model: AnnouncementResponseSchema Used By: Order */ - class AnnouncementResponse: Codable { + class AnnouncementResponseSchema: Codable { public var toDatetime: String? diff --git a/Sources/code/platform/Models/Order/AnnouncementsResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AnnouncementsResponseSchemaOrderPlatformModel.swift similarity index 80% rename from Sources/code/platform/Models/Order/AnnouncementsResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/AnnouncementsResponseSchemaOrderPlatformModel.swift index 97579a4b60..311fd21076 100644 --- a/Sources/code/platform/Models/Order/AnnouncementsResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/AnnouncementsResponseSchemaOrderPlatformModel.swift @@ -5,18 +5,18 @@ import Foundation public extension PlatformClient.Order { /* - Model: AnnouncementsResponse + Model: AnnouncementsResponseSchema Used By: Order */ - class AnnouncementsResponse: Codable { + class AnnouncementsResponseSchema: Codable { - public var announcements: [AnnouncementResponse]? + public var announcements: [AnnouncementResponseSchema]? public var success: Bool? - public var status: Int? + public var message: String? public enum CodingKeys: String, CodingKey { @@ -25,17 +25,17 @@ public extension PlatformClient.Order { case success = "success" - case status = "status" + case message = "message" } - public init(announcements: [AnnouncementResponse]? = nil, status: Int? = nil, success: Bool? = nil) { + public init(announcements: [AnnouncementResponseSchema]? = nil, message: String? = nil, success: Bool? = nil) { self.announcements = announcements self.success = success - self.status = status + self.message = message } @@ -44,7 +44,7 @@ public extension PlatformClient.Order { do { - announcements = try container.decode([AnnouncementResponse].self, forKey: .announcements) + announcements = try container.decode([AnnouncementResponseSchema].self, forKey: .announcements) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ public extension PlatformClient.Order { 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) @@ -95,7 +95,7 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(message, forKey: .message) } @@ -107,18 +107,18 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: AnnouncementsResponse + Model: AnnouncementsResponseSchema Used By: Order */ - class AnnouncementsResponse: Codable { + class AnnouncementsResponseSchema: Codable { - public var announcements: [AnnouncementResponse]? + public var announcements: [AnnouncementResponseSchema]? public var success: Bool? - public var status: Int? + public var message: String? public enum CodingKeys: String, CodingKey { @@ -127,17 +127,17 @@ public extension PlatformClient.ApplicationClient.Order { case success = "success" - case status = "status" + case message = "message" } - public init(announcements: [AnnouncementResponse]? = nil, status: Int? = nil, success: Bool? = nil) { + public init(announcements: [AnnouncementResponseSchema]? = nil, message: String? = nil, success: Bool? = nil) { self.announcements = announcements self.success = success - self.status = status + self.message = message } @@ -146,7 +146,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - announcements = try container.decode([AnnouncementResponse].self, forKey: .announcements) + announcements = try container.decode([AnnouncementResponseSchema].self, forKey: .announcements) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +170,7 @@ public extension PlatformClient.ApplicationClient.Order { 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) @@ -197,7 +197,7 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(message, forKey: .message) } diff --git a/Sources/code/platform/Models/Order/AppliedFreeArticlesOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AppliedFreeArticlesOrderPlatformModel.swift new file mode 100644 index 0000000000..d55422c0b0 --- /dev/null +++ b/Sources/code/platform/Models/Order/AppliedFreeArticlesOrderPlatformModel.swift @@ -0,0 +1,254 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: AppliedFreeArticles + Used By: Order + */ + + class AppliedFreeArticles: Codable { + + + public var articleId: String? + + public var freeGiftItemDetails: FreeGiftItems? + + public var parentItemIdentifier: String? + + public var quantity: Double? + + + public enum CodingKeys: String, CodingKey { + + case articleId = "article_id" + + case freeGiftItemDetails = "free_gift_item_details" + + case parentItemIdentifier = "parent_item_identifier" + + case quantity = "quantity" + + } + + public init(articleId: String? = nil, freeGiftItemDetails: FreeGiftItems? = nil, parentItemIdentifier: String? = nil, quantity: Double? = nil) { + + self.articleId = articleId + + self.freeGiftItemDetails = freeGiftItemDetails + + self.parentItemIdentifier = parentItemIdentifier + + self.quantity = quantity + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + articleId = try container.decode(String.self, forKey: .articleId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + freeGiftItemDetails = try container.decode(FreeGiftItems.self, forKey: .freeGiftItemDetails) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + parentItemIdentifier = try container.decode(String.self, forKey: .parentItemIdentifier) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + quantity = try container.decode(Double.self, forKey: .quantity) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(articleId, forKey: .articleId) + + + + + try? container.encodeIfPresent(freeGiftItemDetails, forKey: .freeGiftItemDetails) + + + + + try? container.encodeIfPresent(parentItemIdentifier, forKey: .parentItemIdentifier) + + + + + try? container.encodeIfPresent(quantity, forKey: .quantity) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: AppliedFreeArticles + Used By: Order + */ + + class AppliedFreeArticles: Codable { + + + public var articleId: String? + + public var freeGiftItemDetails: FreeGiftItems? + + public var parentItemIdentifier: String? + + public var quantity: Double? + + + public enum CodingKeys: String, CodingKey { + + case articleId = "article_id" + + case freeGiftItemDetails = "free_gift_item_details" + + case parentItemIdentifier = "parent_item_identifier" + + case quantity = "quantity" + + } + + public init(articleId: String? = nil, freeGiftItemDetails: FreeGiftItems? = nil, parentItemIdentifier: String? = nil, quantity: Double? = nil) { + + self.articleId = articleId + + self.freeGiftItemDetails = freeGiftItemDetails + + self.parentItemIdentifier = parentItemIdentifier + + self.quantity = quantity + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + articleId = try container.decode(String.self, forKey: .articleId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + freeGiftItemDetails = try container.decode(FreeGiftItems.self, forKey: .freeGiftItemDetails) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + parentItemIdentifier = try container.decode(String.self, forKey: .parentItemIdentifier) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + quantity = try container.decode(Double.self, forKey: .quantity) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(articleId, forKey: .articleId) + + + + + try? container.encodeIfPresent(freeGiftItemDetails, forKey: .freeGiftItemDetails) + + + + + try? container.encodeIfPresent(parentItemIdentifier, forKey: .parentItemIdentifier) + + + + + try? container.encodeIfPresent(quantity, forKey: .quantity) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/AppliedPromosOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AppliedPromosOrderPlatformModel.swift index 010c8b1bb9..17eece5c02 100644 --- a/Sources/code/platform/Models/Order/AppliedPromosOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/AppliedPromosOrderPlatformModel.swift @@ -28,6 +28,8 @@ public extension PlatformClient.Order { public var mrpPromotion: Bool? + public var appliedFreeArticles: [AppliedFreeArticles]? + public enum CodingKeys: String, CodingKey { @@ -47,9 +49,11 @@ public extension PlatformClient.Order { case mrpPromotion = "mrp_promotion" + case appliedFreeArticles = "applied_free_articles" + } - public init(amount: Double? = nil, articleQuantity: Int? = nil, buyRules: [BuyRules]? = nil, discountRules: [DiscountRules]? = nil, mrpPromotion: Bool? = nil, promotionName: String? = nil, promotionType: String? = nil, promoId: String? = nil) { + public init(amount: Double? = nil, appliedFreeArticles: [AppliedFreeArticles]? = nil, articleQuantity: Int? = nil, buyRules: [BuyRules]? = nil, discountRules: [DiscountRules]? = nil, mrpPromotion: Bool? = nil, promotionName: String? = nil, promotionType: String? = nil, promoId: String? = nil) { self.promotionType = promotionType @@ -67,6 +71,8 @@ public extension PlatformClient.Order { self.mrpPromotion = mrpPromotion + self.appliedFreeArticles = appliedFreeArticles + } required public init(from decoder: Decoder) throws { @@ -168,6 +174,18 @@ public extension PlatformClient.Order { } + + do { + appliedFreeArticles = try container.decode([AppliedFreeArticles].self, forKey: .appliedFreeArticles) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -213,6 +231,11 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(mrpPromotion, forKey: .mrpPromotion) + + + try? container.encodeIfPresent(appliedFreeArticles, forKey: .appliedFreeArticles) + + } } @@ -245,6 +268,8 @@ public extension PlatformClient.ApplicationClient.Order { public var mrpPromotion: Bool? + public var appliedFreeArticles: [AppliedFreeArticles]? + public enum CodingKeys: String, CodingKey { @@ -264,9 +289,11 @@ public extension PlatformClient.ApplicationClient.Order { case mrpPromotion = "mrp_promotion" + case appliedFreeArticles = "applied_free_articles" + } - public init(amount: Double? = nil, articleQuantity: Int? = nil, buyRules: [BuyRules]? = nil, discountRules: [DiscountRules]? = nil, mrpPromotion: Bool? = nil, promotionName: String? = nil, promotionType: String? = nil, promoId: String? = nil) { + public init(amount: Double? = nil, appliedFreeArticles: [AppliedFreeArticles]? = nil, articleQuantity: Int? = nil, buyRules: [BuyRules]? = nil, discountRules: [DiscountRules]? = nil, mrpPromotion: Bool? = nil, promotionName: String? = nil, promotionType: String? = nil, promoId: String? = nil) { self.promotionType = promotionType @@ -284,6 +311,8 @@ public extension PlatformClient.ApplicationClient.Order { self.mrpPromotion = mrpPromotion + self.appliedFreeArticles = appliedFreeArticles + } required public init(from decoder: Decoder) throws { @@ -385,6 +414,18 @@ public extension PlatformClient.ApplicationClient.Order { } + + do { + appliedFreeArticles = try container.decode([AppliedFreeArticles].self, forKey: .appliedFreeArticles) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -430,6 +471,11 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(mrpPromotion, forKey: .mrpPromotion) + + + try? container.encodeIfPresent(appliedFreeArticles, forKey: .appliedFreeArticles) + + } } diff --git a/Sources/code/platform/Models/Order/ArticleDetailsOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ArticleDetailsOrderPlatformModel.swift new file mode 100644 index 0000000000..08385c7c51 --- /dev/null +++ b/Sources/code/platform/Models/Order/ArticleDetailsOrderPlatformModel.swift @@ -0,0 +1,294 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ArticleDetails + Used By: Order + */ + + class ArticleDetails: Codable { + + + public var id: String + + public var brandId: Int + + public var dimension: [String: Any] + + public var category: [String: Any] + + public var weight: [String: Any] + + public var attributes: [String: Any] + + public var quantity: Int + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case brandId = "brand_id" + + case dimension = "dimension" + + case category = "category" + + case weight = "weight" + + case attributes = "attributes" + + case quantity = "quantity" + + } + + public init(attributes: [String: Any], brandId: Int, category: [String: Any], dimension: [String: Any], quantity: Int, weight: [String: Any], id: String) { + + self.id = id + + self.brandId = brandId + + self.dimension = dimension + + self.category = category + + self.weight = weight + + self.attributes = attributes + + self.quantity = quantity + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + id = try container.decode(String.self, forKey: .id) + + + + + brandId = try container.decode(Int.self, forKey: .brandId) + + + + + dimension = try container.decode([String: Any].self, forKey: .dimension) + + + + + category = try container.decode([String: Any].self, forKey: .category) + + + + + weight = try container.decode([String: Any].self, forKey: .weight) + + + + + attributes = try container.decode([String: Any].self, forKey: .attributes) + + + + + quantity = try container.decode(Int.self, forKey: .quantity) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(brandId, forKey: .brandId) + + + + + try? container.encodeIfPresent(dimension, forKey: .dimension) + + + + + try? container.encodeIfPresent(category, forKey: .category) + + + + + try? container.encodeIfPresent(weight, forKey: .weight) + + + + + try? container.encodeIfPresent(attributes, forKey: .attributes) + + + + + try? container.encodeIfPresent(quantity, forKey: .quantity) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ArticleDetails + Used By: Order + */ + + class ArticleDetails: Codable { + + + public var id: String + + public var brandId: Int + + public var dimension: [String: Any] + + public var category: [String: Any] + + public var weight: [String: Any] + + public var attributes: [String: Any] + + public var quantity: Int + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case brandId = "brand_id" + + case dimension = "dimension" + + case category = "category" + + case weight = "weight" + + case attributes = "attributes" + + case quantity = "quantity" + + } + + public init(attributes: [String: Any], brandId: Int, category: [String: Any], dimension: [String: Any], quantity: Int, weight: [String: Any], id: String) { + + self.id = id + + self.brandId = brandId + + self.dimension = dimension + + self.category = category + + self.weight = weight + + self.attributes = attributes + + self.quantity = quantity + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + id = try container.decode(String.self, forKey: .id) + + + + + brandId = try container.decode(Int.self, forKey: .brandId) + + + + + dimension = try container.decode([String: Any].self, forKey: .dimension) + + + + + category = try container.decode([String: Any].self, forKey: .category) + + + + + weight = try container.decode([String: Any].self, forKey: .weight) + + + + + attributes = try container.decode([String: Any].self, forKey: .attributes) + + + + + quantity = try container.decode(Int.self, forKey: .quantity) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(brandId, forKey: .brandId) + + + + + try? container.encodeIfPresent(dimension, forKey: .dimension) + + + + + try? container.encodeIfPresent(category, forKey: .category) + + + + + try? container.encodeIfPresent(weight, forKey: .weight) + + + + + try? container.encodeIfPresent(attributes, forKey: .attributes) + + + + + try? container.encodeIfPresent(quantity, forKey: .quantity) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ArticleOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ArticleOrderPlatformModel.swift index 5404dbe8e0..60375ce53c 100644 --- a/Sources/code/platform/Models/Order/ArticleOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ArticleOrderPlatformModel.swift @@ -18,7 +18,7 @@ public extension PlatformClient.Order { public var uid: String - public var aSet: [String: Any]? + public var set: [String: Any]? public var dimensions: Dimensions? @@ -53,7 +53,7 @@ public extension PlatformClient.Order { case uid = "uid" - case aSet = "a_set" + case set = "set" case dimensions = "dimensions" @@ -81,7 +81,7 @@ public extension PlatformClient.Order { } - public init(aSet: [String: Any]? = nil, childDetails: [String: Any]? = nil, code: String? = nil, currency: [String: Any]? = nil, dimensions: Dimensions? = nil, espModified: Bool? = nil, identifiers: [String: Any], isSet: Bool? = nil, rawMeta: String? = nil, returnConfig: ReturnConfig? = nil, sellerIdentifier: String, size: String, tags: [String]? = nil, uid: String, weight: Weight? = nil, id: String) { + public init(childDetails: [String: Any]? = nil, code: String? = nil, currency: [String: Any]? = nil, dimensions: Dimensions? = nil, espModified: Bool? = nil, identifiers: [String: Any], isSet: Bool? = nil, rawMeta: String? = nil, returnConfig: ReturnConfig? = nil, sellerIdentifier: String, set: [String: Any]? = nil, size: String, tags: [String]? = nil, uid: String, weight: Weight? = nil, id: String) { self.childDetails = childDetails @@ -89,7 +89,7 @@ public extension PlatformClient.Order { self.uid = uid - self.aSet = aSet + self.set = set self.dimensions = dimensions @@ -144,7 +144,7 @@ public extension PlatformClient.Order { do { - aSet = try container.decode([String: Any].self, forKey: .aSet) + set = try container.decode([String: Any].self, forKey: .set) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -299,7 +299,7 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(aSet, forKey: .aSet) + try? container.encodeIfPresent(set, forKey: .set) @@ -384,7 +384,7 @@ public extension PlatformClient.ApplicationClient.Order { public var uid: String - public var aSet: [String: Any]? + public var set: [String: Any]? public var dimensions: Dimensions? @@ -419,7 +419,7 @@ public extension PlatformClient.ApplicationClient.Order { case uid = "uid" - case aSet = "a_set" + case set = "set" case dimensions = "dimensions" @@ -447,7 +447,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(aSet: [String: Any]? = nil, childDetails: [String: Any]? = nil, code: String? = nil, currency: [String: Any]? = nil, dimensions: Dimensions? = nil, espModified: Bool? = nil, identifiers: [String: Any], isSet: Bool? = nil, rawMeta: String? = nil, returnConfig: ReturnConfig? = nil, sellerIdentifier: String, size: String, tags: [String]? = nil, uid: String, weight: Weight? = nil, id: String) { + public init(childDetails: [String: Any]? = nil, code: String? = nil, currency: [String: Any]? = nil, dimensions: Dimensions? = nil, espModified: Bool? = nil, identifiers: [String: Any], isSet: Bool? = nil, rawMeta: String? = nil, returnConfig: ReturnConfig? = nil, sellerIdentifier: String, set: [String: Any]? = nil, size: String, tags: [String]? = nil, uid: String, weight: Weight? = nil, id: String) { self.childDetails = childDetails @@ -455,7 +455,7 @@ public extension PlatformClient.ApplicationClient.Order { self.uid = uid - self.aSet = aSet + self.set = set self.dimensions = dimensions @@ -510,7 +510,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - aSet = try container.decode([String: Any].self, forKey: .aSet) + set = try container.decode([String: Any].self, forKey: .set) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -665,7 +665,7 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(aSet, forKey: .aSet) + try? container.encodeIfPresent(set, forKey: .set) diff --git a/Sources/code/platform/Models/Order/AttachOrderUserResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/AttachOrderUserResponseSchemaOrderPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Order/AttachOrderUserResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/AttachOrderUserResponseSchemaOrderPlatformModel.swift index 75127a5e95..fa7f93616d 100644 --- a/Sources/code/platform/Models/Order/AttachOrderUserResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/AttachOrderUserResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: AttachOrderUserResponse + Model: AttachOrderUserResponseSchema Used By: Order */ - class AttachOrderUserResponse: Codable { + class AttachOrderUserResponseSchema: Codable { public var success: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: AttachOrderUserResponse + Model: AttachOrderUserResponseSchema Used By: Order */ - class AttachOrderUserResponse: Codable { + class AttachOrderUserResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Order/BagDetailsOrderPlatformModel.swift b/Sources/code/platform/Models/Order/BagDetailsOrderPlatformModel.swift index f93cab82f5..a963342c6f 100644 --- a/Sources/code/platform/Models/Order/BagDetailsOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BagDetailsOrderPlatformModel.swift @@ -42,7 +42,7 @@ public extension PlatformClient.Order { public var dates: Dates? - public var deliveryAddress: PlatformDeliveryAddress? + public var deliveryAddress: Address? public var deliverySlot: DeliverySlotDetails? @@ -104,6 +104,8 @@ public extension PlatformClient.Order { public var prices: Prices? + public var charges: [PriceAdjustmentCharge]? + public var qcRequired: Bool? public var quantity: Double? @@ -114,7 +116,7 @@ public extension PlatformClient.Order { public var restorePromos: [String: Any]? - public var rtoAddress: PlatformDeliveryAddress? + public var rtoAddress: Address? public var sellerIdentifier: String? @@ -247,6 +249,8 @@ public extension PlatformClient.Order { case prices = "prices" + case charges = "charges" + case qcRequired = "qc_required" case quantity = "quantity" @@ -297,7 +301,7 @@ public extension PlatformClient.Order { } - public init(affiliateBagDetails: AffiliateBagDetails? = nil, affiliateDetails: AffiliateDetails? = nil, appliedPromos: [[String: Any]]? = nil, article: Article? = nil, articleDetails: ArticleStatusDetails? = nil, bagId: Int? = nil, bagStatus: [BagStatusHistory]? = nil, bagStatusHistory: [BagStatusHistory]? = nil, bagUpdateTime: Double? = nil, brand: Brand? = nil, company: Company? = nil, currentOperationalStatus: BagStatusHistory? = nil, currentStatus: BagStatusHistory? = nil, dates: Dates? = nil, deliveryAddress: PlatformDeliveryAddress? = nil, deliverySlot: DeliverySlotDetails? = nil, displayName: String? = nil, dpDetails: [String: Any]? = nil, einvoiceInfo: [String: Any]? = nil, entityType: String? = nil, fallbackUser: [String: Any]? = nil, financialBreakup: [FinancialBreakup]? = nil, fulfillingStore: Store? = nil, fyndstoreEmp: [String: Any]? = nil, gstDetails: GSTDetailsData? = nil, id: String? = nil, identifier: String? = nil, invoice: InvoiceDetails? = nil, item: Item? = nil, journeyType: String? = nil, lineNumber: Int? = nil, lockStatus: Bool? = nil, manifestId: String? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, noOfBagsOrder: Int? = nil, operationalStatus: String? = nil, order: OrderDetails? = nil, orderingStore: Store? = nil, orderIntegrationId: String? = nil, orderType: String? = nil, orderValue: Double? = nil, originalBagList: [Int]? = nil, parentPromoBags: [String: Any]? = nil, payments: [String: Any]? = nil, paymentMethods: [String: Any]? = nil, paymentType: String? = nil, prices: Prices? = nil, qcRequired: Bool? = nil, quantity: Double? = nil, reasons: [[String: Any]]? = nil, restoreCoupon: Bool? = nil, restorePromos: [String: Any]? = nil, rtoAddress: PlatformDeliveryAddress? = nil, sellerIdentifier: String? = nil, shipment: Shipment? = nil, shipmentDetails: ShipmentDetails? = nil, shipmentGst: ShipmentGstDetails? = nil, shipmentId: String? = nil, shipmentStatus: ShipmentStatusData? = nil, shipmentStatusHistory: [ShipmentStatusData]? = nil, status: BagReturnableCancelableStatus? = nil, tags: [String]? = nil, totalShipmentsInOrder: Int? = nil, totalShipmentBags: Int? = nil, transactionType: String? = nil, type: String? = nil, updatedAt: String? = nil, user: UserDetails? = nil, weight: WeightData? = nil) { + public init(affiliateBagDetails: AffiliateBagDetails? = nil, affiliateDetails: AffiliateDetails? = nil, appliedPromos: [[String: Any]]? = nil, article: Article? = nil, articleDetails: ArticleStatusDetails? = nil, bagId: Int? = nil, bagStatus: [BagStatusHistory]? = nil, bagStatusHistory: [BagStatusHistory]? = nil, bagUpdateTime: Double? = nil, brand: Brand? = nil, charges: [PriceAdjustmentCharge]? = nil, company: Company? = nil, currentOperationalStatus: BagStatusHistory? = nil, currentStatus: BagStatusHistory? = nil, dates: Dates? = nil, deliveryAddress: Address? = nil, deliverySlot: DeliverySlotDetails? = nil, displayName: String? = nil, dpDetails: [String: Any]? = nil, einvoiceInfo: [String: Any]? = nil, entityType: String? = nil, fallbackUser: [String: Any]? = nil, financialBreakup: [FinancialBreakup]? = nil, fulfillingStore: Store? = nil, fyndstoreEmp: [String: Any]? = nil, gstDetails: GSTDetailsData? = nil, id: String? = nil, identifier: String? = nil, invoice: InvoiceDetails? = nil, item: Item? = nil, journeyType: String? = nil, lineNumber: Int? = nil, lockStatus: Bool? = nil, manifestId: String? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, noOfBagsOrder: Int? = nil, operationalStatus: String? = nil, order: OrderDetails? = nil, orderingStore: Store? = nil, orderIntegrationId: String? = nil, orderType: String? = nil, orderValue: Double? = nil, originalBagList: [Int]? = nil, parentPromoBags: [String: Any]? = nil, payments: [String: Any]? = nil, paymentMethods: [String: Any]? = nil, paymentType: String? = nil, prices: Prices? = nil, qcRequired: Bool? = nil, quantity: Double? = nil, reasons: [[String: Any]]? = nil, restoreCoupon: Bool? = nil, restorePromos: [String: Any]? = nil, rtoAddress: Address? = nil, sellerIdentifier: String? = nil, shipment: Shipment? = nil, shipmentDetails: ShipmentDetails? = nil, shipmentGst: ShipmentGstDetails? = nil, shipmentId: String? = nil, shipmentStatus: ShipmentStatusData? = nil, shipmentStatusHistory: [ShipmentStatusData]? = nil, status: BagReturnableCancelableStatus? = nil, tags: [String]? = nil, totalShipmentsInOrder: Int? = nil, totalShipmentBags: Int? = nil, transactionType: String? = nil, type: String? = nil, updatedAt: String? = nil, user: UserDetails? = nil, weight: WeightData? = nil) { self.bagUpdateTime = bagUpdateTime @@ -391,6 +395,8 @@ public extension PlatformClient.Order { self.prices = prices + self.charges = charges + self.qcRequired = qcRequired self.quantity = quantity @@ -626,7 +632,7 @@ public extension PlatformClient.Order { do { - deliveryAddress = try container.decode(PlatformDeliveryAddress.self, forKey: .deliveryAddress) + deliveryAddress = try container.decode(Address.self, forKey: .deliveryAddress) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -997,6 +1003,18 @@ public extension PlatformClient.Order { + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { qcRequired = try container.decode(Bool.self, forKey: .qcRequired) @@ -1058,7 +1076,7 @@ public extension PlatformClient.Order { do { - rtoAddress = try container.decode(PlatformDeliveryAddress.self, forKey: .rtoAddress) + rtoAddress = try container.decode(Address.self, forKey: .rtoAddress) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1521,6 +1539,11 @@ public extension PlatformClient.Order { + try? container.encodeIfPresent(charges, forKey: .charges) + + + + try? container.encodeIfPresent(qcRequired, forKey: .qcRequired) @@ -1685,7 +1708,7 @@ public extension PlatformClient.ApplicationClient.Order { public var dates: Dates? - public var deliveryAddress: PlatformDeliveryAddress? + public var deliveryAddress: Address? public var deliverySlot: DeliverySlotDetails? @@ -1747,6 +1770,8 @@ public extension PlatformClient.ApplicationClient.Order { public var prices: Prices? + public var charges: [PriceAdjustmentCharge]? + public var qcRequired: Bool? public var quantity: Double? @@ -1757,7 +1782,7 @@ public extension PlatformClient.ApplicationClient.Order { public var restorePromos: [String: Any]? - public var rtoAddress: PlatformDeliveryAddress? + public var rtoAddress: Address? public var sellerIdentifier: String? @@ -1890,6 +1915,8 @@ public extension PlatformClient.ApplicationClient.Order { case prices = "prices" + case charges = "charges" + case qcRequired = "qc_required" case quantity = "quantity" @@ -1940,7 +1967,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(affiliateBagDetails: AffiliateBagDetails? = nil, affiliateDetails: AffiliateDetails? = nil, appliedPromos: [[String: Any]]? = nil, article: Article? = nil, articleDetails: ArticleStatusDetails? = nil, bagId: Int? = nil, bagStatus: [BagStatusHistory]? = nil, bagStatusHistory: [BagStatusHistory]? = nil, bagUpdateTime: Double? = nil, brand: Brand? = nil, company: Company? = nil, currentOperationalStatus: BagStatusHistory? = nil, currentStatus: BagStatusHistory? = nil, dates: Dates? = nil, deliveryAddress: PlatformDeliveryAddress? = nil, deliverySlot: DeliverySlotDetails? = nil, displayName: String? = nil, dpDetails: [String: Any]? = nil, einvoiceInfo: [String: Any]? = nil, entityType: String? = nil, fallbackUser: [String: Any]? = nil, financialBreakup: [FinancialBreakup]? = nil, fulfillingStore: Store? = nil, fyndstoreEmp: [String: Any]? = nil, gstDetails: GSTDetailsData? = nil, id: String? = nil, identifier: String? = nil, invoice: InvoiceDetails? = nil, item: Item? = nil, journeyType: String? = nil, lineNumber: Int? = nil, lockStatus: Bool? = nil, manifestId: String? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, noOfBagsOrder: Int? = nil, operationalStatus: String? = nil, order: OrderDetails? = nil, orderingStore: Store? = nil, orderIntegrationId: String? = nil, orderType: String? = nil, orderValue: Double? = nil, originalBagList: [Int]? = nil, parentPromoBags: [String: Any]? = nil, payments: [String: Any]? = nil, paymentMethods: [String: Any]? = nil, paymentType: String? = nil, prices: Prices? = nil, qcRequired: Bool? = nil, quantity: Double? = nil, reasons: [[String: Any]]? = nil, restoreCoupon: Bool? = nil, restorePromos: [String: Any]? = nil, rtoAddress: PlatformDeliveryAddress? = nil, sellerIdentifier: String? = nil, shipment: Shipment? = nil, shipmentDetails: ShipmentDetails? = nil, shipmentGst: ShipmentGstDetails? = nil, shipmentId: String? = nil, shipmentStatus: ShipmentStatusData? = nil, shipmentStatusHistory: [ShipmentStatusData]? = nil, status: BagReturnableCancelableStatus? = nil, tags: [String]? = nil, totalShipmentsInOrder: Int? = nil, totalShipmentBags: Int? = nil, transactionType: String? = nil, type: String? = nil, updatedAt: String? = nil, user: UserDetails? = nil, weight: WeightData? = nil) { + public init(affiliateBagDetails: AffiliateBagDetails? = nil, affiliateDetails: AffiliateDetails? = nil, appliedPromos: [[String: Any]]? = nil, article: Article? = nil, articleDetails: ArticleStatusDetails? = nil, bagId: Int? = nil, bagStatus: [BagStatusHistory]? = nil, bagStatusHistory: [BagStatusHistory]? = nil, bagUpdateTime: Double? = nil, brand: Brand? = nil, charges: [PriceAdjustmentCharge]? = nil, company: Company? = nil, currentOperationalStatus: BagStatusHistory? = nil, currentStatus: BagStatusHistory? = nil, dates: Dates? = nil, deliveryAddress: Address? = nil, deliverySlot: DeliverySlotDetails? = nil, displayName: String? = nil, dpDetails: [String: Any]? = nil, einvoiceInfo: [String: Any]? = nil, entityType: String? = nil, fallbackUser: [String: Any]? = nil, financialBreakup: [FinancialBreakup]? = nil, fulfillingStore: Store? = nil, fyndstoreEmp: [String: Any]? = nil, gstDetails: GSTDetailsData? = nil, id: String? = nil, identifier: String? = nil, invoice: InvoiceDetails? = nil, item: Item? = nil, journeyType: String? = nil, lineNumber: Int? = nil, lockStatus: Bool? = nil, manifestId: String? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, noOfBagsOrder: Int? = nil, operationalStatus: String? = nil, order: OrderDetails? = nil, orderingStore: Store? = nil, orderIntegrationId: String? = nil, orderType: String? = nil, orderValue: Double? = nil, originalBagList: [Int]? = nil, parentPromoBags: [String: Any]? = nil, payments: [String: Any]? = nil, paymentMethods: [String: Any]? = nil, paymentType: String? = nil, prices: Prices? = nil, qcRequired: Bool? = nil, quantity: Double? = nil, reasons: [[String: Any]]? = nil, restoreCoupon: Bool? = nil, restorePromos: [String: Any]? = nil, rtoAddress: Address? = nil, sellerIdentifier: String? = nil, shipment: Shipment? = nil, shipmentDetails: ShipmentDetails? = nil, shipmentGst: ShipmentGstDetails? = nil, shipmentId: String? = nil, shipmentStatus: ShipmentStatusData? = nil, shipmentStatusHistory: [ShipmentStatusData]? = nil, status: BagReturnableCancelableStatus? = nil, tags: [String]? = nil, totalShipmentsInOrder: Int? = nil, totalShipmentBags: Int? = nil, transactionType: String? = nil, type: String? = nil, updatedAt: String? = nil, user: UserDetails? = nil, weight: WeightData? = nil) { self.bagUpdateTime = bagUpdateTime @@ -2034,6 +2061,8 @@ public extension PlatformClient.ApplicationClient.Order { self.prices = prices + self.charges = charges + self.qcRequired = qcRequired self.quantity = quantity @@ -2269,7 +2298,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - deliveryAddress = try container.decode(PlatformDeliveryAddress.self, forKey: .deliveryAddress) + deliveryAddress = try container.decode(Address.self, forKey: .deliveryAddress) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -2640,6 +2669,18 @@ public extension PlatformClient.ApplicationClient.Order { + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { qcRequired = try container.decode(Bool.self, forKey: .qcRequired) @@ -2701,7 +2742,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - rtoAddress = try container.decode(PlatformDeliveryAddress.self, forKey: .rtoAddress) + rtoAddress = try container.decode(Address.self, forKey: .rtoAddress) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -3164,6 +3205,11 @@ public extension PlatformClient.ApplicationClient.Order { + try? container.encodeIfPresent(charges, forKey: .charges) + + + + try? container.encodeIfPresent(qcRequired, forKey: .qcRequired) diff --git a/Sources/code/platform/Models/Order/BagDetailsPlatformResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/BagDetailsPlatformResponseSchemaOrderPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Order/BagDetailsPlatformResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/BagDetailsPlatformResponseSchemaOrderPlatformModel.swift index 2d1690e802..09c0226ca1 100644 --- a/Sources/code/platform/Models/Order/BagDetailsPlatformResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BagDetailsPlatformResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: BagDetailsPlatformResponse + Model: BagDetailsPlatformResponseSchema Used By: Order */ - class BagDetailsPlatformResponse: Codable { + class BagDetailsPlatformResponseSchema: Codable { public var statusCode: Int? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: BagDetailsPlatformResponse + Model: BagDetailsPlatformResponseSchema Used By: Order */ - class BagDetailsPlatformResponse: Codable { + class BagDetailsPlatformResponseSchema: Codable { public var statusCode: Int? diff --git a/Sources/code/platform/Models/Order/BagUnitOrderPlatformModel.swift b/Sources/code/platform/Models/Order/BagUnitOrderPlatformModel.swift index 14944e31a3..d7b9ca3e98 100644 --- a/Sources/code/platform/Models/Order/BagUnitOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BagUnitOrderPlatformModel.swift @@ -50,6 +50,8 @@ public extension PlatformClient.Order { public var prices: Prices? + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public var dates: Dates? public var currentStatus: BagStatusHistory @@ -101,6 +103,8 @@ public extension PlatformClient.Order { case prices = "prices" + case orderingCurrencyPrices = "ordering_currency_prices" + case dates = "dates" case currentStatus = "current_status" @@ -113,7 +117,7 @@ public extension PlatformClient.Order { } - public init(affiliateBagDetails: AffiliateBagDetails? = nil, article: Article? = nil, bagExpiryDate: String? = nil, bagId: Int, bagStatus: [BagStatusHistory]? = nil, bagType: String? = nil, brand: ShipmentListingBrand? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, currentOperationalStatus: BagStatusHistory, currentStatus: BagStatusHistory, dates: Dates? = nil, displayName: String? = nil, entityType: String? = nil, financialBreakup: [FinancialBreakup], gst: GSTDetailsData? = nil, item: PlatformItem? = nil, lineNumber: Int? = nil, meta: [String: Any]? = nil, prices: Prices? = nil, productQuantity: Int, reasons: [[String: Any]]? = nil, size: String? = nil, status: BagReturnableCancelableStatus) { + public init(affiliateBagDetails: AffiliateBagDetails? = nil, article: Article? = nil, bagExpiryDate: String? = nil, bagId: Int, bagStatus: [BagStatusHistory]? = nil, bagType: String? = nil, brand: ShipmentListingBrand? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, currentOperationalStatus: BagStatusHistory, currentStatus: BagStatusHistory, dates: Dates? = nil, displayName: String? = nil, entityType: String? = nil, financialBreakup: [FinancialBreakup], gst: GSTDetailsData? = nil, item: PlatformItem? = nil, lineNumber: Int? = nil, meta: [String: Any]? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, prices: Prices? = nil, productQuantity: Int, reasons: [[String: Any]]? = nil, size: String? = nil, status: BagReturnableCancelableStatus) { self.bagType = bagType @@ -153,6 +157,8 @@ public extension PlatformClient.Order { self.prices = prices + self.orderingCurrencyPrices = orderingCurrencyPrices + self.dates = dates self.currentStatus = currentStatus @@ -376,6 +382,18 @@ public extension PlatformClient.Order { + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { dates = try container.decode(Dates.self, forKey: .dates) @@ -516,6 +534,11 @@ public extension PlatformClient.Order { + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + + + try? container.encodeIfPresent(dates, forKey: .dates) @@ -593,6 +616,8 @@ public extension PlatformClient.ApplicationClient.Order { public var prices: Prices? + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public var dates: Dates? public var currentStatus: BagStatusHistory @@ -644,6 +669,8 @@ public extension PlatformClient.ApplicationClient.Order { case prices = "prices" + case orderingCurrencyPrices = "ordering_currency_prices" + case dates = "dates" case currentStatus = "current_status" @@ -656,7 +683,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(affiliateBagDetails: AffiliateBagDetails? = nil, article: Article? = nil, bagExpiryDate: String? = nil, bagId: Int, bagStatus: [BagStatusHistory]? = nil, bagType: String? = nil, brand: ShipmentListingBrand? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, currentOperationalStatus: BagStatusHistory, currentStatus: BagStatusHistory, dates: Dates? = nil, displayName: String? = nil, entityType: String? = nil, financialBreakup: [FinancialBreakup], gst: GSTDetailsData? = nil, item: PlatformItem? = nil, lineNumber: Int? = nil, meta: [String: Any]? = nil, prices: Prices? = nil, productQuantity: Int, reasons: [[String: Any]]? = nil, size: String? = nil, status: BagReturnableCancelableStatus) { + public init(affiliateBagDetails: AffiliateBagDetails? = nil, article: Article? = nil, bagExpiryDate: String? = nil, bagId: Int, bagStatus: [BagStatusHistory]? = nil, bagType: String? = nil, brand: ShipmentListingBrand? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, currentOperationalStatus: BagStatusHistory, currentStatus: BagStatusHistory, dates: Dates? = nil, displayName: String? = nil, entityType: String? = nil, financialBreakup: [FinancialBreakup], gst: GSTDetailsData? = nil, item: PlatformItem? = nil, lineNumber: Int? = nil, meta: [String: Any]? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, prices: Prices? = nil, productQuantity: Int, reasons: [[String: Any]]? = nil, size: String? = nil, status: BagReturnableCancelableStatus) { self.bagType = bagType @@ -696,6 +723,8 @@ public extension PlatformClient.ApplicationClient.Order { self.prices = prices + self.orderingCurrencyPrices = orderingCurrencyPrices + self.dates = dates self.currentStatus = currentStatus @@ -919,6 +948,18 @@ public extension PlatformClient.ApplicationClient.Order { + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { dates = try container.decode(Dates.self, forKey: .dates) @@ -1059,6 +1100,11 @@ public extension PlatformClient.ApplicationClient.Order { + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + + + try? container.encodeIfPresent(dates, forKey: .dates) diff --git a/Sources/code/platform/Models/Order/BaseResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/BaseResponseSchemaOrderPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Order/BaseResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/BaseResponseSchemaOrderPlatformModel.swift index ce8d3b7969..aa0250a146 100644 --- a/Sources/code/platform/Models/Order/BaseResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BaseResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: BaseResponse + Model: BaseResponseSchema Used By: Order */ - class BaseResponse: Codable { + class BaseResponseSchema: Codable { public var success: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: BaseResponse + Model: BaseResponseSchema Used By: Order */ - class BaseResponse: Codable { + class BaseResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Catalog/ProductListingDetailCatalogPlatformModel.swift b/Sources/code/platform/Models/Order/BillingInfoOrderPlatformModel.swift similarity index 58% rename from Sources/code/platform/Models/Catalog/ProductListingDetailCatalogPlatformModel.swift rename to Sources/code/platform/Models/Order/BillingInfoOrderPlatformModel.swift index cdefc2201b..01db4c3117 100644 --- a/Sources/code/platform/Models/Catalog/ProductListingDetailCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BillingInfoOrderPlatformModel.swift @@ -3,177 +3,171 @@ import Foundation -public extension PlatformClient.Catalog { +public extension PlatformClient.Order { /* - Model: ProductListingDetail - Used By: Catalog + Model: BillingInfo + Used By: Order */ - class ProductListingDetail: Codable { + class BillingInfo: Codable { - public var attributes: [String: Any]? + public var alternateMobileNumber: String? - public var brand: ProductBrand? + public var state: String? - public var color: String? + public var customerCode: String? - public var description: String? + public var middleName: String? - public var discount: String? + public var primaryMobileNumber: String? - public var groupedAttributes: [ProductDetailGroupedAttribute]? + public var lastName: String? - public var hasVariant: Bool? + public var gender: String? - public var highlights: [String]? + public var houseNo: String? - public var imageNature: String? + public var firstName: String? - public var itemCode: String? + public var title: String? - public var itemType: String? + public var country: String? - public var medias: [Media]? + public var stateCode: String? - public var name: String? + public var city: String? - public var price: ProductListingPrice? + public var externalCustomerCode: String? - public var productOnlineDate: String? + public var floorNo: String? - public var promoMeta: [String: Any]? + public var alternateEmail: String? - public var rating: Double? + public var address: String? - public var ratingCount: Int? + public var area: String? - public var sellable: Bool? + public var address1: String? - public var shortDescription: String? + public var pincode: String? - public var similars: [String]? + public var primaryEmail: String? - public var slug: String + public var address2: String? - public var teaserTag: [String: Any]? + public var landmark: String? - public var tryouts: [String]? + public var countryCode: String? - public var type: String? - - public var uid: Int? + public var countryIsoCode: String? public enum CodingKeys: String, CodingKey { - case attributes = "attributes" - - case brand = "brand" + case alternateMobileNumber = "alternate_mobile_number" - case color = "color" + case state = "state" - case description = "description" + case customerCode = "customer_code" - case discount = "discount" + case middleName = "middle_name" - case groupedAttributes = "grouped_attributes" + case primaryMobileNumber = "primary_mobile_number" - case hasVariant = "has_variant" + case lastName = "last_name" - case highlights = "highlights" + case gender = "gender" - case imageNature = "image_nature" + case houseNo = "house_no" - case itemCode = "item_code" + case firstName = "first_name" - case itemType = "item_type" + case title = "title" - case medias = "medias" + case country = "country" - case name = "name" + case stateCode = "state_code" - case price = "price" + case city = "city" - case productOnlineDate = "product_online_date" + case externalCustomerCode = "external_customer_code" - case promoMeta = "promo_meta" + case floorNo = "floor_no" - case rating = "rating" + case alternateEmail = "alternate_email" - case ratingCount = "rating_count" + case address = "address" - case sellable = "sellable" + case area = "area" - case shortDescription = "short_description" + case address1 = "address1" - case similars = "similars" + case pincode = "pincode" - case slug = "slug" + case primaryEmail = "primary_email" - case teaserTag = "teaser_tag" + case address2 = "address2" - case tryouts = "tryouts" + case landmark = "landmark" - case type = "type" + case countryCode = "country_code" - case uid = "uid" + case countryIsoCode = "country_iso_code" } - 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: [Media]? = 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.attributes = attributes + public init(address: String? = nil, address1: String? = nil, address2: String? = nil, alternateEmail: String? = nil, alternateMobileNumber: String? = nil, area: String? = nil, city: String? = nil, country: String? = nil, countryCode: String? = nil, countryIsoCode: String? = nil, customerCode: String? = nil, externalCustomerCode: String? = nil, firstName: String? = nil, floorNo: String? = nil, gender: String? = nil, houseNo: String? = nil, landmark: String? = nil, lastName: String? = nil, middleName: String? = nil, pincode: String? = nil, primaryEmail: String? = nil, primaryMobileNumber: String? = nil, state: String? = nil, stateCode: String? = nil, title: String? = nil) { - self.brand = brand + self.alternateMobileNumber = alternateMobileNumber - self.color = color + self.state = state - self.description = description + self.customerCode = customerCode - self.discount = discount + self.middleName = middleName - self.groupedAttributes = groupedAttributes + self.primaryMobileNumber = primaryMobileNumber - self.hasVariant = hasVariant + self.lastName = lastName - self.highlights = highlights + self.gender = gender - self.imageNature = imageNature + self.houseNo = houseNo - self.itemCode = itemCode + self.firstName = firstName - self.itemType = itemType + self.title = title - self.medias = medias + self.country = country - self.name = name + self.stateCode = stateCode - self.price = price + self.city = city - self.productOnlineDate = productOnlineDate + self.externalCustomerCode = externalCustomerCode - self.promoMeta = promoMeta + self.floorNo = floorNo - self.rating = rating + self.alternateEmail = alternateEmail - self.ratingCount = ratingCount + self.address = address - self.sellable = sellable + self.area = area - self.shortDescription = shortDescription + self.address1 = address1 - self.similars = similars + self.pincode = pincode - self.slug = slug + self.primaryEmail = primaryEmail - self.teaserTag = teaserTag + self.address2 = address2 - self.tryouts = tryouts + self.landmark = landmark - self.type = type + self.countryCode = countryCode - self.uid = uid + self.countryIsoCode = countryIsoCode } @@ -182,7 +176,7 @@ public extension PlatformClient.Catalog { do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + alternateMobileNumber = try container.decode(String.self, forKey: .alternateMobileNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +188,7 @@ public extension PlatformClient.Catalog { do { - brand = try container.decode(ProductBrand.self, forKey: .brand) + state = try container.decode(String.self, forKey: .state) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +200,7 @@ public extension PlatformClient.Catalog { do { - color = try container.decode(String.self, forKey: .color) + customerCode = try container.decode(String.self, forKey: .customerCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +212,7 @@ public extension PlatformClient.Catalog { do { - description = try container.decode(String.self, forKey: .description) + middleName = try container.decode(String.self, forKey: .middleName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,7 +224,7 @@ public extension PlatformClient.Catalog { do { - discount = try container.decode(String.self, forKey: .discount) + primaryMobileNumber = try container.decode(String.self, forKey: .primaryMobileNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -242,7 +236,7 @@ public extension PlatformClient.Catalog { do { - groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) + lastName = try container.decode(String.self, forKey: .lastName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -254,7 +248,7 @@ public extension PlatformClient.Catalog { do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + gender = try container.decode(String.self, forKey: .gender) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -266,7 +260,7 @@ public extension PlatformClient.Catalog { do { - highlights = try container.decode([String].self, forKey: .highlights) + houseNo = try container.decode(String.self, forKey: .houseNo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -278,7 +272,7 @@ public extension PlatformClient.Catalog { do { - imageNature = try container.decode(String.self, forKey: .imageNature) + firstName = try container.decode(String.self, forKey: .firstName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -290,7 +284,7 @@ public extension PlatformClient.Catalog { do { - itemCode = try container.decode(String.self, forKey: .itemCode) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -302,7 +296,7 @@ public extension PlatformClient.Catalog { do { - itemType = try container.decode(String.self, forKey: .itemType) + country = try container.decode(String.self, forKey: .country) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -314,7 +308,7 @@ public extension PlatformClient.Catalog { do { - medias = try container.decode([Media].self, forKey: .medias) + stateCode = try container.decode(String.self, forKey: .stateCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -326,7 +320,7 @@ public extension PlatformClient.Catalog { do { - name = try container.decode(String.self, forKey: .name) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -338,7 +332,7 @@ public extension PlatformClient.Catalog { do { - price = try container.decode(ProductListingPrice.self, forKey: .price) + externalCustomerCode = try container.decode(String.self, forKey: .externalCustomerCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -350,7 +344,7 @@ public extension PlatformClient.Catalog { do { - productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + floorNo = try container.decode(String.self, forKey: .floorNo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -362,7 +356,7 @@ public extension PlatformClient.Catalog { do { - promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) + alternateEmail = try container.decode(String.self, forKey: .alternateEmail) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -374,7 +368,7 @@ public extension PlatformClient.Catalog { do { - rating = try container.decode(Double.self, forKey: .rating) + address = try container.decode(String.self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -386,7 +380,7 @@ public extension PlatformClient.Catalog { do { - ratingCount = try container.decode(Int.self, forKey: .ratingCount) + area = try container.decode(String.self, forKey: .area) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -398,7 +392,7 @@ public extension PlatformClient.Catalog { do { - sellable = try container.decode(Bool.self, forKey: .sellable) + address1 = try container.decode(String.self, forKey: .address1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -410,7 +404,7 @@ public extension PlatformClient.Catalog { do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + pincode = try container.decode(String.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -422,7 +416,7 @@ public extension PlatformClient.Catalog { do { - similars = try container.decode([String].self, forKey: .similars) + primaryEmail = try container.decode(String.self, forKey: .primaryEmail) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -433,13 +427,8 @@ public extension PlatformClient.Catalog { - slug = try container.decode(String.self, forKey: .slug) - - - - do { - teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) + address2 = try container.decode(String.self, forKey: .address2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -451,7 +440,7 @@ public extension PlatformClient.Catalog { do { - tryouts = try container.decode([String].self, forKey: .tryouts) + landmark = try container.decode(String.self, forKey: .landmark) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -463,7 +452,7 @@ public extension PlatformClient.Catalog { do { - type = try container.decode(String.self, forKey: .type) + countryCode = try container.decode(String.self, forKey: .countryCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -475,7 +464,7 @@ public extension PlatformClient.Catalog { do { - uid = try container.decode(Int.self, forKey: .uid) + countryIsoCode = try container.decode(String.self, forKey: .countryIsoCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -492,132 +481,127 @@ public extension PlatformClient.Catalog { - try? container.encodeIfPresent(attributes, forKey: .attributes) - - - - - try? container.encodeIfPresent(brand, forKey: .brand) + try? container.encodeIfPresent(alternateMobileNumber, forKey: .alternateMobileNumber) - try? container.encodeIfPresent(color, forKey: .color) + try? container.encodeIfPresent(state, forKey: .state) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(customerCode, forKey: .customerCode) - try? container.encodeIfPresent(discount, forKey: .discount) + try? container.encodeIfPresent(middleName, forKey: .middleName) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(primaryMobileNumber, forKey: .primaryMobileNumber) - try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + try? container.encodeIfPresent(lastName, forKey: .lastName) - try? container.encodeIfPresent(highlights, forKey: .highlights) + try? container.encodeIfPresent(gender, forKey: .gender) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(houseNo, forKey: .houseNo) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(firstName, forKey: .firstName) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(medias, forKey: .medias) + try? container.encodeIfPresent(country, forKey: .country) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(stateCode, forKey: .stateCode) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(city, forKey: .city) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) + try? container.encodeIfPresent(externalCustomerCode, forKey: .externalCustomerCode) - try? container.encodeIfPresent(promoMeta, forKey: .promoMeta) + try? container.encodeIfPresent(floorNo, forKey: .floorNo) - try? container.encodeIfPresent(rating, forKey: .rating) + try? container.encodeIfPresent(alternateEmail, forKey: .alternateEmail) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(sellable, forKey: .sellable) + try? container.encodeIfPresent(area, forKey: .area) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(address1, forKey: .address1) - try? container.encodeIfPresent(similars, forKey: .similars) + try? container.encodeIfPresent(pincode, forKey: .pincode) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(primaryEmail, forKey: .primaryEmail) - try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + try? container.encodeIfPresent(address2, forKey: .address2) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) + try? container.encodeIfPresent(landmark, forKey: .landmark) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(countryCode, forKey: .countryCode) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(countryIsoCode, forKey: .countryIsoCode) } @@ -627,177 +611,171 @@ public extension PlatformClient.Catalog { -public extension PlatformClient.ApplicationClient.Catalog { +public extension PlatformClient.ApplicationClient.Order { /* - Model: ProductListingDetail - Used By: Catalog + Model: BillingInfo + Used By: Order */ - class ProductListingDetail: Codable { + class BillingInfo: Codable { - public var attributes: [String: Any]? + public var alternateMobileNumber: String? - public var brand: ProductBrand? + public var state: String? - public var color: String? + public var customerCode: String? - public var description: String? + public var middleName: String? - public var discount: String? + public var primaryMobileNumber: String? - public var groupedAttributes: [ProductDetailGroupedAttribute]? + public var lastName: String? - public var hasVariant: Bool? + public var gender: String? - public var highlights: [String]? + public var houseNo: String? - public var imageNature: String? + public var firstName: String? - public var itemCode: String? + public var title: String? - public var itemType: String? + public var country: String? - public var medias: [Media]? + public var stateCode: String? - public var name: String? + public var city: String? - public var price: ProductListingPrice? + public var externalCustomerCode: String? - public var productOnlineDate: String? + public var floorNo: String? - public var promoMeta: [String: Any]? + public var alternateEmail: String? - public var rating: Double? + public var address: String? - public var ratingCount: Int? + public var area: String? - public var sellable: Bool? + public var address1: String? - public var shortDescription: String? + public var pincode: String? - public var similars: [String]? + public var primaryEmail: String? - public var slug: String + public var address2: String? - public var teaserTag: [String: Any]? + public var landmark: String? - public var tryouts: [String]? + public var countryCode: String? - public var type: String? - - public var uid: Int? + public var countryIsoCode: String? public enum CodingKeys: String, CodingKey { - case attributes = "attributes" - - case brand = "brand" + case alternateMobileNumber = "alternate_mobile_number" - case color = "color" + case state = "state" - case description = "description" + case customerCode = "customer_code" - case discount = "discount" + case middleName = "middle_name" - case groupedAttributes = "grouped_attributes" + case primaryMobileNumber = "primary_mobile_number" - case hasVariant = "has_variant" + case lastName = "last_name" - case highlights = "highlights" + case gender = "gender" - case imageNature = "image_nature" + case houseNo = "house_no" - case itemCode = "item_code" + case firstName = "first_name" - case itemType = "item_type" + case title = "title" - case medias = "medias" + case country = "country" - case name = "name" + case stateCode = "state_code" - case price = "price" + case city = "city" - case productOnlineDate = "product_online_date" + case externalCustomerCode = "external_customer_code" - case promoMeta = "promo_meta" + case floorNo = "floor_no" - case rating = "rating" + case alternateEmail = "alternate_email" - case ratingCount = "rating_count" + case address = "address" - case sellable = "sellable" + case area = "area" - case shortDescription = "short_description" + case address1 = "address1" - case similars = "similars" + case pincode = "pincode" - case slug = "slug" + case primaryEmail = "primary_email" - case teaserTag = "teaser_tag" + case address2 = "address2" - case tryouts = "tryouts" + case landmark = "landmark" - case type = "type" + case countryCode = "country_code" - case uid = "uid" + case countryIsoCode = "country_iso_code" } - 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: [Media]? = 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.attributes = attributes + public init(address: String? = nil, address1: String? = nil, address2: String? = nil, alternateEmail: String? = nil, alternateMobileNumber: String? = nil, area: String? = nil, city: String? = nil, country: String? = nil, countryCode: String? = nil, countryIsoCode: String? = nil, customerCode: String? = nil, externalCustomerCode: String? = nil, firstName: String? = nil, floorNo: String? = nil, gender: String? = nil, houseNo: String? = nil, landmark: String? = nil, lastName: String? = nil, middleName: String? = nil, pincode: String? = nil, primaryEmail: String? = nil, primaryMobileNumber: String? = nil, state: String? = nil, stateCode: String? = nil, title: String? = nil) { - self.brand = brand + self.alternateMobileNumber = alternateMobileNumber - self.color = color + self.state = state - self.description = description + self.customerCode = customerCode - self.discount = discount + self.middleName = middleName - self.groupedAttributes = groupedAttributes + self.primaryMobileNumber = primaryMobileNumber - self.hasVariant = hasVariant + self.lastName = lastName - self.highlights = highlights + self.gender = gender - self.imageNature = imageNature + self.houseNo = houseNo - self.itemCode = itemCode + self.firstName = firstName - self.itemType = itemType + self.title = title - self.medias = medias + self.country = country - self.name = name + self.stateCode = stateCode - self.price = price + self.city = city - self.productOnlineDate = productOnlineDate + self.externalCustomerCode = externalCustomerCode - self.promoMeta = promoMeta + self.floorNo = floorNo - self.rating = rating + self.alternateEmail = alternateEmail - self.ratingCount = ratingCount + self.address = address - self.sellable = sellable + self.area = area - self.shortDescription = shortDescription + self.address1 = address1 - self.similars = similars + self.pincode = pincode - self.slug = slug + self.primaryEmail = primaryEmail - self.teaserTag = teaserTag + self.address2 = address2 - self.tryouts = tryouts + self.landmark = landmark - self.type = type + self.countryCode = countryCode - self.uid = uid + self.countryIsoCode = countryIsoCode } @@ -806,7 +784,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - attributes = try container.decode([String: Any].self, forKey: .attributes) + alternateMobileNumber = try container.decode(String.self, forKey: .alternateMobileNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -818,7 +796,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - brand = try container.decode(ProductBrand.self, forKey: .brand) + state = try container.decode(String.self, forKey: .state) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -830,7 +808,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - color = try container.decode(String.self, forKey: .color) + customerCode = try container.decode(String.self, forKey: .customerCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -842,7 +820,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - description = try container.decode(String.self, forKey: .description) + middleName = try container.decode(String.self, forKey: .middleName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -854,7 +832,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - discount = try container.decode(String.self, forKey: .discount) + primaryMobileNumber = try container.decode(String.self, forKey: .primaryMobileNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -866,7 +844,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - groupedAttributes = try container.decode([ProductDetailGroupedAttribute].self, forKey: .groupedAttributes) + lastName = try container.decode(String.self, forKey: .lastName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -878,7 +856,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - hasVariant = try container.decode(Bool.self, forKey: .hasVariant) + gender = try container.decode(String.self, forKey: .gender) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -890,7 +868,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - highlights = try container.decode([String].self, forKey: .highlights) + houseNo = try container.decode(String.self, forKey: .houseNo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -902,7 +880,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - imageNature = try container.decode(String.self, forKey: .imageNature) + firstName = try container.decode(String.self, forKey: .firstName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -914,7 +892,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - itemCode = try container.decode(String.self, forKey: .itemCode) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -926,7 +904,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - itemType = try container.decode(String.self, forKey: .itemType) + country = try container.decode(String.self, forKey: .country) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -938,7 +916,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - medias = try container.decode([Media].self, forKey: .medias) + stateCode = try container.decode(String.self, forKey: .stateCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -950,7 +928,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - name = try container.decode(String.self, forKey: .name) + city = try container.decode(String.self, forKey: .city) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -962,7 +940,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - price = try container.decode(ProductListingPrice.self, forKey: .price) + externalCustomerCode = try container.decode(String.self, forKey: .externalCustomerCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -974,7 +952,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - productOnlineDate = try container.decode(String.self, forKey: .productOnlineDate) + floorNo = try container.decode(String.self, forKey: .floorNo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -986,7 +964,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - promoMeta = try container.decode([String: Any].self, forKey: .promoMeta) + alternateEmail = try container.decode(String.self, forKey: .alternateEmail) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -998,7 +976,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - rating = try container.decode(Double.self, forKey: .rating) + address = try container.decode(String.self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1010,7 +988,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - ratingCount = try container.decode(Int.self, forKey: .ratingCount) + area = try container.decode(String.self, forKey: .area) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1022,7 +1000,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - sellable = try container.decode(Bool.self, forKey: .sellable) + address1 = try container.decode(String.self, forKey: .address1) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1034,7 +1012,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - shortDescription = try container.decode(String.self, forKey: .shortDescription) + pincode = try container.decode(String.self, forKey: .pincode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1046,7 +1024,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - similars = try container.decode([String].self, forKey: .similars) + primaryEmail = try container.decode(String.self, forKey: .primaryEmail) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1057,13 +1035,8 @@ public extension PlatformClient.ApplicationClient.Catalog { - slug = try container.decode(String.self, forKey: .slug) - - - - do { - teaserTag = try container.decode([String: Any].self, forKey: .teaserTag) + address2 = try container.decode(String.self, forKey: .address2) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1075,7 +1048,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - tryouts = try container.decode([String].self, forKey: .tryouts) + landmark = try container.decode(String.self, forKey: .landmark) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1087,7 +1060,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - type = try container.decode(String.self, forKey: .type) + countryCode = try container.decode(String.self, forKey: .countryCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1099,7 +1072,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - uid = try container.decode(Int.self, forKey: .uid) + countryIsoCode = try container.decode(String.self, forKey: .countryIsoCode) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1116,132 +1089,127 @@ public extension PlatformClient.ApplicationClient.Catalog { - try? container.encodeIfPresent(attributes, forKey: .attributes) - - - - - try? container.encodeIfPresent(brand, forKey: .brand) + try? container.encodeIfPresent(alternateMobileNumber, forKey: .alternateMobileNumber) - try? container.encodeIfPresent(color, forKey: .color) + try? container.encodeIfPresent(state, forKey: .state) - try? container.encodeIfPresent(description, forKey: .description) + try? container.encodeIfPresent(customerCode, forKey: .customerCode) - try? container.encodeIfPresent(discount, forKey: .discount) + try? container.encodeIfPresent(middleName, forKey: .middleName) - try? container.encodeIfPresent(groupedAttributes, forKey: .groupedAttributes) + try? container.encodeIfPresent(primaryMobileNumber, forKey: .primaryMobileNumber) - try? container.encodeIfPresent(hasVariant, forKey: .hasVariant) + try? container.encodeIfPresent(lastName, forKey: .lastName) - try? container.encodeIfPresent(highlights, forKey: .highlights) + try? container.encodeIfPresent(gender, forKey: .gender) - try? container.encodeIfPresent(imageNature, forKey: .imageNature) + try? container.encodeIfPresent(houseNo, forKey: .houseNo) - try? container.encodeIfPresent(itemCode, forKey: .itemCode) + try? container.encodeIfPresent(firstName, forKey: .firstName) - try? container.encodeIfPresent(itemType, forKey: .itemType) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(medias, forKey: .medias) + try? container.encodeIfPresent(country, forKey: .country) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(stateCode, forKey: .stateCode) - try? container.encodeIfPresent(price, forKey: .price) + try? container.encodeIfPresent(city, forKey: .city) - try? container.encodeIfPresent(productOnlineDate, forKey: .productOnlineDate) + try? container.encodeIfPresent(externalCustomerCode, forKey: .externalCustomerCode) - try? container.encodeIfPresent(promoMeta, forKey: .promoMeta) + try? container.encodeIfPresent(floorNo, forKey: .floorNo) - try? container.encodeIfPresent(rating, forKey: .rating) + try? container.encodeIfPresent(alternateEmail, forKey: .alternateEmail) - try? container.encodeIfPresent(ratingCount, forKey: .ratingCount) + try? container.encodeIfPresent(address, forKey: .address) - try? container.encodeIfPresent(sellable, forKey: .sellable) + try? container.encodeIfPresent(area, forKey: .area) - try? container.encodeIfPresent(shortDescription, forKey: .shortDescription) + try? container.encodeIfPresent(address1, forKey: .address1) - try? container.encodeIfPresent(similars, forKey: .similars) + try? container.encodeIfPresent(pincode, forKey: .pincode) - try? container.encodeIfPresent(slug, forKey: .slug) + try? container.encodeIfPresent(primaryEmail, forKey: .primaryEmail) - try? container.encodeIfPresent(teaserTag, forKey: .teaserTag) + try? container.encodeIfPresent(address2, forKey: .address2) - try? container.encodeIfPresent(tryouts, forKey: .tryouts) + try? container.encodeIfPresent(landmark, forKey: .landmark) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(countryCode, forKey: .countryCode) - try? container.encodeIfPresent(uid, forKey: .uid) + try? container.encodeIfPresent(countryIsoCode, forKey: .countryIsoCode) } diff --git a/Sources/code/platform/Models/Order/BulkActionListingDataOrderPlatformModel.swift b/Sources/code/platform/Models/Order/BulkActionListingDataOrderPlatformModel.swift index 477d31a445..f0e3ae7fbc 100644 --- a/Sources/code/platform/Models/Order/BulkActionListingDataOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BulkActionListingDataOrderPlatformModel.swift @@ -60,22 +60,6 @@ public extension PlatformClient.Order { public var uploadedBy: String? - public var invoicelabelDocumentType: String? - - public var failedShCount: Int? - - public var successfulShCount: Int? - - public var totalCount: Int? - - public var failedShipments: [String]? - - public var successfulInvoicedCount: Int? - - public var failedInvoicedCount: Int? - - public var totalInvoicedCount: Int? - public enum CodingKeys: String, CodingKey { @@ -127,25 +111,9 @@ public extension PlatformClient.Order { case uploadedBy = "uploaded_by" - case invoicelabelDocumentType = "invoicelabel_document_type" - - case failedShCount = "failed_sh_count" - - case successfulShCount = "successful_sh_count" - - case totalCount = "total_count" - - case failedShipments = "failed_shipments" - - case successfulInvoicedCount = "successful_invoiced_count" - - case failedInvoicedCount = "failed_invoiced_count" - - case totalInvoicedCount = "total_invoiced_count" - } - public init(batchId: String? = nil, bulkActionType: String? = nil, companyId: Int? = nil, createdTs: String? = nil, doInvoiceLabelGenerated: Bool? = nil, failedInvoicedCount: Int? = nil, failedShipments: [String]? = nil, failedShCount: Int? = nil, fileName: String? = nil, fileUrl: String? = nil, id: Int? = nil, invoicelabelDocumentType: String? = nil, invoiceDocumentType: String? = nil, invoiceStatus: String? = nil, isInvoiceable: Bool? = nil, labelDocumentType: String? = nil, lastSelectedInvoiceLabelType: String? = nil, meta: [String: Any]? = nil, shipmentsActionInfo: ShipmentActionInfo? = nil, status: Bool? = nil, storeCode: String? = nil, storeId: Int? = nil, storeName: String? = nil, successfulInvoicedCount: Int? = nil, successfulShCount: Int? = nil, totalCount: Int? = nil, totalInvoicedCount: Int? = nil, updatedTs: Int? = nil, uploadedBy: String? = nil, uploadedOn: String? = nil, userId: String? = nil, userName: String? = nil) { + public init(batchId: String? = nil, bulkActionType: String? = nil, companyId: Int? = nil, createdTs: String? = nil, doInvoiceLabelGenerated: Bool? = nil, fileName: String? = nil, fileUrl: String? = nil, id: Int? = nil, invoiceDocumentType: String? = nil, invoiceStatus: String? = nil, isInvoiceable: Bool? = nil, labelDocumentType: String? = nil, lastSelectedInvoiceLabelType: String? = nil, meta: [String: Any]? = nil, shipmentsActionInfo: ShipmentActionInfo? = nil, status: Bool? = nil, storeCode: String? = nil, storeId: Int? = nil, storeName: String? = nil, updatedTs: Int? = nil, uploadedBy: String? = nil, uploadedOn: String? = nil, userId: String? = nil, userName: String? = nil) { self.storeId = storeId @@ -195,22 +163,6 @@ public extension PlatformClient.Order { self.uploadedBy = uploadedBy - self.invoicelabelDocumentType = invoicelabelDocumentType - - self.failedShCount = failedShCount - - self.successfulShCount = successfulShCount - - self.totalCount = totalCount - - self.failedShipments = failedShipments - - self.successfulInvoicedCount = successfulInvoicedCount - - self.failedInvoicedCount = failedInvoicedCount - - self.totalInvoicedCount = totalInvoicedCount - } required public init(from decoder: Decoder) throws { @@ -504,102 +456,6 @@ public extension PlatformClient.Order { } - - do { - invoicelabelDocumentType = try container.decode(String.self, forKey: .invoicelabelDocumentType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - failedShCount = try container.decode(Int.self, forKey: .failedShCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - successfulShCount = try container.decode(Int.self, forKey: .successfulShCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - totalCount = try container.decode(Int.self, forKey: .totalCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - failedShipments = try container.decode([String].self, forKey: .failedShipments) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - successfulInvoicedCount = try container.decode(Int.self, forKey: .successfulInvoicedCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - failedInvoicedCount = try container.decode(Int.self, forKey: .failedInvoicedCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - totalInvoicedCount = try container.decode(Int.self, forKey: .totalInvoicedCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -725,46 +581,6 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(uploadedBy, forKey: .uploadedBy) - - - try? container.encodeIfPresent(invoicelabelDocumentType, forKey: .invoicelabelDocumentType) - - - - - try? container.encodeIfPresent(failedShCount, forKey: .failedShCount) - - - - - try? container.encodeIfPresent(successfulShCount, forKey: .successfulShCount) - - - - - try? container.encodeIfPresent(totalCount, forKey: .totalCount) - - - - - try? container.encodeIfPresent(failedShipments, forKey: .failedShipments) - - - - - try? container.encodeIfPresent(successfulInvoicedCount, forKey: .successfulInvoicedCount) - - - - - try? container.encodeIfPresent(failedInvoicedCount, forKey: .failedInvoicedCount) - - - - - try? container.encodeIfPresent(totalInvoicedCount, forKey: .totalInvoicedCount) - - } } @@ -829,22 +645,6 @@ public extension PlatformClient.ApplicationClient.Order { public var uploadedBy: String? - public var invoicelabelDocumentType: String? - - public var failedShCount: Int? - - public var successfulShCount: Int? - - public var totalCount: Int? - - public var failedShipments: [String]? - - public var successfulInvoicedCount: Int? - - public var failedInvoicedCount: Int? - - public var totalInvoicedCount: Int? - public enum CodingKeys: String, CodingKey { @@ -896,25 +696,9 @@ public extension PlatformClient.ApplicationClient.Order { case uploadedBy = "uploaded_by" - case invoicelabelDocumentType = "invoicelabel_document_type" - - case failedShCount = "failed_sh_count" - - case successfulShCount = "successful_sh_count" - - case totalCount = "total_count" - - case failedShipments = "failed_shipments" - - case successfulInvoicedCount = "successful_invoiced_count" - - case failedInvoicedCount = "failed_invoiced_count" - - case totalInvoicedCount = "total_invoiced_count" - } - public init(batchId: String? = nil, bulkActionType: String? = nil, companyId: Int? = nil, createdTs: String? = nil, doInvoiceLabelGenerated: Bool? = nil, failedInvoicedCount: Int? = nil, failedShipments: [String]? = nil, failedShCount: Int? = nil, fileName: String? = nil, fileUrl: String? = nil, id: Int? = nil, invoicelabelDocumentType: String? = nil, invoiceDocumentType: String? = nil, invoiceStatus: String? = nil, isInvoiceable: Bool? = nil, labelDocumentType: String? = nil, lastSelectedInvoiceLabelType: String? = nil, meta: [String: Any]? = nil, shipmentsActionInfo: ShipmentActionInfo? = nil, status: Bool? = nil, storeCode: String? = nil, storeId: Int? = nil, storeName: String? = nil, successfulInvoicedCount: Int? = nil, successfulShCount: Int? = nil, totalCount: Int? = nil, totalInvoicedCount: Int? = nil, updatedTs: Int? = nil, uploadedBy: String? = nil, uploadedOn: String? = nil, userId: String? = nil, userName: String? = nil) { + public init(batchId: String? = nil, bulkActionType: String? = nil, companyId: Int? = nil, createdTs: String? = nil, doInvoiceLabelGenerated: Bool? = nil, fileName: String? = nil, fileUrl: String? = nil, id: Int? = nil, invoiceDocumentType: String? = nil, invoiceStatus: String? = nil, isInvoiceable: Bool? = nil, labelDocumentType: String? = nil, lastSelectedInvoiceLabelType: String? = nil, meta: [String: Any]? = nil, shipmentsActionInfo: ShipmentActionInfo? = nil, status: Bool? = nil, storeCode: String? = nil, storeId: Int? = nil, storeName: String? = nil, updatedTs: Int? = nil, uploadedBy: String? = nil, uploadedOn: String? = nil, userId: String? = nil, userName: String? = nil) { self.storeId = storeId @@ -964,22 +748,6 @@ public extension PlatformClient.ApplicationClient.Order { self.uploadedBy = uploadedBy - self.invoicelabelDocumentType = invoicelabelDocumentType - - self.failedShCount = failedShCount - - self.successfulShCount = successfulShCount - - self.totalCount = totalCount - - self.failedShipments = failedShipments - - self.successfulInvoicedCount = successfulInvoicedCount - - self.failedInvoicedCount = failedInvoicedCount - - self.totalInvoicedCount = totalInvoicedCount - } required public init(from decoder: Decoder) throws { @@ -1273,102 +1041,6 @@ public extension PlatformClient.ApplicationClient.Order { } - - do { - invoicelabelDocumentType = try container.decode(String.self, forKey: .invoicelabelDocumentType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - failedShCount = try container.decode(Int.self, forKey: .failedShCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - successfulShCount = try container.decode(Int.self, forKey: .successfulShCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - totalCount = try container.decode(Int.self, forKey: .totalCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - failedShipments = try container.decode([String].self, forKey: .failedShipments) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - successfulInvoicedCount = try container.decode(Int.self, forKey: .successfulInvoicedCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - failedInvoicedCount = try container.decode(Int.self, forKey: .failedInvoicedCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - totalInvoicedCount = try container.decode(Int.self, forKey: .totalInvoicedCount) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -1494,46 +1166,6 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(uploadedBy, forKey: .uploadedBy) - - - try? container.encodeIfPresent(invoicelabelDocumentType, forKey: .invoicelabelDocumentType) - - - - - try? container.encodeIfPresent(failedShCount, forKey: .failedShCount) - - - - - try? container.encodeIfPresent(successfulShCount, forKey: .successfulShCount) - - - - - try? container.encodeIfPresent(totalCount, forKey: .totalCount) - - - - - try? container.encodeIfPresent(failedShipments, forKey: .failedShipments) - - - - - try? container.encodeIfPresent(successfulInvoicedCount, forKey: .successfulInvoicedCount) - - - - - try? container.encodeIfPresent(failedInvoicedCount, forKey: .failedInvoicedCount) - - - - - try? container.encodeIfPresent(totalInvoicedCount, forKey: .totalInvoicedCount) - - } } diff --git a/Sources/code/platform/Models/Order/BulkActionTemplateResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/BulkActionTemplateResponseSchemaOrderPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Order/BulkActionTemplateResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/BulkActionTemplateResponseSchemaOrderPlatformModel.swift index 58f4df8222..99cae434fb 100644 --- a/Sources/code/platform/Models/Order/BulkActionTemplateResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BulkActionTemplateResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: BulkActionTemplateResponse + Model: BulkActionTemplateResponseSchema Used By: Order */ - class BulkActionTemplateResponse: Codable { + class BulkActionTemplateResponseSchema: Codable { public var templateXSlug: [BulkActionTemplate]? @@ -61,11 +61,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: BulkActionTemplateResponse + Model: BulkActionTemplateResponseSchema Used By: Order */ - class BulkActionTemplateResponse: Codable { + class BulkActionTemplateResponseSchema: Codable { public var templateXSlug: [BulkActionTemplate]? diff --git a/Sources/code/platform/Models/Order/BulkFailedResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/BulkFailedResponseSchemaOrderPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Order/BulkFailedResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/BulkFailedResponseSchemaOrderPlatformModel.swift index 1786d0a9a3..a3c3c6fbf4 100644 --- a/Sources/code/platform/Models/Order/BulkFailedResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BulkFailedResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: BulkFailedResponse + Model: BulkFailedResponseSchema Used By: Order */ - class BulkFailedResponse: Codable { + class BulkFailedResponseSchema: Codable { public var status: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: BulkFailedResponse + Model: BulkFailedResponseSchema Used By: Order */ - class BulkFailedResponse: Codable { + class BulkFailedResponseSchema: Codable { public var status: Bool? diff --git a/Sources/code/platform/Models/Order/BulkListingResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/BulkListingResponseSchemaOrderPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Order/BulkListingResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/BulkListingResponseSchemaOrderPlatformModel.swift index 36bb02b494..62a74c67af 100644 --- a/Sources/code/platform/Models/Order/BulkListingResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BulkListingResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: BulkListingResponse + Model: BulkListingResponseSchema Used By: Order */ - class BulkListingResponse: Codable { + class BulkListingResponseSchema: Codable { public var success: Bool? @@ -130,11 +130,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: BulkListingResponse + Model: BulkListingResponseSchema Used By: Order */ - class BulkListingResponse: Codable { + class BulkListingResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Order/BulkReportsDownloadRequestOrderPlatformModel.swift b/Sources/code/platform/Models/Order/BulkReportsDownloadRequestSchemaOrderPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Order/BulkReportsDownloadRequestOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/BulkReportsDownloadRequestSchemaOrderPlatformModel.swift index e494b4d956..f5a1093eb1 100644 --- a/Sources/code/platform/Models/Order/BulkReportsDownloadRequestOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BulkReportsDownloadRequestSchemaOrderPlatformModel.swift @@ -5,18 +5,18 @@ import Foundation public extension PlatformClient.Order { /* - Model: BulkReportsDownloadRequest + Model: BulkReportsDownloadRequestSchema Used By: Order */ - class BulkReportsDownloadRequest: Codable { + class BulkReportsDownloadRequestSchema: Codable { public var storeIds: [String]? public var laneType: String? - public var customHeaders: [String]? + public var customHeaders: String? public var reportType: String? @@ -57,7 +57,7 @@ public extension PlatformClient.Order { } - public init(customFiltersForLane: [String: Any]? = nil, customHeaders: [String]? = nil, endDate: String? = nil, entities: [String]? = nil, filterType: String? = nil, isCrossCompanyEnabled: Bool? = nil, laneType: String? = nil, reportType: String? = nil, startDate: String? = nil, storeIds: [String]? = nil) { + public init(customFiltersForLane: [String: Any]? = nil, customHeaders: String? = nil, endDate: String? = nil, entities: [String]? = nil, filterType: String? = nil, isCrossCompanyEnabled: Bool? = nil, laneType: String? = nil, reportType: String? = nil, startDate: String? = nil, storeIds: [String]? = nil) { self.storeIds = storeIds @@ -110,7 +110,7 @@ public extension PlatformClient.Order { do { - customHeaders = try container.decode([String].self, forKey: .customHeaders) + customHeaders = try container.decode(String.self, forKey: .customHeaders) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -268,18 +268,18 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: BulkReportsDownloadRequest + Model: BulkReportsDownloadRequestSchema Used By: Order */ - class BulkReportsDownloadRequest: Codable { + class BulkReportsDownloadRequestSchema: Codable { public var storeIds: [String]? public var laneType: String? - public var customHeaders: [String]? + public var customHeaders: String? public var reportType: String? @@ -320,7 +320,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(customFiltersForLane: [String: Any]? = nil, customHeaders: [String]? = nil, endDate: String? = nil, entities: [String]? = nil, filterType: String? = nil, isCrossCompanyEnabled: Bool? = nil, laneType: String? = nil, reportType: String? = nil, startDate: String? = nil, storeIds: [String]? = nil) { + public init(customFiltersForLane: [String: Any]? = nil, customHeaders: String? = nil, endDate: String? = nil, entities: [String]? = nil, filterType: String? = nil, isCrossCompanyEnabled: Bool? = nil, laneType: String? = nil, reportType: String? = nil, startDate: String? = nil, storeIds: [String]? = nil) { self.storeIds = storeIds @@ -373,7 +373,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - customHeaders = try container.decode([String].self, forKey: .customHeaders) + customHeaders = try container.decode(String.self, forKey: .customHeaders) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/BulkReportsDownloadResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/BulkReportsDownloadResponseSchemaOrderPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Order/BulkReportsDownloadResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/BulkReportsDownloadResponseSchemaOrderPlatformModel.swift index 5276bf0301..93182e9ef3 100644 --- a/Sources/code/platform/Models/Order/BulkReportsDownloadResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BulkReportsDownloadResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: BulkReportsDownloadResponse + Model: BulkReportsDownloadResponseSchema Used By: Order */ - class BulkReportsDownloadResponse: Codable { + class BulkReportsDownloadResponseSchema: Codable { public var success: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: BulkReportsDownloadResponse + Model: BulkReportsDownloadResponseSchema Used By: Order */ - class BulkReportsDownloadResponse: Codable { + class BulkReportsDownloadResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Order/BulkStateTransistionResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/BulkStateTransistionResponseSchemaOrderPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Order/BulkStateTransistionResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/BulkStateTransistionResponseSchemaOrderPlatformModel.swift index 4efb0a1391..de6136ccad 100644 --- a/Sources/code/platform/Models/Order/BulkStateTransistionResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/BulkStateTransistionResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: BulkStateTransistionResponse + Model: BulkStateTransistionResponseSchema Used By: Order */ - class BulkStateTransistionResponse: Codable { + class BulkStateTransistionResponseSchema: Codable { public var status: Bool? @@ -107,11 +107,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: BulkStateTransistionResponse + Model: BulkStateTransistionResponseSchema Used By: Order */ - class BulkStateTransistionResponse: Codable { + class BulkStateTransistionResponseSchema: Codable { public var status: Bool? diff --git a/Sources/code/platform/Models/Order/ChargeAmountCurrencyOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ChargeAmountCurrencyOrderPlatformModel.swift new file mode 100644 index 0000000000..c2b4296294 --- /dev/null +++ b/Sources/code/platform/Models/Order/ChargeAmountCurrencyOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ChargeAmountCurrency + Used By: Order + */ + + class ChargeAmountCurrency: Codable { + + + public var value: Double + + public var currency: String + + + public enum CodingKeys: String, CodingKey { + + case value = "value" + + case currency = "currency" + + } + + public init(currency: String, value: Double) { + + self.value = value + + self.currency = currency + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + value = try container.decode(Double.self, forKey: .value) + + + + + currency = try container.decode(String.self, forKey: .currency) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(value, forKey: .value) + + + + + try? container.encodeIfPresent(currency, forKey: .currency) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ChargeAmountCurrency + Used By: Order + */ + + class ChargeAmountCurrency: Codable { + + + public var value: Double + + public var currency: String + + + public enum CodingKeys: String, CodingKey { + + case value = "value" + + case currency = "currency" + + } + + public init(currency: String, value: Double) { + + self.value = value + + self.currency = currency + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + value = try container.decode(Double.self, forKey: .value) + + + + + currency = try container.decode(String.self, forKey: .currency) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(value, forKey: .value) + + + + + try? container.encodeIfPresent(currency, forKey: .currency) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ChargeAmountOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ChargeAmountOrderPlatformModel.swift new file mode 100644 index 0000000000..5f8ceb0bae --- /dev/null +++ b/Sources/code/platform/Models/Order/ChargeAmountOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ChargeAmount + Used By: Order + */ + + class ChargeAmount: Codable { + + + public var baseCurrency: ChargeAmountCurrency + + public var orderingCurrency: ChargeAmountCurrency + + + public enum CodingKeys: String, CodingKey { + + case baseCurrency = "base_currency" + + case orderingCurrency = "ordering_currency" + + } + + public init(baseCurrency: ChargeAmountCurrency, orderingCurrency: ChargeAmountCurrency) { + + self.baseCurrency = baseCurrency + + self.orderingCurrency = orderingCurrency + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + baseCurrency = try container.decode(ChargeAmountCurrency.self, forKey: .baseCurrency) + + + + + orderingCurrency = try container.decode(ChargeAmountCurrency.self, forKey: .orderingCurrency) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(baseCurrency, forKey: .baseCurrency) + + + + + try? container.encodeIfPresent(orderingCurrency, forKey: .orderingCurrency) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ChargeAmount + Used By: Order + */ + + class ChargeAmount: Codable { + + + public var baseCurrency: ChargeAmountCurrency + + public var orderingCurrency: ChargeAmountCurrency + + + public enum CodingKeys: String, CodingKey { + + case baseCurrency = "base_currency" + + case orderingCurrency = "ordering_currency" + + } + + public init(baseCurrency: ChargeAmountCurrency, orderingCurrency: ChargeAmountCurrency) { + + self.baseCurrency = baseCurrency + + self.orderingCurrency = orderingCurrency + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + baseCurrency = try container.decode(ChargeAmountCurrency.self, forKey: .baseCurrency) + + + + + orderingCurrency = try container.decode(ChargeAmountCurrency.self, forKey: .orderingCurrency) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(baseCurrency, forKey: .baseCurrency) + + + + + try? container.encodeIfPresent(orderingCurrency, forKey: .orderingCurrency) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ChargeDistributionLogicOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ChargeDistributionLogicOrderPlatformModel.swift new file mode 100644 index 0000000000..0ebb2da009 --- /dev/null +++ b/Sources/code/platform/Models/Order/ChargeDistributionLogicOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ChargeDistributionLogic + Used By: Order + */ + + class ChargeDistributionLogic: Codable { + + + public var distribution: ChargeDistributionSchema + + public var distributionLevel: String + + + public enum CodingKeys: String, CodingKey { + + case distribution = "distribution" + + case distributionLevel = "distribution_level" + + } + + public init(distribution: ChargeDistributionSchema, distributionLevel: String) { + + self.distribution = distribution + + self.distributionLevel = distributionLevel + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + distribution = try container.decode(ChargeDistributionSchema.self, forKey: .distribution) + + + + + distributionLevel = try container.decode(String.self, forKey: .distributionLevel) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(distribution, forKey: .distribution) + + + + + try? container.encodeIfPresent(distributionLevel, forKey: .distributionLevel) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ChargeDistributionLogic + Used By: Order + */ + + class ChargeDistributionLogic: Codable { + + + public var distribution: ChargeDistributionSchema + + public var distributionLevel: String + + + public enum CodingKeys: String, CodingKey { + + case distribution = "distribution" + + case distributionLevel = "distribution_level" + + } + + public init(distribution: ChargeDistributionSchema, distributionLevel: String) { + + self.distribution = distribution + + self.distributionLevel = distributionLevel + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + distribution = try container.decode(ChargeDistributionSchema.self, forKey: .distribution) + + + + + distributionLevel = try container.decode(String.self, forKey: .distributionLevel) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(distribution, forKey: .distribution) + + + + + try? container.encodeIfPresent(distributionLevel, forKey: .distributionLevel) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ChargeDistributionSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ChargeDistributionSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..98b022d8ae --- /dev/null +++ b/Sources/code/platform/Models/Order/ChargeDistributionSchemaOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ChargeDistributionSchema + Used By: Order + */ + + class ChargeDistributionSchema: Codable { + + + public var type: String + + public var logic: String + + + public enum CodingKeys: String, CodingKey { + + case type = "type" + + case logic = "logic" + + } + + public init(logic: String, type: String) { + + self.type = type + + self.logic = logic + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + type = try container.decode(String.self, forKey: .type) + + + + + logic = try container.decode(String.self, forKey: .logic) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(logic, forKey: .logic) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ChargeDistributionSchema + Used By: Order + */ + + class ChargeDistributionSchema: Codable { + + + public var type: String + + public var logic: String + + + public enum CodingKeys: String, CodingKey { + + case type = "type" + + case logic = "logic" + + } + + public init(logic: String, type: String) { + + self.type = type + + self.logic = logic + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + type = try container.decode(String.self, forKey: .type) + + + + + logic = try container.decode(String.self, forKey: .logic) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(logic, forKey: .logic) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ChargeOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ChargeOrderPlatformModel.swift index 3d3da75847..77c82a22d7 100644 --- a/Sources/code/platform/Models/Order/ChargeOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ChargeOrderPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.Order { public var name: String - public var amount: AmountSchema + public var amount: [String: Any] public var tax: Tax? @@ -37,7 +37,7 @@ public extension PlatformClient.Order { } - public init(amount: AmountSchema, code: String? = nil, name: String, tax: Tax? = nil, type: String) { + public init(amount: [String: Any], code: String? = nil, name: String, tax: Tax? = nil, type: String) { self.name = name @@ -60,7 +60,7 @@ public extension PlatformClient.Order { - amount = try container.decode(AmountSchema.self, forKey: .amount) + amount = try container.decode([String: Any].self, forKey: .amount) @@ -141,7 +141,7 @@ public extension PlatformClient.ApplicationClient.Order { public var name: String - public var amount: AmountSchema + public var amount: [String: Any] public var tax: Tax? @@ -164,7 +164,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(amount: AmountSchema, code: String? = nil, name: String, tax: Tax? = nil, type: String) { + public init(amount: [String: Any], code: String? = nil, name: String, tax: Tax? = nil, type: String) { self.name = name @@ -187,7 +187,7 @@ public extension PlatformClient.ApplicationClient.Order { - amount = try container.decode(AmountSchema.self, forKey: .amount) + amount = try container.decode([String: Any].self, forKey: .amount) diff --git a/Sources/code/platform/Models/Order/CheckResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CheckResponseSchemaOrderPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Order/CheckResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/CheckResponseSchemaOrderPlatformModel.swift index 4f8185f241..a38f6899d4 100644 --- a/Sources/code/platform/Models/Order/CheckResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/CheckResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: CheckResponse + Model: CheckResponseSchema Used By: Order */ - class CheckResponse: Codable { + class CheckResponseSchema: Codable { public var shipmentId: String? @@ -245,11 +245,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: CheckResponse + Model: CheckResponseSchema Used By: Order */ - class CheckResponse: Codable { + class CheckResponseSchema: Codable { public var shipmentId: String? diff --git a/Sources/code/platform/Models/Order/Click2CallResponseSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/Click2CallResponseSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..2a16e30209 --- /dev/null +++ b/Sources/code/platform/Models/Order/Click2CallResponseSchemaOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: Click2CallResponseSchema + Used By: Order + */ + + class Click2CallResponseSchema: Codable { + + + public var callId: String + + public var success: Bool + + + public enum CodingKeys: String, CodingKey { + + case callId = "call_id" + + case success = "success" + + } + + public init(callId: String, success: Bool) { + + self.callId = callId + + self.success = success + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + callId = try container.decode(String.self, forKey: .callId) + + + + + 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(callId, forKey: .callId) + + + + + try? container.encodeIfPresent(success, forKey: .success) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: Click2CallResponseSchema + Used By: Order + */ + + class Click2CallResponseSchema: Codable { + + + public var callId: String + + public var success: Bool + + + public enum CodingKeys: String, CodingKey { + + case callId = "call_id" + + case success = "success" + + } + + public init(callId: String, success: Bool) { + + self.callId = callId + + self.success = success + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + callId = try container.decode(String.self, forKey: .callId) + + + + + 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(callId, forKey: .callId) + + + + + try? container.encodeIfPresent(success, forKey: .success) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ConditionsOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ConditionsOrderPlatformModel.swift new file mode 100644 index 0000000000..1d332bf18b --- /dev/null +++ b/Sources/code/platform/Models/Order/ConditionsOrderPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: Conditions + Used By: Order + */ + + class Conditions: Codable { + + + public var department: String? + + public var l3: String? + + + public enum CodingKeys: String, CodingKey { + + case department = "department" + + case l3 = "l3" + + } + + public init(department: String? = nil, l3: String? = nil) { + + self.department = department + + self.l3 = l3 + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + department = try container.decode(String.self, forKey: .department) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + l3 = try container.decode(String.self, forKey: .l3) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(department, forKey: .department) + + + + + try? container.encodeIfPresent(l3, forKey: .l3) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: Conditions + Used By: Order + */ + + class Conditions: Codable { + + + public var department: String? + + public var l3: String? + + + public enum CodingKeys: String, CodingKey { + + case department = "department" + + case l3 = "l3" + + } + + public init(department: String? = nil, l3: String? = nil) { + + self.department = department + + self.l3 = l3 + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + department = try container.decode(String.self, forKey: .department) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + l3 = try container.decode(String.self, forKey: .l3) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(department, forKey: .department) + + + + + try? container.encodeIfPresent(l3, forKey: .l3) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ConfigUpdatedResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ConfigUpdatedResponseSchemaOrderPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Order/ConfigUpdatedResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ConfigUpdatedResponseSchemaOrderPlatformModel.swift index 547324801e..167940efc3 100644 --- a/Sources/code/platform/Models/Order/ConfigUpdatedResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ConfigUpdatedResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: ConfigUpdatedResponse + Model: ConfigUpdatedResponseSchema Used By: Order */ - class ConfigUpdatedResponse: Codable { + class ConfigUpdatedResponseSchema: Codable { public var data: [ConfigData] @@ -70,11 +70,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ConfigUpdatedResponse + Model: ConfigUpdatedResponseSchema Used By: Order */ - class ConfigUpdatedResponse: Codable { + class ConfigUpdatedResponseSchema: Codable { public var data: [ConfigData] diff --git a/Sources/code/platform/Models/Order/CourierPartnerTrackingResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CourierPartnerTrackingResponseSchemaOrderPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Order/CourierPartnerTrackingResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/CourierPartnerTrackingResponseSchemaOrderPlatformModel.swift index fcc4061248..7689ba2785 100644 --- a/Sources/code/platform/Models/Order/CourierPartnerTrackingResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/CourierPartnerTrackingResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: CourierPartnerTrackingResponse + Model: CourierPartnerTrackingResponseSchema Used By: Order */ - class CourierPartnerTrackingResponse: Codable { + class CourierPartnerTrackingResponseSchema: Codable { public var items: [CourierPartnerTrackingDetails]? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: CourierPartnerTrackingResponse + Model: CourierPartnerTrackingResponseSchema Used By: Order */ - class CourierPartnerTrackingResponse: Codable { + class CourierPartnerTrackingResponseSchema: Codable { public var items: [CourierPartnerTrackingDetails]? diff --git a/Sources/code/platform/Models/Order/CreateChannelConfigDataOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CreateChannelConfigDataOrderPlatformModel.swift new file mode 100644 index 0000000000..da5afb36d6 --- /dev/null +++ b/Sources/code/platform/Models/Order/CreateChannelConfigDataOrderPlatformModel.swift @@ -0,0 +1,116 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: CreateChannelConfigData + Used By: Order + */ + + class CreateChannelConfigData: Codable { + + + public var configData: CreateChannelConfig? + + + public enum CodingKeys: String, CodingKey { + + case configData = "config_data" + + } + + public init(configData: CreateChannelConfig? = nil) { + + self.configData = configData + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + configData = try container.decode(CreateChannelConfig.self, forKey: .configData) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(configData, forKey: .configData) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: CreateChannelConfigData + Used By: Order + */ + + class CreateChannelConfigData: Codable { + + + public var configData: CreateChannelConfig? + + + public enum CodingKeys: String, CodingKey { + + case configData = "config_data" + + } + + public init(configData: CreateChannelConfig? = nil) { + + self.configData = configData + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + configData = try container.decode(CreateChannelConfig.self, forKey: .configData) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(configData, forKey: .configData) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/CreateChannelConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CreateChannelConfigOrderPlatformModel.swift new file mode 100644 index 0000000000..ac653d755b --- /dev/null +++ b/Sources/code/platform/Models/Order/CreateChannelConfigOrderPlatformModel.swift @@ -0,0 +1,346 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: CreateChannelConfig + Used By: Order + */ + + class CreateChannelConfig: Codable { + + + public var dpConfiguration: DPConfiguration? + + public var shipmentAssignment: String? + + public var locationReassignment: Bool? + + public var logoUrl: [String: Any]? + + public var paymentInfo: CreateChannelPaymentInfo? + + public var lockStates: [String]? + + + public enum CodingKeys: String, CodingKey { + + case dpConfiguration = "dp_configuration" + + case shipmentAssignment = "shipment_assignment" + + case locationReassignment = "location_reassignment" + + case logoUrl = "logo_url" + + case paymentInfo = "payment_info" + + case lockStates = "lock_states" + + } + + public init(dpConfiguration: DPConfiguration? = nil, locationReassignment: Bool? = nil, lockStates: [String]? = nil, logoUrl: [String: Any]? = nil, paymentInfo: CreateChannelPaymentInfo? = nil, shipmentAssignment: String? = nil) { + + self.dpConfiguration = dpConfiguration + + self.shipmentAssignment = shipmentAssignment + + self.locationReassignment = locationReassignment + + self.logoUrl = logoUrl + + self.paymentInfo = paymentInfo + + self.lockStates = lockStates + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + dpConfiguration = try container.decode(DPConfiguration.self, forKey: .dpConfiguration) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentAssignment = try container.decode(String.self, forKey: .shipmentAssignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + locationReassignment = try container.decode(Bool.self, forKey: .locationReassignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + logoUrl = try container.decode([String: Any].self, forKey: .logoUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentInfo = try container.decode(CreateChannelPaymentInfo.self, forKey: .paymentInfo) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + lockStates = try container.decode([String].self, forKey: .lockStates) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(dpConfiguration, forKey: .dpConfiguration) + + + + + try? container.encodeIfPresent(shipmentAssignment, forKey: .shipmentAssignment) + + + + + try? container.encodeIfPresent(locationReassignment, forKey: .locationReassignment) + + + + + try? container.encodeIfPresent(logoUrl, forKey: .logoUrl) + + + + + try? container.encodeIfPresent(paymentInfo, forKey: .paymentInfo) + + + + + try? container.encodeIfPresent(lockStates, forKey: .lockStates) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: CreateChannelConfig + Used By: Order + */ + + class CreateChannelConfig: Codable { + + + public var dpConfiguration: DPConfiguration? + + public var shipmentAssignment: String? + + public var locationReassignment: Bool? + + public var logoUrl: [String: Any]? + + public var paymentInfo: CreateChannelPaymentInfo? + + public var lockStates: [String]? + + + public enum CodingKeys: String, CodingKey { + + case dpConfiguration = "dp_configuration" + + case shipmentAssignment = "shipment_assignment" + + case locationReassignment = "location_reassignment" + + case logoUrl = "logo_url" + + case paymentInfo = "payment_info" + + case lockStates = "lock_states" + + } + + public init(dpConfiguration: DPConfiguration? = nil, locationReassignment: Bool? = nil, lockStates: [String]? = nil, logoUrl: [String: Any]? = nil, paymentInfo: CreateChannelPaymentInfo? = nil, shipmentAssignment: String? = nil) { + + self.dpConfiguration = dpConfiguration + + self.shipmentAssignment = shipmentAssignment + + self.locationReassignment = locationReassignment + + self.logoUrl = logoUrl + + self.paymentInfo = paymentInfo + + self.lockStates = lockStates + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + dpConfiguration = try container.decode(DPConfiguration.self, forKey: .dpConfiguration) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentAssignment = try container.decode(String.self, forKey: .shipmentAssignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + locationReassignment = try container.decode(Bool.self, forKey: .locationReassignment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + logoUrl = try container.decode([String: Any].self, forKey: .logoUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentInfo = try container.decode(CreateChannelPaymentInfo.self, forKey: .paymentInfo) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + lockStates = try container.decode([String].self, forKey: .lockStates) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(dpConfiguration, forKey: .dpConfiguration) + + + + + try? container.encodeIfPresent(shipmentAssignment, forKey: .shipmentAssignment) + + + + + try? container.encodeIfPresent(locationReassignment, forKey: .locationReassignment) + + + + + try? container.encodeIfPresent(logoUrl, forKey: .logoUrl) + + + + + try? container.encodeIfPresent(paymentInfo, forKey: .paymentInfo) + + + + + try? container.encodeIfPresent(lockStates, forKey: .lockStates) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/CreateChannelConfigResponseSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CreateChannelConfigResponseSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..ef8f69950a --- /dev/null +++ b/Sources/code/platform/Models/Order/CreateChannelConfigResponseSchemaOrderPlatformModel.swift @@ -0,0 +1,208 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: CreateChannelConfigResponseSchema + Used By: Order + */ + + class CreateChannelConfigResponseSchema: Codable { + + + public var isInserted: Bool? + + public var isUpserted: Bool? + + public var acknowledged: Bool? + + + public enum CodingKeys: String, CodingKey { + + case isInserted = "is_inserted" + + case isUpserted = "is_upserted" + + case acknowledged = "acknowledged" + + } + + public init(acknowledged: Bool? = nil, isInserted: Bool? = nil, isUpserted: Bool? = nil) { + + self.isInserted = isInserted + + self.isUpserted = isUpserted + + self.acknowledged = acknowledged + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + isInserted = try container.decode(Bool.self, forKey: .isInserted) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + isUpserted = try container.decode(Bool.self, forKey: .isUpserted) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + acknowledged = try container.decode(Bool.self, forKey: .acknowledged) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(isInserted, forKey: .isInserted) + + + + + try? container.encodeIfPresent(isUpserted, forKey: .isUpserted) + + + + + try? container.encodeIfPresent(acknowledged, forKey: .acknowledged) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: CreateChannelConfigResponseSchema + Used By: Order + */ + + class CreateChannelConfigResponseSchema: Codable { + + + public var isInserted: Bool? + + public var isUpserted: Bool? + + public var acknowledged: Bool? + + + public enum CodingKeys: String, CodingKey { + + case isInserted = "is_inserted" + + case isUpserted = "is_upserted" + + case acknowledged = "acknowledged" + + } + + public init(acknowledged: Bool? = nil, isInserted: Bool? = nil, isUpserted: Bool? = nil) { + + self.isInserted = isInserted + + self.isUpserted = isUpserted + + self.acknowledged = acknowledged + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + isInserted = try container.decode(Bool.self, forKey: .isInserted) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + isUpserted = try container.decode(Bool.self, forKey: .isUpserted) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + acknowledged = try container.decode(Bool.self, forKey: .acknowledged) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(isInserted, forKey: .isInserted) + + + + + try? container.encodeIfPresent(isUpserted, forKey: .isUpserted) + + + + + try? container.encodeIfPresent(acknowledged, forKey: .acknowledged) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/CreateChannelConifgErrorResponseSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CreateChannelConifgErrorResponseSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..700d127ea2 --- /dev/null +++ b/Sources/code/platform/Models/Order/CreateChannelConifgErrorResponseSchemaOrderPlatformModel.swift @@ -0,0 +1,116 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: CreateChannelConifgErrorResponseSchema + Used By: Order + */ + + class CreateChannelConifgErrorResponseSchema: Codable { + + + public var error: String? + + + public enum CodingKeys: String, CodingKey { + + case error = "error" + + } + + public init(error: String? = nil) { + + self.error = error + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + error = try container.decode(String.self, forKey: .error) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(error, forKey: .error) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: CreateChannelConifgErrorResponseSchema + Used By: Order + */ + + class CreateChannelConifgErrorResponseSchema: Codable { + + + public var error: String? + + + public enum CodingKeys: String, CodingKey { + + case error = "error" + + } + + public init(error: String? = nil) { + + self.error = error + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + error = try container.decode(String.self, forKey: .error) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(error, forKey: .error) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/CreateChannelPaymentInfoOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CreateChannelPaymentInfoOrderPlatformModel.swift new file mode 100644 index 0000000000..bcb51e7069 --- /dev/null +++ b/Sources/code/platform/Models/Order/CreateChannelPaymentInfoOrderPlatformModel.swift @@ -0,0 +1,208 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: CreateChannelPaymentInfo + Used By: Order + */ + + class CreateChannelPaymentInfo: Codable { + + + public var source: String? + + public var paymentMethods: [PaymentMethods]? + + public var modeOfPayment: String? + + + public enum CodingKeys: String, CodingKey { + + case source = "source" + + case paymentMethods = "payment_methods" + + case modeOfPayment = "mode_of_payment" + + } + + public init(modeOfPayment: String? = nil, paymentMethods: [PaymentMethods]? = nil, source: String? = nil) { + + self.source = source + + self.paymentMethods = paymentMethods + + self.modeOfPayment = modeOfPayment + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + source = try container.decode(String.self, forKey: .source) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentMethods = try container.decode([PaymentMethods].self, forKey: .paymentMethods) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + modeOfPayment = try container.decode(String.self, forKey: .modeOfPayment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(source, forKey: .source) + + + + + try? container.encodeIfPresent(paymentMethods, forKey: .paymentMethods) + + + + + try? container.encodeIfPresent(modeOfPayment, forKey: .modeOfPayment) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: CreateChannelPaymentInfo + Used By: Order + */ + + class CreateChannelPaymentInfo: Codable { + + + public var source: String? + + public var paymentMethods: [PaymentMethods]? + + public var modeOfPayment: String? + + + public enum CodingKeys: String, CodingKey { + + case source = "source" + + case paymentMethods = "payment_methods" + + case modeOfPayment = "mode_of_payment" + + } + + public init(modeOfPayment: String? = nil, paymentMethods: [PaymentMethods]? = nil, source: String? = nil) { + + self.source = source + + self.paymentMethods = paymentMethods + + self.modeOfPayment = modeOfPayment + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + source = try container.decode(String.self, forKey: .source) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentMethods = try container.decode([PaymentMethods].self, forKey: .paymentMethods) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + modeOfPayment = try container.decode(String.self, forKey: .modeOfPayment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(source, forKey: .source) + + + + + try? container.encodeIfPresent(paymentMethods, forKey: .paymentMethods) + + + + + try? container.encodeIfPresent(modeOfPayment, forKey: .modeOfPayment) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/CreateOrderAPIOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CreateOrderAPIOrderPlatformModel.swift index a98dd310e0..671b890323 100644 --- a/Sources/code/platform/Models/Order/CreateOrderAPIOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/CreateOrderAPIOrderPlatformModel.swift @@ -16,7 +16,7 @@ public extension PlatformClient.Order { public var shippingInfo: ShippingInfo - public var billingInfo: ShippingInfo + public var billingInfo: BillingInfo public var currencyInfo: [String: Any]? @@ -30,7 +30,7 @@ public extension PlatformClient.Order { public var taxInfo: TaxInfo? - public var config: CreateOrderConfig + public var config: CreateOrderConfig? public var paymentInfo: PaymentInfo @@ -40,13 +40,9 @@ public extension PlatformClient.Order { public var orderPlatform: String? - public var orderType: String? + public var status: String? - public var fyndOrderId: String? - - public var applicationId: String? - - public var externalShipmentId: String? + public var systemMessages: [SystemMessages]? public enum CodingKeys: String, CodingKey { @@ -79,17 +75,13 @@ public extension PlatformClient.Order { case orderPlatform = "order_platform" - case orderType = "order_type" - - case fyndOrderId = "fynd_order_id" + case status = "status" - case applicationId = "application_id" - - case externalShipmentId = "external_shipment_id" + case systemMessages = "system_messages" } - public init(applicationId: String? = nil, billingInfo: ShippingInfo, charges: [Charge]? = nil, config: CreateOrderConfig, currencyInfo: [String: Any]? = nil, externalCreationDate: String? = nil, externalOrderId: String? = nil, externalShipmentId: String? = nil, fyndOrderId: String? = nil, meta: [String: Any]? = nil, orderingStoreId: Int? = nil, orderPlatform: String? = nil, orderType: String? = nil, paymentInfo: PaymentInfo, shipments: [Shipment], shippingInfo: ShippingInfo, taxInfo: TaxInfo? = nil, userInfo: UserInfo? = nil) { + public init(billingInfo: BillingInfo, charges: [Charge]? = nil, config: CreateOrderConfig? = nil, currencyInfo: [String: Any]? = nil, externalCreationDate: String? = nil, externalOrderId: String? = nil, meta: [String: Any]? = nil, orderingStoreId: Int? = nil, orderPlatform: String? = nil, paymentInfo: PaymentInfo, shipments: [Shipment], shippingInfo: ShippingInfo, status: String? = nil, systemMessages: [SystemMessages]? = nil, taxInfo: TaxInfo? = nil, userInfo: UserInfo? = nil) { self.shipments = shipments @@ -119,13 +111,9 @@ public extension PlatformClient.Order { self.orderPlatform = orderPlatform - self.orderType = orderType - - self.fyndOrderId = fyndOrderId + self.status = status - self.applicationId = applicationId - - self.externalShipmentId = externalShipmentId + self.systemMessages = systemMessages } @@ -143,7 +131,7 @@ public extension PlatformClient.Order { - billingInfo = try container.decode(ShippingInfo.self, forKey: .billingInfo) + billingInfo = try container.decode(BillingInfo.self, forKey: .billingInfo) @@ -220,18 +208,8 @@ public extension PlatformClient.Order { - config = try container.decode(CreateOrderConfig.self, forKey: .config) - - - - - paymentInfo = try container.decode(PaymentInfo.self, forKey: .paymentInfo) - - - - do { - userInfo = try container.decode(UserInfo.self, forKey: .userInfo) + config = try container.decode(CreateOrderConfig.self, forKey: .config) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -242,20 +220,13 @@ public extension PlatformClient.Order { - do { - orderingStoreId = try container.decode(Int.self, forKey: .orderingStoreId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } + paymentInfo = try container.decode(PaymentInfo.self, forKey: .paymentInfo) + do { - orderPlatform = try container.decode(String.self, forKey: .orderPlatform) + userInfo = try container.decode(UserInfo.self, forKey: .userInfo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -267,7 +238,7 @@ public extension PlatformClient.Order { do { - orderType = try container.decode(String.self, forKey: .orderType) + orderingStoreId = try container.decode(Int.self, forKey: .orderingStoreId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -279,7 +250,7 @@ public extension PlatformClient.Order { do { - fyndOrderId = try container.decode(String.self, forKey: .fyndOrderId) + orderPlatform = try container.decode(String.self, forKey: .orderPlatform) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -291,7 +262,7 @@ public extension PlatformClient.Order { do { - applicationId = try container.decode(String.self, forKey: .applicationId) + status = try container.decode(String.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -303,7 +274,7 @@ public extension PlatformClient.Order { do { - externalShipmentId = try container.decode(String.self, forKey: .externalShipmentId) + systemMessages = try container.decode([SystemMessages].self, forKey: .systemMessages) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -390,22 +361,12 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(orderType, forKey: .orderType) - - - - - try? container.encodeIfPresent(fyndOrderId, forKey: .fyndOrderId) - - - - - try? container.encodeIfPresent(applicationId, forKey: .applicationId) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(externalShipmentId, forKey: .externalShipmentId) + try? container.encodeIfPresent(systemMessages, forKey: .systemMessages) } @@ -428,7 +389,7 @@ public extension PlatformClient.ApplicationClient.Order { public var shippingInfo: ShippingInfo - public var billingInfo: ShippingInfo + public var billingInfo: BillingInfo public var currencyInfo: [String: Any]? @@ -442,7 +403,7 @@ public extension PlatformClient.ApplicationClient.Order { public var taxInfo: TaxInfo? - public var config: CreateOrderConfig + public var config: CreateOrderConfig? public var paymentInfo: PaymentInfo @@ -452,13 +413,9 @@ public extension PlatformClient.ApplicationClient.Order { public var orderPlatform: String? - public var orderType: String? + public var status: String? - public var fyndOrderId: String? - - public var applicationId: String? - - public var externalShipmentId: String? + public var systemMessages: [SystemMessages]? public enum CodingKeys: String, CodingKey { @@ -491,17 +448,13 @@ public extension PlatformClient.ApplicationClient.Order { case orderPlatform = "order_platform" - case orderType = "order_type" - - case fyndOrderId = "fynd_order_id" + case status = "status" - case applicationId = "application_id" - - case externalShipmentId = "external_shipment_id" + case systemMessages = "system_messages" } - public init(applicationId: String? = nil, billingInfo: ShippingInfo, charges: [Charge]? = nil, config: CreateOrderConfig, currencyInfo: [String: Any]? = nil, externalCreationDate: String? = nil, externalOrderId: String? = nil, externalShipmentId: String? = nil, fyndOrderId: String? = nil, meta: [String: Any]? = nil, orderingStoreId: Int? = nil, orderPlatform: String? = nil, orderType: String? = nil, paymentInfo: PaymentInfo, shipments: [Shipment], shippingInfo: ShippingInfo, taxInfo: TaxInfo? = nil, userInfo: UserInfo? = nil) { + public init(billingInfo: BillingInfo, charges: [Charge]? = nil, config: CreateOrderConfig? = nil, currencyInfo: [String: Any]? = nil, externalCreationDate: String? = nil, externalOrderId: String? = nil, meta: [String: Any]? = nil, orderingStoreId: Int? = nil, orderPlatform: String? = nil, paymentInfo: PaymentInfo, shipments: [Shipment], shippingInfo: ShippingInfo, status: String? = nil, systemMessages: [SystemMessages]? = nil, taxInfo: TaxInfo? = nil, userInfo: UserInfo? = nil) { self.shipments = shipments @@ -531,13 +484,9 @@ public extension PlatformClient.ApplicationClient.Order { self.orderPlatform = orderPlatform - self.orderType = orderType - - self.fyndOrderId = fyndOrderId + self.status = status - self.applicationId = applicationId - - self.externalShipmentId = externalShipmentId + self.systemMessages = systemMessages } @@ -555,7 +504,7 @@ public extension PlatformClient.ApplicationClient.Order { - billingInfo = try container.decode(ShippingInfo.self, forKey: .billingInfo) + billingInfo = try container.decode(BillingInfo.self, forKey: .billingInfo) @@ -632,18 +581,8 @@ public extension PlatformClient.ApplicationClient.Order { - config = try container.decode(CreateOrderConfig.self, forKey: .config) - - - - - paymentInfo = try container.decode(PaymentInfo.self, forKey: .paymentInfo) - - - - do { - userInfo = try container.decode(UserInfo.self, forKey: .userInfo) + config = try container.decode(CreateOrderConfig.self, forKey: .config) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -654,20 +593,13 @@ public extension PlatformClient.ApplicationClient.Order { - do { - orderingStoreId = try container.decode(Int.self, forKey: .orderingStoreId) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } + paymentInfo = try container.decode(PaymentInfo.self, forKey: .paymentInfo) + do { - orderPlatform = try container.decode(String.self, forKey: .orderPlatform) + userInfo = try container.decode(UserInfo.self, forKey: .userInfo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -679,7 +611,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - orderType = try container.decode(String.self, forKey: .orderType) + orderingStoreId = try container.decode(Int.self, forKey: .orderingStoreId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -691,7 +623,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - fyndOrderId = try container.decode(String.self, forKey: .fyndOrderId) + orderPlatform = try container.decode(String.self, forKey: .orderPlatform) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -703,7 +635,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - applicationId = try container.decode(String.self, forKey: .applicationId) + status = try container.decode(String.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -715,7 +647,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - externalShipmentId = try container.decode(String.self, forKey: .externalShipmentId) + systemMessages = try container.decode([SystemMessages].self, forKey: .systemMessages) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -802,22 +734,12 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(orderType, forKey: .orderType) - - - - - try? container.encodeIfPresent(fyndOrderId, forKey: .fyndOrderId) - - - - - try? container.encodeIfPresent(applicationId, forKey: .applicationId) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(externalShipmentId, forKey: .externalShipmentId) + try? container.encodeIfPresent(systemMessages, forKey: .systemMessages) } diff --git a/Sources/code/platform/Models/Order/CreateOrderConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CreateOrderConfigOrderPlatformModel.swift index 9be5a3acc1..5b47da11b2 100644 --- a/Sources/code/platform/Models/Order/CreateOrderConfigOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/CreateOrderConfigOrderPlatformModel.swift @@ -12,9 +12,7 @@ public extension PlatformClient.Order { class CreateOrderConfig: Codable { - public var dpConfiguration: DPConfiguration - - public var integrationType: String? + public var dpConfiguration: DPConfiguration? public var locationReassignment: Bool? @@ -22,46 +20,43 @@ public extension PlatformClient.Order { public var optimalShipmentCreation: Bool? + public var lockStateMessages: [LockStateMessage]? + public enum CodingKeys: String, CodingKey { case dpConfiguration = "dp_configuration" - case integrationType = "integration_type" - case locationReassignment = "location_reassignment" case payment = "payment" case optimalShipmentCreation = "optimal_shipment_creation" + case lockStateMessages = "lock_state_messages" + } - public init(dpConfiguration: DPConfiguration, integrationType: String? = nil, locationReassignment: Bool? = nil, optimalShipmentCreation: Bool? = nil, payment: PaymentConfig? = nil) { + public init(dpConfiguration: DPConfiguration? = nil, locationReassignment: Bool? = nil, lockStateMessages: [LockStateMessage]? = nil, optimalShipmentCreation: Bool? = nil, payment: PaymentConfig? = nil) { self.dpConfiguration = dpConfiguration - self.integrationType = integrationType - self.locationReassignment = locationReassignment self.payment = payment self.optimalShipmentCreation = optimalShipmentCreation + self.lockStateMessages = lockStateMessages + } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - dpConfiguration = try container.decode(DPConfiguration.self, forKey: .dpConfiguration) - - - - do { - integrationType = try container.decode(String.self, forKey: .integrationType) + dpConfiguration = try container.decode(DPConfiguration.self, forKey: .dpConfiguration) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -107,6 +102,18 @@ public extension PlatformClient.Order { } + + do { + lockStateMessages = try container.decode([LockStateMessage].self, forKey: .lockStateMessages) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -119,22 +126,22 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(integrationType, forKey: .integrationType) + try? container.encodeIfPresent(locationReassignment, forKey: .locationReassignment) - try? container.encodeIfPresent(locationReassignment, forKey: .locationReassignment) + try? container.encodeIfPresent(payment, forKey: .payment) - try? container.encodeIfPresent(payment, forKey: .payment) + try? container.encodeIfPresent(optimalShipmentCreation, forKey: .optimalShipmentCreation) - try? container.encodeIfPresent(optimalShipmentCreation, forKey: .optimalShipmentCreation) + try? container.encodeIfPresent(lockStateMessages, forKey: .lockStateMessages) } @@ -153,9 +160,7 @@ public extension PlatformClient.ApplicationClient.Order { class CreateOrderConfig: Codable { - public var dpConfiguration: DPConfiguration - - public var integrationType: String? + public var dpConfiguration: DPConfiguration? public var locationReassignment: Bool? @@ -163,46 +168,43 @@ public extension PlatformClient.ApplicationClient.Order { public var optimalShipmentCreation: Bool? + public var lockStateMessages: [LockStateMessage]? + public enum CodingKeys: String, CodingKey { case dpConfiguration = "dp_configuration" - case integrationType = "integration_type" - case locationReassignment = "location_reassignment" case payment = "payment" case optimalShipmentCreation = "optimal_shipment_creation" + case lockStateMessages = "lock_state_messages" + } - public init(dpConfiguration: DPConfiguration, integrationType: String? = nil, locationReassignment: Bool? = nil, optimalShipmentCreation: Bool? = nil, payment: PaymentConfig? = nil) { + public init(dpConfiguration: DPConfiguration? = nil, locationReassignment: Bool? = nil, lockStateMessages: [LockStateMessage]? = nil, optimalShipmentCreation: Bool? = nil, payment: PaymentConfig? = nil) { self.dpConfiguration = dpConfiguration - self.integrationType = integrationType - self.locationReassignment = locationReassignment self.payment = payment self.optimalShipmentCreation = optimalShipmentCreation + self.lockStateMessages = lockStateMessages + } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - dpConfiguration = try container.decode(DPConfiguration.self, forKey: .dpConfiguration) - - - - do { - integrationType = try container.decode(String.self, forKey: .integrationType) + dpConfiguration = try container.decode(DPConfiguration.self, forKey: .dpConfiguration) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -248,6 +250,18 @@ public extension PlatformClient.ApplicationClient.Order { } + + do { + lockStateMessages = try container.decode([LockStateMessage].self, forKey: .lockStateMessages) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -260,22 +274,22 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(integrationType, forKey: .integrationType) + try? container.encodeIfPresent(locationReassignment, forKey: .locationReassignment) - try? container.encodeIfPresent(locationReassignment, forKey: .locationReassignment) + try? container.encodeIfPresent(payment, forKey: .payment) - try? container.encodeIfPresent(payment, forKey: .payment) + try? container.encodeIfPresent(optimalShipmentCreation, forKey: .optimalShipmentCreation) - try? container.encodeIfPresent(optimalShipmentCreation, forKey: .optimalShipmentCreation) + try? container.encodeIfPresent(lockStateMessages, forKey: .lockStateMessages) } diff --git a/Sources/code/platform/Models/Order/CreateOrderErrorReponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CreateOrderErrorReponseOrderPlatformModel.swift index daf70efe6f..d645916ebc 100644 --- a/Sources/code/platform/Models/Order/CreateOrderErrorReponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/CreateOrderErrorReponseOrderPlatformModel.swift @@ -12,36 +12,60 @@ public extension PlatformClient.Order { class CreateOrderErrorReponse: Codable { - public var success: Bool? + public var requestId: String? - public var errors: String? + public var status: Int - public var statusCode: Double? + public var info: [String: Any]? - public var fyndOrderId: String? + public var stackTrace: String? + + public var code: String? + + public var meta: String? + + public var message: String + + public var exception: String? public enum CodingKeys: String, CodingKey { - case success = "success" + case requestId = "request_id" + + case status = "status" + + case info = "info" + + case stackTrace = "stack_trace" + + case code = "code" - case errors = "errors" + case meta = "meta" - case statusCode = "status_code" + case message = "message" - case fyndOrderId = "fynd_order_id" + case exception = "exception" } - public init(errors: String? = nil, fyndOrderId: String? = nil, statusCode: Double? = nil, success: Bool? = nil) { + public init(code: String? = nil, exception: String? = nil, info: [String: Any]? = nil, message: String, meta: String? = nil, requestId: String? = nil, stackTrace: String? = nil, status: Int) { - self.success = success + self.requestId = requestId - self.errors = errors + self.status = status - self.statusCode = statusCode + self.info = info - self.fyndOrderId = fyndOrderId + self.stackTrace = stackTrace + + self.code = code + + self.meta = meta + + self.message = message + + self.exception = exception } @@ -50,7 +74,36 @@ public extension PlatformClient.Order { do { - success = try container.decode(Bool.self, forKey: .success) + 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 { + + } + + + + status = try container.decode(Int.self, forKey: .status) + + + + + do { + info = try container.decode([String: Any].self, forKey: .info) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + stackTrace = try container.decode(String.self, forKey: .stackTrace) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +115,7 @@ public extension PlatformClient.Order { do { - errors = try container.decode(String.self, forKey: .errors) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +127,7 @@ public extension PlatformClient.Order { do { - statusCode = try container.decode(Double.self, forKey: .statusCode) + meta = try container.decode(String.self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,8 +138,13 @@ public extension PlatformClient.Order { + message = try container.decode(String.self, forKey: .message) + + + + do { - fyndOrderId = try container.decode(String.self, forKey: .fyndOrderId) + exception = try container.decode(String.self, forKey: .exception) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -103,22 +161,42 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(success, forKey: .success) + try? container.encodeIfPresent(requestId, forKey: .requestId) + + + + + try? container.encodeIfPresent(status, forKey: .status) + + + + + try? container.encodeIfPresent(info, forKey: .info) + + + + + try? container.encodeIfPresent(stackTrace, forKey: .stackTrace) + + + + + try? container.encodeIfPresent(code, forKey: .code) - try? container.encodeIfPresent(errors, forKey: .errors) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(statusCode, forKey: .statusCode) + try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(fyndOrderId, forKey: .fyndOrderId) + try? container.encodeIfPresent(exception, forKey: .exception) } @@ -137,36 +215,60 @@ public extension PlatformClient.ApplicationClient.Order { class CreateOrderErrorReponse: Codable { - public var success: Bool? + public var requestId: String? - public var errors: String? + public var status: Int - public var statusCode: Double? + public var info: [String: Any]? - public var fyndOrderId: String? + public var stackTrace: String? + + public var code: String? + + public var meta: String? + + public var message: String + + public var exception: String? public enum CodingKeys: String, CodingKey { - case success = "success" + case requestId = "request_id" + + case status = "status" + + case info = "info" + + case stackTrace = "stack_trace" + + case code = "code" - case errors = "errors" + case meta = "meta" - case statusCode = "status_code" + case message = "message" - case fyndOrderId = "fynd_order_id" + case exception = "exception" } - public init(errors: String? = nil, fyndOrderId: String? = nil, statusCode: Double? = nil, success: Bool? = nil) { + public init(code: String? = nil, exception: String? = nil, info: [String: Any]? = nil, message: String, meta: String? = nil, requestId: String? = nil, stackTrace: String? = nil, status: Int) { - self.success = success + self.requestId = requestId - self.errors = errors + self.status = status - self.statusCode = statusCode + self.info = info - self.fyndOrderId = fyndOrderId + self.stackTrace = stackTrace + + self.code = code + + self.meta = meta + + self.message = message + + self.exception = exception } @@ -175,7 +277,36 @@ public extension PlatformClient.ApplicationClient.Order { do { - success = try container.decode(Bool.self, forKey: .success) + 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 { + + } + + + + status = try container.decode(Int.self, forKey: .status) + + + + + do { + info = try container.decode([String: Any].self, forKey: .info) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + stackTrace = try container.decode(String.self, forKey: .stackTrace) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -187,7 +318,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - errors = try container.decode(String.self, forKey: .errors) + code = try container.decode(String.self, forKey: .code) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -199,7 +330,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - statusCode = try container.decode(Double.self, forKey: .statusCode) + meta = try container.decode(String.self, forKey: .meta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -210,8 +341,13 @@ public extension PlatformClient.ApplicationClient.Order { + message = try container.decode(String.self, forKey: .message) + + + + do { - fyndOrderId = try container.decode(String.self, forKey: .fyndOrderId) + exception = try container.decode(String.self, forKey: .exception) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -228,22 +364,42 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(success, forKey: .success) + try? container.encodeIfPresent(requestId, forKey: .requestId) + + + + + try? container.encodeIfPresent(status, forKey: .status) + + + + + try? container.encodeIfPresent(info, forKey: .info) + + + + + try? container.encodeIfPresent(stackTrace, forKey: .stackTrace) + + + + + try? container.encodeIfPresent(code, forKey: .code) - try? container.encodeIfPresent(errors, forKey: .errors) + try? container.encodeIfPresent(meta, forKey: .meta) - try? container.encodeIfPresent(statusCode, forKey: .statusCode) + try? container.encodeIfPresent(message, forKey: .message) - try? container.encodeIfPresent(fyndOrderId, forKey: .fyndOrderId) + try? container.encodeIfPresent(exception, forKey: .exception) } diff --git a/Sources/code/platform/Models/Order/CreateOrderResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CreateOrderResponseSchemaOrderPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Order/CreateOrderResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/CreateOrderResponseSchemaOrderPlatformModel.swift index 1822c3f303..cead69f9cc 100644 --- a/Sources/code/platform/Models/Order/CreateOrderResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/CreateOrderResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: CreateOrderResponse + Model: CreateOrderResponseSchema Used By: Order */ - class CreateOrderResponse: Codable { + class CreateOrderResponseSchema: Codable { public var fyndOrderId: String @@ -54,11 +54,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: CreateOrderResponse + Model: CreateOrderResponseSchema Used By: Order */ - class CreateOrderResponse: Codable { + class CreateOrderResponseSchema: Codable { public var fyndOrderId: String diff --git a/Sources/code/platform/Models/Order/CreditBalanceInfoOrderPlatformModel.swift b/Sources/code/platform/Models/Order/CreditBalanceInfoOrderPlatformModel.swift new file mode 100644 index 0000000000..fe999bfae6 --- /dev/null +++ b/Sources/code/platform/Models/Order/CreditBalanceInfoOrderPlatformModel.swift @@ -0,0 +1,208 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: CreditBalanceInfo + Used By: Order + */ + + class CreditBalanceInfo: Codable { + + + public var totalCreditedBalance: String? + + public var reason: String? + + public var customerMobileNumber: String? + + + public enum CodingKeys: String, CodingKey { + + case totalCreditedBalance = "total_credited_balance" + + case reason = "reason" + + case customerMobileNumber = "customer_mobile_number" + + } + + public init(customerMobileNumber: String? = nil, reason: String? = nil, totalCreditedBalance: String? = nil) { + + self.totalCreditedBalance = totalCreditedBalance + + self.reason = reason + + self.customerMobileNumber = customerMobileNumber + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + totalCreditedBalance = try container.decode(String.self, forKey: .totalCreditedBalance) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + reason = try container.decode(String.self, forKey: .reason) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + customerMobileNumber = try container.decode(String.self, forKey: .customerMobileNumber) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(totalCreditedBalance, forKey: .totalCreditedBalance) + + + + + try? container.encodeIfPresent(reason, forKey: .reason) + + + + + try? container.encodeIfPresent(customerMobileNumber, forKey: .customerMobileNumber) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: CreditBalanceInfo + Used By: Order + */ + + class CreditBalanceInfo: Codable { + + + public var totalCreditedBalance: String? + + public var reason: String? + + public var customerMobileNumber: String? + + + public enum CodingKeys: String, CodingKey { + + case totalCreditedBalance = "total_credited_balance" + + case reason = "reason" + + case customerMobileNumber = "customer_mobile_number" + + } + + public init(customerMobileNumber: String? = nil, reason: String? = nil, totalCreditedBalance: String? = nil) { + + self.totalCreditedBalance = totalCreditedBalance + + self.reason = reason + + self.customerMobileNumber = customerMobileNumber + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + totalCreditedBalance = try container.decode(String.self, forKey: .totalCreditedBalance) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + reason = try container.decode(String.self, forKey: .reason) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + customerMobileNumber = try container.decode(String.self, forKey: .customerMobileNumber) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(totalCreditedBalance, forKey: .totalCreditedBalance) + + + + + try? container.encodeIfPresent(reason, forKey: .reason) + + + + + try? container.encodeIfPresent(customerMobileNumber, forKey: .customerMobileNumber) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/DataUpdatesOrderPlatformModel.swift b/Sources/code/platform/Models/Order/DataUpdatesOrderPlatformModel.swift index c6afdea1b5..ec310adaec 100644 --- a/Sources/code/platform/Models/Order/DataUpdatesOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/DataUpdatesOrderPlatformModel.swift @@ -18,6 +18,8 @@ public extension PlatformClient.Order { public var entities: [EntitiesDataUpdates]? + public var order: [OrderDataUpdates]? + public enum CodingKeys: String, CodingKey { @@ -27,9 +29,11 @@ public extension PlatformClient.Order { case entities = "entities" + case order = "order" + } - public init(entities: [EntitiesDataUpdates]? = nil, orderItemStatus: [OrderItemDataUpdates]? = nil, products: [ProductsDataUpdates]? = nil) { + public init(entities: [EntitiesDataUpdates]? = nil, order: [OrderDataUpdates]? = nil, orderItemStatus: [OrderItemDataUpdates]? = nil, products: [ProductsDataUpdates]? = nil) { self.orderItemStatus = orderItemStatus @@ -37,6 +41,8 @@ public extension PlatformClient.Order { self.entities = entities + self.order = order + } required public init(from decoder: Decoder) throws { @@ -78,6 +84,18 @@ public extension PlatformClient.Order { } + + do { + order = try container.decode([OrderDataUpdates].self, forKey: .order) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -98,6 +116,11 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(entities, forKey: .entities) + + + try? container.encodeIfPresent(order, forKey: .order) + + } } @@ -120,6 +143,8 @@ public extension PlatformClient.ApplicationClient.Order { public var entities: [EntitiesDataUpdates]? + public var order: [OrderDataUpdates]? + public enum CodingKeys: String, CodingKey { @@ -129,9 +154,11 @@ public extension PlatformClient.ApplicationClient.Order { case entities = "entities" + case order = "order" + } - public init(entities: [EntitiesDataUpdates]? = nil, orderItemStatus: [OrderItemDataUpdates]? = nil, products: [ProductsDataUpdates]? = nil) { + public init(entities: [EntitiesDataUpdates]? = nil, order: [OrderDataUpdates]? = nil, orderItemStatus: [OrderItemDataUpdates]? = nil, products: [ProductsDataUpdates]? = nil) { self.orderItemStatus = orderItemStatus @@ -139,6 +166,8 @@ public extension PlatformClient.ApplicationClient.Order { self.entities = entities + self.order = order + } required public init(from decoder: Decoder) throws { @@ -180,6 +209,18 @@ public extension PlatformClient.ApplicationClient.Order { } + + do { + order = try container.decode([OrderDataUpdates].self, forKey: .order) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -200,6 +241,11 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(entities, forKey: .entities) + + + try? container.encodeIfPresent(order, forKey: .order) + + } } diff --git a/Sources/code/platform/Models/Order/DimensionOrderPlatformModel.swift b/Sources/code/platform/Models/Order/DimensionOrderPlatformModel.swift index dd04337092..c51a96ae58 100644 --- a/Sources/code/platform/Models/Order/DimensionOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/DimensionOrderPlatformModel.swift @@ -14,9 +14,9 @@ public extension PlatformClient.Order { public var packagingType: String? - public var weight: Double? + public var weight: String? - public var height: Double? + public var height: String? public var length: Double? @@ -37,7 +37,7 @@ public extension PlatformClient.Order { } - public init(height: Double? = nil, length: Double? = nil, packagingType: String? = nil, weight: Double? = nil, width: Double? = nil) { + public init(height: String? = nil, length: Double? = nil, packagingType: String? = nil, weight: String? = nil, width: Double? = nil) { self.packagingType = packagingType @@ -68,7 +68,7 @@ public extension PlatformClient.Order { do { - weight = try container.decode(Double.self, forKey: .weight) + weight = try container.decode(String.self, forKey: .weight) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -80,7 +80,7 @@ public extension PlatformClient.Order { do { - height = try container.decode(Double.self, forKey: .height) + height = try container.decode(String.self, forKey: .height) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -162,9 +162,9 @@ public extension PlatformClient.ApplicationClient.Order { public var packagingType: String? - public var weight: Double? + public var weight: String? - public var height: Double? + public var height: String? public var length: Double? @@ -185,7 +185,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(height: Double? = nil, length: Double? = nil, packagingType: String? = nil, weight: Double? = nil, width: Double? = nil) { + public init(height: String? = nil, length: Double? = nil, packagingType: String? = nil, weight: String? = nil, width: Double? = nil) { self.packagingType = packagingType @@ -216,7 +216,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - weight = try container.decode(Double.self, forKey: .weight) + weight = try container.decode(String.self, forKey: .weight) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -228,7 +228,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - height = try container.decode(Double.self, forKey: .height) + height = try container.decode(String.self, forKey: .height) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/DocumentOrderPlatformModel.swift b/Sources/code/platform/Models/Order/DocumentOrderPlatformModel.swift index b7c74ca893..84c4ca6285 100644 --- a/Sources/code/platform/Models/Order/DocumentOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/DocumentOrderPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.Order { public var value: String - public var dsType: String + public var type: String public var verified: Bool @@ -27,7 +27,7 @@ public extension PlatformClient.Order { case value = "value" - case dsType = "ds_type" + case type = "type" case verified = "verified" @@ -37,11 +37,11 @@ public extension PlatformClient.Order { } - public init(dsType: String, legalName: String, url: String? = nil, value: String, verified: Bool) { + public init(legalName: String, type: String, url: String? = nil, value: String, verified: Bool) { self.value = value - self.dsType = dsType + self.type = type self.verified = verified @@ -60,7 +60,7 @@ public extension PlatformClient.Order { - dsType = try container.decode(String.self, forKey: .dsType) + type = try container.decode(String.self, forKey: .type) @@ -98,7 +98,7 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(dsType, forKey: .dsType) + try? container.encodeIfPresent(type, forKey: .type) @@ -134,7 +134,7 @@ public extension PlatformClient.ApplicationClient.Order { public var value: String - public var dsType: String + public var type: String public var verified: Bool @@ -147,7 +147,7 @@ public extension PlatformClient.ApplicationClient.Order { case value = "value" - case dsType = "ds_type" + case type = "type" case verified = "verified" @@ -157,11 +157,11 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(dsType: String, legalName: String, url: String? = nil, value: String, verified: Bool) { + public init(legalName: String, type: String, url: String? = nil, value: String, verified: Bool) { self.value = value - self.dsType = dsType + self.type = type self.verified = verified @@ -180,7 +180,7 @@ public extension PlatformClient.ApplicationClient.Order { - dsType = try container.decode(String.self, forKey: .dsType) + type = try container.decode(String.self, forKey: .type) @@ -218,7 +218,7 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(dsType, forKey: .dsType) + try? container.encodeIfPresent(type, forKey: .type) diff --git a/Sources/code/platform/Models/Order/EInvoiceErrorResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/EInvoiceErrorResponseSchemaOrderPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Order/EInvoiceErrorResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/EInvoiceErrorResponseSchemaOrderPlatformModel.swift index bb556e4f50..1f507757a5 100644 --- a/Sources/code/platform/Models/Order/EInvoiceErrorResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/EInvoiceErrorResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: EInvoiceErrorResponse + Model: EInvoiceErrorResponseSchema Used By: Order */ - class EInvoiceErrorResponse: Codable { + class EInvoiceErrorResponseSchema: Codable { public var responseData: [EInvoiceErrorResponseData]? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: EInvoiceErrorResponse + Model: EInvoiceErrorResponseSchema Used By: Order */ - class EInvoiceErrorResponse: Codable { + class EInvoiceErrorResponseSchema: Codable { public var responseData: [EInvoiceErrorResponseData]? diff --git a/Sources/code/platform/Models/Order/EInvoiceRetryResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/EInvoiceRetryResponseSchemaOrderPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Order/EInvoiceRetryResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/EInvoiceRetryResponseSchemaOrderPlatformModel.swift index acc2f99d2a..251d6053d5 100644 --- a/Sources/code/platform/Models/Order/EInvoiceRetryResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/EInvoiceRetryResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: EInvoiceRetryResponse + Model: EInvoiceRetryResponseSchema Used By: Order */ - class EInvoiceRetryResponse: Codable { + class EInvoiceRetryResponseSchema: Codable { public var responseData: [EInvoiceResponseData] @@ -54,11 +54,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: EInvoiceRetryResponse + Model: EInvoiceRetryResponseSchema Used By: Order */ - class EInvoiceRetryResponse: Codable { + class EInvoiceRetryResponseSchema: Codable { public var responseData: [EInvoiceResponseData] diff --git a/Sources/code/platform/Models/Order/LockManagerEntitiesOrderPlatformModel.swift b/Sources/code/platform/Models/Order/EntitiesOrderPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Order/LockManagerEntitiesOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/EntitiesOrderPlatformModel.swift index da90130785..373a508a0b 100644 --- a/Sources/code/platform/Models/Order/LockManagerEntitiesOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/EntitiesOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: LockManagerEntities + Model: Entities Used By: Order */ - class LockManagerEntities: Codable { + class Entities: Codable { public var id: String? @@ -169,11 +169,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: LockManagerEntities + Model: Entities Used By: Order */ - class LockManagerEntities: Codable { + class Entities: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Order/ErrorResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ErrorResponseSchemaOrderPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Order/ErrorResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ErrorResponseSchemaOrderPlatformModel.swift index 2dfc73aa3d..9acccb56b7 100644 --- a/Sources/code/platform/Models/Order/ErrorResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ErrorResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: ErrorResponse + Model: ErrorResponseSchema Used By: Order */ - class ErrorResponse: Codable { + class ErrorResponseSchema: Codable { public var status: Int? @@ -146,11 +146,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ErrorResponse + Model: ErrorResponseSchema Used By: Order */ - class ErrorResponse: Codable { + class ErrorResponseSchema: Codable { public var status: Int? diff --git a/Sources/code/platform/Models/Order/FetchCreditBalanceRequestPayloadOrderPlatformModel.swift b/Sources/code/platform/Models/Order/FetchCreditBalanceRequestPayloadOrderPlatformModel.swift new file mode 100644 index 0000000000..79dd9a8b33 --- /dev/null +++ b/Sources/code/platform/Models/Order/FetchCreditBalanceRequestPayloadOrderPlatformModel.swift @@ -0,0 +1,166 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: FetchCreditBalanceRequestPayload + Used By: Order + */ + + class FetchCreditBalanceRequestPayload: Codable { + + + public var affiliateId: String + + public var sellerId: String + + public var customerMobileNumber: String + + + public enum CodingKeys: String, CodingKey { + + case affiliateId = "affiliate_id" + + case sellerId = "seller_id" + + case customerMobileNumber = "customer_mobile_number" + + } + + public init(affiliateId: String, customerMobileNumber: String, sellerId: String) { + + self.affiliateId = affiliateId + + self.sellerId = sellerId + + self.customerMobileNumber = customerMobileNumber + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + affiliateId = try container.decode(String.self, forKey: .affiliateId) + + + + + sellerId = try container.decode(String.self, forKey: .sellerId) + + + + + customerMobileNumber = try container.decode(String.self, forKey: .customerMobileNumber) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(affiliateId, forKey: .affiliateId) + + + + + try? container.encodeIfPresent(sellerId, forKey: .sellerId) + + + + + try? container.encodeIfPresent(customerMobileNumber, forKey: .customerMobileNumber) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: FetchCreditBalanceRequestPayload + Used By: Order + */ + + class FetchCreditBalanceRequestPayload: Codable { + + + public var affiliateId: String + + public var sellerId: String + + public var customerMobileNumber: String + + + public enum CodingKeys: String, CodingKey { + + case affiliateId = "affiliate_id" + + case sellerId = "seller_id" + + case customerMobileNumber = "customer_mobile_number" + + } + + public init(affiliateId: String, customerMobileNumber: String, sellerId: String) { + + self.affiliateId = affiliateId + + self.sellerId = sellerId + + self.customerMobileNumber = customerMobileNumber + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + affiliateId = try container.decode(String.self, forKey: .affiliateId) + + + + + sellerId = try container.decode(String.self, forKey: .sellerId) + + + + + customerMobileNumber = try container.decode(String.self, forKey: .customerMobileNumber) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(affiliateId, forKey: .affiliateId) + + + + + try? container.encodeIfPresent(sellerId, forKey: .sellerId) + + + + + try? container.encodeIfPresent(customerMobileNumber, forKey: .customerMobileNumber) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/FetchCreditBalanceResponsePayloadOrderPlatformModel.swift b/Sources/code/platform/Models/Order/FetchCreditBalanceResponsePayloadOrderPlatformModel.swift new file mode 100644 index 0000000000..abacb5ffd1 --- /dev/null +++ b/Sources/code/platform/Models/Order/FetchCreditBalanceResponsePayloadOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: FetchCreditBalanceResponsePayload + Used By: Order + */ + + class FetchCreditBalanceResponsePayload: Codable { + + + public var success: Bool + + public var data: CreditBalanceInfo + + + public enum CodingKeys: String, CodingKey { + + case success = "success" + + case data = "data" + + } + + public init(data: CreditBalanceInfo, success: Bool) { + + self.success = success + + self.data = data + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + success = try container.decode(Bool.self, forKey: .success) + + + + + data = try container.decode(CreditBalanceInfo.self, forKey: .data) + + + + } + + 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) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: FetchCreditBalanceResponsePayload + Used By: Order + */ + + class FetchCreditBalanceResponsePayload: Codable { + + + public var success: Bool + + public var data: CreditBalanceInfo + + + public enum CodingKeys: String, CodingKey { + + case success = "success" + + case data = "data" + + } + + public init(data: CreditBalanceInfo, success: Bool) { + + self.success = success + + self.data = data + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + success = try container.decode(Bool.self, forKey: .success) + + + + + data = try container.decode(CreditBalanceInfo.self, forKey: .data) + + + + } + + 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) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/FileResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/FileResponseSchemaOrderPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Order/FileResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/FileResponseSchemaOrderPlatformModel.swift index bbc0e13158..2f43fa03e2 100644 --- a/Sources/code/platform/Models/Order/FileResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/FileResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: FileResponse + Model: FileResponseSchema Used By: Order */ - class FileResponse: Codable { + class FileResponseSchema: Codable { public var fileName: String? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: FileResponse + Model: FileResponseSchema Used By: Order */ - class FileResponse: Codable { + class FileResponseSchema: Codable { public var fileName: String? diff --git a/Sources/code/platform/Models/Order/FiltersRequestSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/FiltersRequestSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..749ddc1071 --- /dev/null +++ b/Sources/code/platform/Models/Order/FiltersRequestSchemaOrderPlatformModel.swift @@ -0,0 +1,322 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: FiltersRequestSchema + Used By: Order + */ + + class FiltersRequestSchema: Codable { + + + public var dateRange: DateRange? + + public var logo: String? + + public var stores: Int + + public var dpName: String + + public var dpIds: Int + + public var lane: String + + public var storeName: String + + + public enum CodingKeys: String, CodingKey { + + case dateRange = "date_range" + + case logo = "logo" + + case stores = "stores" + + case dpName = "dp_name" + + case dpIds = "dp_ids" + + case lane = "lane" + + case storeName = "store_name" + + } + + public init(dateRange: DateRange? = nil, dpIds: Int, dpName: String, lane: String, logo: String? = nil, stores: Int, storeName: String) { + + self.dateRange = dateRange + + self.logo = logo + + self.stores = stores + + self.dpName = dpName + + self.dpIds = dpIds + + self.lane = lane + + self.storeName = storeName + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + dateRange = try container.decode(DateRange.self, forKey: .dateRange) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + stores = try container.decode(Int.self, forKey: .stores) + + + + + dpName = try container.decode(String.self, forKey: .dpName) + + + + + dpIds = try container.decode(Int.self, forKey: .dpIds) + + + + + lane = try container.decode(String.self, forKey: .lane) + + + + + storeName = try container.decode(String.self, forKey: .storeName) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(dateRange, forKey: .dateRange) + + + + + try? container.encodeIfPresent(logo, forKey: .logo) + + + + + try? container.encodeIfPresent(stores, forKey: .stores) + + + + + try? container.encodeIfPresent(dpName, forKey: .dpName) + + + + + try? container.encodeIfPresent(dpIds, forKey: .dpIds) + + + + + try? container.encodeIfPresent(lane, forKey: .lane) + + + + + try? container.encodeIfPresent(storeName, forKey: .storeName) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: FiltersRequestSchema + Used By: Order + */ + + class FiltersRequestSchema: Codable { + + + public var dateRange: DateRange? + + public var logo: String? + + public var stores: Int + + public var dpName: String + + public var dpIds: Int + + public var lane: String + + public var storeName: String + + + public enum CodingKeys: String, CodingKey { + + case dateRange = "date_range" + + case logo = "logo" + + case stores = "stores" + + case dpName = "dp_name" + + case dpIds = "dp_ids" + + case lane = "lane" + + case storeName = "store_name" + + } + + public init(dateRange: DateRange? = nil, dpIds: Int, dpName: String, lane: String, logo: String? = nil, stores: Int, storeName: String) { + + self.dateRange = dateRange + + self.logo = logo + + self.stores = stores + + self.dpName = dpName + + self.dpIds = dpIds + + self.lane = lane + + self.storeName = storeName + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + dateRange = try container.decode(DateRange.self, forKey: .dateRange) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + stores = try container.decode(Int.self, forKey: .stores) + + + + + dpName = try container.decode(String.self, forKey: .dpName) + + + + + dpIds = try container.decode(Int.self, forKey: .dpIds) + + + + + lane = try container.decode(String.self, forKey: .lane) + + + + + storeName = try container.decode(String.self, forKey: .storeName) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(dateRange, forKey: .dateRange) + + + + + try? container.encodeIfPresent(logo, forKey: .logo) + + + + + try? container.encodeIfPresent(stores, forKey: .stores) + + + + + try? container.encodeIfPresent(dpName, forKey: .dpName) + + + + + try? container.encodeIfPresent(dpIds, forKey: .dpIds) + + + + + try? container.encodeIfPresent(lane, forKey: .lane) + + + + + try? container.encodeIfPresent(storeName, forKey: .storeName) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/FiltersResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/FiltersResponseSchemaOrderPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Order/FiltersResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/FiltersResponseSchemaOrderPlatformModel.swift index 76dbaf113f..f6a5cea90f 100644 --- a/Sources/code/platform/Models/Order/FiltersResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/FiltersResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: FiltersResponse + Model: FiltersResponseSchema Used By: Order */ - class FiltersResponse: Codable { + class FiltersResponseSchema: Codable { public var advanceFilter: AdvanceFilterInfo? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: FiltersResponse + Model: FiltersResponseSchema Used By: Order */ - class FiltersResponse: Codable { + class FiltersResponseSchema: Codable { public var advanceFilter: AdvanceFilterInfo? diff --git a/Sources/code/platform/Models/Order/FlagDataOrderPlatformModel.swift b/Sources/code/platform/Models/Order/FlagDataOrderPlatformModel.swift index 4737c0091d..16243a416b 100644 --- a/Sources/code/platform/Models/Order/FlagDataOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/FlagDataOrderPlatformModel.swift @@ -12,22 +12,16 @@ public extension PlatformClient.Order { class FlagData: Codable { - public var value: [String: Any]? - public var filter: [String: Any]? public enum CodingKeys: String, CodingKey { - case value = "value" - case filter = "filter" } - public init(filter: [String: Any]? = nil, value: [String: Any]? = nil) { - - self.value = value + public init(filter: [String: Any]? = nil) { self.filter = filter @@ -37,18 +31,6 @@ public extension PlatformClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - value = try container.decode([String: Any].self, forKey: .value) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { filter = try container.decode([String: Any].self, forKey: .filter) @@ -67,11 +49,6 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(value, forKey: .value) - - - - try? container.encodeIfPresent(filter, forKey: .filter) @@ -91,22 +68,16 @@ public extension PlatformClient.ApplicationClient.Order { class FlagData: Codable { - public var value: [String: Any]? - public var filter: [String: Any]? public enum CodingKeys: String, CodingKey { - case value = "value" - case filter = "filter" } - public init(filter: [String: Any]? = nil, value: [String: Any]? = nil) { - - self.value = value + public init(filter: [String: Any]? = nil) { self.filter = filter @@ -116,18 +87,6 @@ public extension PlatformClient.ApplicationClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - value = try container.decode([String: Any].self, forKey: .value) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { filter = try container.decode([String: Any].self, forKey: .filter) @@ -146,11 +105,6 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(value, forKey: .value) - - - - try? container.encodeIfPresent(filter, forKey: .filter) diff --git a/Sources/code/platform/Models/Order/FreeGiftItemsOrderPlatformModel.swift b/Sources/code/platform/Models/Order/FreeGiftItemsOrderPlatformModel.swift new file mode 100644 index 0000000000..fce0a5494a --- /dev/null +++ b/Sources/code/platform/Models/Order/FreeGiftItemsOrderPlatformModel.swift @@ -0,0 +1,346 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: FreeGiftItems + Used By: Order + */ + + class FreeGiftItems: Codable { + + + public var itemSlug: String? + + public var itemName: String? + + public var itemPriceDetails: ItemPriceDetails? + + public var itemBrandName: String? + + public var itemId: Int? + + public var itemImagesUrl: [String]? + + + public enum CodingKeys: String, CodingKey { + + case itemSlug = "item_slug" + + case itemName = "item_name" + + case itemPriceDetails = "item_price_details" + + case itemBrandName = "item_brand_name" + + case itemId = "item_id" + + case itemImagesUrl = "item_images_url" + + } + + public init(itemBrandName: String? = nil, itemId: Int? = nil, itemImagesUrl: [String]? = nil, itemName: String? = nil, itemPriceDetails: ItemPriceDetails? = nil, itemSlug: String? = nil) { + + self.itemSlug = itemSlug + + self.itemName = itemName + + self.itemPriceDetails = itemPriceDetails + + self.itemBrandName = itemBrandName + + self.itemId = itemId + + self.itemImagesUrl = itemImagesUrl + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + itemSlug = try container.decode(String.self, forKey: .itemSlug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemName = try container.decode(String.self, forKey: .itemName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemPriceDetails = try container.decode(ItemPriceDetails.self, forKey: .itemPriceDetails) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemBrandName = try container.decode(String.self, forKey: .itemBrandName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemId = try container.decode(Int.self, forKey: .itemId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemImagesUrl = try container.decode([String].self, forKey: .itemImagesUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(itemSlug, forKey: .itemSlug) + + + + + try? container.encodeIfPresent(itemName, forKey: .itemName) + + + + + try? container.encodeIfPresent(itemPriceDetails, forKey: .itemPriceDetails) + + + + + try? container.encodeIfPresent(itemBrandName, forKey: .itemBrandName) + + + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + + try? container.encodeIfPresent(itemImagesUrl, forKey: .itemImagesUrl) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: FreeGiftItems + Used By: Order + */ + + class FreeGiftItems: Codable { + + + public var itemSlug: String? + + public var itemName: String? + + public var itemPriceDetails: ItemPriceDetails? + + public var itemBrandName: String? + + public var itemId: Int? + + public var itemImagesUrl: [String]? + + + public enum CodingKeys: String, CodingKey { + + case itemSlug = "item_slug" + + case itemName = "item_name" + + case itemPriceDetails = "item_price_details" + + case itemBrandName = "item_brand_name" + + case itemId = "item_id" + + case itemImagesUrl = "item_images_url" + + } + + public init(itemBrandName: String? = nil, itemId: Int? = nil, itemImagesUrl: [String]? = nil, itemName: String? = nil, itemPriceDetails: ItemPriceDetails? = nil, itemSlug: String? = nil) { + + self.itemSlug = itemSlug + + self.itemName = itemName + + self.itemPriceDetails = itemPriceDetails + + self.itemBrandName = itemBrandName + + self.itemId = itemId + + self.itemImagesUrl = itemImagesUrl + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + itemSlug = try container.decode(String.self, forKey: .itemSlug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemName = try container.decode(String.self, forKey: .itemName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemPriceDetails = try container.decode(ItemPriceDetails.self, forKey: .itemPriceDetails) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemBrandName = try container.decode(String.self, forKey: .itemBrandName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemId = try container.decode(Int.self, forKey: .itemId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemImagesUrl = try container.decode([String].self, forKey: .itemImagesUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(itemSlug, forKey: .itemSlug) + + + + + try? container.encodeIfPresent(itemName, forKey: .itemName) + + + + + try? container.encodeIfPresent(itemPriceDetails, forKey: .itemPriceDetails) + + + + + try? container.encodeIfPresent(itemBrandName, forKey: .itemBrandName) + + + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + + try? container.encodeIfPresent(itemImagesUrl, forKey: .itemImagesUrl) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/FyndOrderIdListOrderPlatformModel.swift b/Sources/code/platform/Models/Order/FyndOrderIdListOrderPlatformModel.swift index d7ab5c4e2f..2357680533 100644 --- a/Sources/code/platform/Models/Order/FyndOrderIdListOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/FyndOrderIdListOrderPlatformModel.swift @@ -14,35 +14,17 @@ public extension PlatformClient.Order { public var fyndOrderId: [String]? - public var startDate: String? - - public var endDate: String? - - public var mobile: Int? - public enum CodingKeys: String, CodingKey { case fyndOrderId = "fynd_order_id" - case startDate = "start_date" - - case endDate = "end_date" - - case mobile = "mobile" - } - public init(endDate: String? = nil, fyndOrderId: [String]? = nil, mobile: Int? = nil, startDate: String? = nil) { + public init(fyndOrderId: [String]? = nil) { self.fyndOrderId = fyndOrderId - self.startDate = startDate - - self.endDate = endDate - - self.mobile = mobile - } required public init(from decoder: Decoder) throws { @@ -60,42 +42,6 @@ public extension PlatformClient.Order { } - - do { - startDate = try container.decode(String.self, forKey: .startDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - endDate = try container.decode(String.self, forKey: .endDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - mobile = try container.decode(Int.self, forKey: .mobile) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -106,21 +52,6 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(fyndOrderId, forKey: .fyndOrderId) - - - try? container.encodeIfPresent(startDate, forKey: .startDate) - - - - - try? container.encodeIfPresent(endDate, forKey: .endDate) - - - - - try? container.encodeIfPresent(mobile, forKey: .mobile) - - } } @@ -139,35 +70,17 @@ public extension PlatformClient.ApplicationClient.Order { public var fyndOrderId: [String]? - public var startDate: String? - - public var endDate: String? - - public var mobile: Int? - public enum CodingKeys: String, CodingKey { case fyndOrderId = "fynd_order_id" - case startDate = "start_date" - - case endDate = "end_date" - - case mobile = "mobile" - } - public init(endDate: String? = nil, fyndOrderId: [String]? = nil, mobile: Int? = nil, startDate: String? = nil) { + public init(fyndOrderId: [String]? = nil) { self.fyndOrderId = fyndOrderId - self.startDate = startDate - - self.endDate = endDate - - self.mobile = mobile - } required public init(from decoder: Decoder) throws { @@ -185,42 +98,6 @@ public extension PlatformClient.ApplicationClient.Order { } - - do { - startDate = try container.decode(String.self, forKey: .startDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - endDate = try container.decode(String.self, forKey: .endDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - mobile = try container.decode(Int.self, forKey: .mobile) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -231,21 +108,6 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(fyndOrderId, forKey: .fyndOrderId) - - - try? container.encodeIfPresent(startDate, forKey: .startDate) - - - - - try? container.encodeIfPresent(endDate, forKey: .endDate) - - - - - try? container.encodeIfPresent(mobile, forKey: .mobile) - - } } diff --git a/Sources/code/platform/Models/Order/GenerateInvoiceIDErrorResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/GenerateInvoiceIDErrorResponseSchemaOrderPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Order/GenerateInvoiceIDErrorResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/GenerateInvoiceIDErrorResponseSchemaOrderPlatformModel.swift index f96f86834d..f981493127 100644 --- a/Sources/code/platform/Models/Order/GenerateInvoiceIDErrorResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/GenerateInvoiceIDErrorResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: GenerateInvoiceIDErrorResponse + Model: GenerateInvoiceIDErrorResponseSchema Used By: Order */ - class GenerateInvoiceIDErrorResponse: Codable { + class GenerateInvoiceIDErrorResponseSchema: Codable { public var items: [GenerateInvoiceIDErrorResponseData]? @@ -61,11 +61,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: GenerateInvoiceIDErrorResponse + Model: GenerateInvoiceIDErrorResponseSchema Used By: Order */ - class GenerateInvoiceIDErrorResponse: Codable { + class GenerateInvoiceIDErrorResponseSchema: Codable { public var items: [GenerateInvoiceIDErrorResponseData]? diff --git a/Sources/code/platform/Models/Order/GenerateInvoiceIDResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/GenerateInvoiceIDResponseSchemaOrderPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Order/GenerateInvoiceIDResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/GenerateInvoiceIDResponseSchemaOrderPlatformModel.swift index b15e8e488b..9f582eadd7 100644 --- a/Sources/code/platform/Models/Order/GenerateInvoiceIDResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/GenerateInvoiceIDResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: GenerateInvoiceIDResponse + Model: GenerateInvoiceIDResponseSchema Used By: Order */ - class GenerateInvoiceIDResponse: Codable { + class GenerateInvoiceIDResponseSchema: Codable { public var items: [GenerateInvoiceIDResponseData]? @@ -61,11 +61,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: GenerateInvoiceIDResponse + Model: GenerateInvoiceIDResponseSchema Used By: Order */ - class GenerateInvoiceIDResponse: Codable { + class GenerateInvoiceIDResponseSchema: Codable { public var items: [GenerateInvoiceIDResponseData]? diff --git a/Sources/code/platform/Models/Order/GeneratePosOrderReceiptResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/GeneratePosOrderReceiptResponseSchemaOrderPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Order/GeneratePosOrderReceiptResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/GeneratePosOrderReceiptResponseSchemaOrderPlatformModel.swift index ff7c956c20..f2e57f5dac 100644 --- a/Sources/code/platform/Models/Order/GeneratePosOrderReceiptResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/GeneratePosOrderReceiptResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: GeneratePosOrderReceiptResponse + Model: GeneratePosOrderReceiptResponseSchema Used By: Order */ - class GeneratePosOrderReceiptResponse: Codable { + class GeneratePosOrderReceiptResponseSchema: Codable { public var customerCnReceipt: String? @@ -245,11 +245,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: GeneratePosOrderReceiptResponse + Model: GeneratePosOrderReceiptResponseSchema Used By: Order */ - class GeneratePosOrderReceiptResponse: Codable { + class GeneratePosOrderReceiptResponseSchema: Codable { public var customerCnReceipt: String? diff --git a/Sources/code/platform/Models/Order/GeoLocationSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/GeoLocationSchemaOrderPlatformModel.swift deleted file mode 100644 index e484fcd209..0000000000 --- a/Sources/code/platform/Models/Order/GeoLocationSchemaOrderPlatformModel.swift +++ /dev/null @@ -1,162 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Order { - /* - Model: GeoLocationSchema - Used By: Order - */ - - class GeoLocationSchema: Codable { - - - public var latitude: Double? - - public var longitude: Double? - - - public enum CodingKeys: String, CodingKey { - - case latitude = "latitude" - - case longitude = "longitude" - - } - - public init(latitude: Double? = nil, longitude: Double? = nil) { - - self.latitude = latitude - - self.longitude = longitude - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - latitude = try container.decode(Double.self, forKey: .latitude) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - longitude = try container.decode(Double.self, forKey: .longitude) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(latitude, forKey: .latitude) - - - - - try? container.encodeIfPresent(longitude, forKey: .longitude) - - - } - - } -} - - - -public extension PlatformClient.ApplicationClient.Order { - /* - Model: GeoLocationSchema - Used By: Order - */ - - class GeoLocationSchema: Codable { - - - public var latitude: Double? - - public var longitude: Double? - - - public enum CodingKeys: String, CodingKey { - - case latitude = "latitude" - - case longitude = "longitude" - - } - - public init(latitude: Double? = nil, longitude: Double? = nil) { - - self.latitude = latitude - - self.longitude = longitude - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - latitude = try container.decode(Double.self, forKey: .latitude) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - longitude = try container.decode(Double.self, forKey: .longitude) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(latitude, forKey: .latitude) - - - - - try? container.encodeIfPresent(longitude, forKey: .longitude) - - - } - - } -} - - diff --git a/Sources/code/platform/Models/Order/GetActionsResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/GetActionsResponseSchemaOrderPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Order/GetActionsResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/GetActionsResponseSchemaOrderPlatformModel.swift index 8524523ac3..fbfd472c56 100644 --- a/Sources/code/platform/Models/Order/GetActionsResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/GetActionsResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: GetActionsResponse + Model: GetActionsResponseSchema Used By: Order */ - class GetActionsResponse: Codable { + class GetActionsResponseSchema: Codable { public var permissions: [ActionInfo]? @@ -61,11 +61,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: GetActionsResponse + Model: GetActionsResponseSchema Used By: Order */ - class GetActionsResponse: Codable { + class GetActionsResponseSchema: Codable { public var permissions: [ActionInfo]? diff --git a/Sources/code/platform/Models/Order/GetBagsPlatformResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/GetBagsPlatformResponseSchemaOrderPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Order/GetBagsPlatformResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/GetBagsPlatformResponseSchemaOrderPlatformModel.swift index aed6c66245..fbc2a9a5ea 100644 --- a/Sources/code/platform/Models/Order/GetBagsPlatformResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/GetBagsPlatformResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: GetBagsPlatformResponse + Model: GetBagsPlatformResponseSchema Used By: Order */ - class GetBagsPlatformResponse: Codable { + class GetBagsPlatformResponseSchema: Codable { public var statusCode: Int? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: GetBagsPlatformResponse + Model: GetBagsPlatformResponseSchema Used By: Order */ - class GetBagsPlatformResponse: Codable { + class GetBagsPlatformResponseSchema: Codable { public var statusCode: Int? diff --git a/Sources/code/platform/Models/Order/HistoryDictOrderPlatformModel.swift b/Sources/code/platform/Models/Order/HistoryDictOrderPlatformModel.swift index 2400119c8c..de7eb0c9f1 100644 --- a/Sources/code/platform/Models/Order/HistoryDictOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/HistoryDictOrderPlatformModel.swift @@ -22,11 +22,9 @@ public extension PlatformClient.Order { public var createdat: String - public var createdTs: String? - public var ticketId: String? - public var type: String + public var activityType: String public var l2Detail: String? @@ -53,11 +51,9 @@ public extension PlatformClient.Order { case createdat = "createdat" - case createdTs = "created_ts" - case ticketId = "ticket_id" - case type = "type" + case activityType = "activity_type" case l2Detail = "l2_detail" @@ -73,7 +69,7 @@ public extension PlatformClient.Order { } - public init(assignedAgent: String? = nil, bagId: Int? = nil, createdat: String, createdTs: String? = nil, displayMessage: String? = nil, l1Detail: String? = nil, l2Detail: String? = nil, l3Detail: String? = nil, message: String, meta: HistoryMeta? = nil, ticketId: String? = nil, ticketUrl: String? = nil, type: String, user: String) { + public init(activityType: String, assignedAgent: String? = nil, bagId: Int? = nil, createdat: String, displayMessage: String? = nil, l1Detail: String? = nil, l2Detail: String? = nil, l3Detail: String? = nil, message: String, meta: HistoryMeta? = nil, ticketId: String? = nil, ticketUrl: String? = nil, user: String) { self.displayMessage = displayMessage @@ -85,11 +81,9 @@ public extension PlatformClient.Order { self.createdat = createdat - self.createdTs = createdTs - self.ticketId = ticketId - self.type = type + self.activityType = activityType self.l2Detail = l2Detail @@ -162,18 +156,6 @@ public extension PlatformClient.Order { - do { - createdTs = try container.decode(String.self, forKey: .createdTs) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { ticketId = try container.decode(String.self, forKey: .ticketId) @@ -186,7 +168,7 @@ public extension PlatformClient.Order { - type = try container.decode(String.self, forKey: .type) + activityType = try container.decode(String.self, forKey: .activityType) @@ -280,17 +262,12 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(createdTs, forKey: .createdTs) - - - - try? container.encodeIfPresent(ticketId, forKey: .ticketId) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(activityType, forKey: .activityType) @@ -349,11 +326,9 @@ public extension PlatformClient.ApplicationClient.Order { public var createdat: String - public var createdTs: String? - public var ticketId: String? - public var type: String + public var activityType: String public var l2Detail: String? @@ -380,11 +355,9 @@ public extension PlatformClient.ApplicationClient.Order { case createdat = "createdat" - case createdTs = "created_ts" - case ticketId = "ticket_id" - case type = "type" + case activityType = "activity_type" case l2Detail = "l2_detail" @@ -400,7 +373,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(assignedAgent: String? = nil, bagId: Int? = nil, createdat: String, createdTs: String? = nil, displayMessage: String? = nil, l1Detail: String? = nil, l2Detail: String? = nil, l3Detail: String? = nil, message: String, meta: HistoryMeta? = nil, ticketId: String? = nil, ticketUrl: String? = nil, type: String, user: String) { + public init(activityType: String, assignedAgent: String? = nil, bagId: Int? = nil, createdat: String, displayMessage: String? = nil, l1Detail: String? = nil, l2Detail: String? = nil, l3Detail: String? = nil, message: String, meta: HistoryMeta? = nil, ticketId: String? = nil, ticketUrl: String? = nil, user: String) { self.displayMessage = displayMessage @@ -412,11 +385,9 @@ public extension PlatformClient.ApplicationClient.Order { self.createdat = createdat - self.createdTs = createdTs - self.ticketId = ticketId - self.type = type + self.activityType = activityType self.l2Detail = l2Detail @@ -489,18 +460,6 @@ public extension PlatformClient.ApplicationClient.Order { - do { - createdTs = try container.decode(String.self, forKey: .createdTs) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { ticketId = try container.decode(String.self, forKey: .ticketId) @@ -513,7 +472,7 @@ public extension PlatformClient.ApplicationClient.Order { - type = try container.decode(String.self, forKey: .type) + activityType = try container.decode(String.self, forKey: .activityType) @@ -607,17 +566,12 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(createdTs, forKey: .createdTs) - - - - try? container.encodeIfPresent(ticketId, forKey: .ticketId) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(activityType, forKey: .activityType) diff --git a/Sources/code/platform/Models/Order/HistoryMetaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/HistoryMetaOrderPlatformModel.swift index 14514ce1a9..75b9c9ef88 100644 --- a/Sources/code/platform/Models/Order/HistoryMetaOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/HistoryMetaOrderPlatformModel.swift @@ -58,6 +58,16 @@ public extension PlatformClient.Order { public var message: String? + public var prevStoreName: String? + + public var prevStoreCode: String? + + public var prevStoreId: String? + + public var refundTo: String? + + public var refundInformation: [RefundInformation]? + public enum CodingKeys: String, CodingKey { @@ -107,9 +117,19 @@ public extension PlatformClient.Order { case message = "message" + case prevStoreName = "prev_store_name" + + case prevStoreCode = "prev_store_code" + + case prevStoreId = "prev_store_id" + + case refundTo = "refund_to" + + case refundInformation = "refund_information" + } - public init(activityComment: String? = nil, activityType: String? = nil, billsec: String? = nil, caller: String? = nil, callerid: String? = nil, callId: String? = nil, channelType: String? = nil, duration: String? = nil, endtime: String? = nil, message: String? = nil, reason: HistoryReason? = nil, receiver: String? = nil, recipient: String? = nil, recordpath: String? = nil, shortLink: String? = nil, slug: String? = nil, starttime: String? = nil, status: String? = nil, status1: String? = nil, status2: String? = nil, storeCode: String? = nil, storeId: Int? = nil, storeName: String? = nil) { + public init(activityComment: String? = nil, activityType: String? = nil, billsec: String? = nil, caller: String? = nil, callerid: String? = nil, callId: String? = nil, channelType: String? = nil, duration: String? = nil, endtime: String? = nil, message: String? = nil, prevStoreCode: String? = nil, prevStoreId: String? = nil, prevStoreName: String? = nil, reason: HistoryReason? = nil, receiver: String? = nil, recipient: String? = nil, recordpath: String? = nil, refundInformation: [RefundInformation]? = nil, refundTo: String? = nil, shortLink: String? = nil, slug: String? = nil, starttime: String? = nil, status: String? = nil, status1: String? = nil, status2: String? = nil, storeCode: String? = nil, storeId: Int? = nil, storeName: String? = nil) { self.storeId = storeId @@ -157,6 +177,16 @@ public extension PlatformClient.Order { self.message = message + self.prevStoreName = prevStoreName + + self.prevStoreCode = prevStoreCode + + self.prevStoreId = prevStoreId + + self.refundTo = refundTo + + self.refundInformation = refundInformation + } required public init(from decoder: Decoder) throws { @@ -438,6 +468,66 @@ public extension PlatformClient.Order { } + + do { + prevStoreName = try container.decode(String.self, forKey: .prevStoreName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + prevStoreCode = try container.decode(String.self, forKey: .prevStoreCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + prevStoreId = try container.decode(String.self, forKey: .prevStoreId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + refundTo = try container.decode(String.self, forKey: .refundTo) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + refundInformation = try container.decode([RefundInformation].self, forKey: .refundInformation) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -558,6 +648,31 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(message, forKey: .message) + + + try? container.encodeIfPresent(prevStoreName, forKey: .prevStoreName) + + + + + try? container.encodeIfPresent(prevStoreCode, forKey: .prevStoreCode) + + + + + try? container.encodeIfPresent(prevStoreId, forKey: .prevStoreId) + + + + + try? container.encodeIfPresent(refundTo, forKey: .refundTo) + + + + + try? container.encodeIfPresent(refundInformation, forKey: .refundInformation) + + } } @@ -620,6 +735,16 @@ public extension PlatformClient.ApplicationClient.Order { public var message: String? + public var prevStoreName: String? + + public var prevStoreCode: String? + + public var prevStoreId: String? + + public var refundTo: String? + + public var refundInformation: [RefundInformation]? + public enum CodingKeys: String, CodingKey { @@ -669,9 +794,19 @@ public extension PlatformClient.ApplicationClient.Order { case message = "message" + case prevStoreName = "prev_store_name" + + case prevStoreCode = "prev_store_code" + + case prevStoreId = "prev_store_id" + + case refundTo = "refund_to" + + case refundInformation = "refund_information" + } - public init(activityComment: String? = nil, activityType: String? = nil, billsec: String? = nil, caller: String? = nil, callerid: String? = nil, callId: String? = nil, channelType: String? = nil, duration: String? = nil, endtime: String? = nil, message: String? = nil, reason: HistoryReason? = nil, receiver: String? = nil, recipient: String? = nil, recordpath: String? = nil, shortLink: String? = nil, slug: String? = nil, starttime: String? = nil, status: String? = nil, status1: String? = nil, status2: String? = nil, storeCode: String? = nil, storeId: Int? = nil, storeName: String? = nil) { + public init(activityComment: String? = nil, activityType: String? = nil, billsec: String? = nil, caller: String? = nil, callerid: String? = nil, callId: String? = nil, channelType: String? = nil, duration: String? = nil, endtime: String? = nil, message: String? = nil, prevStoreCode: String? = nil, prevStoreId: String? = nil, prevStoreName: String? = nil, reason: HistoryReason? = nil, receiver: String? = nil, recipient: String? = nil, recordpath: String? = nil, refundInformation: [RefundInformation]? = nil, refundTo: String? = nil, shortLink: String? = nil, slug: String? = nil, starttime: String? = nil, status: String? = nil, status1: String? = nil, status2: String? = nil, storeCode: String? = nil, storeId: Int? = nil, storeName: String? = nil) { self.storeId = storeId @@ -719,6 +854,16 @@ public extension PlatformClient.ApplicationClient.Order { self.message = message + self.prevStoreName = prevStoreName + + self.prevStoreCode = prevStoreCode + + self.prevStoreId = prevStoreId + + self.refundTo = refundTo + + self.refundInformation = refundInformation + } required public init(from decoder: Decoder) throws { @@ -1000,6 +1145,66 @@ public extension PlatformClient.ApplicationClient.Order { } + + do { + prevStoreName = try container.decode(String.self, forKey: .prevStoreName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + prevStoreCode = try container.decode(String.self, forKey: .prevStoreCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + prevStoreId = try container.decode(String.self, forKey: .prevStoreId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + refundTo = try container.decode(String.self, forKey: .refundTo) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + refundInformation = try container.decode([RefundInformation].self, forKey: .refundInformation) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -1120,6 +1325,31 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(message, forKey: .message) + + + try? container.encodeIfPresent(prevStoreName, forKey: .prevStoreName) + + + + + try? container.encodeIfPresent(prevStoreCode, forKey: .prevStoreCode) + + + + + try? container.encodeIfPresent(prevStoreId, forKey: .prevStoreId) + + + + + try? container.encodeIfPresent(refundTo, forKey: .refundTo) + + + + + try? container.encodeIfPresent(refundInformation, forKey: .refundInformation) + + } } diff --git a/Sources/code/platform/Models/Order/InvalidateShipmentCacheNestedResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/InvalidateShipmentCacheNestedResponseSchemaOrderPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Order/InvalidateShipmentCacheNestedResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/InvalidateShipmentCacheNestedResponseSchemaOrderPlatformModel.swift index 54dd468d99..3691fc2df0 100644 --- a/Sources/code/platform/Models/Order/InvalidateShipmentCacheNestedResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/InvalidateShipmentCacheNestedResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: InvalidateShipmentCacheNestedResponse + Model: InvalidateShipmentCacheNestedResponseSchema Used By: Order */ - class InvalidateShipmentCacheNestedResponse: Codable { + class InvalidateShipmentCacheNestedResponseSchema: Codable { public var shipmentId: String? @@ -130,11 +130,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: InvalidateShipmentCacheNestedResponse + Model: InvalidateShipmentCacheNestedResponseSchema Used By: Order */ - class InvalidateShipmentCacheNestedResponse: Codable { + class InvalidateShipmentCacheNestedResponseSchema: Codable { public var shipmentId: String? diff --git a/Sources/code/platform/Models/Order/InvalidateShipmentCacheResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/InvalidateShipmentCacheResponseSchemaOrderPlatformModel.swift similarity index 86% rename from Sources/code/platform/Models/Order/InvalidateShipmentCacheResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/InvalidateShipmentCacheResponseSchemaOrderPlatformModel.swift index fa4d085402..80c8a04730 100644 --- a/Sources/code/platform/Models/Order/InvalidateShipmentCacheResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/InvalidateShipmentCacheResponseSchemaOrderPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Order { /* - Model: InvalidateShipmentCacheResponse + Model: InvalidateShipmentCacheResponseSchema Used By: Order */ - class InvalidateShipmentCacheResponse: Codable { + class InvalidateShipmentCacheResponseSchema: Codable { - public var response: [InvalidateShipmentCacheNestedResponse]? + public var response: [InvalidateShipmentCacheNestedResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -21,7 +21,7 @@ public extension PlatformClient.Order { } - public init(response: [InvalidateShipmentCacheNestedResponse]? = nil) { + public init(response: [InvalidateShipmentCacheNestedResponseSchema]? = nil) { self.response = response @@ -32,7 +32,7 @@ public extension PlatformClient.Order { do { - response = try container.decode([InvalidateShipmentCacheNestedResponse].self, forKey: .response) + response = try container.decode([InvalidateShipmentCacheNestedResponseSchema].self, forKey: .response) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,14 +61,14 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: InvalidateShipmentCacheResponse + Model: InvalidateShipmentCacheResponseSchema Used By: Order */ - class InvalidateShipmentCacheResponse: Codable { + class InvalidateShipmentCacheResponseSchema: Codable { - public var response: [InvalidateShipmentCacheNestedResponse]? + public var response: [InvalidateShipmentCacheNestedResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -77,7 +77,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(response: [InvalidateShipmentCacheNestedResponse]? = nil) { + public init(response: [InvalidateShipmentCacheNestedResponseSchema]? = nil) { self.response = response @@ -88,7 +88,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - response = try container.decode([InvalidateShipmentCacheNestedResponse].self, forKey: .response) + response = try container.decode([InvalidateShipmentCacheNestedResponseSchema].self, forKey: .response) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/ExceptionErrorResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ItemPriceDetailsOrderPlatformModel.swift similarity index 65% rename from Sources/code/platform/Models/Order/ExceptionErrorResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ItemPriceDetailsOrderPlatformModel.swift index 0b1c57d568..baf4fcb113 100644 --- a/Sources/code/platform/Models/Order/ExceptionErrorResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ItemPriceDetailsOrderPlatformModel.swift @@ -5,37 +5,37 @@ import Foundation public extension PlatformClient.Order { /* - Model: ExceptionErrorResponse + Model: ItemPriceDetails Used By: Order */ - class ExceptionErrorResponse: Codable { + class ItemPriceDetails: Codable { - public var message: String? + public var marked: PriceMinMax? - public var exception: String? + public var effective: PriceMinMax? - public var stackTrace: String? + public var currency: String? public enum CodingKeys: String, CodingKey { - case message = "message" + case marked = "marked" - case exception = "exception" + case effective = "effective" - case stackTrace = "stack_trace" + case currency = "currency" } - public init(exception: String? = nil, message: String? = nil, stackTrace: String? = nil) { + public init(currency: String? = nil, effective: PriceMinMax? = nil, marked: PriceMinMax? = nil) { - self.message = message + self.marked = marked - self.exception = exception + self.effective = effective - self.stackTrace = stackTrace + self.currency = currency } @@ -44,7 +44,7 @@ public extension PlatformClient.Order { do { - message = try container.decode(String.self, forKey: .message) + marked = try container.decode(PriceMinMax.self, forKey: .marked) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient.Order { do { - exception = try container.decode(String.self, forKey: .exception) + effective = try container.decode(PriceMinMax.self, forKey: .effective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ public extension PlatformClient.Order { do { - stackTrace = try container.decode(String.self, forKey: .stackTrace) + currency = try container.decode(String.self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -85,17 +85,17 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(message, forKey: .message) + try? container.encodeIfPresent(marked, forKey: .marked) - try? container.encodeIfPresent(exception, forKey: .exception) + try? container.encodeIfPresent(effective, forKey: .effective) - try? container.encodeIfPresent(stackTrace, forKey: .stackTrace) + try? container.encodeIfPresent(currency, forKey: .currency) } @@ -107,37 +107,37 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ExceptionErrorResponse + Model: ItemPriceDetails Used By: Order */ - class ExceptionErrorResponse: Codable { + class ItemPriceDetails: Codable { - public var message: String? + public var marked: PriceMinMax? - public var exception: String? + public var effective: PriceMinMax? - public var stackTrace: String? + public var currency: String? public enum CodingKeys: String, CodingKey { - case message = "message" + case marked = "marked" - case exception = "exception" + case effective = "effective" - case stackTrace = "stack_trace" + case currency = "currency" } - public init(exception: String? = nil, message: String? = nil, stackTrace: String? = nil) { + public init(currency: String? = nil, effective: PriceMinMax? = nil, marked: PriceMinMax? = nil) { - self.message = message + self.marked = marked - self.exception = exception + self.effective = effective - self.stackTrace = stackTrace + self.currency = currency } @@ -146,7 +146,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - message = try container.decode(String.self, forKey: .message) + marked = try container.decode(PriceMinMax.self, forKey: .marked) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - exception = try container.decode(String.self, forKey: .exception) + effective = try container.decode(PriceMinMax.self, forKey: .effective) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +170,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - stackTrace = try container.decode(String.self, forKey: .stackTrace) + currency = try container.decode(String.self, forKey: .currency) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -187,17 +187,17 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(message, forKey: .message) + try? container.encodeIfPresent(marked, forKey: .marked) - try? container.encodeIfPresent(exception, forKey: .exception) + try? container.encodeIfPresent(effective, forKey: .effective) - try? container.encodeIfPresent(stackTrace, forKey: .stackTrace) + try? container.encodeIfPresent(currency, forKey: .currency) } diff --git a/Sources/code/platform/Models/Order/JobDetailsResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/JobDetailsResponseSchemaOrderPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Order/JobDetailsResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/JobDetailsResponseSchemaOrderPlatformModel.swift index 74cfafd3ae..28f7f3573c 100644 --- a/Sources/code/platform/Models/Order/JobDetailsResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/JobDetailsResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: JobDetailsResponse + Model: JobDetailsResponseSchema Used By: Order */ - class JobDetailsResponse: Codable { + class JobDetailsResponseSchema: Codable { public var success: Bool? @@ -268,11 +268,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: JobDetailsResponse + Model: JobDetailsResponseSchema Used By: Order */ - class JobDetailsResponse: Codable { + class JobDetailsResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Order/JobFailedResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/JobFailedResponseSchemaOrderPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Order/JobFailedResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/JobFailedResponseSchemaOrderPlatformModel.swift index 24de8f11eb..385ca4e534 100644 --- a/Sources/code/platform/Models/Order/JobFailedResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/JobFailedResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: JobFailedResponse + Model: JobFailedResponseSchema Used By: Order */ - class JobFailedResponse: Codable { + class JobFailedResponseSchema: Codable { public var fileName: String? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: JobFailedResponse + Model: JobFailedResponseSchema Used By: Order */ - class JobFailedResponse: Codable { + class JobFailedResponseSchema: Codable { public var fileName: String? diff --git a/Sources/code/platform/Models/Order/LaneConfigResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/LaneConfigResponseSchemaOrderPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Order/LaneConfigResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/LaneConfigResponseSchemaOrderPlatformModel.swift index c8e6f4be17..6b8ebd4f8f 100644 --- a/Sources/code/platform/Models/Order/LaneConfigResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/LaneConfigResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: LaneConfigResponse + Model: LaneConfigResponseSchema Used By: Order */ - class LaneConfigResponse: Codable { + class LaneConfigResponseSchema: Codable { public var superLanes: [SuperLane]? @@ -61,11 +61,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: LaneConfigResponse + Model: LaneConfigResponseSchema Used By: Order */ - class LaneConfigResponse: Codable { + class LaneConfigResponseSchema: Codable { public var superLanes: [SuperLane]? diff --git a/Sources/code/platform/Models/Order/LocationDetailsOrderPlatformModel.swift b/Sources/code/platform/Models/Order/LocationDetailsOrderPlatformModel.swift new file mode 100644 index 0000000000..5f37d8a287 --- /dev/null +++ b/Sources/code/platform/Models/Order/LocationDetailsOrderPlatformModel.swift @@ -0,0 +1,166 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: LocationDetails + Used By: Order + */ + + class LocationDetails: Codable { + + + public var fulfillmentType: String + + public var articles: [ArticleDetails] + + public var fulfillmentId: Int + + + public enum CodingKeys: String, CodingKey { + + case fulfillmentType = "fulfillment_type" + + case articles = "articles" + + case fulfillmentId = "fulfillment_id" + + } + + public init(articles: [ArticleDetails], fulfillmentId: Int, fulfillmentType: String) { + + self.fulfillmentType = fulfillmentType + + self.articles = articles + + self.fulfillmentId = fulfillmentId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + fulfillmentType = try container.decode(String.self, forKey: .fulfillmentType) + + + + + articles = try container.decode([ArticleDetails].self, forKey: .articles) + + + + + fulfillmentId = try container.decode(Int.self, forKey: .fulfillmentId) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(fulfillmentType, forKey: .fulfillmentType) + + + + + try? container.encodeIfPresent(articles, forKey: .articles) + + + + + try? container.encodeIfPresent(fulfillmentId, forKey: .fulfillmentId) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: LocationDetails + Used By: Order + */ + + class LocationDetails: Codable { + + + public var fulfillmentType: String + + public var articles: [ArticleDetails] + + public var fulfillmentId: Int + + + public enum CodingKeys: String, CodingKey { + + case fulfillmentType = "fulfillment_type" + + case articles = "articles" + + case fulfillmentId = "fulfillment_id" + + } + + public init(articles: [ArticleDetails], fulfillmentId: Int, fulfillmentType: String) { + + self.fulfillmentType = fulfillmentType + + self.articles = articles + + self.fulfillmentId = fulfillmentId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + fulfillmentType = try container.decode(String.self, forKey: .fulfillmentType) + + + + + articles = try container.decode([ArticleDetails].self, forKey: .articles) + + + + + fulfillmentId = try container.decode(Int.self, forKey: .fulfillmentId) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(fulfillmentType, forKey: .fulfillmentType) + + + + + try? container.encodeIfPresent(articles, forKey: .articles) + + + + + try? container.encodeIfPresent(fulfillmentId, forKey: .fulfillmentId) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/CommonErrorResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/LockStateMessageOrderPlatformModel.swift similarity index 81% rename from Sources/code/platform/Models/Order/CommonErrorResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/LockStateMessageOrderPlatformModel.swift index 11fc07c496..b1faf841ce 100644 --- a/Sources/code/platform/Models/Order/CommonErrorResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/LockStateMessageOrderPlatformModel.swift @@ -5,29 +5,29 @@ import Foundation public extension PlatformClient.Order { /* - Model: CommonErrorResponse + Model: LockStateMessage Used By: Order */ - class CommonErrorResponse: Codable { + class LockStateMessage: Codable { - public var status: Int? + public var state: String? public var message: String? public enum CodingKeys: String, CodingKey { - case status = "status" + case state = "state" case message = "message" } - public init(message: String? = nil, status: Int? = nil) { + public init(message: String? = nil, state: String? = nil) { - self.status = status + self.state = state self.message = message @@ -38,7 +38,7 @@ public extension PlatformClient.Order { do { - status = try container.decode(Int.self, forKey: .status) + state = try container.decode(String.self, forKey: .state) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -67,7 +67,7 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(state, forKey: .state) @@ -84,29 +84,29 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: CommonErrorResponse + Model: LockStateMessage Used By: Order */ - class CommonErrorResponse: Codable { + class LockStateMessage: Codable { - public var status: Int? + public var state: String? public var message: String? public enum CodingKeys: String, CodingKey { - case status = "status" + case state = "state" case message = "message" } - public init(message: String? = nil, status: Int? = nil) { + public init(message: String? = nil, state: String? = nil) { - self.status = status + self.state = state self.message = message @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - status = try container.decode(Int.self, forKey: .status) + state = try container.decode(String.self, forKey: .state) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +146,7 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(state, forKey: .state) diff --git a/Sources/code/platform/Models/Order/ManifestFiltersResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ManifestFiltersResponseSchemaOrderPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Order/ManifestFiltersResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ManifestFiltersResponseSchemaOrderPlatformModel.swift index e3b35dd2ac..cdf90825af 100644 --- a/Sources/code/platform/Models/Order/ManifestFiltersResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ManifestFiltersResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: ManifestFiltersResponse + Model: ManifestFiltersResponseSchema Used By: Order */ - class ManifestFiltersResponse: Codable { + class ManifestFiltersResponseSchema: Codable { public var advanceFilter: [FiltersInfo]? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ManifestFiltersResponse + Model: ManifestFiltersResponseSchema Used By: Order */ - class ManifestFiltersResponse: Codable { + class ManifestFiltersResponseSchema: Codable { public var advanceFilter: [FiltersInfo]? diff --git a/Sources/code/platform/Models/Order/ManifestResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ManifestResponseSchemaOrderPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Order/ManifestResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ManifestResponseSchemaOrderPlatformModel.swift index 30c30b47b7..6409f6bc5f 100644 --- a/Sources/code/platform/Models/Order/ManifestResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ManifestResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: ManifestResponse + Model: ManifestResponseSchema Used By: Order */ - class ManifestResponse: Codable { + class ManifestResponseSchema: Codable { public var items: ManifestItems? @@ -61,11 +61,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ManifestResponse + Model: ManifestResponseSchema Used By: Order */ - class ManifestResponse: Codable { + class ManifestResponseSchema: Codable { public var items: ManifestItems? diff --git a/Sources/code/platform/Models/Order/ManifestShipmentListingOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ManifestShipmentListingOrderPlatformModel.swift index 91fe510f95..36ce3aa972 100644 --- a/Sources/code/platform/Models/Order/ManifestShipmentListingOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ManifestShipmentListingOrderPlatformModel.swift @@ -14,15 +14,15 @@ public extension PlatformClient.Order { public var totalCount: Int - public var lane: String + public var lane: String? public var page: ManifestPageInfo public var success: Bool - public var status: Int? + public var status: Int - public var items: [ManifestItemDetails] + public var items: [ManifestItemDetails]? public var message: String? @@ -45,7 +45,7 @@ public extension PlatformClient.Order { } - public init(items: [ManifestItemDetails], lane: String, message: String? = nil, page: ManifestPageInfo, status: Int? = nil, success: Bool, totalCount: Int) { + public init(items: [ManifestItemDetails]? = nil, lane: String? = nil, message: String? = nil, page: ManifestPageInfo, status: Int, success: Bool, totalCount: Int) { self.totalCount = totalCount @@ -72,9 +72,16 @@ public extension PlatformClient.Order { - lane = try container.decode(String.self, forKey: .lane) + do { + lane = try container.decode(String.self, forKey: .lane) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - page = try container.decode(ManifestPageInfo.self, forKey: .page) @@ -87,8 +94,13 @@ public extension PlatformClient.Order { + status = try container.decode(Int.self, forKey: .status) + + + + do { - status = try container.decode(Int.self, forKey: .status) + items = try container.decode([ManifestItemDetails].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -99,11 +111,6 @@ public extension PlatformClient.Order { - items = try container.decode([ManifestItemDetails].self, forKey: .items) - - - - do { message = try container.decode(String.self, forKey: .message) @@ -173,15 +180,15 @@ public extension PlatformClient.ApplicationClient.Order { public var totalCount: Int - public var lane: String + public var lane: String? public var page: ManifestPageInfo public var success: Bool - public var status: Int? + public var status: Int - public var items: [ManifestItemDetails] + public var items: [ManifestItemDetails]? public var message: String? @@ -204,7 +211,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(items: [ManifestItemDetails], lane: String, message: String? = nil, page: ManifestPageInfo, status: Int? = nil, success: Bool, totalCount: Int) { + public init(items: [ManifestItemDetails]? = nil, lane: String? = nil, message: String? = nil, page: ManifestPageInfo, status: Int, success: Bool, totalCount: Int) { self.totalCount = totalCount @@ -231,9 +238,16 @@ public extension PlatformClient.ApplicationClient.Order { - lane = try container.decode(String.self, forKey: .lane) + do { + lane = try container.decode(String.self, forKey: .lane) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - page = try container.decode(ManifestPageInfo.self, forKey: .page) @@ -246,8 +260,13 @@ public extension PlatformClient.ApplicationClient.Order { + status = try container.decode(Int.self, forKey: .status) + + + + do { - status = try container.decode(Int.self, forKey: .status) + items = try container.decode([ManifestItemDetails].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -258,11 +277,6 @@ public extension PlatformClient.ApplicationClient.Order { - items = try container.decode([ManifestItemDetails].self, forKey: .items) - - - - do { message = try container.decode(String.self, forKey: .message) diff --git a/Sources/code/platform/Models/Order/MarketPlacePdfOrderPlatformModel.swift b/Sources/code/platform/Models/Order/MarketPlacePdfOrderPlatformModel.swift new file mode 100644 index 0000000000..6b458fbf64 --- /dev/null +++ b/Sources/code/platform/Models/Order/MarketPlacePdfOrderPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: MarketPlacePdf + Used By: Order + */ + + class MarketPlacePdf: Codable { + + + public var invoice: String? + + public var label: String? + + + public enum CodingKeys: String, CodingKey { + + case invoice = "invoice" + + case label = "label" + + } + + public init(invoice: String? = nil, label: String? = nil) { + + self.invoice = invoice + + self.label = label + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + invoice = try container.decode(String.self, forKey: .invoice) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + label = try container.decode(String.self, forKey: .label) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(invoice, forKey: .invoice) + + + + + try? container.encodeIfPresent(label, forKey: .label) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: MarketPlacePdf + Used By: Order + */ + + class MarketPlacePdf: Codable { + + + public var invoice: String? + + public var label: String? + + + public enum CodingKeys: String, CodingKey { + + case invoice = "invoice" + + case label = "label" + + } + + public init(invoice: String? = nil, label: String? = nil) { + + self.invoice = invoice + + self.label = label + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + invoice = try container.decode(String.self, forKey: .invoice) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + label = try container.decode(String.self, forKey: .label) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(invoice, forKey: .invoice) + + + + + try? container.encodeIfPresent(label, forKey: .label) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/OrderBagsOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderBagsOrderPlatformModel.swift index c36ee079e5..918b0e6f7e 100644 --- a/Sources/code/platform/Models/Order/OrderBagsOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/OrderBagsOrderPlatformModel.swift @@ -24,7 +24,7 @@ public extension PlatformClient.Order { public var sellerIdentifier: String? - public var deliveryAddress: PlatformDeliveryAddress? + public var deliveryAddress: Address? public var article: OrderBagArticle? @@ -58,6 +58,10 @@ public extension PlatformClient.Order { public var prices: Prices? + public var charges: [PriceAdjustmentCharge]? + + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public var currentStatus: CurrentStatus? public var bagId: Int @@ -115,6 +119,10 @@ public extension PlatformClient.Order { case prices = "prices" + case charges = "charges" + + case orderingCurrencyPrices = "ordering_currency_prices" + case currentStatus = "current_status" case bagId = "bag_id" @@ -125,7 +133,7 @@ public extension PlatformClient.Order { } - public init(affiliateBagDetails: AffiliateBagsDetails? = nil, appliedPromos: [AppliedPromos]? = nil, article: OrderBagArticle? = nil, bagConfigs: BagConfigs? = nil, bagId: Int, bagStatus: [BagStatusHistory]? = nil, brand: OrderBrandName? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, currentStatus: CurrentStatus? = nil, deliveryAddress: PlatformDeliveryAddress? = nil, displayName: String? = nil, entityType: String? = nil, financialBreakup: FinancialBreakup? = nil, groupId: String? = nil, gstDetails: GSTDetailsData? = nil, identifier: String? = nil, isParent: Bool? = nil, item: PlatformItem? = nil, lineNumber: Int? = nil, meta: [String: Any]? = nil, parentPromoBags: [String: Any]? = nil, paymentInfo: [BagPaymentMethods]? = nil, paymentMethods: [BagPaymentMethods]? = nil, prices: Prices? = nil, quantity: Int? = nil, sellerIdentifier: String? = nil) { + public init(affiliateBagDetails: AffiliateBagsDetails? = nil, appliedPromos: [AppliedPromos]? = nil, article: OrderBagArticle? = nil, bagConfigs: BagConfigs? = nil, bagId: Int, bagStatus: [BagStatusHistory]? = nil, brand: OrderBrandName? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, charges: [PriceAdjustmentCharge]? = nil, currentStatus: CurrentStatus? = nil, deliveryAddress: Address? = nil, displayName: String? = nil, entityType: String? = nil, financialBreakup: FinancialBreakup? = nil, groupId: String? = nil, gstDetails: GSTDetailsData? = nil, identifier: String? = nil, isParent: Bool? = nil, item: PlatformItem? = nil, lineNumber: Int? = nil, meta: [String: Any]? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, parentPromoBags: [String: Any]? = nil, paymentInfo: [BagPaymentMethods]? = nil, paymentMethods: [BagPaymentMethods]? = nil, prices: Prices? = nil, quantity: Int? = nil, sellerIdentifier: String? = nil) { self.gstDetails = gstDetails @@ -173,6 +181,10 @@ public extension PlatformClient.Order { self.prices = prices + self.charges = charges + + self.orderingCurrencyPrices = orderingCurrencyPrices + self.currentStatus = currentStatus self.bagId = bagId @@ -260,7 +272,7 @@ public extension PlatformClient.Order { do { - deliveryAddress = try container.decode(PlatformDeliveryAddress.self, forKey: .deliveryAddress) + deliveryAddress = try container.decode(Address.self, forKey: .deliveryAddress) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -463,6 +475,30 @@ public extension PlatformClient.Order { + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { currentStatus = try container.decode(CurrentStatus.self, forKey: .currentStatus) @@ -625,6 +661,16 @@ public extension PlatformClient.Order { + try? container.encodeIfPresent(charges, forKey: .charges) + + + + + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + + + try? container.encodeIfPresent(currentStatus, forKey: .currentStatus) @@ -671,7 +717,7 @@ public extension PlatformClient.ApplicationClient.Order { public var sellerIdentifier: String? - public var deliveryAddress: PlatformDeliveryAddress? + public var deliveryAddress: Address? public var article: OrderBagArticle? @@ -705,6 +751,10 @@ public extension PlatformClient.ApplicationClient.Order { public var prices: Prices? + public var charges: [PriceAdjustmentCharge]? + + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public var currentStatus: CurrentStatus? public var bagId: Int @@ -762,6 +812,10 @@ public extension PlatformClient.ApplicationClient.Order { case prices = "prices" + case charges = "charges" + + case orderingCurrencyPrices = "ordering_currency_prices" + case currentStatus = "current_status" case bagId = "bag_id" @@ -772,7 +826,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(affiliateBagDetails: AffiliateBagsDetails? = nil, appliedPromos: [AppliedPromos]? = nil, article: OrderBagArticle? = nil, bagConfigs: BagConfigs? = nil, bagId: Int, bagStatus: [BagStatusHistory]? = nil, brand: OrderBrandName? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, currentStatus: CurrentStatus? = nil, deliveryAddress: PlatformDeliveryAddress? = nil, displayName: String? = nil, entityType: String? = nil, financialBreakup: FinancialBreakup? = nil, groupId: String? = nil, gstDetails: GSTDetailsData? = nil, identifier: String? = nil, isParent: Bool? = nil, item: PlatformItem? = nil, lineNumber: Int? = nil, meta: [String: Any]? = nil, parentPromoBags: [String: Any]? = nil, paymentInfo: [BagPaymentMethods]? = nil, paymentMethods: [BagPaymentMethods]? = nil, prices: Prices? = nil, quantity: Int? = nil, sellerIdentifier: String? = nil) { + public init(affiliateBagDetails: AffiliateBagsDetails? = nil, appliedPromos: [AppliedPromos]? = nil, article: OrderBagArticle? = nil, bagConfigs: BagConfigs? = nil, bagId: Int, bagStatus: [BagStatusHistory]? = nil, brand: OrderBrandName? = nil, canCancel: Bool? = nil, canReturn: Bool? = nil, charges: [PriceAdjustmentCharge]? = nil, currentStatus: CurrentStatus? = nil, deliveryAddress: Address? = nil, displayName: String? = nil, entityType: String? = nil, financialBreakup: FinancialBreakup? = nil, groupId: String? = nil, gstDetails: GSTDetailsData? = nil, identifier: String? = nil, isParent: Bool? = nil, item: PlatformItem? = nil, lineNumber: Int? = nil, meta: [String: Any]? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, parentPromoBags: [String: Any]? = nil, paymentInfo: [BagPaymentMethods]? = nil, paymentMethods: [BagPaymentMethods]? = nil, prices: Prices? = nil, quantity: Int? = nil, sellerIdentifier: String? = nil) { self.gstDetails = gstDetails @@ -820,6 +874,10 @@ public extension PlatformClient.ApplicationClient.Order { self.prices = prices + self.charges = charges + + self.orderingCurrencyPrices = orderingCurrencyPrices + self.currentStatus = currentStatus self.bagId = bagId @@ -907,7 +965,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - deliveryAddress = try container.decode(PlatformDeliveryAddress.self, forKey: .deliveryAddress) + deliveryAddress = try container.decode(Address.self, forKey: .deliveryAddress) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1110,6 +1168,30 @@ public extension PlatformClient.ApplicationClient.Order { + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { currentStatus = try container.decode(CurrentStatus.self, forKey: .currentStatus) @@ -1272,6 +1354,16 @@ public extension PlatformClient.ApplicationClient.Order { + try? container.encodeIfPresent(charges, forKey: .charges) + + + + + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + + + try? container.encodeIfPresent(currentStatus, forKey: .currentStatus) diff --git a/Sources/code/platform/Models/Order/OrderConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderConfigOrderPlatformModel.swift new file mode 100644 index 0000000000..d02010c992 --- /dev/null +++ b/Sources/code/platform/Models/Order/OrderConfigOrderPlatformModel.swift @@ -0,0 +1,318 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: OrderConfig + Used By: Order + */ + + class OrderConfig: Codable { + + + public var createUser: Bool? + + public var articleLookup: String? + + public var bagEndState: String? + + public var affiliate: Affiliate + + public var storeLookup: String? + + public var affiliateStoreIdMapping: [AffiliateStoreIdMapping] + + + public enum CodingKeys: String, CodingKey { + + case createUser = "create_user" + + case articleLookup = "article_lookup" + + case bagEndState = "bag_end_state" + + case affiliate = "affiliate" + + case storeLookup = "store_lookup" + + case affiliateStoreIdMapping = "affiliate_store_id_mapping" + + } + + public init(affiliate: Affiliate, affiliateStoreIdMapping: [AffiliateStoreIdMapping], articleLookup: String? = nil, bagEndState: String? = nil, createUser: Bool? = nil, storeLookup: String? = nil) { + + self.createUser = createUser + + self.articleLookup = articleLookup + + self.bagEndState = bagEndState + + self.affiliate = affiliate + + self.storeLookup = storeLookup + + self.affiliateStoreIdMapping = affiliateStoreIdMapping + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + createUser = try container.decode(Bool.self, forKey: .createUser) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + articleLookup = try container.decode(String.self, forKey: .articleLookup) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + bagEndState = try container.decode(String.self, forKey: .bagEndState) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + affiliate = try container.decode(Affiliate.self, forKey: .affiliate) + + + + + do { + storeLookup = try container.decode(String.self, forKey: .storeLookup) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + affiliateStoreIdMapping = try container.decode([AffiliateStoreIdMapping].self, forKey: .affiliateStoreIdMapping) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(createUser, forKey: .createUser) + + + + + try? container.encodeIfPresent(articleLookup, forKey: .articleLookup) + + + + + try? container.encodeIfPresent(bagEndState, forKey: .bagEndState) + + + + + try? container.encodeIfPresent(affiliate, forKey: .affiliate) + + + + + try? container.encodeIfPresent(storeLookup, forKey: .storeLookup) + + + + + try? container.encodeIfPresent(affiliateStoreIdMapping, forKey: .affiliateStoreIdMapping) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: OrderConfig + Used By: Order + */ + + class OrderConfig: Codable { + + + public var createUser: Bool? + + public var articleLookup: String? + + public var bagEndState: String? + + public var affiliate: Affiliate + + public var storeLookup: String? + + public var affiliateStoreIdMapping: [AffiliateStoreIdMapping] + + + public enum CodingKeys: String, CodingKey { + + case createUser = "create_user" + + case articleLookup = "article_lookup" + + case bagEndState = "bag_end_state" + + case affiliate = "affiliate" + + case storeLookup = "store_lookup" + + case affiliateStoreIdMapping = "affiliate_store_id_mapping" + + } + + public init(affiliate: Affiliate, affiliateStoreIdMapping: [AffiliateStoreIdMapping], articleLookup: String? = nil, bagEndState: String? = nil, createUser: Bool? = nil, storeLookup: String? = nil) { + + self.createUser = createUser + + self.articleLookup = articleLookup + + self.bagEndState = bagEndState + + self.affiliate = affiliate + + self.storeLookup = storeLookup + + self.affiliateStoreIdMapping = affiliateStoreIdMapping + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + createUser = try container.decode(Bool.self, forKey: .createUser) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + articleLookup = try container.decode(String.self, forKey: .articleLookup) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + bagEndState = try container.decode(String.self, forKey: .bagEndState) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + affiliate = try container.decode(Affiliate.self, forKey: .affiliate) + + + + + do { + storeLookup = try container.decode(String.self, forKey: .storeLookup) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + affiliateStoreIdMapping = try container.decode([AffiliateStoreIdMapping].self, forKey: .affiliateStoreIdMapping) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(createUser, forKey: .createUser) + + + + + try? container.encodeIfPresent(articleLookup, forKey: .articleLookup) + + + + + try? container.encodeIfPresent(bagEndState, forKey: .bagEndState) + + + + + try? container.encodeIfPresent(affiliate, forKey: .affiliate) + + + + + try? container.encodeIfPresent(storeLookup, forKey: .storeLookup) + + + + + try? container.encodeIfPresent(affiliateStoreIdMapping, forKey: .affiliateStoreIdMapping) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/OrderDataOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderDataOrderPlatformModel.swift index b88b0558bc..e9a4ce6d28 100644 --- a/Sources/code/platform/Models/Order/OrderDataOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/OrderDataOrderPlatformModel.swift @@ -24,6 +24,10 @@ public extension PlatformClient.Order { public var prices: Prices? + public var charges: [PriceAdjustmentCharge]? + + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public var paymentMethods: [String: Any]? public var paymentInfo: [PaymentInfoData]? @@ -43,13 +47,17 @@ public extension PlatformClient.Order { case prices = "prices" + case charges = "charges" + + case orderingCurrencyPrices = "ordering_currency_prices" + case paymentMethods = "payment_methods" case paymentInfo = "payment_info" } - public init(createdTs: String? = nil, fyndOrderId: String, meta: [String: Any]? = nil, orderDate: String, paymentInfo: [PaymentInfoData]? = nil, paymentMethods: [String: Any]? = nil, prices: Prices? = nil, taxDetails: TaxDetails? = nil) { + public init(charges: [PriceAdjustmentCharge]? = nil, createdTs: String? = nil, fyndOrderId: String, meta: [String: Any]? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, orderDate: String, paymentInfo: [PaymentInfoData]? = nil, paymentMethods: [String: Any]? = nil, prices: Prices? = nil, taxDetails: TaxDetails? = nil) { self.orderDate = orderDate @@ -63,6 +71,10 @@ public extension PlatformClient.Order { self.prices = prices + self.charges = charges + + self.orderingCurrencyPrices = orderingCurrencyPrices + self.paymentMethods = paymentMethods self.paymentInfo = paymentInfo @@ -131,6 +143,30 @@ public extension PlatformClient.Order { + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { paymentMethods = try container.decode([String: Any].self, forKey: .paymentMethods) @@ -191,6 +227,16 @@ public extension PlatformClient.Order { + try? container.encodeIfPresent(charges, forKey: .charges) + + + + + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + + + try? container.encodeIfPresent(paymentMethods, forKey: .paymentMethods) @@ -227,6 +273,10 @@ public extension PlatformClient.ApplicationClient.Order { public var prices: Prices? + public var charges: [PriceAdjustmentCharge]? + + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public var paymentMethods: [String: Any]? public var paymentInfo: [PaymentInfoData]? @@ -246,13 +296,17 @@ public extension PlatformClient.ApplicationClient.Order { case prices = "prices" + case charges = "charges" + + case orderingCurrencyPrices = "ordering_currency_prices" + case paymentMethods = "payment_methods" case paymentInfo = "payment_info" } - public init(createdTs: String? = nil, fyndOrderId: String, meta: [String: Any]? = nil, orderDate: String, paymentInfo: [PaymentInfoData]? = nil, paymentMethods: [String: Any]? = nil, prices: Prices? = nil, taxDetails: TaxDetails? = nil) { + public init(charges: [PriceAdjustmentCharge]? = nil, createdTs: String? = nil, fyndOrderId: String, meta: [String: Any]? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, orderDate: String, paymentInfo: [PaymentInfoData]? = nil, paymentMethods: [String: Any]? = nil, prices: Prices? = nil, taxDetails: TaxDetails? = nil) { self.orderDate = orderDate @@ -266,6 +320,10 @@ public extension PlatformClient.ApplicationClient.Order { self.prices = prices + self.charges = charges + + self.orderingCurrencyPrices = orderingCurrencyPrices + self.paymentMethods = paymentMethods self.paymentInfo = paymentInfo @@ -334,6 +392,30 @@ public extension PlatformClient.ApplicationClient.Order { + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { paymentMethods = try container.decode([String: Any].self, forKey: .paymentMethods) @@ -394,6 +476,16 @@ public extension PlatformClient.ApplicationClient.Order { + try? container.encodeIfPresent(charges, forKey: .charges) + + + + + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + + + try? container.encodeIfPresent(paymentMethods, forKey: .paymentMethods) diff --git a/Sources/code/platform/Models/Order/OrderDataUpdatesOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderDataUpdatesOrderPlatformModel.swift new file mode 100644 index 0000000000..af2986760c --- /dev/null +++ b/Sources/code/platform/Models/Order/OrderDataUpdatesOrderPlatformModel.swift @@ -0,0 +1,116 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: OrderDataUpdates + Used By: Order + */ + + class OrderDataUpdates: Codable { + + + public var data: [String: Any]? + + + public enum CodingKeys: String, CodingKey { + + case data = "data" + + } + + public init(data: [String: Any]? = nil) { + + 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) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(data, forKey: .data) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: OrderDataUpdates + Used By: Order + */ + + class OrderDataUpdates: Codable { + + + public var data: [String: Any]? + + + public enum CodingKeys: String, CodingKey { + + case data = "data" + + } + + public init(data: [String: Any]? = nil) { + + 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) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(data, forKey: .data) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/OrderDetailsOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderDetailsOrderPlatformModel.swift index d978b9f4f7..acc61c2bf6 100644 --- a/Sources/code/platform/Models/Order/OrderDetailsOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/OrderDetailsOrderPlatformModel.swift @@ -74,6 +74,8 @@ public extension PlatformClient.Order { public var prices: Prices? + public var charges: [PriceAdjustmentCharge]? + public enum CodingKeys: String, CodingKey { @@ -139,9 +141,11 @@ public extension PlatformClient.Order { case prices = "prices" + case charges = "charges" + } - public init(affiliateId: String? = nil, affiliateOrderDate: String? = nil, affiliateOrderId: String? = nil, cashbackApplied: Double? = nil, cashbackValue: Double? = nil, codCharges: Double? = nil, collectBy: String? = nil, couponValue: Double? = nil, createdAt: String? = nil, createdTime: String? = nil, currency: String? = nil, deliveryCharges: Double? = nil, discount: Double? = nil, fyndCredits: Double? = nil, fyndOrderId: String? = nil, headers: [String: Any]? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, mongoCartId: Double? = nil, orderingChannel: String? = nil, orderingChannelLogo: String? = nil, orderValue: Double? = nil, paymentMethods: [String: Any]? = nil, paymentModeId: Double? = nil, prices: Prices? = nil, promotionEffectiveDiscount: Double? = nil, refundBy: String? = nil, taxDetails: TaxDetails? = nil, totalOrderValue: Double? = nil, transactionId: String? = nil, userId: String? = nil) { + public init(affiliateId: String? = nil, affiliateOrderDate: String? = nil, affiliateOrderId: String? = nil, cashbackApplied: Double? = nil, cashbackValue: Double? = nil, charges: [PriceAdjustmentCharge]? = nil, codCharges: Double? = nil, collectBy: String? = nil, couponValue: Double? = nil, createdAt: String? = nil, createdTime: String? = nil, currency: String? = nil, deliveryCharges: Double? = nil, discount: Double? = nil, fyndCredits: Double? = nil, fyndOrderId: String? = nil, headers: [String: Any]? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, mongoCartId: Double? = nil, orderingChannel: String? = nil, orderingChannelLogo: String? = nil, orderValue: Double? = nil, paymentMethods: [String: Any]? = nil, paymentModeId: Double? = nil, prices: Prices? = nil, promotionEffectiveDiscount: Double? = nil, refundBy: String? = nil, taxDetails: TaxDetails? = nil, totalOrderValue: Double? = nil, transactionId: String? = nil, userId: String? = nil) { self.fyndOrderId = fyndOrderId @@ -205,6 +209,8 @@ public extension PlatformClient.Order { self.prices = prices + self.charges = charges + } required public init(from decoder: Decoder) throws { @@ -582,6 +588,18 @@ public extension PlatformClient.Order { } + + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -742,6 +760,11 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(prices, forKey: .prices) + + + try? container.encodeIfPresent(charges, forKey: .charges) + + } } @@ -820,6 +843,8 @@ public extension PlatformClient.ApplicationClient.Order { public var prices: Prices? + public var charges: [PriceAdjustmentCharge]? + public enum CodingKeys: String, CodingKey { @@ -885,9 +910,11 @@ public extension PlatformClient.ApplicationClient.Order { case prices = "prices" + case charges = "charges" + } - public init(affiliateId: String? = nil, affiliateOrderDate: String? = nil, affiliateOrderId: String? = nil, cashbackApplied: Double? = nil, cashbackValue: Double? = nil, codCharges: Double? = nil, collectBy: String? = nil, couponValue: Double? = nil, createdAt: String? = nil, createdTime: String? = nil, currency: String? = nil, deliveryCharges: Double? = nil, discount: Double? = nil, fyndCredits: Double? = nil, fyndOrderId: String? = nil, headers: [String: Any]? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, mongoCartId: Double? = nil, orderingChannel: String? = nil, orderingChannelLogo: String? = nil, orderValue: Double? = nil, paymentMethods: [String: Any]? = nil, paymentModeId: Double? = nil, prices: Prices? = nil, promotionEffectiveDiscount: Double? = nil, refundBy: String? = nil, taxDetails: TaxDetails? = nil, totalOrderValue: Double? = nil, transactionId: String? = nil, userId: String? = nil) { + public init(affiliateId: String? = nil, affiliateOrderDate: String? = nil, affiliateOrderId: String? = nil, cashbackApplied: Double? = nil, cashbackValue: Double? = nil, charges: [PriceAdjustmentCharge]? = nil, codCharges: Double? = nil, collectBy: String? = nil, couponValue: Double? = nil, createdAt: String? = nil, createdTime: String? = nil, currency: String? = nil, deliveryCharges: Double? = nil, discount: Double? = nil, fyndCredits: Double? = nil, fyndOrderId: String? = nil, headers: [String: Any]? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, mongoCartId: Double? = nil, orderingChannel: String? = nil, orderingChannelLogo: String? = nil, orderValue: Double? = nil, paymentMethods: [String: Any]? = nil, paymentModeId: Double? = nil, prices: Prices? = nil, promotionEffectiveDiscount: Double? = nil, refundBy: String? = nil, taxDetails: TaxDetails? = nil, totalOrderValue: Double? = nil, transactionId: String? = nil, userId: String? = nil) { self.fyndOrderId = fyndOrderId @@ -951,6 +978,8 @@ public extension PlatformClient.ApplicationClient.Order { self.prices = prices + self.charges = charges + } required public init(from decoder: Decoder) throws { @@ -1328,6 +1357,18 @@ public extension PlatformClient.ApplicationClient.Order { } + + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -1488,6 +1529,11 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(prices, forKey: .prices) + + + try? container.encodeIfPresent(charges, forKey: .charges) + + } } diff --git a/Sources/code/platform/Models/Order/OrderDetailsResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderDetailsResponseSchemaOrderPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Order/OrderDetailsResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/OrderDetailsResponseSchemaOrderPlatformModel.swift index da14a2966d..342224bcda 100644 --- a/Sources/code/platform/Models/Order/OrderDetailsResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/OrderDetailsResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: OrderDetailsResponse + Model: OrderDetailsResponseSchema Used By: Order */ - class OrderDetailsResponse: Codable { + class OrderDetailsResponseSchema: Codable { public var order: OrderData? @@ -100,11 +100,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: OrderDetailsResponse + Model: OrderDetailsResponseSchema Used By: Order */ - class OrderDetailsResponse: Codable { + class OrderDetailsResponseSchema: Codable { public var order: OrderData? diff --git a/Sources/code/platform/Models/Order/OrderInfoOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderInfoOrderPlatformModel.swift new file mode 100644 index 0000000000..b63e7a245d --- /dev/null +++ b/Sources/code/platform/Models/Order/OrderInfoOrderPlatformModel.swift @@ -0,0 +1,620 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: OrderInfo + Used By: Order + */ + + class OrderInfo: Codable { + + + public var affiliateOrderId: String? + + public var codCharges: Double + + public var items: [String: Any] + + public var discount: Double + + public var billingAddress: OrderUser + + public var payment: [String: Any]? + + public var orderPriority: OrderPriority? + + public var shipment: ShipmentData? + + public var deliveryCharges: Double + + public var shippingAddress: OrderUser + + public var orderValue: Double + + public var paymentMode: String + + public var bags: [AffiliateBag] + + public var user: UserData + + public var coupon: String? + + + public enum CodingKeys: String, CodingKey { + + case affiliateOrderId = "affiliate_order_id" + + case codCharges = "cod_charges" + + case items = "items" + + case discount = "discount" + + case billingAddress = "billing_address" + + case payment = "payment" + + case orderPriority = "order_priority" + + case shipment = "shipment" + + case deliveryCharges = "delivery_charges" + + case shippingAddress = "shipping_address" + + case orderValue = "order_value" + + case paymentMode = "payment_mode" + + case bags = "bags" + + case user = "user" + + case coupon = "coupon" + + } + + public init(affiliateOrderId: String? = nil, bags: [AffiliateBag], billingAddress: OrderUser, codCharges: Double, coupon: String? = nil, deliveryCharges: Double, discount: Double, items: [String: Any], orderPriority: OrderPriority? = nil, orderValue: Double, payment: [String: Any]? = nil, paymentMode: String, shipment: ShipmentData? = nil, shippingAddress: OrderUser, user: UserData) { + + self.affiliateOrderId = affiliateOrderId + + self.codCharges = codCharges + + self.items = items + + self.discount = discount + + self.billingAddress = billingAddress + + self.payment = payment + + self.orderPriority = orderPriority + + self.shipment = shipment + + self.deliveryCharges = deliveryCharges + + self.shippingAddress = shippingAddress + + self.orderValue = orderValue + + self.paymentMode = paymentMode + + self.bags = bags + + self.user = user + + self.coupon = coupon + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + affiliateOrderId = try container.decode(String.self, forKey: .affiliateOrderId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + codCharges = try container.decode(Double.self, forKey: .codCharges) + + + + + items = try container.decode([String: Any].self, forKey: .items) + + + + + discount = try container.decode(Double.self, forKey: .discount) + + + + + billingAddress = try container.decode(OrderUser.self, forKey: .billingAddress) + + + + + do { + payment = try container.decode([String: Any].self, forKey: .payment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderPriority = try container.decode(OrderPriority.self, forKey: .orderPriority) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipment = try container.decode(ShipmentData.self, forKey: .shipment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + deliveryCharges = try container.decode(Double.self, forKey: .deliveryCharges) + + + + + shippingAddress = try container.decode(OrderUser.self, forKey: .shippingAddress) + + + + + orderValue = try container.decode(Double.self, forKey: .orderValue) + + + + + paymentMode = try container.decode(String.self, forKey: .paymentMode) + + + + + bags = try container.decode([AffiliateBag].self, forKey: .bags) + + + + + user = try container.decode(UserData.self, forKey: .user) + + + + + do { + coupon = try container.decode(String.self, forKey: .coupon) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(affiliateOrderId, forKey: .affiliateOrderId) + + + + + try? container.encodeIfPresent(codCharges, forKey: .codCharges) + + + + + try? container.encodeIfPresent(items, forKey: .items) + + + + + try? container.encodeIfPresent(discount, forKey: .discount) + + + + + try? container.encodeIfPresent(billingAddress, forKey: .billingAddress) + + + + + try? container.encodeIfPresent(payment, forKey: .payment) + + + + + try? container.encodeIfPresent(orderPriority, forKey: .orderPriority) + + + + + try? container.encodeIfPresent(shipment, forKey: .shipment) + + + + + try? container.encodeIfPresent(deliveryCharges, forKey: .deliveryCharges) + + + + + try? container.encodeIfPresent(shippingAddress, forKey: .shippingAddress) + + + + + try? container.encodeIfPresent(orderValue, forKey: .orderValue) + + + + + try? container.encodeIfPresent(paymentMode, forKey: .paymentMode) + + + + + try? container.encodeIfPresent(bags, forKey: .bags) + + + + + try? container.encodeIfPresent(user, forKey: .user) + + + + + try? container.encodeIfPresent(coupon, forKey: .coupon) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: OrderInfo + Used By: Order + */ + + class OrderInfo: Codable { + + + public var affiliateOrderId: String? + + public var codCharges: Double + + public var items: [String: Any] + + public var discount: Double + + public var billingAddress: OrderUser + + public var payment: [String: Any]? + + public var orderPriority: OrderPriority? + + public var shipment: ShipmentData? + + public var deliveryCharges: Double + + public var shippingAddress: OrderUser + + public var orderValue: Double + + public var paymentMode: String + + public var bags: [AffiliateBag] + + public var user: UserData + + public var coupon: String? + + + public enum CodingKeys: String, CodingKey { + + case affiliateOrderId = "affiliate_order_id" + + case codCharges = "cod_charges" + + case items = "items" + + case discount = "discount" + + case billingAddress = "billing_address" + + case payment = "payment" + + case orderPriority = "order_priority" + + case shipment = "shipment" + + case deliveryCharges = "delivery_charges" + + case shippingAddress = "shipping_address" + + case orderValue = "order_value" + + case paymentMode = "payment_mode" + + case bags = "bags" + + case user = "user" + + case coupon = "coupon" + + } + + public init(affiliateOrderId: String? = nil, bags: [AffiliateBag], billingAddress: OrderUser, codCharges: Double, coupon: String? = nil, deliveryCharges: Double, discount: Double, items: [String: Any], orderPriority: OrderPriority? = nil, orderValue: Double, payment: [String: Any]? = nil, paymentMode: String, shipment: ShipmentData? = nil, shippingAddress: OrderUser, user: UserData) { + + self.affiliateOrderId = affiliateOrderId + + self.codCharges = codCharges + + self.items = items + + self.discount = discount + + self.billingAddress = billingAddress + + self.payment = payment + + self.orderPriority = orderPriority + + self.shipment = shipment + + self.deliveryCharges = deliveryCharges + + self.shippingAddress = shippingAddress + + self.orderValue = orderValue + + self.paymentMode = paymentMode + + self.bags = bags + + self.user = user + + self.coupon = coupon + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + affiliateOrderId = try container.decode(String.self, forKey: .affiliateOrderId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + codCharges = try container.decode(Double.self, forKey: .codCharges) + + + + + items = try container.decode([String: Any].self, forKey: .items) + + + + + discount = try container.decode(Double.self, forKey: .discount) + + + + + billingAddress = try container.decode(OrderUser.self, forKey: .billingAddress) + + + + + do { + payment = try container.decode([String: Any].self, forKey: .payment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderPriority = try container.decode(OrderPriority.self, forKey: .orderPriority) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipment = try container.decode(ShipmentData.self, forKey: .shipment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + deliveryCharges = try container.decode(Double.self, forKey: .deliveryCharges) + + + + + shippingAddress = try container.decode(OrderUser.self, forKey: .shippingAddress) + + + + + orderValue = try container.decode(Double.self, forKey: .orderValue) + + + + + paymentMode = try container.decode(String.self, forKey: .paymentMode) + + + + + bags = try container.decode([AffiliateBag].self, forKey: .bags) + + + + + user = try container.decode(UserData.self, forKey: .user) + + + + + do { + coupon = try container.decode(String.self, forKey: .coupon) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(affiliateOrderId, forKey: .affiliateOrderId) + + + + + try? container.encodeIfPresent(codCharges, forKey: .codCharges) + + + + + try? container.encodeIfPresent(items, forKey: .items) + + + + + try? container.encodeIfPresent(discount, forKey: .discount) + + + + + try? container.encodeIfPresent(billingAddress, forKey: .billingAddress) + + + + + try? container.encodeIfPresent(payment, forKey: .payment) + + + + + try? container.encodeIfPresent(orderPriority, forKey: .orderPriority) + + + + + try? container.encodeIfPresent(shipment, forKey: .shipment) + + + + + try? container.encodeIfPresent(deliveryCharges, forKey: .deliveryCharges) + + + + + try? container.encodeIfPresent(shippingAddress, forKey: .shippingAddress) + + + + + try? container.encodeIfPresent(orderValue, forKey: .orderValue) + + + + + try? container.encodeIfPresent(paymentMode, forKey: .paymentMode) + + + + + try? container.encodeIfPresent(bags, forKey: .bags) + + + + + try? container.encodeIfPresent(user, forKey: .user) + + + + + try? container.encodeIfPresent(coupon, forKey: .coupon) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/OrderListingResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderListingResponseSchemaOrderPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Order/OrderListingResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/OrderListingResponseSchemaOrderPlatformModel.swift index 15ecff98fa..86ef2b1337 100644 --- a/Sources/code/platform/Models/Order/OrderListingResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/OrderListingResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: OrderListingResponse + Model: OrderListingResponseSchema Used By: Order */ - class OrderListingResponse: Codable { + class OrderListingResponseSchema: Codable { public var totalCount: Int? @@ -176,11 +176,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: OrderListingResponse + Model: OrderListingResponseSchema Used By: Order */ - class OrderListingResponse: Codable { + class OrderListingResponseSchema: Codable { public var totalCount: Int? diff --git a/Sources/code/platform/Models/Order/OrderPriorityOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderPriorityOrderPlatformModel.swift new file mode 100644 index 0000000000..2b475c1d91 --- /dev/null +++ b/Sources/code/platform/Models/Order/OrderPriorityOrderPlatformModel.swift @@ -0,0 +1,208 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: OrderPriority + Used By: Order + */ + + class OrderPriority: Codable { + + + public var fulfilmentPriorityText: String? + + public var affiliatePriorityCode: String? + + public var fulfilmentPriority: Int? + + + public enum CodingKeys: String, CodingKey { + + case fulfilmentPriorityText = "fulfilment_priority_text" + + case affiliatePriorityCode = "affiliate_priority_code" + + case fulfilmentPriority = "fulfilment_priority" + + } + + public init(affiliatePriorityCode: String? = nil, fulfilmentPriority: Int? = nil, fulfilmentPriorityText: String? = nil) { + + self.fulfilmentPriorityText = fulfilmentPriorityText + + self.affiliatePriorityCode = affiliatePriorityCode + + self.fulfilmentPriority = fulfilmentPriority + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + fulfilmentPriorityText = try container.decode(String.self, forKey: .fulfilmentPriorityText) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + affiliatePriorityCode = try container.decode(String.self, forKey: .affiliatePriorityCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + fulfilmentPriority = try container.decode(Int.self, forKey: .fulfilmentPriority) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(fulfilmentPriorityText, forKey: .fulfilmentPriorityText) + + + + + try? container.encodeIfPresent(affiliatePriorityCode, forKey: .affiliatePriorityCode) + + + + + try? container.encodeIfPresent(fulfilmentPriority, forKey: .fulfilmentPriority) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: OrderPriority + Used By: Order + */ + + class OrderPriority: Codable { + + + public var fulfilmentPriorityText: String? + + public var affiliatePriorityCode: String? + + public var fulfilmentPriority: Int? + + + public enum CodingKeys: String, CodingKey { + + case fulfilmentPriorityText = "fulfilment_priority_text" + + case affiliatePriorityCode = "affiliate_priority_code" + + case fulfilmentPriority = "fulfilment_priority" + + } + + public init(affiliatePriorityCode: String? = nil, fulfilmentPriority: Int? = nil, fulfilmentPriorityText: String? = nil) { + + self.fulfilmentPriorityText = fulfilmentPriorityText + + self.affiliatePriorityCode = affiliatePriorityCode + + self.fulfilmentPriority = fulfilmentPriority + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + fulfilmentPriorityText = try container.decode(String.self, forKey: .fulfilmentPriorityText) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + affiliatePriorityCode = try container.decode(String.self, forKey: .affiliatePriorityCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + fulfilmentPriority = try container.decode(Int.self, forKey: .fulfilmentPriority) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(fulfilmentPriorityText, forKey: .fulfilmentPriorityText) + + + + + try? container.encodeIfPresent(affiliatePriorityCode, forKey: .affiliatePriorityCode) + + + + + try? container.encodeIfPresent(fulfilmentPriority, forKey: .fulfilmentPriority) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/OrderStatusOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderStatusOrderPlatformModel.swift index e2a7e2587b..13468c3527 100644 --- a/Sources/code/platform/Models/Order/OrderStatusOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/OrderStatusOrderPlatformModel.swift @@ -14,17 +14,35 @@ public extension PlatformClient.Order { public var orderDetails: [FyndOrderIdList]? + public var startDate: String + + public var endDate: String + + public var mobile: Int + public enum CodingKeys: String, CodingKey { case orderDetails = "order_details" + case startDate = "start_date" + + case endDate = "end_date" + + case mobile = "mobile" + } - public init(orderDetails: [FyndOrderIdList]? = nil) { + public init(endDate: String, mobile: Int, orderDetails: [FyndOrderIdList]? = nil, startDate: String) { self.orderDetails = orderDetails + self.startDate = startDate + + self.endDate = endDate + + self.mobile = mobile + } required public init(from decoder: Decoder) throws { @@ -42,6 +60,21 @@ public extension PlatformClient.Order { } + + startDate = try container.decode(String.self, forKey: .startDate) + + + + + endDate = try container.decode(String.self, forKey: .endDate) + + + + + mobile = try container.decode(Int.self, forKey: .mobile) + + + } public func encode(to encoder: Encoder) throws { @@ -52,6 +85,21 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(orderDetails, forKey: .orderDetails) + + + try? container.encodeIfPresent(startDate, forKey: .startDate) + + + + + try? container.encodeIfPresent(endDate, forKey: .endDate) + + + + + try? container.encodeIfPresent(mobile, forKey: .mobile) + + } } @@ -70,17 +118,35 @@ public extension PlatformClient.ApplicationClient.Order { public var orderDetails: [FyndOrderIdList]? + public var startDate: String + + public var endDate: String + + public var mobile: Int + public enum CodingKeys: String, CodingKey { case orderDetails = "order_details" + case startDate = "start_date" + + case endDate = "end_date" + + case mobile = "mobile" + } - public init(orderDetails: [FyndOrderIdList]? = nil) { + public init(endDate: String, mobile: Int, orderDetails: [FyndOrderIdList]? = nil, startDate: String) { self.orderDetails = orderDetails + self.startDate = startDate + + self.endDate = endDate + + self.mobile = mobile + } required public init(from decoder: Decoder) throws { @@ -98,6 +164,21 @@ public extension PlatformClient.ApplicationClient.Order { } + + startDate = try container.decode(String.self, forKey: .startDate) + + + + + endDate = try container.decode(String.self, forKey: .endDate) + + + + + mobile = try container.decode(Int.self, forKey: .mobile) + + + } public func encode(to encoder: Encoder) throws { @@ -108,6 +189,21 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(orderDetails, forKey: .orderDetails) + + + try? container.encodeIfPresent(startDate, forKey: .startDate) + + + + + try? container.encodeIfPresent(endDate, forKey: .endDate) + + + + + try? container.encodeIfPresent(mobile, forKey: .mobile) + + } } diff --git a/Sources/code/platform/Models/Order/OrderUserOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderUserOrderPlatformModel.swift new file mode 100644 index 0000000000..aea60db2f8 --- /dev/null +++ b/Sources/code/platform/Models/Order/OrderUserOrderPlatformModel.swift @@ -0,0 +1,450 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: OrderUser + Used By: Order + */ + + class OrderUser: Codable { + + + public var phone: Int + + public var lastName: String + + public var address1: String? + + public var state: String + + public var pincode: String + + public var firstName: String + + public var mobile: Int + + public var address2: String? + + public var email: String + + public var country: String + + public var city: String + + + public enum CodingKeys: String, CodingKey { + + case phone = "phone" + + case lastName = "last_name" + + case address1 = "address1" + + case state = "state" + + case pincode = "pincode" + + case firstName = "first_name" + + case mobile = "mobile" + + case address2 = "address2" + + case email = "email" + + case country = "country" + + case city = "city" + + } + + public init(address1: String? = nil, address2: String? = nil, city: String, country: String, email: String, firstName: String, lastName: String, mobile: Int, phone: Int, pincode: String, state: String) { + + self.phone = phone + + self.lastName = lastName + + self.address1 = address1 + + self.state = state + + self.pincode = pincode + + self.firstName = firstName + + self.mobile = mobile + + self.address2 = address2 + + self.email = email + + self.country = country + + self.city = city + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + phone = try container.decode(Int.self, forKey: .phone) + + + + + lastName = try container.decode(String.self, forKey: .lastName) + + + + + do { + address1 = try container.decode(String.self, forKey: .address1) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + state = try container.decode(String.self, forKey: .state) + + + + + pincode = try container.decode(String.self, forKey: .pincode) + + + + + firstName = try container.decode(String.self, forKey: .firstName) + + + + + mobile = try container.decode(Int.self, forKey: .mobile) + + + + + do { + 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 { + + } + + + + email = try container.decode(String.self, forKey: .email) + + + + + country = try container.decode(String.self, forKey: .country) + + + + + 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(phone, forKey: .phone) + + + + + try? container.encodeIfPresent(lastName, forKey: .lastName) + + + + + try? container.encodeIfPresent(address1, forKey: .address1) + + + + + try? container.encodeIfPresent(state, forKey: .state) + + + + + try? container.encodeIfPresent(pincode, forKey: .pincode) + + + + + try? container.encodeIfPresent(firstName, forKey: .firstName) + + + + + try? container.encodeIfPresent(mobile, forKey: .mobile) + + + + + try? container.encodeIfPresent(address2, forKey: .address2) + + + + + try? container.encodeIfPresent(email, forKey: .email) + + + + + try? container.encodeIfPresent(country, forKey: .country) + + + + + try? container.encodeIfPresent(city, forKey: .city) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: OrderUser + Used By: Order + */ + + class OrderUser: Codable { + + + public var phone: Int + + public var lastName: String + + public var address1: String? + + public var state: String + + public var pincode: String + + public var firstName: String + + public var mobile: Int + + public var address2: String? + + public var email: String + + public var country: String + + public var city: String + + + public enum CodingKeys: String, CodingKey { + + case phone = "phone" + + case lastName = "last_name" + + case address1 = "address1" + + case state = "state" + + case pincode = "pincode" + + case firstName = "first_name" + + case mobile = "mobile" + + case address2 = "address2" + + case email = "email" + + case country = "country" + + case city = "city" + + } + + public init(address1: String? = nil, address2: String? = nil, city: String, country: String, email: String, firstName: String, lastName: String, mobile: Int, phone: Int, pincode: String, state: String) { + + self.phone = phone + + self.lastName = lastName + + self.address1 = address1 + + self.state = state + + self.pincode = pincode + + self.firstName = firstName + + self.mobile = mobile + + self.address2 = address2 + + self.email = email + + self.country = country + + self.city = city + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + phone = try container.decode(Int.self, forKey: .phone) + + + + + lastName = try container.decode(String.self, forKey: .lastName) + + + + + do { + address1 = try container.decode(String.self, forKey: .address1) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + state = try container.decode(String.self, forKey: .state) + + + + + pincode = try container.decode(String.self, forKey: .pincode) + + + + + firstName = try container.decode(String.self, forKey: .firstName) + + + + + mobile = try container.decode(Int.self, forKey: .mobile) + + + + + do { + 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 { + + } + + + + email = try container.decode(String.self, forKey: .email) + + + + + country = try container.decode(String.self, forKey: .country) + + + + + 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(phone, forKey: .phone) + + + + + try? container.encodeIfPresent(lastName, forKey: .lastName) + + + + + try? container.encodeIfPresent(address1, forKey: .address1) + + + + + try? container.encodeIfPresent(state, forKey: .state) + + + + + try? container.encodeIfPresent(pincode, forKey: .pincode) + + + + + try? container.encodeIfPresent(firstName, forKey: .firstName) + + + + + try? container.encodeIfPresent(mobile, forKey: .mobile) + + + + + try? container.encodeIfPresent(address2, forKey: .address2) + + + + + try? container.encodeIfPresent(email, forKey: .email) + + + + + try? container.encodeIfPresent(country, forKey: .country) + + + + + try? container.encodeIfPresent(city, forKey: .city) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/OrderingCurrencyPricesOrderPlatformModel.swift b/Sources/code/platform/Models/Order/OrderingCurrencyPricesOrderPlatformModel.swift new file mode 100644 index 0000000000..3deb4e24cb --- /dev/null +++ b/Sources/code/platform/Models/Order/OrderingCurrencyPricesOrderPlatformModel.swift @@ -0,0 +1,1082 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: OrderingCurrencyPrices + Used By: Order + */ + + class OrderingCurrencyPrices: Codable { + + + public var refundCredit: Double? + + public var amountPaidRoundoff: Double? + + public var priceEffective: Double? + + public var promotionEffectiveDiscount: Double? + + public var pmPriceSplit: Double? + + public var refundAmount: Double? + + public var transferPrice: Double? + + public var couponEffectiveDiscount: Double? + + public var taxCollectedAtSource: Double? + + public var brandCalculatedAmount: Double? + + public var deliveryCharge: Double? + + public var cashback: Double? + + public var valueOfGood: Double? + + public var cashbackApplied: Double? + + public var codCharges: Double? + + public var priceMarked: Double? + + public var amountPaid: Double? + + public var couponValue: Double? + + public var discount: Double? + + public var fyndCredits: Double? + + public var giftPrice: Double? + + public var amountToBeCollected: Double? + + + public enum CodingKeys: String, CodingKey { + + case refundCredit = "refund_credit" + + case amountPaidRoundoff = "amount_paid_roundoff" + + case priceEffective = "price_effective" + + case promotionEffectiveDiscount = "promotion_effective_discount" + + case pmPriceSplit = "pm_price_split" + + case refundAmount = "refund_amount" + + case transferPrice = "transfer_price" + + case couponEffectiveDiscount = "coupon_effective_discount" + + case taxCollectedAtSource = "tax_collected_at_source" + + case brandCalculatedAmount = "brand_calculated_amount" + + case deliveryCharge = "delivery_charge" + + case cashback = "cashback" + + case valueOfGood = "value_of_good" + + case cashbackApplied = "cashback_applied" + + case codCharges = "cod_charges" + + case priceMarked = "price_marked" + + case amountPaid = "amount_paid" + + case couponValue = "coupon_value" + + case discount = "discount" + + case fyndCredits = "fynd_credits" + + case giftPrice = "gift_price" + + case amountToBeCollected = "amount_to_be_collected" + + } + + public init(amountPaid: Double? = nil, amountPaidRoundoff: Double? = nil, amountToBeCollected: Double? = nil, brandCalculatedAmount: Double? = nil, cashback: Double? = nil, cashbackApplied: Double? = nil, codCharges: Double? = nil, couponEffectiveDiscount: Double? = nil, couponValue: Double? = nil, deliveryCharge: Double? = nil, discount: Double? = nil, fyndCredits: Double? = nil, giftPrice: Double? = nil, pmPriceSplit: Double? = nil, priceEffective: Double? = nil, priceMarked: Double? = nil, promotionEffectiveDiscount: Double? = nil, refundAmount: Double? = nil, refundCredit: Double? = nil, taxCollectedAtSource: Double? = nil, transferPrice: Double? = nil, valueOfGood: Double? = nil) { + + self.refundCredit = refundCredit + + self.amountPaidRoundoff = amountPaidRoundoff + + self.priceEffective = priceEffective + + self.promotionEffectiveDiscount = promotionEffectiveDiscount + + self.pmPriceSplit = pmPriceSplit + + self.refundAmount = refundAmount + + self.transferPrice = transferPrice + + self.couponEffectiveDiscount = couponEffectiveDiscount + + self.taxCollectedAtSource = taxCollectedAtSource + + self.brandCalculatedAmount = brandCalculatedAmount + + self.deliveryCharge = deliveryCharge + + self.cashback = cashback + + self.valueOfGood = valueOfGood + + self.cashbackApplied = cashbackApplied + + self.codCharges = codCharges + + self.priceMarked = priceMarked + + self.amountPaid = amountPaid + + self.couponValue = couponValue + + self.discount = discount + + self.fyndCredits = fyndCredits + + self.giftPrice = giftPrice + + self.amountToBeCollected = amountToBeCollected + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + refundCredit = try container.decode(Double.self, forKey: .refundCredit) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + amountPaidRoundoff = try container.decode(Double.self, forKey: .amountPaidRoundoff) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + priceEffective = try container.decode(Double.self, forKey: .priceEffective) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + promotionEffectiveDiscount = try container.decode(Double.self, forKey: .promotionEffectiveDiscount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + pmPriceSplit = try container.decode(Double.self, forKey: .pmPriceSplit) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + refundAmount = try container.decode(Double.self, forKey: .refundAmount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + transferPrice = try container.decode(Double.self, forKey: .transferPrice) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + couponEffectiveDiscount = try container.decode(Double.self, forKey: .couponEffectiveDiscount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + taxCollectedAtSource = try container.decode(Double.self, forKey: .taxCollectedAtSource) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + brandCalculatedAmount = try container.decode(Double.self, forKey: .brandCalculatedAmount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + deliveryCharge = try container.decode(Double.self, forKey: .deliveryCharge) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + cashback = try container.decode(Double.self, forKey: .cashback) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + valueOfGood = try container.decode(Double.self, forKey: .valueOfGood) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + cashbackApplied = try container.decode(Double.self, forKey: .cashbackApplied) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + codCharges = try container.decode(Double.self, forKey: .codCharges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + priceMarked = try container.decode(Double.self, forKey: .priceMarked) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + amountPaid = try container.decode(Double.self, forKey: .amountPaid) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + couponValue = try container.decode(Double.self, forKey: .couponValue) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + discount = try container.decode(Double.self, forKey: .discount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + fyndCredits = try container.decode(Double.self, forKey: .fyndCredits) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + giftPrice = try container.decode(Double.self, forKey: .giftPrice) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + amountToBeCollected = try container.decode(Double.self, forKey: .amountToBeCollected) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(refundCredit, forKey: .refundCredit) + + + + + try? container.encodeIfPresent(amountPaidRoundoff, forKey: .amountPaidRoundoff) + + + + + try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + + + + + try? container.encodeIfPresent(promotionEffectiveDiscount, forKey: .promotionEffectiveDiscount) + + + + + try? container.encodeIfPresent(pmPriceSplit, forKey: .pmPriceSplit) + + + + + try? container.encodeIfPresent(refundAmount, forKey: .refundAmount) + + + + + try? container.encodeIfPresent(transferPrice, forKey: .transferPrice) + + + + + try? container.encodeIfPresent(couponEffectiveDiscount, forKey: .couponEffectiveDiscount) + + + + + try? container.encodeIfPresent(taxCollectedAtSource, forKey: .taxCollectedAtSource) + + + + + try? container.encodeIfPresent(brandCalculatedAmount, forKey: .brandCalculatedAmount) + + + + + try? container.encodeIfPresent(deliveryCharge, forKey: .deliveryCharge) + + + + + try? container.encodeIfPresent(cashback, forKey: .cashback) + + + + + try? container.encodeIfPresent(valueOfGood, forKey: .valueOfGood) + + + + + try? container.encodeIfPresent(cashbackApplied, forKey: .cashbackApplied) + + + + + try? container.encodeIfPresent(codCharges, forKey: .codCharges) + + + + + try? container.encodeIfPresent(priceMarked, forKey: .priceMarked) + + + + + try? container.encodeIfPresent(amountPaid, forKey: .amountPaid) + + + + + try? container.encodeIfPresent(couponValue, forKey: .couponValue) + + + + + try? container.encodeIfPresent(discount, forKey: .discount) + + + + + try? container.encodeIfPresent(fyndCredits, forKey: .fyndCredits) + + + + + try? container.encodeIfPresent(giftPrice, forKey: .giftPrice) + + + + + try? container.encodeIfPresent(amountToBeCollected, forKey: .amountToBeCollected) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: OrderingCurrencyPrices + Used By: Order + */ + + class OrderingCurrencyPrices: Codable { + + + public var refundCredit: Double? + + public var amountPaidRoundoff: Double? + + public var priceEffective: Double? + + public var promotionEffectiveDiscount: Double? + + public var pmPriceSplit: Double? + + public var refundAmount: Double? + + public var transferPrice: Double? + + public var couponEffectiveDiscount: Double? + + public var taxCollectedAtSource: Double? + + public var brandCalculatedAmount: Double? + + public var deliveryCharge: Double? + + public var cashback: Double? + + public var valueOfGood: Double? + + public var cashbackApplied: Double? + + public var codCharges: Double? + + public var priceMarked: Double? + + public var amountPaid: Double? + + public var couponValue: Double? + + public var discount: Double? + + public var fyndCredits: Double? + + public var giftPrice: Double? + + public var amountToBeCollected: Double? + + + public enum CodingKeys: String, CodingKey { + + case refundCredit = "refund_credit" + + case amountPaidRoundoff = "amount_paid_roundoff" + + case priceEffective = "price_effective" + + case promotionEffectiveDiscount = "promotion_effective_discount" + + case pmPriceSplit = "pm_price_split" + + case refundAmount = "refund_amount" + + case transferPrice = "transfer_price" + + case couponEffectiveDiscount = "coupon_effective_discount" + + case taxCollectedAtSource = "tax_collected_at_source" + + case brandCalculatedAmount = "brand_calculated_amount" + + case deliveryCharge = "delivery_charge" + + case cashback = "cashback" + + case valueOfGood = "value_of_good" + + case cashbackApplied = "cashback_applied" + + case codCharges = "cod_charges" + + case priceMarked = "price_marked" + + case amountPaid = "amount_paid" + + case couponValue = "coupon_value" + + case discount = "discount" + + case fyndCredits = "fynd_credits" + + case giftPrice = "gift_price" + + case amountToBeCollected = "amount_to_be_collected" + + } + + public init(amountPaid: Double? = nil, amountPaidRoundoff: Double? = nil, amountToBeCollected: Double? = nil, brandCalculatedAmount: Double? = nil, cashback: Double? = nil, cashbackApplied: Double? = nil, codCharges: Double? = nil, couponEffectiveDiscount: Double? = nil, couponValue: Double? = nil, deliveryCharge: Double? = nil, discount: Double? = nil, fyndCredits: Double? = nil, giftPrice: Double? = nil, pmPriceSplit: Double? = nil, priceEffective: Double? = nil, priceMarked: Double? = nil, promotionEffectiveDiscount: Double? = nil, refundAmount: Double? = nil, refundCredit: Double? = nil, taxCollectedAtSource: Double? = nil, transferPrice: Double? = nil, valueOfGood: Double? = nil) { + + self.refundCredit = refundCredit + + self.amountPaidRoundoff = amountPaidRoundoff + + self.priceEffective = priceEffective + + self.promotionEffectiveDiscount = promotionEffectiveDiscount + + self.pmPriceSplit = pmPriceSplit + + self.refundAmount = refundAmount + + self.transferPrice = transferPrice + + self.couponEffectiveDiscount = couponEffectiveDiscount + + self.taxCollectedAtSource = taxCollectedAtSource + + self.brandCalculatedAmount = brandCalculatedAmount + + self.deliveryCharge = deliveryCharge + + self.cashback = cashback + + self.valueOfGood = valueOfGood + + self.cashbackApplied = cashbackApplied + + self.codCharges = codCharges + + self.priceMarked = priceMarked + + self.amountPaid = amountPaid + + self.couponValue = couponValue + + self.discount = discount + + self.fyndCredits = fyndCredits + + self.giftPrice = giftPrice + + self.amountToBeCollected = amountToBeCollected + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + refundCredit = try container.decode(Double.self, forKey: .refundCredit) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + amountPaidRoundoff = try container.decode(Double.self, forKey: .amountPaidRoundoff) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + priceEffective = try container.decode(Double.self, forKey: .priceEffective) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + promotionEffectiveDiscount = try container.decode(Double.self, forKey: .promotionEffectiveDiscount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + pmPriceSplit = try container.decode(Double.self, forKey: .pmPriceSplit) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + refundAmount = try container.decode(Double.self, forKey: .refundAmount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + transferPrice = try container.decode(Double.self, forKey: .transferPrice) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + couponEffectiveDiscount = try container.decode(Double.self, forKey: .couponEffectiveDiscount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + taxCollectedAtSource = try container.decode(Double.self, forKey: .taxCollectedAtSource) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + brandCalculatedAmount = try container.decode(Double.self, forKey: .brandCalculatedAmount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + deliveryCharge = try container.decode(Double.self, forKey: .deliveryCharge) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + cashback = try container.decode(Double.self, forKey: .cashback) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + valueOfGood = try container.decode(Double.self, forKey: .valueOfGood) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + cashbackApplied = try container.decode(Double.self, forKey: .cashbackApplied) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + codCharges = try container.decode(Double.self, forKey: .codCharges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + priceMarked = try container.decode(Double.self, forKey: .priceMarked) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + amountPaid = try container.decode(Double.self, forKey: .amountPaid) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + couponValue = try container.decode(Double.self, forKey: .couponValue) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + discount = try container.decode(Double.self, forKey: .discount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + fyndCredits = try container.decode(Double.self, forKey: .fyndCredits) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + giftPrice = try container.decode(Double.self, forKey: .giftPrice) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + amountToBeCollected = try container.decode(Double.self, forKey: .amountToBeCollected) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(refundCredit, forKey: .refundCredit) + + + + + try? container.encodeIfPresent(amountPaidRoundoff, forKey: .amountPaidRoundoff) + + + + + try? container.encodeIfPresent(priceEffective, forKey: .priceEffective) + + + + + try? container.encodeIfPresent(promotionEffectiveDiscount, forKey: .promotionEffectiveDiscount) + + + + + try? container.encodeIfPresent(pmPriceSplit, forKey: .pmPriceSplit) + + + + + try? container.encodeIfPresent(refundAmount, forKey: .refundAmount) + + + + + try? container.encodeIfPresent(transferPrice, forKey: .transferPrice) + + + + + try? container.encodeIfPresent(couponEffectiveDiscount, forKey: .couponEffectiveDiscount) + + + + + try? container.encodeIfPresent(taxCollectedAtSource, forKey: .taxCollectedAtSource) + + + + + try? container.encodeIfPresent(brandCalculatedAmount, forKey: .brandCalculatedAmount) + + + + + try? container.encodeIfPresent(deliveryCharge, forKey: .deliveryCharge) + + + + + try? container.encodeIfPresent(cashback, forKey: .cashback) + + + + + try? container.encodeIfPresent(valueOfGood, forKey: .valueOfGood) + + + + + try? container.encodeIfPresent(cashbackApplied, forKey: .cashbackApplied) + + + + + try? container.encodeIfPresent(codCharges, forKey: .codCharges) + + + + + try? container.encodeIfPresent(priceMarked, forKey: .priceMarked) + + + + + try? container.encodeIfPresent(amountPaid, forKey: .amountPaid) + + + + + try? container.encodeIfPresent(couponValue, forKey: .couponValue) + + + + + try? container.encodeIfPresent(discount, forKey: .discount) + + + + + try? container.encodeIfPresent(fyndCredits, forKey: .fyndCredits) + + + + + try? container.encodeIfPresent(giftPrice, forKey: .giftPrice) + + + + + try? container.encodeIfPresent(amountToBeCollected, forKey: .amountToBeCollected) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/PaymentInfoOrderPlatformModel.swift b/Sources/code/platform/Models/Order/PaymentInfoOrderPlatformModel.swift index 3b34eeadfa..ec0ec12381 100644 --- a/Sources/code/platform/Models/Order/PaymentInfoOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/PaymentInfoOrderPlatformModel.swift @@ -14,8 +14,6 @@ public extension PlatformClient.Order { public var primaryMode: String - public var paymentMode: String? - public var paymentMethods: [PaymentMethod]? @@ -23,18 +21,14 @@ public extension PlatformClient.Order { case primaryMode = "primary_mode" - case paymentMode = "payment_mode" - case paymentMethods = "payment_methods" } - public init(paymentMethods: [PaymentMethod]? = nil, paymentMode: String? = nil, primaryMode: String) { + public init(paymentMethods: [PaymentMethod]? = nil, primaryMode: String) { self.primaryMode = primaryMode - self.paymentMode = paymentMode - self.paymentMethods = paymentMethods } @@ -48,18 +42,6 @@ public extension PlatformClient.Order { - do { - paymentMode = try container.decode(String.self, forKey: .paymentMode) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { paymentMethods = try container.decode([PaymentMethod].self, forKey: .paymentMethods) @@ -83,11 +65,6 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(paymentMode, forKey: .paymentMode) - - - - try? container.encodeIfPresent(paymentMethods, forKey: .paymentMethods) @@ -109,8 +86,6 @@ public extension PlatformClient.ApplicationClient.Order { public var primaryMode: String - public var paymentMode: String? - public var paymentMethods: [PaymentMethod]? @@ -118,18 +93,14 @@ public extension PlatformClient.ApplicationClient.Order { case primaryMode = "primary_mode" - case paymentMode = "payment_mode" - case paymentMethods = "payment_methods" } - public init(paymentMethods: [PaymentMethod]? = nil, paymentMode: String? = nil, primaryMode: String) { + public init(paymentMethods: [PaymentMethod]? = nil, primaryMode: String) { self.primaryMode = primaryMode - self.paymentMode = paymentMode - self.paymentMethods = paymentMethods } @@ -143,18 +114,6 @@ public extension PlatformClient.ApplicationClient.Order { - do { - paymentMode = try container.decode(String.self, forKey: .paymentMode) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { paymentMethods = try container.decode([PaymentMethod].self, forKey: .paymentMethods) @@ -178,11 +137,6 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(paymentMode, forKey: .paymentMode) - - - - try? container.encodeIfPresent(paymentMethods, forKey: .paymentMethods) diff --git a/Sources/code/platform/Models/Order/PaymentMetaDataSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/PaymentMetaDataSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..8567363a71 --- /dev/null +++ b/Sources/code/platform/Models/Order/PaymentMetaDataSchemaOrderPlatformModel.swift @@ -0,0 +1,208 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: PaymentMetaDataSchema + Used By: Order + */ + + class PaymentMetaDataSchema: Codable { + + + public var paymentGateway: String? + + public var paymentIdentifier: String? + + public var logoUrl: PaymentMetaLogoURLSchema? + + + public enum CodingKeys: String, CodingKey { + + case paymentGateway = "payment_gateway" + + case paymentIdentifier = "payment_identifier" + + case logoUrl = "logo_url" + + } + + public init(logoUrl: PaymentMetaLogoURLSchema? = nil, paymentGateway: String? = nil, paymentIdentifier: String? = nil) { + + self.paymentGateway = paymentGateway + + self.paymentIdentifier = paymentIdentifier + + self.logoUrl = logoUrl + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + paymentGateway = try container.decode(String.self, forKey: .paymentGateway) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentIdentifier = try container.decode(String.self, forKey: .paymentIdentifier) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + logoUrl = try container.decode(PaymentMetaLogoURLSchema.self, forKey: .logoUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(paymentGateway, forKey: .paymentGateway) + + + + + try? container.encodeIfPresent(paymentIdentifier, forKey: .paymentIdentifier) + + + + + try? container.encodeIfPresent(logoUrl, forKey: .logoUrl) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: PaymentMetaDataSchema + Used By: Order + */ + + class PaymentMetaDataSchema: Codable { + + + public var paymentGateway: String? + + public var paymentIdentifier: String? + + public var logoUrl: PaymentMetaLogoURLSchema? + + + public enum CodingKeys: String, CodingKey { + + case paymentGateway = "payment_gateway" + + case paymentIdentifier = "payment_identifier" + + case logoUrl = "logo_url" + + } + + public init(logoUrl: PaymentMetaLogoURLSchema? = nil, paymentGateway: String? = nil, paymentIdentifier: String? = nil) { + + self.paymentGateway = paymentGateway + + self.paymentIdentifier = paymentIdentifier + + self.logoUrl = logoUrl + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + paymentGateway = try container.decode(String.self, forKey: .paymentGateway) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentIdentifier = try container.decode(String.self, forKey: .paymentIdentifier) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + logoUrl = try container.decode(PaymentMetaLogoURLSchema.self, forKey: .logoUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(paymentGateway, forKey: .paymentGateway) + + + + + try? container.encodeIfPresent(paymentIdentifier, forKey: .paymentIdentifier) + + + + + try? container.encodeIfPresent(logoUrl, forKey: .logoUrl) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/PaymentMetaLogoURLSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/PaymentMetaLogoURLSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..21ed94e4cb --- /dev/null +++ b/Sources/code/platform/Models/Order/PaymentMetaLogoURLSchemaOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: PaymentMetaLogoURLSchema + Used By: Order + */ + + class PaymentMetaLogoURLSchema: Codable { + + + public var large: String + + public var small: String + + + public enum CodingKeys: String, CodingKey { + + case large = "large" + + case small = "small" + + } + + public init(large: String, small: String) { + + self.large = large + + self.small = small + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + large = try container.decode(String.self, forKey: .large) + + + + + small = try container.decode(String.self, forKey: .small) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(large, forKey: .large) + + + + + try? container.encodeIfPresent(small, forKey: .small) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: PaymentMetaLogoURLSchema + Used By: Order + */ + + class PaymentMetaLogoURLSchema: Codable { + + + public var large: String + + public var small: String + + + public enum CodingKeys: String, CodingKey { + + case large = "large" + + case small = "small" + + } + + public init(large: String, small: String) { + + self.large = large + + self.small = small + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + large = try container.decode(String.self, forKey: .large) + + + + + small = try container.decode(String.self, forKey: .small) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(large, forKey: .large) + + + + + try? container.encodeIfPresent(small, forKey: .small) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/PaymentMethodSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/PaymentMethodSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..55bbb62a68 --- /dev/null +++ b/Sources/code/platform/Models/Order/PaymentMethodSchemaOrderPlatformModel.swift @@ -0,0 +1,404 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: PaymentMethodSchema + Used By: Order + */ + + class PaymentMethodSchema: Codable { + + + public var name: String + + public var mode: String + + public var amount: Double + + public var meta: PaymentMetaDataSchema? + + public var identifier: String + + public var displayName: String + + public var aggregator: String + + public var action: ActionDetailSchema + + public var refundBy: String + + public var collectBy: String + + + public enum CodingKeys: String, CodingKey { + + case name = "name" + + case mode = "mode" + + case amount = "amount" + + case meta = "meta" + + case identifier = "identifier" + + case displayName = "display_name" + + case aggregator = "aggregator" + + case action = "action" + + case refundBy = "refund_by" + + case collectBy = "collect_by" + + } + + public init(action: ActionDetailSchema, aggregator: String, amount: Double, collectBy: String, displayName: String, identifier: String, meta: PaymentMetaDataSchema? = nil, mode: String, name: String, refundBy: String) { + + self.name = name + + self.mode = mode + + self.amount = amount + + self.meta = meta + + self.identifier = identifier + + self.displayName = displayName + + self.aggregator = aggregator + + self.action = action + + self.refundBy = refundBy + + self.collectBy = collectBy + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + name = try container.decode(String.self, forKey: .name) + + + + + mode = try container.decode(String.self, forKey: .mode) + + + + + amount = try container.decode(Double.self, forKey: .amount) + + + + + do { + meta = try container.decode(PaymentMetaDataSchema.self, forKey: .meta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + identifier = try container.decode(String.self, forKey: .identifier) + + + + + displayName = try container.decode(String.self, forKey: .displayName) + + + + + aggregator = try container.decode(String.self, forKey: .aggregator) + + + + + action = try container.decode(ActionDetailSchema.self, forKey: .action) + + + + + refundBy = try container.decode(String.self, forKey: .refundBy) + + + + + collectBy = try container.decode(String.self, forKey: .collectBy) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(mode, forKey: .mode) + + + + + try? container.encodeIfPresent(amount, forKey: .amount) + + + + + try? container.encodeIfPresent(meta, forKey: .meta) + + + + + try? container.encodeIfPresent(identifier, forKey: .identifier) + + + + + try? container.encodeIfPresent(displayName, forKey: .displayName) + + + + + try? container.encodeIfPresent(aggregator, forKey: .aggregator) + + + + + try? container.encodeIfPresent(action, forKey: .action) + + + + + try? container.encodeIfPresent(refundBy, forKey: .refundBy) + + + + + try? container.encodeIfPresent(collectBy, forKey: .collectBy) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: PaymentMethodSchema + Used By: Order + */ + + class PaymentMethodSchema: Codable { + + + public var name: String + + public var mode: String + + public var amount: Double + + public var meta: PaymentMetaDataSchema? + + public var identifier: String + + public var displayName: String + + public var aggregator: String + + public var action: ActionDetailSchema + + public var refundBy: String + + public var collectBy: String + + + public enum CodingKeys: String, CodingKey { + + case name = "name" + + case mode = "mode" + + case amount = "amount" + + case meta = "meta" + + case identifier = "identifier" + + case displayName = "display_name" + + case aggregator = "aggregator" + + case action = "action" + + case refundBy = "refund_by" + + case collectBy = "collect_by" + + } + + public init(action: ActionDetailSchema, aggregator: String, amount: Double, collectBy: String, displayName: String, identifier: String, meta: PaymentMetaDataSchema? = nil, mode: String, name: String, refundBy: String) { + + self.name = name + + self.mode = mode + + self.amount = amount + + self.meta = meta + + self.identifier = identifier + + self.displayName = displayName + + self.aggregator = aggregator + + self.action = action + + self.refundBy = refundBy + + self.collectBy = collectBy + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + name = try container.decode(String.self, forKey: .name) + + + + + mode = try container.decode(String.self, forKey: .mode) + + + + + amount = try container.decode(Double.self, forKey: .amount) + + + + + do { + meta = try container.decode(PaymentMetaDataSchema.self, forKey: .meta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + identifier = try container.decode(String.self, forKey: .identifier) + + + + + displayName = try container.decode(String.self, forKey: .displayName) + + + + + aggregator = try container.decode(String.self, forKey: .aggregator) + + + + + action = try container.decode(ActionDetailSchema.self, forKey: .action) + + + + + refundBy = try container.decode(String.self, forKey: .refundBy) + + + + + collectBy = try container.decode(String.self, forKey: .collectBy) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(mode, forKey: .mode) + + + + + try? container.encodeIfPresent(amount, forKey: .amount) + + + + + try? container.encodeIfPresent(meta, forKey: .meta) + + + + + try? container.encodeIfPresent(identifier, forKey: .identifier) + + + + + try? container.encodeIfPresent(displayName, forKey: .displayName) + + + + + try? container.encodeIfPresent(aggregator, forKey: .aggregator) + + + + + try? container.encodeIfPresent(action, forKey: .action) + + + + + try? container.encodeIfPresent(refundBy, forKey: .refundBy) + + + + + try? container.encodeIfPresent(collectBy, forKey: .collectBy) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/PaymentMethodsOrderPlatformModel.swift b/Sources/code/platform/Models/Order/PaymentMethodsOrderPlatformModel.swift new file mode 100644 index 0000000000..a0c0be74cf --- /dev/null +++ b/Sources/code/platform/Models/Order/PaymentMethodsOrderPlatformModel.swift @@ -0,0 +1,208 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: PaymentMethods + Used By: Order + */ + + class PaymentMethods: Codable { + + + public var collectBy: String? + + public var refundBy: String? + + public var mode: String? + + + public enum CodingKeys: String, CodingKey { + + case collectBy = "collect_by" + + case refundBy = "refund_by" + + case mode = "mode" + + } + + public init(collectBy: String? = nil, mode: String? = nil, refundBy: String? = nil) { + + self.collectBy = collectBy + + self.refundBy = refundBy + + self.mode = mode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + collectBy = try container.decode(String.self, forKey: .collectBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + refundBy = try container.decode(String.self, forKey: .refundBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(collectBy, forKey: .collectBy) + + + + + try? container.encodeIfPresent(refundBy, forKey: .refundBy) + + + + + try? container.encodeIfPresent(mode, forKey: .mode) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: PaymentMethods + Used By: Order + */ + + class PaymentMethods: Codable { + + + public var collectBy: String? + + public var refundBy: String? + + public var mode: String? + + + public enum CodingKeys: String, CodingKey { + + case collectBy = "collect_by" + + case refundBy = "refund_by" + + case mode = "mode" + + } + + public init(collectBy: String? = nil, mode: String? = nil, refundBy: String? = nil) { + + self.collectBy = collectBy + + self.refundBy = refundBy + + self.mode = mode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + collectBy = try container.decode(String.self, forKey: .collectBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + refundBy = try container.decode(String.self, forKey: .refundBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(collectBy, forKey: .collectBy) + + + + + try? container.encodeIfPresent(refundBy, forKey: .refundBy) + + + + + try? container.encodeIfPresent(mode, forKey: .mode) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/PlatformOrderItemsOrderPlatformModel.swift b/Sources/code/platform/Models/Order/PlatformOrderItemsOrderPlatformModel.swift index e5004973d4..16875cfdfa 100644 --- a/Sources/code/platform/Models/Order/PlatformOrderItemsOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/PlatformOrderItemsOrderPlatformModel.swift @@ -38,6 +38,10 @@ public extension PlatformClient.Order { public var currencyInfo: CurrencyInfo? + public var prices: Prices? + + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public enum CodingKeys: String, CodingKey { @@ -67,9 +71,13 @@ public extension PlatformClient.Order { case currencyInfo = "currency_info" + case prices = "prices" + + case orderingCurrencyPrices = "ordering_currency_prices" + } - public init(breakupValues: [PlatformBreakupValues]? = nil, channel: PlatformChannel? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, meta: [String: Any]? = nil, orderCreatedTime: String? = nil, orderCreatedTs: String? = nil, orderId: String? = nil, orderValue: Double? = nil, paymentMode: String? = nil, shipments: [PlatformShipment]? = nil, totalOrderValue: Double? = nil, userInfo: UserDataInfo? = nil) { + public init(breakupValues: [PlatformBreakupValues]? = nil, channel: PlatformChannel? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, meta: [String: Any]? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, orderCreatedTime: String? = nil, orderCreatedTs: String? = nil, orderId: String? = nil, orderValue: Double? = nil, paymentMode: String? = nil, prices: Prices? = nil, shipments: [PlatformShipment]? = nil, totalOrderValue: Double? = nil, userInfo: UserDataInfo? = nil) { self.breakupValues = breakupValues @@ -97,6 +105,10 @@ public extension PlatformClient.Order { self.currencyInfo = currencyInfo + self.prices = prices + + self.orderingCurrencyPrices = orderingCurrencyPrices + } required public init(from decoder: Decoder) throws { @@ -258,6 +270,30 @@ public extension PlatformClient.Order { } + + do { + prices = try container.decode(Prices.self, forKey: .prices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -328,6 +364,16 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(currencyInfo, forKey: .currencyInfo) + + + try? container.encodeIfPresent(prices, forKey: .prices) + + + + + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + } } @@ -370,6 +416,10 @@ public extension PlatformClient.ApplicationClient.Order { public var currencyInfo: CurrencyInfo? + public var prices: Prices? + + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public enum CodingKeys: String, CodingKey { @@ -399,9 +449,13 @@ public extension PlatformClient.ApplicationClient.Order { case currencyInfo = "currency_info" + case prices = "prices" + + case orderingCurrencyPrices = "ordering_currency_prices" + } - public init(breakupValues: [PlatformBreakupValues]? = nil, channel: PlatformChannel? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, meta: [String: Any]? = nil, orderCreatedTime: String? = nil, orderCreatedTs: String? = nil, orderId: String? = nil, orderValue: Double? = nil, paymentMode: String? = nil, shipments: [PlatformShipment]? = nil, totalOrderValue: Double? = nil, userInfo: UserDataInfo? = nil) { + public init(breakupValues: [PlatformBreakupValues]? = nil, channel: PlatformChannel? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, meta: [String: Any]? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, orderCreatedTime: String? = nil, orderCreatedTs: String? = nil, orderId: String? = nil, orderValue: Double? = nil, paymentMode: String? = nil, prices: Prices? = nil, shipments: [PlatformShipment]? = nil, totalOrderValue: Double? = nil, userInfo: UserDataInfo? = nil) { self.breakupValues = breakupValues @@ -429,6 +483,10 @@ public extension PlatformClient.ApplicationClient.Order { self.currencyInfo = currencyInfo + self.prices = prices + + self.orderingCurrencyPrices = orderingCurrencyPrices + } required public init(from decoder: Decoder) throws { @@ -590,6 +648,30 @@ public extension PlatformClient.ApplicationClient.Order { } + + do { + prices = try container.decode(Prices.self, forKey: .prices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -660,6 +742,16 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(currencyInfo, forKey: .currencyInfo) + + + try? container.encodeIfPresent(prices, forKey: .prices) + + + + + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + } } diff --git a/Sources/code/platform/Models/Order/PlatformShipmentOrderPlatformModel.swift b/Sources/code/platform/Models/Order/PlatformShipmentOrderPlatformModel.swift index 6756682d51..608cee1651 100644 --- a/Sources/code/platform/Models/Order/PlatformShipmentOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/PlatformShipmentOrderPlatformModel.swift @@ -42,9 +42,9 @@ public extension PlatformClient.Order { public var shipmentImages: [String]? - public var deliveryDetails: UserDetailsData? + public var deliveryDetails: [String: Any]? - public var billingDetails: UserDetailsData? + public var billingDetails: [String: Any]? public var forwardShipmentId: String? @@ -106,6 +106,10 @@ public extension PlatformClient.Order { public var prices: Prices? + public var charges: [PriceAdjustmentCharge]? + + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public var vertical: String? public var shipmentId: String @@ -130,7 +134,7 @@ public extension PlatformClient.Order { public var shipmentUpdateTime: Double? - public var rtoAddress: PlatformDeliveryAddress? + public var rtoAddress: Address? public var creditNoteId: String? @@ -140,6 +144,10 @@ public extension PlatformClient.Order { public var isLapaEnabled: Bool? + public var forwardEndShipmentId: String? + + public var logisticsMeta: [String: Any]? + public enum CodingKeys: String, CodingKey { @@ -237,6 +245,10 @@ public extension PlatformClient.Order { case prices = "prices" + case charges = "charges" + + case orderingCurrencyPrices = "ordering_currency_prices" + case vertical = "vertical" case shipmentId = "shipment_id" @@ -271,9 +283,13 @@ public extension PlatformClient.Order { case isLapaEnabled = "is_lapa_enabled" + case forwardEndShipmentId = "forward_end_shipment_id" + + case logisticsMeta = "logistics_meta" + } - public init(affiliateDetails: AffiliateDetails? = nil, bags: [OrderBags]? = nil, bagStatusHistory: [BagStatusHistory]? = nil, billingDetails: UserDetailsData? = nil, canUpdateDimension: Bool? = nil, companyDetails: CompanyDetails? = nil, coupon: [String: Any]? = nil, creditNoteId: String? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, customMessage: String? = nil, customMeta: [[String: Any]]? = nil, deliveryDetails: UserDetailsData? = nil, deliverySlot: [String: Any]? = nil, dpAssignment: Bool? = nil, dpDetails: DPDetailsData? = nil, enableDpTracking: Bool? = nil, estimatedSlaTime: String? = nil, estimatedSlaTs: String? = nil, forwardShipmentId: String? = nil, fulfillingStore: FulfillingStore? = nil, fulfilmentPriority: Int? = nil, gstDetails: GSTDetailsData? = nil, invoice: InvoiceInfo? = nil, invoiceId: String? = nil, isDpAssignEnabled: Bool? = nil, isLapaEnabled: Bool? = nil, isSelfShip: Bool? = nil, journeyType: String? = nil, lockStatus: Bool? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, operationalStatus: String? = nil, order: OrderDetailsData? = nil, orderingStore: OrderingStoreDetails? = nil, orderPlatform: String? = nil, orderStatus: OrderStatusData? = nil, packagingType: String? = nil, payments: ShipmentPayments? = nil, paymentInfo: [[String: Any]]? = nil, paymentMethods: [String: Any]? = nil, paymentMode: String? = nil, pdfLinks: [String: Any]? = nil, pickedDate: String? = nil, platformLogo: String? = nil, previousShipmentId: String? = nil, prices: Prices? = nil, priorityText: String? = nil, rtoAddress: PlatformDeliveryAddress? = nil, shipmentCreatedAt: String? = nil, shipmentCreatedTs: String? = nil, shipmentDetails: ShipmentLockDetails? = nil, shipmentId: String, shipmentImages: [String]? = nil, shipmentQuantity: Int? = nil, shipmentStatus: String? = nil, shipmentUpdateTime: Double? = nil, status: ShipmentStatusData? = nil, totalBags: Int? = nil, totalItems: Int? = nil, trackingList: [TrackingList]? = nil, user: UserDataInfo? = nil, userAgent: String? = nil, vertical: String? = nil) { + public init(affiliateDetails: AffiliateDetails? = nil, bags: [OrderBags]? = nil, bagStatusHistory: [BagStatusHistory]? = nil, billingDetails: [String: Any]? = nil, canUpdateDimension: Bool? = nil, charges: [PriceAdjustmentCharge]? = nil, companyDetails: CompanyDetails? = nil, coupon: [String: Any]? = nil, creditNoteId: String? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, customMessage: String? = nil, customMeta: [[String: Any]]? = nil, deliveryDetails: [String: Any]? = nil, deliverySlot: [String: Any]? = nil, dpAssignment: Bool? = nil, dpDetails: DPDetailsData? = nil, enableDpTracking: Bool? = nil, estimatedSlaTime: String? = nil, estimatedSlaTs: String? = nil, forwardEndShipmentId: String? = nil, forwardShipmentId: String? = nil, fulfillingStore: FulfillingStore? = nil, fulfilmentPriority: Int? = nil, gstDetails: GSTDetailsData? = nil, invoice: InvoiceInfo? = nil, invoiceId: String? = nil, isDpAssignEnabled: Bool? = nil, isLapaEnabled: Bool? = nil, isSelfShip: Bool? = nil, journeyType: String? = nil, lockStatus: Bool? = nil, logisticsMeta: [String: Any]? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, operationalStatus: String? = nil, order: OrderDetailsData? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, orderingStore: OrderingStoreDetails? = nil, orderPlatform: String? = nil, orderStatus: OrderStatusData? = nil, packagingType: String? = nil, payments: ShipmentPayments? = nil, paymentInfo: [[String: Any]]? = nil, paymentMethods: [String: Any]? = nil, paymentMode: String? = nil, pdfLinks: [String: Any]? = nil, pickedDate: String? = nil, platformLogo: String? = nil, previousShipmentId: String? = nil, prices: Prices? = nil, priorityText: String? = nil, rtoAddress: Address? = nil, shipmentCreatedAt: String? = nil, shipmentCreatedTs: String? = nil, shipmentDetails: ShipmentLockDetails? = nil, shipmentId: String, shipmentImages: [String]? = nil, shipmentQuantity: Int? = nil, shipmentStatus: String? = nil, shipmentUpdateTime: Double? = nil, status: ShipmentStatusData? = nil, totalBags: Int? = nil, totalItems: Int? = nil, trackingList: [TrackingList]? = nil, user: UserDataInfo? = nil, userAgent: String? = nil, vertical: String? = nil) { self.pickedDate = pickedDate @@ -369,6 +385,10 @@ public extension PlatformClient.Order { self.prices = prices + self.charges = charges + + self.orderingCurrencyPrices = orderingCurrencyPrices + self.vertical = vertical self.shipmentId = shipmentId @@ -403,6 +423,10 @@ public extension PlatformClient.Order { self.isLapaEnabled = isLapaEnabled + self.forwardEndShipmentId = forwardEndShipmentId + + self.logisticsMeta = logisticsMeta + } required public init(from decoder: Decoder) throws { @@ -590,7 +614,7 @@ public extension PlatformClient.Order { do { - deliveryDetails = try container.decode(UserDetailsData.self, forKey: .deliveryDetails) + deliveryDetails = try container.decode([String: Any].self, forKey: .deliveryDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -602,7 +626,7 @@ public extension PlatformClient.Order { do { - billingDetails = try container.decode(UserDetailsData.self, forKey: .billingDetails) + billingDetails = try container.decode([String: Any].self, forKey: .billingDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -973,6 +997,30 @@ public extension PlatformClient.Order { + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { vertical = try container.decode(String.self, forKey: .vertical) @@ -1111,7 +1159,7 @@ public extension PlatformClient.Order { do { - rtoAddress = try container.decode(PlatformDeliveryAddress.self, forKey: .rtoAddress) + rtoAddress = try container.decode(Address.self, forKey: .rtoAddress) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1169,6 +1217,30 @@ public extension PlatformClient.Order { } + + do { + forwardEndShipmentId = try container.decode(String.self, forKey: .forwardEndShipmentId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + logisticsMeta = try container.decode([String: Any].self, forKey: .logisticsMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -1411,6 +1483,16 @@ public extension PlatformClient.Order { + try? container.encodeIfPresent(charges, forKey: .charges) + + + + + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + + + try? container.encodeIfPresent(vertical, forKey: .vertical) @@ -1494,6 +1576,16 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(isLapaEnabled, forKey: .isLapaEnabled) + + + try? container.encodeIfPresent(forwardEndShipmentId, forKey: .forwardEndShipmentId) + + + + + try? container.encodeIfPresent(logisticsMeta, forKey: .logisticsMeta) + + } } @@ -1540,9 +1632,9 @@ public extension PlatformClient.ApplicationClient.Order { public var shipmentImages: [String]? - public var deliveryDetails: UserDetailsData? + public var deliveryDetails: [String: Any]? - public var billingDetails: UserDetailsData? + public var billingDetails: [String: Any]? public var forwardShipmentId: String? @@ -1604,6 +1696,10 @@ public extension PlatformClient.ApplicationClient.Order { public var prices: Prices? + public var charges: [PriceAdjustmentCharge]? + + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public var vertical: String? public var shipmentId: String @@ -1628,7 +1724,7 @@ public extension PlatformClient.ApplicationClient.Order { public var shipmentUpdateTime: Double? - public var rtoAddress: PlatformDeliveryAddress? + public var rtoAddress: Address? public var creditNoteId: String? @@ -1638,6 +1734,10 @@ public extension PlatformClient.ApplicationClient.Order { public var isLapaEnabled: Bool? + public var forwardEndShipmentId: String? + + public var logisticsMeta: [String: Any]? + public enum CodingKeys: String, CodingKey { @@ -1735,6 +1835,10 @@ public extension PlatformClient.ApplicationClient.Order { case prices = "prices" + case charges = "charges" + + case orderingCurrencyPrices = "ordering_currency_prices" + case vertical = "vertical" case shipmentId = "shipment_id" @@ -1769,9 +1873,13 @@ public extension PlatformClient.ApplicationClient.Order { case isLapaEnabled = "is_lapa_enabled" + case forwardEndShipmentId = "forward_end_shipment_id" + + case logisticsMeta = "logistics_meta" + } - public init(affiliateDetails: AffiliateDetails? = nil, bags: [OrderBags]? = nil, bagStatusHistory: [BagStatusHistory]? = nil, billingDetails: UserDetailsData? = nil, canUpdateDimension: Bool? = nil, companyDetails: CompanyDetails? = nil, coupon: [String: Any]? = nil, creditNoteId: String? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, customMessage: String? = nil, customMeta: [[String: Any]]? = nil, deliveryDetails: UserDetailsData? = nil, deliverySlot: [String: Any]? = nil, dpAssignment: Bool? = nil, dpDetails: DPDetailsData? = nil, enableDpTracking: Bool? = nil, estimatedSlaTime: String? = nil, estimatedSlaTs: String? = nil, forwardShipmentId: String? = nil, fulfillingStore: FulfillingStore? = nil, fulfilmentPriority: Int? = nil, gstDetails: GSTDetailsData? = nil, invoice: InvoiceInfo? = nil, invoiceId: String? = nil, isDpAssignEnabled: Bool? = nil, isLapaEnabled: Bool? = nil, isSelfShip: Bool? = nil, journeyType: String? = nil, lockStatus: Bool? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, operationalStatus: String? = nil, order: OrderDetailsData? = nil, orderingStore: OrderingStoreDetails? = nil, orderPlatform: String? = nil, orderStatus: OrderStatusData? = nil, packagingType: String? = nil, payments: ShipmentPayments? = nil, paymentInfo: [[String: Any]]? = nil, paymentMethods: [String: Any]? = nil, paymentMode: String? = nil, pdfLinks: [String: Any]? = nil, pickedDate: String? = nil, platformLogo: String? = nil, previousShipmentId: String? = nil, prices: Prices? = nil, priorityText: String? = nil, rtoAddress: PlatformDeliveryAddress? = nil, shipmentCreatedAt: String? = nil, shipmentCreatedTs: String? = nil, shipmentDetails: ShipmentLockDetails? = nil, shipmentId: String, shipmentImages: [String]? = nil, shipmentQuantity: Int? = nil, shipmentStatus: String? = nil, shipmentUpdateTime: Double? = nil, status: ShipmentStatusData? = nil, totalBags: Int? = nil, totalItems: Int? = nil, trackingList: [TrackingList]? = nil, user: UserDataInfo? = nil, userAgent: String? = nil, vertical: String? = nil) { + public init(affiliateDetails: AffiliateDetails? = nil, bags: [OrderBags]? = nil, bagStatusHistory: [BagStatusHistory]? = nil, billingDetails: [String: Any]? = nil, canUpdateDimension: Bool? = nil, charges: [PriceAdjustmentCharge]? = nil, companyDetails: CompanyDetails? = nil, coupon: [String: Any]? = nil, creditNoteId: String? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, customMessage: String? = nil, customMeta: [[String: Any]]? = nil, deliveryDetails: [String: Any]? = nil, deliverySlot: [String: Any]? = nil, dpAssignment: Bool? = nil, dpDetails: DPDetailsData? = nil, enableDpTracking: Bool? = nil, estimatedSlaTime: String? = nil, estimatedSlaTs: String? = nil, forwardEndShipmentId: String? = nil, forwardShipmentId: String? = nil, fulfillingStore: FulfillingStore? = nil, fulfilmentPriority: Int? = nil, gstDetails: GSTDetailsData? = nil, invoice: InvoiceInfo? = nil, invoiceId: String? = nil, isDpAssignEnabled: Bool? = nil, isLapaEnabled: Bool? = nil, isSelfShip: Bool? = nil, journeyType: String? = nil, lockStatus: Bool? = nil, logisticsMeta: [String: Any]? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, operationalStatus: String? = nil, order: OrderDetailsData? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, orderingStore: OrderingStoreDetails? = nil, orderPlatform: String? = nil, orderStatus: OrderStatusData? = nil, packagingType: String? = nil, payments: ShipmentPayments? = nil, paymentInfo: [[String: Any]]? = nil, paymentMethods: [String: Any]? = nil, paymentMode: String? = nil, pdfLinks: [String: Any]? = nil, pickedDate: String? = nil, platformLogo: String? = nil, previousShipmentId: String? = nil, prices: Prices? = nil, priorityText: String? = nil, rtoAddress: Address? = nil, shipmentCreatedAt: String? = nil, shipmentCreatedTs: String? = nil, shipmentDetails: ShipmentLockDetails? = nil, shipmentId: String, shipmentImages: [String]? = nil, shipmentQuantity: Int? = nil, shipmentStatus: String? = nil, shipmentUpdateTime: Double? = nil, status: ShipmentStatusData? = nil, totalBags: Int? = nil, totalItems: Int? = nil, trackingList: [TrackingList]? = nil, user: UserDataInfo? = nil, userAgent: String? = nil, vertical: String? = nil) { self.pickedDate = pickedDate @@ -1867,6 +1975,10 @@ public extension PlatformClient.ApplicationClient.Order { self.prices = prices + self.charges = charges + + self.orderingCurrencyPrices = orderingCurrencyPrices + self.vertical = vertical self.shipmentId = shipmentId @@ -1901,6 +2013,10 @@ public extension PlatformClient.ApplicationClient.Order { self.isLapaEnabled = isLapaEnabled + self.forwardEndShipmentId = forwardEndShipmentId + + self.logisticsMeta = logisticsMeta + } required public init(from decoder: Decoder) throws { @@ -2088,7 +2204,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - deliveryDetails = try container.decode(UserDetailsData.self, forKey: .deliveryDetails) + deliveryDetails = try container.decode([String: Any].self, forKey: .deliveryDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -2100,7 +2216,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - billingDetails = try container.decode(UserDetailsData.self, forKey: .billingDetails) + billingDetails = try container.decode([String: Any].self, forKey: .billingDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -2471,6 +2587,30 @@ public extension PlatformClient.ApplicationClient.Order { + do { + charges = try container.decode([PriceAdjustmentCharge].self, forKey: .charges) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { vertical = try container.decode(String.self, forKey: .vertical) @@ -2609,7 +2749,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - rtoAddress = try container.decode(PlatformDeliveryAddress.self, forKey: .rtoAddress) + rtoAddress = try container.decode(Address.self, forKey: .rtoAddress) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -2667,6 +2807,30 @@ public extension PlatformClient.ApplicationClient.Order { } + + do { + forwardEndShipmentId = try container.decode(String.self, forKey: .forwardEndShipmentId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + logisticsMeta = try container.decode([String: Any].self, forKey: .logisticsMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -2909,6 +3073,16 @@ public extension PlatformClient.ApplicationClient.Order { + try? container.encodeIfPresent(charges, forKey: .charges) + + + + + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + + + try? container.encodeIfPresent(vertical, forKey: .vertical) @@ -2992,6 +3166,16 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(isLapaEnabled, forKey: .isLapaEnabled) + + + try? container.encodeIfPresent(forwardEndShipmentId, forKey: .forwardEndShipmentId) + + + + + try? container.encodeIfPresent(logisticsMeta, forKey: .logisticsMeta) + + } } diff --git a/Sources/code/platform/Models/Order/PlatformShipmentReasonsResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/PlatformShipmentReasonsResponseSchemaOrderPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Order/PlatformShipmentReasonsResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/PlatformShipmentReasonsResponseSchemaOrderPlatformModel.swift index e92fce5a53..9ff3378819 100644 --- a/Sources/code/platform/Models/Order/PlatformShipmentReasonsResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/PlatformShipmentReasonsResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: PlatformShipmentReasonsResponse + Model: PlatformShipmentReasonsResponseSchema Used By: Order */ - class PlatformShipmentReasonsResponse: Codable { + class PlatformShipmentReasonsResponseSchema: Codable { public var reasons: [Reason]? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: PlatformShipmentReasonsResponse + Model: PlatformShipmentReasonsResponseSchema Used By: Order */ - class PlatformShipmentReasonsResponse: Codable { + class PlatformShipmentReasonsResponseSchema: Codable { public var reasons: [Reason]? diff --git a/Sources/code/platform/Models/Order/PriceAdjustmentChargeOrderPlatformModel.swift b/Sources/code/platform/Models/Order/PriceAdjustmentChargeOrderPlatformModel.swift new file mode 100644 index 0000000000..48aca322a8 --- /dev/null +++ b/Sources/code/platform/Models/Order/PriceAdjustmentChargeOrderPlatformModel.swift @@ -0,0 +1,258 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: PriceAdjustmentCharge + Used By: Order + */ + + class PriceAdjustmentCharge: Codable { + + + public var code: String? + + public var name: String + + public var type: String? + + public var amount: ChargeAmount + + public var distributionLogic: ChargeDistributionLogic + + + public enum CodingKeys: String, CodingKey { + + case code = "code" + + case name = "name" + + case type = "type" + + case amount = "amount" + + case distributionLogic = "distribution_logic" + + } + + public init(amount: ChargeAmount, code: String? = nil, distributionLogic: ChargeDistributionLogic, name: String, type: String? = nil) { + + self.code = code + + self.name = name + + self.type = type + + self.amount = amount + + self.distributionLogic = distributionLogic + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + code = try container.decode(String.self, forKey: .code) + + } 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 { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + amount = try container.decode(ChargeAmount.self, forKey: .amount) + + + + + distributionLogic = try container.decode(ChargeDistributionLogic.self, forKey: .distributionLogic) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(code, forKey: .code) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(amount, forKey: .amount) + + + + + try? container.encodeIfPresent(distributionLogic, forKey: .distributionLogic) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: PriceAdjustmentCharge + Used By: Order + */ + + class PriceAdjustmentCharge: Codable { + + + public var code: String? + + public var name: String + + public var type: String? + + public var amount: ChargeAmount + + public var distributionLogic: ChargeDistributionLogic + + + public enum CodingKeys: String, CodingKey { + + case code = "code" + + case name = "name" + + case type = "type" + + case amount = "amount" + + case distributionLogic = "distribution_logic" + + } + + public init(amount: ChargeAmount, code: String? = nil, distributionLogic: ChargeDistributionLogic, name: String, type: String? = nil) { + + self.code = code + + self.name = name + + self.type = type + + self.amount = amount + + self.distributionLogic = distributionLogic + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + code = try container.decode(String.self, forKey: .code) + + } 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 { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + amount = try container.decode(ChargeAmount.self, forKey: .amount) + + + + + distributionLogic = try container.decode(ChargeDistributionLogic.self, forKey: .distributionLogic) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(code, forKey: .code) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(amount, forKey: .amount) + + + + + try? container.encodeIfPresent(distributionLogic, forKey: .distributionLogic) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/APIFailedResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/PriceMinMaxOrderPlatformModel.swift similarity index 69% rename from Sources/code/platform/Models/Order/APIFailedResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/PriceMinMaxOrderPlatformModel.swift index bea33e7cf3..c4aecfe4c9 100644 --- a/Sources/code/platform/Models/Order/APIFailedResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/PriceMinMaxOrderPlatformModel.swift @@ -5,31 +5,31 @@ import Foundation public extension PlatformClient.Order { /* - Model: APIFailedResponse + Model: PriceMinMax Used By: Order */ - class APIFailedResponse: Codable { + class PriceMinMax: Codable { - public var status: Bool? + public var min: Double? - public var error: String? + public var max: Double? public enum CodingKeys: String, CodingKey { - case status = "status" + case min = "min" - case error = "error" + case max = "max" } - public init(error: String? = nil, status: Bool? = nil) { + public init(max: Double? = nil, min: Double? = nil) { - self.status = status + self.min = min - self.error = error + self.max = max } @@ -38,7 +38,7 @@ public extension PlatformClient.Order { do { - status = try container.decode(Bool.self, forKey: .status) + min = try container.decode(Double.self, forKey: .min) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient.Order { do { - error = try container.decode(String.self, forKey: .error) + max = try container.decode(Double.self, forKey: .max) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -67,12 +67,12 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(min, forKey: .min) - try? container.encodeIfPresent(error, forKey: .error) + try? container.encodeIfPresent(max, forKey: .max) } @@ -84,31 +84,31 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: APIFailedResponse + Model: PriceMinMax Used By: Order */ - class APIFailedResponse: Codable { + class PriceMinMax: Codable { - public var status: Bool? + public var min: Double? - public var error: String? + public var max: Double? public enum CodingKeys: String, CodingKey { - case status = "status" + case min = "min" - case error = "error" + case max = "max" } - public init(error: String? = nil, status: Bool? = nil) { + public init(max: Double? = nil, min: Double? = nil) { - self.status = status + self.min = min - self.error = error + self.max = max } @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - status = try container.decode(Bool.self, forKey: .status) + min = try container.decode(Double.self, forKey: .min) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -129,7 +129,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - error = try container.decode(String.self, forKey: .error) + max = try container.decode(Double.self, forKey: .max) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,12 +146,12 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(min, forKey: .min) - try? container.encodeIfPresent(error, forKey: .error) + try? container.encodeIfPresent(max, forKey: .max) } diff --git a/Sources/code/platform/Models/Order/ProcessAfterConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ProcessAfterConfigOrderPlatformModel.swift new file mode 100644 index 0000000000..1a41caafe0 --- /dev/null +++ b/Sources/code/platform/Models/Order/ProcessAfterConfigOrderPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ProcessAfterConfig + Used By: Order + */ + + class ProcessAfterConfig: Codable { + + + public var isScheduledShipment: Bool? + + public var enableProcessingAfter: String? + + + public enum CodingKeys: String, CodingKey { + + case isScheduledShipment = "is_scheduled_shipment" + + case enableProcessingAfter = "enable_processing_after" + + } + + public init(enableProcessingAfter: String? = nil, isScheduledShipment: Bool? = nil) { + + self.isScheduledShipment = isScheduledShipment + + self.enableProcessingAfter = enableProcessingAfter + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + isScheduledShipment = try container.decode(Bool.self, forKey: .isScheduledShipment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + enableProcessingAfter = try container.decode(String.self, forKey: .enableProcessingAfter) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(isScheduledShipment, forKey: .isScheduledShipment) + + + + + try? container.encodeIfPresent(enableProcessingAfter, forKey: .enableProcessingAfter) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ProcessAfterConfig + Used By: Order + */ + + class ProcessAfterConfig: Codable { + + + public var isScheduledShipment: Bool? + + public var enableProcessingAfter: String? + + + public enum CodingKeys: String, CodingKey { + + case isScheduledShipment = "is_scheduled_shipment" + + case enableProcessingAfter = "enable_processing_after" + + } + + public init(enableProcessingAfter: String? = nil, isScheduledShipment: Bool? = nil) { + + self.isScheduledShipment = isScheduledShipment + + self.enableProcessingAfter = enableProcessingAfter + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + isScheduledShipment = try container.decode(Bool.self, forKey: .isScheduledShipment) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + enableProcessingAfter = try container.decode(String.self, forKey: .enableProcessingAfter) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(isScheduledShipment, forKey: .isScheduledShipment) + + + + + try? container.encodeIfPresent(enableProcessingAfter, forKey: .enableProcessingAfter) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ProcessManifestItemResponseSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ProcessManifestItemResponseSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..1687c74ac5 --- /dev/null +++ b/Sources/code/platform/Models/Order/ProcessManifestItemResponseSchemaOrderPlatformModel.swift @@ -0,0 +1,116 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ProcessManifestItemResponseSchema + Used By: Order + */ + + class ProcessManifestItemResponseSchema: Codable { + + + public var items: ProcessManifestResponseSchema? + + + public enum CodingKeys: String, CodingKey { + + case items = "items" + + } + + public init(items: ProcessManifestResponseSchema? = nil) { + + self.items = items + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + items = try container.decode(ProcessManifestResponseSchema.self, forKey: .items) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(items, forKey: .items) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ProcessManifestItemResponseSchema + Used By: Order + */ + + class ProcessManifestItemResponseSchema: Codable { + + + public var items: ProcessManifestResponseSchema? + + + public enum CodingKeys: String, CodingKey { + + case items = "items" + + } + + public init(items: ProcessManifestResponseSchema? = nil) { + + self.items = items + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + items = try container.decode(ProcessManifestResponseSchema.self, forKey: .items) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(items, forKey: .items) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ProcessManifestRequestOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ProcessManifestOrderPlatformModel.swift similarity index 88% rename from Sources/code/platform/Models/Order/ProcessManifestRequestOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ProcessManifestOrderPlatformModel.swift index cf007d235f..236c509c16 100644 --- a/Sources/code/platform/Models/Order/ProcessManifestRequestOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ProcessManifestOrderPlatformModel.swift @@ -5,55 +5,65 @@ import Foundation public extension PlatformClient.Order { /* - Model: ProcessManifestRequest + Model: ProcessManifest Used By: Order */ - class ProcessManifestRequest: Codable { + class ProcessManifest: Codable { - public var action: String - - public var manifestId: String? + public var filters: FiltersRequestSchema - public var filters: Filters + public var action: String public var uniqueId: String + public var manifestId: String? + public enum CodingKeys: String, CodingKey { - case action = "action" - - case manifestId = "manifest_id" - case filters = "filters" + case action = "action" + case uniqueId = "unique_id" + case manifestId = "manifest_id" + } - public init(action: String, filters: Filters, manifestId: String? = nil, uniqueId: String) { - - self.action = action - - self.manifestId = manifestId + public init(action: String, filters: FiltersRequestSchema, manifestId: String? = nil, uniqueId: String) { self.filters = filters + self.action = action + self.uniqueId = uniqueId + self.manifestId = manifestId + } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + filters = try container.decode(FiltersRequestSchema.self, forKey: .filters) + + + + action = try container.decode(String.self, forKey: .action) + uniqueId = try container.decode(String.self, forKey: .uniqueId) + + + + do { manifestId = try container.decode(String.self, forKey: .manifestId) @@ -65,16 +75,6 @@ public extension PlatformClient.Order { } - - filters = try container.decode(Filters.self, forKey: .filters) - - - - - uniqueId = try container.decode(String.self, forKey: .uniqueId) - - - } public func encode(to encoder: Encoder) throws { @@ -82,22 +82,22 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(manifestId, forKey: .manifestId) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(filters, forKey: .filters) + try? container.encodeIfPresent(uniqueId, forKey: .uniqueId) - try? container.encodeIfPresent(uniqueId, forKey: .uniqueId) + try? container.encodeIfPresent(manifestId, forKey: .manifestId) } @@ -109,55 +109,65 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ProcessManifestRequest + Model: ProcessManifest Used By: Order */ - class ProcessManifestRequest: Codable { + class ProcessManifest: Codable { - public var action: String - - public var manifestId: String? + public var filters: FiltersRequestSchema - public var filters: Filters + public var action: String public var uniqueId: String + public var manifestId: String? + public enum CodingKeys: String, CodingKey { - case action = "action" - - case manifestId = "manifest_id" - case filters = "filters" + case action = "action" + case uniqueId = "unique_id" + case manifestId = "manifest_id" + } - public init(action: String, filters: Filters, manifestId: String? = nil, uniqueId: String) { - - self.action = action - - self.manifestId = manifestId + public init(action: String, filters: FiltersRequestSchema, manifestId: String? = nil, uniqueId: String) { self.filters = filters + self.action = action + self.uniqueId = uniqueId + self.manifestId = manifestId + } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) + filters = try container.decode(FiltersRequestSchema.self, forKey: .filters) + + + + action = try container.decode(String.self, forKey: .action) + uniqueId = try container.decode(String.self, forKey: .uniqueId) + + + + do { manifestId = try container.decode(String.self, forKey: .manifestId) @@ -169,16 +179,6 @@ public extension PlatformClient.ApplicationClient.Order { } - - filters = try container.decode(Filters.self, forKey: .filters) - - - - - uniqueId = try container.decode(String.self, forKey: .uniqueId) - - - } public func encode(to encoder: Encoder) throws { @@ -186,22 +186,22 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(manifestId, forKey: .manifestId) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(filters, forKey: .filters) + try? container.encodeIfPresent(uniqueId, forKey: .uniqueId) - try? container.encodeIfPresent(uniqueId, forKey: .uniqueId) + try? container.encodeIfPresent(manifestId, forKey: .manifestId) } diff --git a/Sources/code/platform/Models/Order/ProcessManifestRequestSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ProcessManifestRequestSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..c1078c212a --- /dev/null +++ b/Sources/code/platform/Models/Order/ProcessManifestRequestSchemaOrderPlatformModel.swift @@ -0,0 +1,254 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ProcessManifestRequestSchema + Used By: Order + */ + + class ProcessManifestRequestSchema: Codable { + + + public var action: String? + + public var manifestId: String? + + public var filters: Filters? + + public var uniqueId: String? + + + public enum CodingKeys: String, CodingKey { + + case action = "action" + + case manifestId = "manifest_id" + + case filters = "filters" + + case uniqueId = "unique_id" + + } + + public init(action: String? = nil, filters: Filters? = nil, manifestId: String? = nil, uniqueId: String? = nil) { + + self.action = action + + self.manifestId = manifestId + + self.filters = filters + + self.uniqueId = uniqueId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + manifestId = try container.decode(String.self, forKey: .manifestId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + filters = try container.decode(Filters.self, forKey: .filters) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + uniqueId = try container.decode(String.self, forKey: .uniqueId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(action, forKey: .action) + + + + + try? container.encodeIfPresent(manifestId, forKey: .manifestId) + + + + + try? container.encodeIfPresent(filters, forKey: .filters) + + + + + try? container.encodeIfPresent(uniqueId, forKey: .uniqueId) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ProcessManifestRequestSchema + Used By: Order + */ + + class ProcessManifestRequestSchema: Codable { + + + public var action: String? + + public var manifestId: String? + + public var filters: Filters? + + public var uniqueId: String? + + + public enum CodingKeys: String, CodingKey { + + case action = "action" + + case manifestId = "manifest_id" + + case filters = "filters" + + case uniqueId = "unique_id" + + } + + public init(action: String? = nil, filters: Filters? = nil, manifestId: String? = nil, uniqueId: String? = nil) { + + self.action = action + + self.manifestId = manifestId + + self.filters = filters + + self.uniqueId = uniqueId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + manifestId = try container.decode(String.self, forKey: .manifestId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + filters = try container.decode(Filters.self, forKey: .filters) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + uniqueId = try container.decode(String.self, forKey: .uniqueId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(action, forKey: .action) + + + + + try? container.encodeIfPresent(manifestId, forKey: .manifestId) + + + + + try? container.encodeIfPresent(filters, forKey: .filters) + + + + + try? container.encodeIfPresent(uniqueId, forKey: .uniqueId) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Finance/DownloadReportResponseDataFinancePlatformModel.swift b/Sources/code/platform/Models/Order/ProcessManifestResponseSchemaOrderPlatformModel.swift similarity index 59% rename from Sources/code/platform/Models/Finance/DownloadReportResponseDataFinancePlatformModel.swift rename to Sources/code/platform/Models/Order/ProcessManifestResponseSchemaOrderPlatformModel.swift index 22d2f2b495..9fd812c80c 100644 --- a/Sources/code/platform/Models/Finance/DownloadReportResponseDataFinancePlatformModel.swift +++ b/Sources/code/platform/Models/Order/ProcessManifestResponseSchemaOrderPlatformModel.swift @@ -3,105 +3,63 @@ import Foundation -public extension PlatformClient.Finance { +public extension PlatformClient.Order { /* - Model: DownloadReportResponseData - Used By: Finance + Model: ProcessManifestResponseSchema + Used By: Order */ - class DownloadReportResponseData: Codable { + class ProcessManifestResponseSchema: Codable { - public var reportConfigId: String? + public var companyId: Int? - public var fullName: String? + public var filters: Filters? - public var requestedBy: String? + public var userId: String? - public var startDate: String? + public var manifestId: String? - public var endDate: String? + public var action: String? - public var requestDict: [String: Any]? + public var uid: String? - public var downloadLink: String? - - public var createdAt: String? - - public var meta: [String: Any]? - - public var msg: String? - - public var reportName: String? - - public var status: String? - - public var displayName: String? - - public var filters: [String: Any]? + public var createdBy: String? public enum CodingKeys: String, CodingKey { - case reportConfigId = "report_config_id" - - case fullName = "full_name" - - case requestedBy = "requested_by" + case companyId = "company_id" - case startDate = "start_date" - - case endDate = "end_date" - - case requestDict = "request_dict" - - case downloadLink = "download_link" - - case createdAt = "created_at" - - case meta = "meta" + case filters = "filters" - case msg = "msg" + case userId = "user_id" - case reportName = "report_name" + case manifestId = "manifest_id" - case status = "status" + case action = "action" - case displayName = "display_name" + case uid = "uid" - case filters = "filters" + case createdBy = "created_by" } - public init(createdAt: String? = nil, displayName: String? = nil, downloadLink: String? = nil, endDate: String? = nil, filters: [String: Any]? = nil, fullName: String? = nil, meta: [String: Any]? = nil, msg: String? = nil, reportConfigId: String? = nil, reportName: String? = nil, requestedBy: String? = nil, requestDict: [String: Any]? = nil, startDate: String? = nil, status: String? = nil) { - - self.reportConfigId = reportConfigId - - self.fullName = fullName + public init(action: String? = nil, companyId: Int? = nil, createdBy: String? = nil, filters: Filters? = nil, manifestId: String? = nil, uid: String? = nil, userId: String? = nil) { - self.requestedBy = requestedBy + self.companyId = companyId - self.startDate = startDate - - self.endDate = endDate - - self.requestDict = requestDict - - self.downloadLink = downloadLink - - self.createdAt = createdAt - - self.meta = meta + self.filters = filters - self.msg = msg + self.userId = userId - self.reportName = reportName + self.manifestId = manifestId - self.status = status + self.action = action - self.displayName = displayName + self.uid = uid - self.filters = filters + self.createdBy = createdBy } @@ -110,7 +68,7 @@ public extension PlatformClient.Finance { do { - reportConfigId = try container.decode(String.self, forKey: .reportConfigId) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +80,7 @@ public extension PlatformClient.Finance { do { - fullName = try container.decode(String.self, forKey: .fullName) + filters = try container.decode(Filters.self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +92,7 @@ public extension PlatformClient.Finance { do { - requestedBy = try container.decode(String.self, forKey: .requestedBy) + userId = try container.decode(String.self, forKey: .userId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +104,7 @@ public extension PlatformClient.Finance { do { - startDate = try container.decode(String.self, forKey: .startDate) + manifestId = try container.decode(String.self, forKey: .manifestId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +116,7 @@ public extension PlatformClient.Finance { do { - endDate = try container.decode(String.self, forKey: .endDate) + action = try container.decode(String.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +128,7 @@ public extension PlatformClient.Finance { do { - requestDict = try container.decode([String: Any].self, forKey: .requestDict) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +140,7 @@ public extension PlatformClient.Finance { do { - downloadLink = try container.decode(String.self, forKey: .downloadLink) + createdBy = try container.decode(String.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -192,9 +150,119 @@ public extension PlatformClient.Finance { } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(companyId, forKey: .companyId) + + + + + try? container.encodeIfPresent(filters, forKey: .filters) + + + + + try? container.encodeIfPresent(userId, forKey: .userId) + + + + + try? container.encodeIfPresent(manifestId, forKey: .manifestId) + + + + + try? container.encodeIfPresent(action, forKey: .action) + + + + + try? container.encodeIfPresent(uid, forKey: .uid) + + + + + try? container.encodeIfPresent(createdBy, forKey: .createdBy) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ProcessManifestResponseSchema + Used By: Order + */ + + class ProcessManifestResponseSchema: Codable { + + + public var companyId: Int? + + public var filters: Filters? + + public var userId: String? + + public var manifestId: String? + + public var action: String? + + public var uid: String? + + public var createdBy: String? + + + public enum CodingKeys: String, CodingKey { + + case companyId = "company_id" + + case filters = "filters" + + case userId = "user_id" + + case manifestId = "manifest_id" + + case action = "action" + + case uid = "uid" + + case createdBy = "created_by" + + } + + public init(action: String? = nil, companyId: Int? = nil, createdBy: String? = nil, filters: Filters? = nil, manifestId: String? = nil, uid: String? = nil, userId: String? = nil) { + + self.companyId = companyId + + self.filters = filters + + self.userId = userId + + self.manifestId = manifestId + + self.action = action + + self.uid = uid + + self.createdBy = createdBy + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + do { - createdAt = try container.decode(String.self, forKey: .createdAt) + companyId = try container.decode(Int.self, forKey: .companyId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +274,7 @@ public extension PlatformClient.Finance { do { - meta = try container.decode([String: Any].self, forKey: .meta) + filters = try container.decode(Filters.self, forKey: .filters) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +286,7 @@ public extension PlatformClient.Finance { do { - msg = try container.decode(String.self, forKey: .msg) + userId = try container.decode(String.self, forKey: .userId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,7 +298,7 @@ public extension PlatformClient.Finance { do { - reportName = try container.decode(String.self, forKey: .reportName) + manifestId = try container.decode(String.self, forKey: .manifestId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -242,7 +310,7 @@ public extension PlatformClient.Finance { do { - status = try container.decode(String.self, forKey: .status) + action = try container.decode(String.self, forKey: .action) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -254,7 +322,7 @@ public extension PlatformClient.Finance { do { - displayName = try container.decode(String.self, forKey: .displayName) + uid = try container.decode(String.self, forKey: .uid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -266,7 +334,7 @@ public extension PlatformClient.Finance { do { - filters = try container.decode([String: Any].self, forKey: .filters) + createdBy = try container.decode(String.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -283,72 +351,37 @@ public extension PlatformClient.Finance { - try? container.encodeIfPresent(reportConfigId, forKey: .reportConfigId) - - - - - try? container.encodeIfPresent(fullName, forKey: .fullName) - - - - - try? container.encodeIfPresent(requestedBy, forKey: .requestedBy) - - - - - try? container.encodeIfPresent(startDate, forKey: .startDate) - - - + try? container.encodeIfPresent(companyId, forKey: .companyId) - try? container.encodeIfPresent(endDate, forKey: .endDate) - - try? container.encodeIfPresent(requestDict, forKey: .requestDict) - - - - - try? container.encodeIfPresent(downloadLink, forKey: .downloadLink) - - - - - try? container.encodeIfPresent(createdAt, forKey: .createdAt) - - - - - try? container.encodeIfPresent(meta, forKey: .meta) + try? container.encodeIfPresent(filters, forKey: .filters) - try? container.encodeIfPresent(msg, forKey: .msg) + try? container.encodeIfPresent(userId, forKey: .userId) - try? container.encodeIfPresent(reportName, forKey: .reportName) + try? container.encodeIfPresent(manifestId, forKey: .manifestId) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(action, forKey: .action) - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(uid, forKey: .uid) - try? container.encodeIfPresent(filters, forKey: .filters) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) } @@ -357,5 +390,3 @@ public extension PlatformClient.Finance { } - - diff --git a/Sources/code/platform/Models/Order/ProductSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ProductSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..d25d05bd02 --- /dev/null +++ b/Sources/code/platform/Models/Order/ProductSchemaOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ProductSchema + Used By: Order + */ + + class ProductSchema: Codable { + + + public var lineNumber: Int + + public var paymentMethods: [PaymentMethodSchema] + + + public enum CodingKeys: String, CodingKey { + + case lineNumber = "line_number" + + case paymentMethods = "payment_methods" + + } + + public init(lineNumber: Int, paymentMethods: [PaymentMethodSchema]) { + + self.lineNumber = lineNumber + + self.paymentMethods = paymentMethods + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + lineNumber = try container.decode(Int.self, forKey: .lineNumber) + + + + + paymentMethods = try container.decode([PaymentMethodSchema].self, forKey: .paymentMethods) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(lineNumber, forKey: .lineNumber) + + + + + try? container.encodeIfPresent(paymentMethods, forKey: .paymentMethods) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ProductSchema + Used By: Order + */ + + class ProductSchema: Codable { + + + public var lineNumber: Int + + public var paymentMethods: [PaymentMethodSchema] + + + public enum CodingKeys: String, CodingKey { + + case lineNumber = "line_number" + + case paymentMethods = "payment_methods" + + } + + public init(lineNumber: Int, paymentMethods: [PaymentMethodSchema]) { + + self.lineNumber = lineNumber + + self.paymentMethods = paymentMethods + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + lineNumber = try container.decode(Int.self, forKey: .lineNumber) + + + + + paymentMethods = try container.decode([PaymentMethodSchema].self, forKey: .paymentMethods) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(lineNumber, forKey: .lineNumber) + + + + + try? container.encodeIfPresent(paymentMethods, forKey: .paymentMethods) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ProductsDataUpdatesFiltersOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ProductsDataUpdatesFiltersOrderPlatformModel.swift index d5f4a23325..9a265fd7b1 100644 --- a/Sources/code/platform/Models/Order/ProductsDataUpdatesFiltersOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ProductsDataUpdatesFiltersOrderPlatformModel.swift @@ -16,6 +16,8 @@ public extension PlatformClient.Order { public var identifier: String? + public var quantity: Int? + public enum CodingKeys: String, CodingKey { @@ -23,14 +25,18 @@ public extension PlatformClient.Order { case identifier = "identifier" + case quantity = "quantity" + } - public init(identifier: String? = nil, lineNumber: Int? = nil) { + public init(identifier: String? = nil, lineNumber: Int? = nil, quantity: Int? = nil) { self.lineNumber = lineNumber self.identifier = identifier + self.quantity = quantity + } required public init(from decoder: Decoder) throws { @@ -60,6 +66,18 @@ public extension PlatformClient.Order { } + + do { + quantity = try container.decode(Int.self, forKey: .quantity) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -75,6 +93,11 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(identifier, forKey: .identifier) + + + try? container.encodeIfPresent(quantity, forKey: .quantity) + + } } @@ -95,6 +118,8 @@ public extension PlatformClient.ApplicationClient.Order { public var identifier: String? + public var quantity: Int? + public enum CodingKeys: String, CodingKey { @@ -102,14 +127,18 @@ public extension PlatformClient.ApplicationClient.Order { case identifier = "identifier" + case quantity = "quantity" + } - public init(identifier: String? = nil, lineNumber: Int? = nil) { + public init(identifier: String? = nil, lineNumber: Int? = nil, quantity: Int? = nil) { self.lineNumber = lineNumber self.identifier = identifier + self.quantity = quantity + } required public init(from decoder: Decoder) throws { @@ -139,6 +168,18 @@ public extension PlatformClient.ApplicationClient.Order { } + + do { + quantity = try container.decode(Int.self, forKey: .quantity) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -154,6 +195,11 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(identifier, forKey: .identifier) + + + try? container.encodeIfPresent(quantity, forKey: .quantity) + + } } diff --git a/Sources/code/platform/Models/Order/QuestionSetItemOrderPlatformModel.swift b/Sources/code/platform/Models/Order/QuestionSetItemOrderPlatformModel.swift new file mode 100644 index 0000000000..eaedfda793 --- /dev/null +++ b/Sources/code/platform/Models/Order/QuestionSetItemOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: QuestionSetItem + Used By: Order + */ + + class QuestionSetItem: Codable { + + + public var id: Int + + public var displayName: String + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case displayName = "display_name" + + } + + public init(displayName: String, id: Int) { + + self.id = id + + self.displayName = displayName + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + id = try container.decode(Int.self, forKey: .id) + + + + + 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(id, forKey: .id) + + + + + try? container.encodeIfPresent(displayName, forKey: .displayName) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: QuestionSetItem + Used By: Order + */ + + class QuestionSetItem: Codable { + + + public var id: Int + + public var displayName: String + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case displayName = "display_name" + + } + + public init(displayName: String, id: Int) { + + self.id = id + + self.displayName = displayName + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + id = try container.decode(Int.self, forKey: .id) + + + + + 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(id, forKey: .id) + + + + + try? container.encodeIfPresent(displayName, forKey: .displayName) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/RMAPageInfoOrderPlatformModel.swift b/Sources/code/platform/Models/Order/RMAPageInfoOrderPlatformModel.swift new file mode 100644 index 0000000000..1c60863c52 --- /dev/null +++ b/Sources/code/platform/Models/Order/RMAPageInfoOrderPlatformModel.swift @@ -0,0 +1,346 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: RMAPageInfo + Used By: Order + */ + + class RMAPageInfo: Codable { + + + public var type: String? + + public var current: Int? + + public var size: Int? + + public var itemTotal: Int? + + public var hasPrevious: Bool? + + public var hasNext: Bool? + + + public enum CodingKeys: String, CodingKey { + + case type = "type" + + case current = "current" + + case size = "size" + + case itemTotal = "item_total" + + case hasPrevious = "has_previous" + + case hasNext = "has_next" + + } + + public init(current: Int? = nil, hasNext: Bool? = nil, hasPrevious: Bool? = nil, itemTotal: Int? = nil, size: Int? = nil, type: String? = nil) { + + self.type = type + + self.current = current + + self.size = size + + self.itemTotal = itemTotal + + self.hasPrevious = hasPrevious + + self.hasNext = hasNext + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + current = try container.decode(Int.self, forKey: .current) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + size = try container.decode(Int.self, forKey: .size) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemTotal = try container.decode(Int.self, forKey: .itemTotal) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + hasPrevious = try container.decode(Bool.self, forKey: .hasPrevious) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + hasNext = try container.decode(Bool.self, forKey: .hasNext) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(current, forKey: .current) + + + + + try? container.encodeIfPresent(size, forKey: .size) + + + + + try? container.encodeIfPresent(itemTotal, forKey: .itemTotal) + + + + + try? container.encodeIfPresent(hasPrevious, forKey: .hasPrevious) + + + + + try? container.encodeIfPresent(hasNext, forKey: .hasNext) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: RMAPageInfo + Used By: Order + */ + + class RMAPageInfo: Codable { + + + public var type: String? + + public var current: Int? + + public var size: Int? + + public var itemTotal: Int? + + public var hasPrevious: Bool? + + public var hasNext: Bool? + + + public enum CodingKeys: String, CodingKey { + + case type = "type" + + case current = "current" + + case size = "size" + + case itemTotal = "item_total" + + case hasPrevious = "has_previous" + + case hasNext = "has_next" + + } + + public init(current: Int? = nil, hasNext: Bool? = nil, hasPrevious: Bool? = nil, itemTotal: Int? = nil, size: Int? = nil, type: String? = nil) { + + self.type = type + + self.current = current + + self.size = size + + self.itemTotal = itemTotal + + self.hasPrevious = hasPrevious + + self.hasNext = hasNext + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + current = try container.decode(Int.self, forKey: .current) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + size = try container.decode(Int.self, forKey: .size) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + itemTotal = try container.decode(Int.self, forKey: .itemTotal) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + hasPrevious = try container.decode(Bool.self, forKey: .hasPrevious) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + hasNext = try container.decode(Bool.self, forKey: .hasNext) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(current, forKey: .current) + + + + + try? container.encodeIfPresent(size, forKey: .size) + + + + + try? container.encodeIfPresent(itemTotal, forKey: .itemTotal) + + + + + try? container.encodeIfPresent(hasPrevious, forKey: .hasPrevious) + + + + + try? container.encodeIfPresent(hasNext, forKey: .hasNext) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ReasonOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ReasonOrderPlatformModel.swift index ff9fca6ca6..91366d8a4e 100644 --- a/Sources/code/platform/Models/Order/ReasonOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ReasonOrderPlatformModel.swift @@ -12,36 +12,54 @@ public extension PlatformClient.Order { class Reason: Codable { - public var qcType: [String]? - public var id: Int? - public var questionSet: [QuestionSet]? + public var displayName: String + + public var reasons: [Reason]? + + public var qcType: [String] + + public var questionSet: [QuestionSet] + + public var meta: [String: Any] - public var displayName: String? + public var isActive: Bool public enum CodingKeys: String, CodingKey { - case qcType = "qc_type" - case id = "id" + case displayName = "display_name" + + case reasons = "reasons" + + case qcType = "qc_type" + case questionSet = "question_set" - case displayName = "display_name" + case meta = "meta" + + case isActive = "is_active" } - public init(displayName: String? = nil, id: Int? = nil, qcType: [String]? = nil, questionSet: [QuestionSet]? = nil) { - - self.qcType = qcType + public init(displayName: String, id: Int? = nil, isActive: Bool, meta: [String: Any], qcType: [String], questionSet: [QuestionSet], reasons: [Reason]? = nil) { self.id = id + self.displayName = displayName + + self.reasons = reasons + + self.qcType = qcType + self.questionSet = questionSet - self.displayName = displayName + self.meta = meta + + self.isActive = isActive } @@ -50,7 +68,7 @@ public extension PlatformClient.Order { do { - qcType = try container.decode([String].self, forKey: .qcType) + id = try container.decode(Int.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,8 +79,13 @@ public extension PlatformClient.Order { + displayName = try container.decode(String.self, forKey: .displayName) + + + + do { - id = try container.decode(Int.self, forKey: .id) + reasons = try container.decode([Reason].self, forKey: .reasons) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -73,29 +96,25 @@ public extension PlatformClient.Order { - do { - questionSet = try container.decode([QuestionSet].self, forKey: .questionSet) + qcType = try container.decode([String].self, forKey: .qcType) - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } + + + + questionSet = try container.decode([QuestionSet].self, forKey: .questionSet) - do { - displayName = try container.decode(String.self, forKey: .displayName) + + 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 { - - } + + + + isActive = try container.decode(Bool.self, forKey: .isActive) + } public func encode(to encoder: Encoder) throws { @@ -103,12 +122,22 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(qcType, forKey: .qcType) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(displayName, forKey: .displayName) + + + + + try? container.encodeIfPresent(reasons, forKey: .reasons) + + + + + try? container.encodeIfPresent(qcType, forKey: .qcType) @@ -118,7 +147,12 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(meta, forKey: .meta) + + + + + try? container.encodeIfPresent(isActive, forKey: .isActive) } @@ -137,36 +171,54 @@ public extension PlatformClient.ApplicationClient.Order { class Reason: Codable { - public var qcType: [String]? - public var id: Int? - public var questionSet: [QuestionSet]? + public var displayName: String + + public var reasons: [Reason]? + + public var qcType: [String] + + public var questionSet: [QuestionSet] + + public var meta: [String: Any] - public var displayName: String? + public var isActive: Bool public enum CodingKeys: String, CodingKey { - case qcType = "qc_type" - case id = "id" + case displayName = "display_name" + + case reasons = "reasons" + + case qcType = "qc_type" + case questionSet = "question_set" - case displayName = "display_name" + case meta = "meta" + + case isActive = "is_active" } - public init(displayName: String? = nil, id: Int? = nil, qcType: [String]? = nil, questionSet: [QuestionSet]? = nil) { - - self.qcType = qcType + public init(displayName: String, id: Int? = nil, isActive: Bool, meta: [String: Any], qcType: [String], questionSet: [QuestionSet], reasons: [Reason]? = nil) { self.id = id + self.displayName = displayName + + self.reasons = reasons + + self.qcType = qcType + self.questionSet = questionSet - self.displayName = displayName + self.meta = meta + + self.isActive = isActive } @@ -175,7 +227,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - qcType = try container.decode([String].self, forKey: .qcType) + id = try container.decode(Int.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -186,8 +238,13 @@ public extension PlatformClient.ApplicationClient.Order { + displayName = try container.decode(String.self, forKey: .displayName) + + + + do { - id = try container.decode(Int.self, forKey: .id) + reasons = try container.decode([Reason].self, forKey: .reasons) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -198,29 +255,25 @@ public extension PlatformClient.ApplicationClient.Order { - do { - questionSet = try container.decode([QuestionSet].self, forKey: .questionSet) + qcType = try container.decode([String].self, forKey: .qcType) - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } + + + + questionSet = try container.decode([QuestionSet].self, forKey: .questionSet) - do { - displayName = try container.decode(String.self, forKey: .displayName) + + 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 { - - } + + + + isActive = try container.decode(Bool.self, forKey: .isActive) + } public func encode(to encoder: Encoder) throws { @@ -228,12 +281,22 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(qcType, forKey: .qcType) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(id, forKey: .id) + try? container.encodeIfPresent(displayName, forKey: .displayName) + + + + + try? container.encodeIfPresent(reasons, forKey: .reasons) + + + + + try? container.encodeIfPresent(qcType, forKey: .qcType) @@ -243,7 +306,12 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(meta, forKey: .meta) + + + + + try? container.encodeIfPresent(isActive, forKey: .isActive) } diff --git a/Sources/code/platform/Models/Order/RefundInformationOrderPlatformModel.swift b/Sources/code/platform/Models/Order/RefundInformationOrderPlatformModel.swift new file mode 100644 index 0000000000..6f413c8168 --- /dev/null +++ b/Sources/code/platform/Models/Order/RefundInformationOrderPlatformModel.swift @@ -0,0 +1,254 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: RefundInformation + Used By: Order + */ + + class RefundInformation: Codable { + + + public var mode: String? + + public var amount: Double? + + public var merchantTransactionId: String? + + public var refundStatus: String? + + + public enum CodingKeys: String, CodingKey { + + case mode = "mode" + + case amount = "amount" + + case merchantTransactionId = "merchant_transaction_id" + + case refundStatus = "refund_status" + + } + + public init(amount: Double? = nil, merchantTransactionId: String? = nil, mode: String? = nil, refundStatus: String? = nil) { + + self.mode = mode + + self.amount = amount + + self.merchantTransactionId = merchantTransactionId + + self.refundStatus = refundStatus + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + amount = try container.decode(Double.self, forKey: .amount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + merchantTransactionId = try container.decode(String.self, forKey: .merchantTransactionId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + refundStatus = try container.decode(String.self, forKey: .refundStatus) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(mode, forKey: .mode) + + + + + try? container.encodeIfPresent(amount, forKey: .amount) + + + + + try? container.encodeIfPresent(merchantTransactionId, forKey: .merchantTransactionId) + + + + + try? container.encodeIfPresent(refundStatus, forKey: .refundStatus) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: RefundInformation + Used By: Order + */ + + class RefundInformation: Codable { + + + public var mode: String? + + public var amount: Double? + + public var merchantTransactionId: String? + + public var refundStatus: String? + + + public enum CodingKeys: String, CodingKey { + + case mode = "mode" + + case amount = "amount" + + case merchantTransactionId = "merchant_transaction_id" + + case refundStatus = "refund_status" + + } + + public init(amount: Double? = nil, merchantTransactionId: String? = nil, mode: String? = nil, refundStatus: String? = nil) { + + self.mode = mode + + self.amount = amount + + self.merchantTransactionId = merchantTransactionId + + self.refundStatus = refundStatus + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + amount = try container.decode(Double.self, forKey: .amount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + merchantTransactionId = try container.decode(String.self, forKey: .merchantTransactionId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + refundStatus = try container.decode(String.self, forKey: .refundStatus) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(mode, forKey: .mode) + + + + + try? container.encodeIfPresent(amount, forKey: .amount) + + + + + try? container.encodeIfPresent(merchantTransactionId, forKey: .merchantTransactionId) + + + + + try? container.encodeIfPresent(refundStatus, forKey: .refundStatus) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/RefundModeConfigRequestPayloadOrderPlatformModel.swift b/Sources/code/platform/Models/Order/RefundModeConfigRequestPayloadOrderPlatformModel.swift index a7d00552e5..4de1309ceb 100644 --- a/Sources/code/platform/Models/Order/RefundModeConfigRequestPayloadOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/RefundModeConfigRequestPayloadOrderPlatformModel.swift @@ -18,7 +18,7 @@ public extension PlatformClient.Order { public var affiliateId: String - public var customerMobileNumber: Double? + public var customerMobileNumber: String? public enum CodingKeys: String, CodingKey { @@ -33,7 +33,7 @@ public extension PlatformClient.Order { } - public init(affiliateId: String, customerMobileNumber: Double? = nil, fyndOrderId: String, sellerId: Int) { + public init(affiliateId: String, customerMobileNumber: String? = nil, fyndOrderId: String, sellerId: Int) { self.fyndOrderId = fyndOrderId @@ -65,7 +65,7 @@ public extension PlatformClient.Order { do { - customerMobileNumber = try container.decode(Double.self, forKey: .customerMobileNumber) + customerMobileNumber = try container.decode(String.self, forKey: .customerMobileNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient.ApplicationClient.Order { public var affiliateId: String - public var customerMobileNumber: Double? + public var customerMobileNumber: String? public enum CodingKeys: String, CodingKey { @@ -137,7 +137,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(affiliateId: String, customerMobileNumber: Double? = nil, fyndOrderId: String, sellerId: Int) { + public init(affiliateId: String, customerMobileNumber: String? = nil, fyndOrderId: String, sellerId: Int) { self.fyndOrderId = fyndOrderId @@ -169,7 +169,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - customerMobileNumber = try container.decode(Double.self, forKey: .customerMobileNumber) + customerMobileNumber = try container.decode(String.self, forKey: .customerMobileNumber) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/RefundModeConfigResponsePayloadOrderPlatformModel.swift b/Sources/code/platform/Models/Order/RefundModeConfigResponsePayloadOrderPlatformModel.swift index 558e3901bd..19a62942a3 100644 --- a/Sources/code/platform/Models/Order/RefundModeConfigResponsePayloadOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/RefundModeConfigResponsePayloadOrderPlatformModel.swift @@ -16,10 +16,6 @@ public extension PlatformClient.Order { public var data: [RefundModeInfo] - public var status: Int? - - public var message: String? - public enum CodingKeys: String, CodingKey { @@ -27,22 +23,14 @@ public extension PlatformClient.Order { case data = "data" - case status = "status" - - case message = "message" - } - public init(data: [RefundModeInfo], message: String? = nil, status: Int? = nil, success: Bool) { + public init(data: [RefundModeInfo], success: Bool) { self.success = success self.data = data - self.status = status - - self.message = message - } required public init(from decoder: Decoder) throws { @@ -58,30 +46,6 @@ public extension PlatformClient.Order { - - do { - status = try container.decode(Int.self, forKey: .status) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -97,16 +61,6 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(data, forKey: .data) - - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(message, forKey: .message) - - } } @@ -127,10 +81,6 @@ public extension PlatformClient.ApplicationClient.Order { public var data: [RefundModeInfo] - public var status: Int? - - public var message: String? - public enum CodingKeys: String, CodingKey { @@ -138,22 +88,14 @@ public extension PlatformClient.ApplicationClient.Order { case data = "data" - case status = "status" - - case message = "message" - } - public init(data: [RefundModeInfo], message: String? = nil, status: Int? = nil, success: Bool) { + public init(data: [RefundModeInfo], success: Bool) { self.success = success self.data = data - self.status = status - - self.message = message - } required public init(from decoder: Decoder) throws { @@ -169,30 +111,6 @@ public extension PlatformClient.ApplicationClient.Order { - - do { - status = try container.decode(Int.self, forKey: .status) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -208,16 +126,6 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(data, forKey: .data) - - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(message, forKey: .message) - - } } diff --git a/Sources/code/platform/Models/Order/RefundModeInfoOrderPlatformModel.swift b/Sources/code/platform/Models/Order/RefundModeInfoOrderPlatformModel.swift index 951a6113bd..4bd3245c47 100644 --- a/Sources/code/platform/Models/Order/RefundModeInfoOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/RefundModeInfoOrderPlatformModel.swift @@ -20,8 +20,6 @@ public extension PlatformClient.Order { public var displayName: String? - public var format: RefundModeFormat? - public enum CodingKeys: String, CodingKey { @@ -33,11 +31,9 @@ public extension PlatformClient.Order { case displayName = "display_name" - case format = "format" - } - public init(displayName: String? = nil, format: RefundModeFormat? = nil, isActive: Bool? = nil, options: [RefundOption]? = nil, slug: String? = nil) { + public init(displayName: String? = nil, isActive: Bool? = nil, options: [RefundOption]? = nil, slug: String? = nil) { self.isActive = isActive @@ -47,8 +43,6 @@ public extension PlatformClient.Order { self.displayName = displayName - self.format = format - } required public init(from decoder: Decoder) throws { @@ -102,18 +96,6 @@ public extension PlatformClient.Order { } - - do { - format = try container.decode(RefundModeFormat.self, forKey: .format) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -139,11 +121,6 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(displayName, forKey: .displayName) - - - try? container.encodeIfPresent(format, forKey: .format) - - } } @@ -168,8 +145,6 @@ public extension PlatformClient.ApplicationClient.Order { public var displayName: String? - public var format: RefundModeFormat? - public enum CodingKeys: String, CodingKey { @@ -181,11 +156,9 @@ public extension PlatformClient.ApplicationClient.Order { case displayName = "display_name" - case format = "format" - } - public init(displayName: String? = nil, format: RefundModeFormat? = nil, isActive: Bool? = nil, options: [RefundOption]? = nil, slug: String? = nil) { + public init(displayName: String? = nil, isActive: Bool? = nil, options: [RefundOption]? = nil, slug: String? = nil) { self.isActive = isActive @@ -195,8 +168,6 @@ public extension PlatformClient.ApplicationClient.Order { self.displayName = displayName - self.format = format - } required public init(from decoder: Decoder) throws { @@ -250,18 +221,6 @@ public extension PlatformClient.ApplicationClient.Order { } - - do { - format = try container.decode(RefundModeFormat.self, forKey: .format) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - } public func encode(to encoder: Encoder) throws { @@ -287,11 +246,6 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(displayName, forKey: .displayName) - - - try? container.encodeIfPresent(format, forKey: .format) - - } } diff --git a/Sources/code/platform/Models/Order/ResponseDetailOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ResponseDetailOrderPlatformModel.swift index 2d32b18026..38e4e10056 100644 --- a/Sources/code/platform/Models/Order/ResponseDetailOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ResponseDetailOrderPlatformModel.swift @@ -14,9 +14,7 @@ public extension PlatformClient.Order { public var success: Bool? - public var message: String? - - public var status: Int? + public var message: [String]? public enum CodingKeys: String, CodingKey { @@ -25,18 +23,14 @@ public extension PlatformClient.Order { case message = "message" - case status = "status" - } - public init(message: String? = nil, status: Int? = nil, success: Bool? = nil) { + public init(message: [String]? = nil, success: Bool? = nil) { self.success = success self.message = message - self.status = status - } required public init(from decoder: Decoder) throws { @@ -56,19 +50,7 @@ public extension PlatformClient.Order { do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - 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) @@ -93,11 +75,6 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(message, forKey: .message) - - - try? container.encodeIfPresent(status, forKey: .status) - - } } @@ -116,9 +93,7 @@ public extension PlatformClient.ApplicationClient.Order { public var success: Bool? - public var message: String? - - public var status: Int? + public var message: [String]? public enum CodingKeys: String, CodingKey { @@ -127,18 +102,14 @@ public extension PlatformClient.ApplicationClient.Order { case message = "message" - case status = "status" - } - public init(message: String? = nil, status: Int? = nil, success: Bool? = nil) { + public init(message: [String]? = nil, success: Bool? = nil) { self.success = success self.message = message - self.status = status - } required public init(from decoder: Decoder) throws { @@ -158,19 +129,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - 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) @@ -195,11 +154,6 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(message, forKey: .message) - - - try? container.encodeIfPresent(status, forKey: .status) - - } } diff --git a/Sources/code/platform/Models/Order/RefundModeFormatOrderPlatformModel.swift b/Sources/code/platform/Models/Order/RuleActionOrderPlatformModel.swift similarity index 72% rename from Sources/code/platform/Models/Order/RefundModeFormatOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/RuleActionOrderPlatformModel.swift index 6c401899e1..783f5a60f2 100644 --- a/Sources/code/platform/Models/Order/RefundModeFormatOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/RuleActionOrderPlatformModel.swift @@ -5,25 +5,25 @@ import Foundation public extension PlatformClient.Order { /* - Model: RefundModeFormat + Model: RuleAction Used By: Order */ - class RefundModeFormat: Codable { + class RuleAction: Codable { - public var refundTo: String? + public var reasons: [Reason]? public enum CodingKeys: String, CodingKey { - case refundTo = "refund_to" + case reasons = "reasons" } - public init(refundTo: String? = nil) { + public init(reasons: [Reason]? = nil) { - self.refundTo = refundTo + self.reasons = reasons } @@ -32,7 +32,7 @@ public extension PlatformClient.Order { do { - refundTo = try container.decode(String.self, forKey: .refundTo) + reasons = try container.decode([Reason].self, forKey: .reasons) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -49,7 +49,7 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(refundTo, forKey: .refundTo) + try? container.encodeIfPresent(reasons, forKey: .reasons) } @@ -61,25 +61,25 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: RefundModeFormat + Model: RuleAction Used By: Order */ - class RefundModeFormat: Codable { + class RuleAction: Codable { - public var refundTo: String? + public var reasons: [Reason]? public enum CodingKeys: String, CodingKey { - case refundTo = "refund_to" + case reasons = "reasons" } - public init(refundTo: String? = nil) { + public init(reasons: [Reason]? = nil) { - self.refundTo = refundTo + self.reasons = reasons } @@ -88,7 +88,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - refundTo = try container.decode(String.self, forKey: .refundTo) + reasons = try container.decode([Reason].self, forKey: .reasons) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -105,7 +105,7 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(refundTo, forKey: .refundTo) + try? container.encodeIfPresent(reasons, forKey: .reasons) } diff --git a/Sources/code/platform/Models/Order/RuleErrorOrderPlatformModel.swift b/Sources/code/platform/Models/Order/RuleErrorOrderPlatformModel.swift new file mode 100644 index 0000000000..ee000e5d1a --- /dev/null +++ b/Sources/code/platform/Models/Order/RuleErrorOrderPlatformModel.swift @@ -0,0 +1,166 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: RuleError + Used By: Order + */ + + class RuleError: Codable { + + + public var type: String + + public var value: String + + public var message: String + + + public enum CodingKeys: String, CodingKey { + + case type = "type" + + case value = "value" + + case message = "message" + + } + + public init(message: String, type: String, value: String) { + + self.type = type + + self.value = value + + self.message = message + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + type = try container.decode(String.self, forKey: .type) + + + + + value = try container.decode(String.self, forKey: .value) + + + + + 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(type, forKey: .type) + + + + + try? container.encodeIfPresent(value, forKey: .value) + + + + + try? container.encodeIfPresent(message, forKey: .message) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: RuleError + Used By: Order + */ + + class RuleError: Codable { + + + public var type: String + + public var value: String + + public var message: String + + + public enum CodingKeys: String, CodingKey { + + case type = "type" + + case value = "value" + + case message = "message" + + } + + public init(message: String, type: String, value: String) { + + self.type = type + + self.value = value + + self.message = message + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + type = try container.decode(String.self, forKey: .type) + + + + + value = try container.decode(String.self, forKey: .value) + + + + + 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(type, forKey: .type) + + + + + try? container.encodeIfPresent(value, forKey: .value) + + + + + try? container.encodeIfPresent(message, forKey: .message) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ManifestErrorResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/RuleErrorResponseSchemaOrderPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Order/ManifestErrorResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/RuleErrorResponseSchemaOrderPlatformModel.swift index 02e52515b0..2934e3447f 100644 --- a/Sources/code/platform/Models/Order/ManifestErrorResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/RuleErrorResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: ManifestErrorResponse + Model: RuleErrorResponseSchema Used By: Order */ - class ManifestErrorResponse: Codable { + class RuleErrorResponseSchema: Codable { public var success: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ManifestErrorResponse + Model: RuleErrorResponseSchema Used By: Order */ - class ManifestErrorResponse: Codable { + class RuleErrorResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Order/RuleItemOrderPlatformModel.swift b/Sources/code/platform/Models/Order/RuleItemOrderPlatformModel.swift new file mode 100644 index 0000000000..7b2e957ed2 --- /dev/null +++ b/Sources/code/platform/Models/Order/RuleItemOrderPlatformModel.swift @@ -0,0 +1,422 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: RuleItem + Used By: Order + */ + + class RuleItem: Codable { + + + public var id: String + + public var entityType: String + + public var value: String + + public var channel: String + + public var actions: RuleAction + + public var qcEnabled: Bool + + public var isDeleted: Bool + + public var conditions: Conditions + + public var meta: [String: Any] + + public var ruleType: String + + public var isActive: Bool + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case entityType = "entity_type" + + case value = "value" + + case channel = "channel" + + case actions = "actions" + + case qcEnabled = "qc_enabled" + + case isDeleted = "is_deleted" + + case conditions = "conditions" + + case meta = "meta" + + case ruleType = "rule_type" + + case isActive = "is_active" + + } + + public init(actions: RuleAction, channel: String, conditions: Conditions, entityType: String, id: String, isActive: Bool, isDeleted: Bool, meta: [String: Any], qcEnabled: Bool, ruleType: String, value: String) { + + self.id = id + + self.entityType = entityType + + self.value = value + + self.channel = channel + + self.actions = actions + + self.qcEnabled = qcEnabled + + self.isDeleted = isDeleted + + self.conditions = conditions + + self.meta = meta + + self.ruleType = ruleType + + self.isActive = isActive + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + id = try container.decode(String.self, forKey: .id) + + + + + entityType = try container.decode(String.self, forKey: .entityType) + + + + + value = try container.decode(String.self, forKey: .value) + + + + + channel = try container.decode(String.self, forKey: .channel) + + + + + actions = try container.decode(RuleAction.self, forKey: .actions) + + + + + qcEnabled = try container.decode(Bool.self, forKey: .qcEnabled) + + + + + isDeleted = try container.decode(Bool.self, forKey: .isDeleted) + + + + + conditions = try container.decode(Conditions.self, forKey: .conditions) + + + + + meta = try container.decode([String: Any].self, forKey: .meta) + + + + + ruleType = try container.decode(String.self, forKey: .ruleType) + + + + + 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(id, forKey: .id) + + + + + try? container.encodeIfPresent(entityType, forKey: .entityType) + + + + + try? container.encodeIfPresent(value, forKey: .value) + + + + + try? container.encodeIfPresent(channel, forKey: .channel) + + + + + try? container.encodeIfPresent(actions, forKey: .actions) + + + + + try? container.encodeIfPresent(qcEnabled, forKey: .qcEnabled) + + + + + try? container.encodeIfPresent(isDeleted, forKey: .isDeleted) + + + + + try? container.encodeIfPresent(conditions, forKey: .conditions) + + + + + try? container.encodeIfPresent(meta, forKey: .meta) + + + + + try? container.encodeIfPresent(ruleType, forKey: .ruleType) + + + + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: RuleItem + Used By: Order + */ + + class RuleItem: Codable { + + + public var id: String + + public var entityType: String + + public var value: String + + public var channel: String + + public var actions: RuleAction + + public var qcEnabled: Bool + + public var isDeleted: Bool + + public var conditions: Conditions + + public var meta: [String: Any] + + public var ruleType: String + + public var isActive: Bool + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case entityType = "entity_type" + + case value = "value" + + case channel = "channel" + + case actions = "actions" + + case qcEnabled = "qc_enabled" + + case isDeleted = "is_deleted" + + case conditions = "conditions" + + case meta = "meta" + + case ruleType = "rule_type" + + case isActive = "is_active" + + } + + public init(actions: RuleAction, channel: String, conditions: Conditions, entityType: String, id: String, isActive: Bool, isDeleted: Bool, meta: [String: Any], qcEnabled: Bool, ruleType: String, value: String) { + + self.id = id + + self.entityType = entityType + + self.value = value + + self.channel = channel + + self.actions = actions + + self.qcEnabled = qcEnabled + + self.isDeleted = isDeleted + + self.conditions = conditions + + self.meta = meta + + self.ruleType = ruleType + + self.isActive = isActive + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + id = try container.decode(String.self, forKey: .id) + + + + + entityType = try container.decode(String.self, forKey: .entityType) + + + + + value = try container.decode(String.self, forKey: .value) + + + + + channel = try container.decode(String.self, forKey: .channel) + + + + + actions = try container.decode(RuleAction.self, forKey: .actions) + + + + + qcEnabled = try container.decode(Bool.self, forKey: .qcEnabled) + + + + + isDeleted = try container.decode(Bool.self, forKey: .isDeleted) + + + + + conditions = try container.decode(Conditions.self, forKey: .conditions) + + + + + meta = try container.decode([String: Any].self, forKey: .meta) + + + + + ruleType = try container.decode(String.self, forKey: .ruleType) + + + + + 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(id, forKey: .id) + + + + + try? container.encodeIfPresent(entityType, forKey: .entityType) + + + + + try? container.encodeIfPresent(value, forKey: .value) + + + + + try? container.encodeIfPresent(channel, forKey: .channel) + + + + + try? container.encodeIfPresent(actions, forKey: .actions) + + + + + try? container.encodeIfPresent(qcEnabled, forKey: .qcEnabled) + + + + + try? container.encodeIfPresent(isDeleted, forKey: .isDeleted) + + + + + try? container.encodeIfPresent(conditions, forKey: .conditions) + + + + + try? container.encodeIfPresent(meta, forKey: .meta) + + + + + try? container.encodeIfPresent(ruleType, forKey: .ruleType) + + + + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/RuleListRequestSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/RuleListRequestSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..ec84095226 --- /dev/null +++ b/Sources/code/platform/Models/Order/RuleListRequestSchemaOrderPlatformModel.swift @@ -0,0 +1,300 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: RuleListRequestSchema + Used By: Order + */ + + class RuleListRequestSchema: Codable { + + + public var pageNo: Int? + + public var channel: [String]? + + public var department: [String]? + + public var id: [String]? + + public var isActive: Bool? + + + public enum CodingKeys: String, CodingKey { + + case pageNo = "page_no" + + case channel = "channel" + + case department = "department" + + case id = "id" + + case isActive = "is_active" + + } + + public init(channel: [String]? = nil, department: [String]? = nil, id: [String]? = nil, isActive: Bool? = nil, pageNo: Int? = nil) { + + self.pageNo = pageNo + + self.channel = channel + + self.department = department + + self.id = id + + self.isActive = isActive + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pageNo = try container.decode(Int.self, forKey: .pageNo) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + channel = try container.decode([String].self, forKey: .channel) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + department = try container.decode([String].self, forKey: .department) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pageNo, forKey: .pageNo) + + + + + try? container.encodeIfPresent(channel, forKey: .channel) + + + + + try? container.encodeIfPresent(department, forKey: .department) + + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: RuleListRequestSchema + Used By: Order + */ + + class RuleListRequestSchema: Codable { + + + public var pageNo: Int? + + public var channel: [String]? + + public var department: [String]? + + public var id: [String]? + + public var isActive: Bool? + + + public enum CodingKeys: String, CodingKey { + + case pageNo = "page_no" + + case channel = "channel" + + case department = "department" + + case id = "id" + + case isActive = "is_active" + + } + + public init(channel: [String]? = nil, department: [String]? = nil, id: [String]? = nil, isActive: Bool? = nil, pageNo: Int? = nil) { + + self.pageNo = pageNo + + self.channel = channel + + self.department = department + + self.id = id + + self.isActive = isActive + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pageNo = try container.decode(Int.self, forKey: .pageNo) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + channel = try container.decode([String].self, forKey: .channel) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + department = try container.decode([String].self, forKey: .department) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pageNo, forKey: .pageNo) + + + + + try? container.encodeIfPresent(channel, forKey: .channel) + + + + + try? container.encodeIfPresent(department, forKey: .department) + + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/RuleListResponseSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/RuleListResponseSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..f448555f69 --- /dev/null +++ b/Sources/code/platform/Models/Order/RuleListResponseSchemaOrderPlatformModel.swift @@ -0,0 +1,254 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: RuleListResponseSchema + Used By: Order + */ + + class RuleListResponseSchema: Codable { + + + public var page: RMAPageInfo? + + public var items: [RuleItem]? + + public var success: Bool? + + public var error: RuleError? + + + public enum CodingKeys: String, CodingKey { + + case page = "page" + + case items = "items" + + case success = "success" + + case error = "error" + + } + + public init(error: RuleError? = nil, items: [RuleItem]? = nil, page: RMAPageInfo? = nil, success: Bool? = nil) { + + self.page = page + + self.items = items + + self.success = success + + self.error = error + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + page = try container.decode(RMAPageInfo.self, forKey: .page) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + items = try container.decode([RuleItem].self, forKey: .items) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + error = try container.decode(RuleError.self, forKey: .error) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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(success, forKey: .success) + + + + + try? container.encodeIfPresent(error, forKey: .error) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: RuleListResponseSchema + Used By: Order + */ + + class RuleListResponseSchema: Codable { + + + public var page: RMAPageInfo? + + public var items: [RuleItem]? + + public var success: Bool? + + public var error: RuleError? + + + public enum CodingKeys: String, CodingKey { + + case page = "page" + + case items = "items" + + case success = "success" + + case error = "error" + + } + + public init(error: RuleError? = nil, items: [RuleItem]? = nil, page: RMAPageInfo? = nil, success: Bool? = nil) { + + self.page = page + + self.items = items + + self.success = success + + self.error = error + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + page = try container.decode(RMAPageInfo.self, forKey: .page) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + items = try container.decode([RuleItem].self, forKey: .items) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + success = try container.decode(Bool.self, forKey: .success) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + error = try container.decode(RuleError.self, forKey: .error) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + 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(success, forKey: .success) + + + + + try? container.encodeIfPresent(error, forKey: .error) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/SendSmsPayloadOrderPlatformModel.swift b/Sources/code/platform/Models/Order/SendSmsPayloadOrderPlatformModel.swift index 82efc7ce8f..f6f394b7e5 100644 --- a/Sources/code/platform/Models/Order/SendSmsPayloadOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/SendSmsPayloadOrderPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Order { class SendSmsPayload: Codable { - public var bagId: Int + public var bagId: String public var data: SmsDataPayload? @@ -29,7 +29,7 @@ public extension PlatformClient.Order { } - public init(bagId: Int, data: SmsDataPayload? = nil, slug: String) { + public init(bagId: String, data: SmsDataPayload? = nil, slug: String) { self.bagId = bagId @@ -43,7 +43,7 @@ public extension PlatformClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) - bagId = try container.decode(Int.self, forKey: .bagId) + bagId = try container.decode(String.self, forKey: .bagId) @@ -100,7 +100,7 @@ public extension PlatformClient.ApplicationClient.Order { class SendSmsPayload: Codable { - public var bagId: Int + public var bagId: String public var data: SmsDataPayload? @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(bagId: Int, data: SmsDataPayload? = nil, slug: String) { + public init(bagId: String, data: SmsDataPayload? = nil, slug: String) { self.bagId = bagId @@ -131,7 +131,7 @@ public extension PlatformClient.ApplicationClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) - bagId = try container.decode(Int.self, forKey: .bagId) + bagId = try container.decode(String.self, forKey: .bagId) diff --git a/Sources/code/platform/Models/Order/SendSmsResponseSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/SendSmsResponseSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..942dc1a7dc --- /dev/null +++ b/Sources/code/platform/Models/Order/SendSmsResponseSchemaOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: SendSmsResponseSchema + Used By: Order + */ + + class SendSmsResponseSchema: Codable { + + + public var success: Bool + + public var message: String + + + public enum CodingKeys: String, CodingKey { + + case success = "success" + + case message = "message" + + } + + public init(message: String, success: Bool) { + + self.success = success + + self.message = message + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + success = try container.decode(Bool.self, forKey: .success) + + + + + 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) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: SendSmsResponseSchema + Used By: Order + */ + + class SendSmsResponseSchema: Codable { + + + public var success: Bool + + public var message: String + + + public enum CodingKeys: String, CodingKey { + + case success = "success" + + case message = "message" + + } + + public init(message: String, success: Bool) { + + self.success = success + + self.message = message + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + success = try container.decode(Bool.self, forKey: .success) + + + + + 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) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/SendUserMobileOTPOrderPlatformModel.swift b/Sources/code/platform/Models/Order/SendUserMobileOTPOrderPlatformModel.swift index f7ae7cfd14..b42647631a 100644 --- a/Sources/code/platform/Models/Order/SendUserMobileOTPOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/SendUserMobileOTPOrderPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Order { class SendUserMobileOTP: Codable { - public var mobile: Double + public var mobile: String public var countryCode: String? @@ -25,7 +25,7 @@ public extension PlatformClient.Order { } - public init(countryCode: String? = nil, mobile: Double) { + public init(countryCode: String? = nil, mobile: String) { self.mobile = mobile @@ -37,7 +37,7 @@ public extension PlatformClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) - mobile = try container.decode(Double.self, forKey: .mobile) + mobile = try container.decode(String.self, forKey: .mobile) @@ -84,7 +84,7 @@ public extension PlatformClient.ApplicationClient.Order { class SendUserMobileOTP: Codable { - public var mobile: Double + public var mobile: String public var countryCode: String? @@ -97,7 +97,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(countryCode: String? = nil, mobile: Double) { + public init(countryCode: String? = nil, mobile: String) { self.mobile = mobile @@ -109,7 +109,7 @@ public extension PlatformClient.ApplicationClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) - mobile = try container.decode(Double.self, forKey: .mobile) + mobile = try container.decode(String.self, forKey: .mobile) diff --git a/Sources/code/platform/Models/Order/SendUserMobileOtpResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/SendUserMobileOtpResponseSchemaOrderPlatformModel.swift similarity index 76% rename from Sources/code/platform/Models/Order/SendUserMobileOtpResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/SendUserMobileOtpResponseSchemaOrderPlatformModel.swift index 14b1b7875f..3b46b49ce0 100644 --- a/Sources/code/platform/Models/Order/SendUserMobileOtpResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/SendUserMobileOtpResponseSchemaOrderPlatformModel.swift @@ -5,17 +5,15 @@ import Foundation public extension PlatformClient.Order { /* - Model: SendUserMobileOtpResponse + Model: SendUserMobileOtpResponseSchema Used By: Order */ - class SendUserMobileOtpResponse: Codable { + class SendUserMobileOtpResponseSchema: Codable { public var success: Bool? - public var status: Int? - public var message: String? public var data: PointBlankOtpData? @@ -25,20 +23,16 @@ public extension PlatformClient.Order { case success = "success" - case status = "status" - case message = "message" case data = "data" } - public init(data: PointBlankOtpData? = nil, message: String? = nil, status: Int? = nil, success: Bool? = nil) { + public init(data: PointBlankOtpData? = nil, message: String? = nil, success: Bool? = nil) { self.success = success - self.status = status - self.message = message self.data = data @@ -61,18 +55,6 @@ public extension PlatformClient.Order { - do { - status = try container.decode(Int.self, forKey: .status) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { message = try container.decode(String.self, forKey: .message) @@ -108,11 +90,6 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(status, forKey: .status) - - - - try? container.encodeIfPresent(message, forKey: .message) @@ -130,17 +107,15 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: SendUserMobileOtpResponse + Model: SendUserMobileOtpResponseSchema Used By: Order */ - class SendUserMobileOtpResponse: Codable { + class SendUserMobileOtpResponseSchema: Codable { public var success: Bool? - public var status: Int? - public var message: String? public var data: PointBlankOtpData? @@ -150,20 +125,16 @@ public extension PlatformClient.ApplicationClient.Order { case success = "success" - case status = "status" - case message = "message" case data = "data" } - public init(data: PointBlankOtpData? = nil, message: String? = nil, status: Int? = nil, success: Bool? = nil) { + public init(data: PointBlankOtpData? = nil, message: String? = nil, success: Bool? = nil) { self.success = success - self.status = status - self.message = message self.data = data @@ -186,18 +157,6 @@ public extension PlatformClient.ApplicationClient.Order { - do { - status = try container.decode(Int.self, forKey: .status) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - do { message = try container.decode(String.self, forKey: .message) @@ -233,11 +192,6 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(status, forKey: .status) - - - - try? container.encodeIfPresent(message, forKey: .message) diff --git a/Sources/code/platform/Models/Order/ShipmentActionInfoOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentActionInfoOrderPlatformModel.swift index 993cbaac34..c58c556597 100644 --- a/Sources/code/platform/Models/Order/ShipmentActionInfoOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShipmentActionInfoOrderPlatformModel.swift @@ -24,7 +24,7 @@ public extension PlatformClient.Order { public var invoiceableShipments: [String]? - public var failedInvoicedShipments: [String: String]? + public var failedInvoicedShipments: [String: Any]? public var processingInvoiceShipments: [String]? @@ -53,7 +53,7 @@ public extension PlatformClient.Order { } - public init(failedInvoicedShipments: [String: String]? = nil, failedShipments: [[String: String]]? = nil, invoice: [String]? = nil, invoiceableShipments: [String]? = nil, label: [String]? = nil, processingInvoiceShipments: [String]? = nil, processingShipments: [String]? = nil, successfulInvoicedShipments: [String]? = nil, successfulShipments: [String]? = nil) { + public init(failedInvoicedShipments: [String: Any]? = nil, failedShipments: [[String: String]]? = nil, invoice: [String]? = nil, invoiceableShipments: [String]? = nil, label: [String]? = nil, processingInvoiceShipments: [String]? = nil, processingShipments: [String]? = nil, successfulInvoicedShipments: [String]? = nil, successfulShipments: [String]? = nil) { self.label = label @@ -152,7 +152,7 @@ public extension PlatformClient.Order { do { - failedInvoicedShipments = try container.decode([String: String].self, forKey: .failedInvoicedShipments) + failedInvoicedShipments = try container.decode([String: Any].self, forKey: .failedInvoicedShipments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -264,7 +264,7 @@ public extension PlatformClient.ApplicationClient.Order { public var invoiceableShipments: [String]? - public var failedInvoicedShipments: [String: String]? + public var failedInvoicedShipments: [String: Any]? public var processingInvoiceShipments: [String]? @@ -293,7 +293,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(failedInvoicedShipments: [String: String]? = nil, failedShipments: [[String: String]]? = nil, invoice: [String]? = nil, invoiceableShipments: [String]? = nil, label: [String]? = nil, processingInvoiceShipments: [String]? = nil, processingShipments: [String]? = nil, successfulInvoicedShipments: [String]? = nil, successfulShipments: [String]? = nil) { + public init(failedInvoicedShipments: [String: Any]? = nil, failedShipments: [[String: String]]? = nil, invoice: [String]? = nil, invoiceableShipments: [String]? = nil, label: [String]? = nil, processingInvoiceShipments: [String]? = nil, processingShipments: [String]? = nil, successfulInvoicedShipments: [String]? = nil, successfulShipments: [String]? = nil) { self.label = label @@ -392,7 +392,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - failedInvoicedShipments = try container.decode([String: String].self, forKey: .failedInvoicedShipments) + failedInvoicedShipments = try container.decode([String: Any].self, forKey: .failedInvoicedShipments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/ShipmentBagReasonsOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentBagReasonsOrderPlatformModel.swift index 718e4a903d..1796b46f73 100644 --- a/Sources/code/platform/Models/Order/ShipmentBagReasonsOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShipmentBagReasonsOrderPlatformModel.swift @@ -16,6 +16,8 @@ public extension PlatformClient.Order { public var success: Bool? + public var ruleId: Int? + public enum CodingKeys: String, CodingKey { @@ -23,14 +25,18 @@ public extension PlatformClient.Order { case success = "success" + case ruleId = "rule_id" + } - public init(reasons: [BagReasons]? = nil, success: Bool? = nil) { + public init(reasons: [BagReasons]? = nil, ruleId: Int? = nil, success: Bool? = nil) { self.reasons = reasons self.success = success + self.ruleId = ruleId + } required public init(from decoder: Decoder) throws { @@ -60,6 +66,18 @@ public extension PlatformClient.Order { } + + do { + ruleId = try container.decode(Int.self, forKey: .ruleId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -75,6 +93,11 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(success, forKey: .success) + + + try? container.encodeIfPresent(ruleId, forKey: .ruleId) + + } } @@ -95,6 +118,8 @@ public extension PlatformClient.ApplicationClient.Order { public var success: Bool? + public var ruleId: Int? + public enum CodingKeys: String, CodingKey { @@ -102,14 +127,18 @@ public extension PlatformClient.ApplicationClient.Order { case success = "success" + case ruleId = "rule_id" + } - public init(reasons: [BagReasons]? = nil, success: Bool? = nil) { + public init(reasons: [BagReasons]? = nil, ruleId: Int? = nil, success: Bool? = nil) { self.reasons = reasons self.success = success + self.ruleId = ruleId + } required public init(from decoder: Decoder) throws { @@ -139,6 +168,18 @@ public extension PlatformClient.ApplicationClient.Order { } + + do { + ruleId = try container.decode(Int.self, forKey: .ruleId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -154,6 +195,11 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(success, forKey: .success) + + + try? container.encodeIfPresent(ruleId, forKey: .ruleId) + + } } diff --git a/Sources/code/platform/Models/Order/ShipmentConfigOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentConfigOrderPlatformModel.swift new file mode 100644 index 0000000000..7278bc46e1 --- /dev/null +++ b/Sources/code/platform/Models/Order/ShipmentConfigOrderPlatformModel.swift @@ -0,0 +1,340 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ShipmentConfig + Used By: Order + */ + + class ShipmentConfig: Codable { + + + public var locationDetails: LocationDetails? + + public var source: String + + public var toPincode: String + + public var shipment: [ShipmentDetails] + + public var identifier: String + + public var paymentMode: String + + public var action: String + + public var journey: String + + + public enum CodingKeys: String, CodingKey { + + case locationDetails = "location_details" + + case source = "source" + + case toPincode = "to_pincode" + + case shipment = "shipment" + + case identifier = "identifier" + + case paymentMode = "payment_mode" + + case action = "action" + + case journey = "journey" + + } + + public init(action: String, identifier: String, journey: String, locationDetails: LocationDetails? = nil, paymentMode: String, shipment: [ShipmentDetails], source: String, toPincode: String) { + + self.locationDetails = locationDetails + + self.source = source + + self.toPincode = toPincode + + self.shipment = shipment + + self.identifier = identifier + + self.paymentMode = paymentMode + + self.action = action + + self.journey = journey + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + locationDetails = try container.decode(LocationDetails.self, forKey: .locationDetails) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + source = try container.decode(String.self, forKey: .source) + + + + + toPincode = try container.decode(String.self, forKey: .toPincode) + + + + + shipment = try container.decode([ShipmentDetails].self, forKey: .shipment) + + + + + identifier = try container.decode(String.self, forKey: .identifier) + + + + + paymentMode = try container.decode(String.self, forKey: .paymentMode) + + + + + action = try container.decode(String.self, forKey: .action) + + + + + journey = try container.decode(String.self, forKey: .journey) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(locationDetails, forKey: .locationDetails) + + + + + try? container.encodeIfPresent(source, forKey: .source) + + + + + try? container.encodeIfPresent(toPincode, forKey: .toPincode) + + + + + try? container.encodeIfPresent(shipment, forKey: .shipment) + + + + + try? container.encodeIfPresent(identifier, forKey: .identifier) + + + + + try? container.encodeIfPresent(paymentMode, forKey: .paymentMode) + + + + + try? container.encodeIfPresent(action, forKey: .action) + + + + + try? container.encodeIfPresent(journey, forKey: .journey) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ShipmentConfig + Used By: Order + */ + + class ShipmentConfig: Codable { + + + public var locationDetails: LocationDetails? + + public var source: String + + public var toPincode: String + + public var shipment: [ShipmentDetails] + + public var identifier: String + + public var paymentMode: String + + public var action: String + + public var journey: String + + + public enum CodingKeys: String, CodingKey { + + case locationDetails = "location_details" + + case source = "source" + + case toPincode = "to_pincode" + + case shipment = "shipment" + + case identifier = "identifier" + + case paymentMode = "payment_mode" + + case action = "action" + + case journey = "journey" + + } + + public init(action: String, identifier: String, journey: String, locationDetails: LocationDetails? = nil, paymentMode: String, shipment: [ShipmentDetails], source: String, toPincode: String) { + + self.locationDetails = locationDetails + + self.source = source + + self.toPincode = toPincode + + self.shipment = shipment + + self.identifier = identifier + + self.paymentMode = paymentMode + + self.action = action + + self.journey = journey + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + locationDetails = try container.decode(LocationDetails.self, forKey: .locationDetails) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + source = try container.decode(String.self, forKey: .source) + + + + + toPincode = try container.decode(String.self, forKey: .toPincode) + + + + + shipment = try container.decode([ShipmentDetails].self, forKey: .shipment) + + + + + identifier = try container.decode(String.self, forKey: .identifier) + + + + + paymentMode = try container.decode(String.self, forKey: .paymentMode) + + + + + action = try container.decode(String.self, forKey: .action) + + + + + journey = try container.decode(String.self, forKey: .journey) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(locationDetails, forKey: .locationDetails) + + + + + try? container.encodeIfPresent(source, forKey: .source) + + + + + try? container.encodeIfPresent(toPincode, forKey: .toPincode) + + + + + try? container.encodeIfPresent(shipment, forKey: .shipment) + + + + + try? container.encodeIfPresent(identifier, forKey: .identifier) + + + + + try? container.encodeIfPresent(paymentMode, forKey: .paymentMode) + + + + + try? container.encodeIfPresent(action, forKey: .action) + + + + + try? container.encodeIfPresent(journey, forKey: .journey) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ShipmentDataOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentDataOrderPlatformModel.swift new file mode 100644 index 0000000000..d7a7b2de0f --- /dev/null +++ b/Sources/code/platform/Models/Order/ShipmentDataOrderPlatformModel.swift @@ -0,0 +1,102 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ShipmentData + Used By: Order + */ + + class ShipmentData: Codable { + + + public var shipmentData: ShipmentConfig + + + public enum CodingKeys: String, CodingKey { + + case shipmentData = "shipment_data" + + } + + public init(shipmentData: ShipmentConfig) { + + self.shipmentData = shipmentData + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + shipmentData = try container.decode(ShipmentConfig.self, forKey: .shipmentData) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(shipmentData, forKey: .shipmentData) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ShipmentData + Used By: Order + */ + + class ShipmentData: Codable { + + + public var shipmentData: ShipmentConfig + + + public enum CodingKeys: String, CodingKey { + + case shipmentData = "shipment_data" + + } + + public init(shipmentData: ShipmentConfig) { + + self.shipmentData = shipmentData + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + shipmentData = try container.decode(ShipmentConfig.self, forKey: .shipmentData) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(shipmentData, forKey: .shipmentData) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ShipmentDetailsOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentDetailsOrderPlatformModel.swift index 76344e7c80..1f8a2edfa0 100644 --- a/Sources/code/platform/Models/Order/ShipmentDetailsOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShipmentDetailsOrderPlatformModel.swift @@ -12,8 +12,20 @@ public extension PlatformClient.Order { class ShipmentDetails: Codable { + public var boxType: String? + + public var shipments: Int + + public var fulfillmentId: Int + + public var articles: [ArticleDetails] + public var dpId: String? + public var meta: [String: Any]? + + public var affiliateShipmentId: String + public var dpOptions: [String: Any]? public var lockStatus: Bool? @@ -23,8 +35,20 @@ public extension PlatformClient.Order { public enum CodingKeys: String, CodingKey { + case boxType = "box_type" + + case shipments = "shipments" + + case fulfillmentId = "fulfillment_id" + + case articles = "articles" + case dpId = "dp_id" + case meta = "meta" + + case affiliateShipmentId = "affiliate_shipment_id" + case dpOptions = "dp_options" case lockStatus = "lock_status" @@ -33,10 +57,22 @@ public extension PlatformClient.Order { } - public init(actionToStatus: [String: Any]? = nil, dpId: String? = nil, dpOptions: [String: Any]? = nil, lockStatus: Bool? = nil) { + public init(actionToStatus: [String: Any]? = nil, affiliateShipmentId: String, articles: [ArticleDetails], boxType: String? = nil, dpId: String? = nil, dpOptions: [String: Any]? = nil, fulfillmentId: Int, lockStatus: Bool? = nil, meta: [String: Any]? = nil, shipments: Int) { + + self.boxType = boxType + + self.shipments = shipments + + self.fulfillmentId = fulfillmentId + + self.articles = articles self.dpId = dpId + self.meta = meta + + self.affiliateShipmentId = affiliateShipmentId + self.dpOptions = dpOptions self.lockStatus = lockStatus @@ -49,6 +85,33 @@ public extension PlatformClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) + do { + boxType = try container.decode(String.self, forKey: .boxType) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + shipments = try container.decode(Int.self, forKey: .shipments) + + + + + fulfillmentId = try container.decode(Int.self, forKey: .fulfillmentId) + + + + + articles = try container.decode([ArticleDetails].self, forKey: .articles) + + + + do { dpId = try container.decode(String.self, forKey: .dpId) @@ -61,6 +124,23 @@ public extension PlatformClient.Order { + do { + 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 { + + } + + + + affiliateShipmentId = try container.decode(String.self, forKey: .affiliateShipmentId) + + + + do { dpOptions = try container.decode([String: Any].self, forKey: .dpOptions) @@ -103,11 +183,41 @@ public extension PlatformClient.Order { + try? container.encodeIfPresent(boxType, forKey: .boxType) + + + + + try? container.encodeIfPresent(shipments, forKey: .shipments) + + + + + try? container.encodeIfPresent(fulfillmentId, forKey: .fulfillmentId) + + + + + try? container.encodeIfPresent(articles, forKey: .articles) + + + + try? container.encodeIfPresent(dpId, forKey: .dpId) + try? container.encodeIfPresent(meta, forKey: .meta) + + + + + try? container.encodeIfPresent(affiliateShipmentId, forKey: .affiliateShipmentId) + + + + try? container.encodeIfPresent(dpOptions, forKey: .dpOptions) @@ -137,8 +247,20 @@ public extension PlatformClient.ApplicationClient.Order { class ShipmentDetails: Codable { + public var boxType: String? + + public var shipments: Int + + public var fulfillmentId: Int + + public var articles: [ArticleDetails] + public var dpId: String? + public var meta: [String: Any]? + + public var affiliateShipmentId: String + public var dpOptions: [String: Any]? public var lockStatus: Bool? @@ -148,8 +270,20 @@ public extension PlatformClient.ApplicationClient.Order { public enum CodingKeys: String, CodingKey { + case boxType = "box_type" + + case shipments = "shipments" + + case fulfillmentId = "fulfillment_id" + + case articles = "articles" + case dpId = "dp_id" + case meta = "meta" + + case affiliateShipmentId = "affiliate_shipment_id" + case dpOptions = "dp_options" case lockStatus = "lock_status" @@ -158,10 +292,22 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(actionToStatus: [String: Any]? = nil, dpId: String? = nil, dpOptions: [String: Any]? = nil, lockStatus: Bool? = nil) { + public init(actionToStatus: [String: Any]? = nil, affiliateShipmentId: String, articles: [ArticleDetails], boxType: String? = nil, dpId: String? = nil, dpOptions: [String: Any]? = nil, fulfillmentId: Int, lockStatus: Bool? = nil, meta: [String: Any]? = nil, shipments: Int) { + + self.boxType = boxType + + self.shipments = shipments + + self.fulfillmentId = fulfillmentId + + self.articles = articles self.dpId = dpId + self.meta = meta + + self.affiliateShipmentId = affiliateShipmentId + self.dpOptions = dpOptions self.lockStatus = lockStatus @@ -174,6 +320,33 @@ public extension PlatformClient.ApplicationClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) + do { + boxType = try container.decode(String.self, forKey: .boxType) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + shipments = try container.decode(Int.self, forKey: .shipments) + + + + + fulfillmentId = try container.decode(Int.self, forKey: .fulfillmentId) + + + + + articles = try container.decode([ArticleDetails].self, forKey: .articles) + + + + do { dpId = try container.decode(String.self, forKey: .dpId) @@ -186,6 +359,23 @@ public extension PlatformClient.ApplicationClient.Order { + do { + 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 { + + } + + + + affiliateShipmentId = try container.decode(String.self, forKey: .affiliateShipmentId) + + + + do { dpOptions = try container.decode([String: Any].self, forKey: .dpOptions) @@ -228,11 +418,41 @@ public extension PlatformClient.ApplicationClient.Order { + try? container.encodeIfPresent(boxType, forKey: .boxType) + + + + + try? container.encodeIfPresent(shipments, forKey: .shipments) + + + + + try? container.encodeIfPresent(fulfillmentId, forKey: .fulfillmentId) + + + + + try? container.encodeIfPresent(articles, forKey: .articles) + + + + try? container.encodeIfPresent(dpId, forKey: .dpId) + try? container.encodeIfPresent(meta, forKey: .meta) + + + + + try? container.encodeIfPresent(affiliateShipmentId, forKey: .affiliateShipmentId) + + + + try? container.encodeIfPresent(dpOptions, forKey: .dpOptions) diff --git a/Sources/code/platform/Models/Order/ShipmentHistoryResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentHistoryResponseSchemaOrderPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Order/ShipmentHistoryResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ShipmentHistoryResponseSchemaOrderPlatformModel.swift index 667e8f7d2f..9d2b573e84 100644 --- a/Sources/code/platform/Models/Order/ShipmentHistoryResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShipmentHistoryResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: ShipmentHistoryResponse + Model: ShipmentHistoryResponseSchema Used By: Order */ - class ShipmentHistoryResponse: Codable { + class ShipmentHistoryResponseSchema: Codable { public var success: Bool? @@ -77,11 +77,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ShipmentHistoryResponse + Model: ShipmentHistoryResponseSchema Used By: Order */ - class ShipmentHistoryResponse: Codable { + class ShipmentHistoryResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Order/ShipmentInfoResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentInfoResponseSchemaOrderPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Order/ShipmentInfoResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ShipmentInfoResponseSchemaOrderPlatformModel.swift index 6feaf89fb1..4e65d41b69 100644 --- a/Sources/code/platform/Models/Order/ShipmentInfoResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShipmentInfoResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: ShipmentInfoResponse + Model: ShipmentInfoResponseSchema Used By: Order */ - class ShipmentInfoResponse: Codable { + class ShipmentInfoResponseSchema: Codable { public var message: String? @@ -100,11 +100,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ShipmentInfoResponse + Model: ShipmentInfoResponseSchema Used By: Order */ - class ShipmentInfoResponse: Codable { + class ShipmentInfoResponseSchema: Codable { public var message: String? diff --git a/Sources/code/platform/Models/Order/ShipmentInternalPlatformViewResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentInternalPlatformViewResponseSchemaOrderPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Order/ShipmentInternalPlatformViewResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ShipmentInternalPlatformViewResponseSchemaOrderPlatformModel.swift index ed61ccc152..c744c1685f 100644 --- a/Sources/code/platform/Models/Order/ShipmentInternalPlatformViewResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShipmentInternalPlatformViewResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: ShipmentInternalPlatformViewResponse + Model: ShipmentInternalPlatformViewResponseSchema Used By: Order */ - class ShipmentInternalPlatformViewResponse: Codable { + class ShipmentInternalPlatformViewResponseSchema: Codable { public var totalCount: Int? @@ -176,11 +176,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ShipmentInternalPlatformViewResponse + Model: ShipmentInternalPlatformViewResponseSchema Used By: Order */ - class ShipmentInternalPlatformViewResponse: Codable { + class ShipmentInternalPlatformViewResponseSchema: Codable { public var totalCount: Int? diff --git a/Sources/code/platform/Models/Order/ShipmentItemOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentItemOrderPlatformModel.swift index 2acb2aea6a..5fcf3146c6 100644 --- a/Sources/code/platform/Models/Order/ShipmentItemOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShipmentItemOrderPlatformModel.swift @@ -24,12 +24,20 @@ public extension PlatformClient.Order { public var estimatedSlaTs: String? - public var deliveryAddress: PlatformDeliveryAddress? + public var deliveryAddress: Address? + + public var billingAddress: Address? + + public var affiliateDetails: AffiliateDetails? + + public var isActive: Bool? public var channel: ShipmentListingChannel? public var previousShipmentId: String? + public var forwardEndShipmentId: String? + public var lockStatus: Bool? public var invoiceId: String? @@ -56,6 +64,8 @@ public extension PlatformClient.Order { public var prices: Prices? + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public var orderId: String public var orderingChannnel: String? @@ -78,6 +88,8 @@ public extension PlatformClient.Order { public var isLapaEnabled: Bool? + public var logisticsMeta: [String: Any]? + public enum CodingKeys: String, CodingKey { @@ -95,10 +107,18 @@ public extension PlatformClient.Order { case deliveryAddress = "delivery_address" + case billingAddress = "billing_address" + + case affiliateDetails = "affiliate_details" + + case isActive = "is_active" + case channel = "channel" case previousShipmentId = "previous_shipment_id" + case forwardEndShipmentId = "forward_end_shipment_id" + case lockStatus = "lock_status" case invoiceId = "invoice_id" @@ -125,6 +145,8 @@ public extension PlatformClient.Order { case prices = "prices" + case orderingCurrencyPrices = "ordering_currency_prices" + case orderId = "order_id" case orderingChannnel = "ordering_channnel" @@ -147,9 +169,11 @@ public extension PlatformClient.Order { case isLapaEnabled = "is_lapa_enabled" + case logisticsMeta = "logistics_meta" + } - public init(bags: [BagUnit]? = nil, canProcess: Bool? = nil, channel: ShipmentListingChannel? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, customerNote: String? = nil, deliveryAddress: PlatformDeliveryAddress? = nil, displayName: String? = nil, estimatedSlaTime: String? = nil, estimatedSlaTs: String? = nil, fulfillingStore: ShipmentItemFulFillingStore? = nil, invoiceId: String? = nil, isLapaEnabled: Bool? = nil, lockStatus: Bool? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, orderingChannnel: String? = nil, orderCreatedTs: String? = nil, orderDate: String? = nil, orderId: String, paymentInfo: [[String: Any]]? = nil, paymentMethods: [String: Any]? = nil, paymentMode: String? = nil, previousShipmentId: String? = nil, prices: Prices? = nil, shipmentCreatedAt: String, shipmentCreatedTs: String? = nil, shipmentId: String? = nil, shipmentStatus: ShipmentStatus? = nil, statusCreatedAt: String? = nil, statusCreatedTs: String? = nil, totalBags: Int, user: UserDataInfo? = nil) { + public init(affiliateDetails: AffiliateDetails? = nil, bags: [BagUnit]? = nil, billingAddress: Address? = nil, canProcess: Bool? = nil, channel: ShipmentListingChannel? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, customerNote: String? = nil, deliveryAddress: Address? = nil, displayName: String? = nil, estimatedSlaTime: String? = nil, estimatedSlaTs: String? = nil, forwardEndShipmentId: String? = nil, fulfillingStore: ShipmentItemFulFillingStore? = nil, invoiceId: String? = nil, isActive: Bool? = nil, isLapaEnabled: Bool? = nil, lockStatus: Bool? = nil, logisticsMeta: [String: Any]? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, orderingChannnel: String? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, orderCreatedTs: String? = nil, orderDate: String? = nil, orderId: String, paymentInfo: [[String: Any]]? = nil, paymentMethods: [String: Any]? = nil, paymentMode: String? = nil, previousShipmentId: String? = nil, prices: Prices? = nil, shipmentCreatedAt: String, shipmentCreatedTs: String? = nil, shipmentId: String? = nil, shipmentStatus: ShipmentStatus? = nil, statusCreatedAt: String? = nil, statusCreatedTs: String? = nil, totalBags: Int, user: UserDataInfo? = nil) { self.orderDate = orderDate @@ -165,10 +189,18 @@ public extension PlatformClient.Order { self.deliveryAddress = deliveryAddress + self.billingAddress = billingAddress + + self.affiliateDetails = affiliateDetails + + self.isActive = isActive + self.channel = channel self.previousShipmentId = previousShipmentId + self.forwardEndShipmentId = forwardEndShipmentId + self.lockStatus = lockStatus self.invoiceId = invoiceId @@ -195,6 +227,8 @@ public extension PlatformClient.Order { self.prices = prices + self.orderingCurrencyPrices = orderingCurrencyPrices + self.orderId = orderId self.orderingChannnel = orderingChannnel @@ -217,6 +251,8 @@ public extension PlatformClient.Order { self.isLapaEnabled = isLapaEnabled + self.logisticsMeta = logisticsMeta + } required public init(from decoder: Decoder) throws { @@ -296,7 +332,43 @@ public extension PlatformClient.Order { do { - deliveryAddress = try container.decode(PlatformDeliveryAddress.self, forKey: .deliveryAddress) + deliveryAddress = try container.decode(Address.self, forKey: .deliveryAddress) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + billingAddress = try container.decode(Address.self, forKey: .billingAddress) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + affiliateDetails = try container.decode(AffiliateDetails.self, forKey: .affiliateDetails) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -331,6 +403,18 @@ public extension PlatformClient.Order { + do { + forwardEndShipmentId = try container.decode(String.self, forKey: .forwardEndShipmentId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { lockStatus = try container.decode(Bool.self, forKey: .lockStatus) @@ -487,6 +571,18 @@ public extension PlatformClient.Order { + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } 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) @@ -597,6 +693,18 @@ public extension PlatformClient.Order { } + + do { + logisticsMeta = try container.decode([String: Any].self, forKey: .logisticsMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -639,6 +747,21 @@ public extension PlatformClient.Order { + try? container.encodeIfPresent(billingAddress, forKey: .billingAddress) + + + + + try? container.encodeIfPresent(affiliateDetails, forKey: .affiliateDetails) + + + + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + + + try? container.encodeIfPresent(channel, forKey: .channel) @@ -649,6 +772,11 @@ public extension PlatformClient.Order { + try? container.encodeIfPresent(forwardEndShipmentId, forKey: .forwardEndShipmentId) + + + + try? container.encodeIfPresent(lockStatus, forKey: .lockStatus) @@ -714,6 +842,11 @@ public extension PlatformClient.Order { + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + + + try? container.encodeIfPresent(orderId, forKey: .orderId) @@ -767,6 +900,11 @@ public extension PlatformClient.Order { try? container.encodeIfPresent(isLapaEnabled, forKey: .isLapaEnabled) + + + try? container.encodeIfPresent(logisticsMeta, forKey: .logisticsMeta) + + } } @@ -795,12 +933,20 @@ public extension PlatformClient.ApplicationClient.Order { public var estimatedSlaTs: String? - public var deliveryAddress: PlatformDeliveryAddress? + public var deliveryAddress: Address? + + public var billingAddress: Address? + + public var affiliateDetails: AffiliateDetails? + + public var isActive: Bool? public var channel: ShipmentListingChannel? public var previousShipmentId: String? + public var forwardEndShipmentId: String? + public var lockStatus: Bool? public var invoiceId: String? @@ -827,6 +973,8 @@ public extension PlatformClient.ApplicationClient.Order { public var prices: Prices? + public var orderingCurrencyPrices: OrderingCurrencyPrices? + public var orderId: String public var orderingChannnel: String? @@ -849,6 +997,8 @@ public extension PlatformClient.ApplicationClient.Order { public var isLapaEnabled: Bool? + public var logisticsMeta: [String: Any]? + public enum CodingKeys: String, CodingKey { @@ -866,10 +1016,18 @@ public extension PlatformClient.ApplicationClient.Order { case deliveryAddress = "delivery_address" + case billingAddress = "billing_address" + + case affiliateDetails = "affiliate_details" + + case isActive = "is_active" + case channel = "channel" case previousShipmentId = "previous_shipment_id" + case forwardEndShipmentId = "forward_end_shipment_id" + case lockStatus = "lock_status" case invoiceId = "invoice_id" @@ -896,6 +1054,8 @@ public extension PlatformClient.ApplicationClient.Order { case prices = "prices" + case orderingCurrencyPrices = "ordering_currency_prices" + case orderId = "order_id" case orderingChannnel = "ordering_channnel" @@ -918,9 +1078,11 @@ public extension PlatformClient.ApplicationClient.Order { case isLapaEnabled = "is_lapa_enabled" + case logisticsMeta = "logistics_meta" + } - public init(bags: [BagUnit]? = nil, canProcess: Bool? = nil, channel: ShipmentListingChannel? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, customerNote: String? = nil, deliveryAddress: PlatformDeliveryAddress? = nil, displayName: String? = nil, estimatedSlaTime: String? = nil, estimatedSlaTs: String? = nil, fulfillingStore: ShipmentItemFulFillingStore? = nil, invoiceId: String? = nil, isLapaEnabled: Bool? = nil, lockStatus: Bool? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, orderingChannnel: String? = nil, orderCreatedTs: String? = nil, orderDate: String? = nil, orderId: String, paymentInfo: [[String: Any]]? = nil, paymentMethods: [String: Any]? = nil, paymentMode: String? = nil, previousShipmentId: String? = nil, prices: Prices? = nil, shipmentCreatedAt: String, shipmentCreatedTs: String? = nil, shipmentId: String? = nil, shipmentStatus: ShipmentStatus? = nil, statusCreatedAt: String? = nil, statusCreatedTs: String? = nil, totalBags: Int, user: UserDataInfo? = nil) { + public init(affiliateDetails: AffiliateDetails? = nil, bags: [BagUnit]? = nil, billingAddress: Address? = nil, canProcess: Bool? = nil, channel: ShipmentListingChannel? = nil, currency: Currency? = nil, currencyInfo: CurrencyInfo? = nil, customerNote: String? = nil, deliveryAddress: Address? = nil, displayName: String? = nil, estimatedSlaTime: String? = nil, estimatedSlaTs: String? = nil, forwardEndShipmentId: String? = nil, fulfillingStore: ShipmentItemFulFillingStore? = nil, invoiceId: String? = nil, isActive: Bool? = nil, isLapaEnabled: Bool? = nil, lockStatus: Bool? = nil, logisticsMeta: [String: Any]? = nil, meta: [String: Any]? = nil, modeOfPayment: String? = nil, orderingChannnel: String? = nil, orderingCurrencyPrices: OrderingCurrencyPrices? = nil, orderCreatedTs: String? = nil, orderDate: String? = nil, orderId: String, paymentInfo: [[String: Any]]? = nil, paymentMethods: [String: Any]? = nil, paymentMode: String? = nil, previousShipmentId: String? = nil, prices: Prices? = nil, shipmentCreatedAt: String, shipmentCreatedTs: String? = nil, shipmentId: String? = nil, shipmentStatus: ShipmentStatus? = nil, statusCreatedAt: String? = nil, statusCreatedTs: String? = nil, totalBags: Int, user: UserDataInfo? = nil) { self.orderDate = orderDate @@ -936,10 +1098,18 @@ public extension PlatformClient.ApplicationClient.Order { self.deliveryAddress = deliveryAddress + self.billingAddress = billingAddress + + self.affiliateDetails = affiliateDetails + + self.isActive = isActive + self.channel = channel self.previousShipmentId = previousShipmentId + self.forwardEndShipmentId = forwardEndShipmentId + self.lockStatus = lockStatus self.invoiceId = invoiceId @@ -966,6 +1136,8 @@ public extension PlatformClient.ApplicationClient.Order { self.prices = prices + self.orderingCurrencyPrices = orderingCurrencyPrices + self.orderId = orderId self.orderingChannnel = orderingChannnel @@ -988,6 +1160,8 @@ public extension PlatformClient.ApplicationClient.Order { self.isLapaEnabled = isLapaEnabled + self.logisticsMeta = logisticsMeta + } required public init(from decoder: Decoder) throws { @@ -1067,7 +1241,43 @@ public extension PlatformClient.ApplicationClient.Order { do { - deliveryAddress = try container.decode(PlatformDeliveryAddress.self, forKey: .deliveryAddress) + deliveryAddress = try container.decode(Address.self, forKey: .deliveryAddress) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + billingAddress = try container.decode(Address.self, forKey: .billingAddress) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + affiliateDetails = try container.decode(AffiliateDetails.self, forKey: .affiliateDetails) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + isActive = try container.decode(Bool.self, forKey: .isActive) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1102,6 +1312,18 @@ public extension PlatformClient.ApplicationClient.Order { + do { + forwardEndShipmentId = try container.decode(String.self, forKey: .forwardEndShipmentId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { lockStatus = try container.decode(Bool.self, forKey: .lockStatus) @@ -1258,6 +1480,18 @@ public extension PlatformClient.ApplicationClient.Order { + do { + orderingCurrencyPrices = try container.decode(OrderingCurrencyPrices.self, forKey: .orderingCurrencyPrices) + + } 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) @@ -1368,6 +1602,18 @@ public extension PlatformClient.ApplicationClient.Order { } + + do { + logisticsMeta = try container.decode([String: Any].self, forKey: .logisticsMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -1410,6 +1656,21 @@ public extension PlatformClient.ApplicationClient.Order { + try? container.encodeIfPresent(billingAddress, forKey: .billingAddress) + + + + + try? container.encodeIfPresent(affiliateDetails, forKey: .affiliateDetails) + + + + + try? container.encodeIfPresent(isActive, forKey: .isActive) + + + + try? container.encodeIfPresent(channel, forKey: .channel) @@ -1420,6 +1681,11 @@ public extension PlatformClient.ApplicationClient.Order { + try? container.encodeIfPresent(forwardEndShipmentId, forKey: .forwardEndShipmentId) + + + + try? container.encodeIfPresent(lockStatus, forKey: .lockStatus) @@ -1485,6 +1751,11 @@ public extension PlatformClient.ApplicationClient.Order { + try? container.encodeIfPresent(orderingCurrencyPrices, forKey: .orderingCurrencyPrices) + + + + try? container.encodeIfPresent(orderId, forKey: .orderId) @@ -1538,6 +1809,11 @@ public extension PlatformClient.ApplicationClient.Order { try? container.encodeIfPresent(isLapaEnabled, forKey: .isLapaEnabled) + + + try? container.encodeIfPresent(logisticsMeta, forKey: .logisticsMeta) + + } } diff --git a/Sources/code/platform/Models/Order/ShipmentOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentOrderPlatformModel.swift index fe5c3e3d48..daae15faab 100644 --- a/Sources/code/platform/Models/Order/ShipmentOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShipmentOrderPlatformModel.swift @@ -26,6 +26,12 @@ public extension PlatformClient.Order { public var orderType: String? + public var tags: [Tag]? + + public var systemMessages: [SystemMessages]? + + public var processAfterConfig: ProcessAfterConfig? + public var parentType: String? public var storeInvoiceId: String? @@ -34,7 +40,7 @@ public extension PlatformClient.Order { public var type: String? - public var billingAddressJson: PlatformDeliveryAddress? + public var billingAddressJson: Address? public var id: String? @@ -46,7 +52,7 @@ public extension PlatformClient.Order { public var pdfLinks: [String: Any]? - public var deliveryAddressJson: PlatformDeliveryAddress? + public var deliveryAddressJson: Address? public var ewayBillId: String? @@ -54,13 +60,11 @@ public extension PlatformClient.Order { public var fyndOrderId: String? - public var tags: [String]? - public var createdAt: String? public var deliveryAwbNumber: String? - public var handOverContactJson: PlatformDeliveryAddress? + public var handOverContactJson: Address? public var creditNoteId: String? @@ -97,6 +101,12 @@ public extension PlatformClient.Order { case orderType = "order_type" + case tags = "tags" + + case systemMessages = "system_messages" + + case processAfterConfig = "process_after_config" + case parentType = "parent_type" case storeInvoiceId = "store_invoice_id" @@ -125,8 +135,6 @@ public extension PlatformClient.Order { case fyndOrderId = "fynd_order_id" - case tags = "tags" - case createdAt = "created_at" case deliveryAwbNumber = "delivery_awb_number" @@ -153,7 +161,7 @@ public extension PlatformClient.Order { } - public init(affiliateId: String? = nil, affiliateShipmentId: String? = nil, billingAddressJson: PlatformDeliveryAddress? = nil, createdAt: String? = nil, creditNoteId: String? = nil, deliveryAddressJson: PlatformDeliveryAddress? = nil, deliveryAwbNumber: String? = nil, ewayBillId: String? = nil, externalShipmentId: String? = nil, fulfilmentPriority: Int? = nil, fyndOrderId: String? = nil, gst: ShipmentGstDetails? = nil, handOverContactJson: PlatformDeliveryAddress? = nil, id: String? = nil, isActive: Bool? = nil, lineItems: [LineItem], locationId: Int? = nil, lockStatus: String? = nil, meta: [String: Any]? = nil, orderType: String? = nil, packagingType: String? = nil, parentId: String? = nil, parentType: String? = nil, pdfLinks: [String: Any]? = nil, previousShipmentId: String? = nil, price: Prices? = nil, priority: Int? = nil, processingDates: ProcessingDates? = nil, quantity: Double? = nil, status: ShipmentStatusData? = nil, storeInvoiceId: String? = nil, tags: [String]? = nil, type: String? = nil, vertical: String? = nil) { + public init(affiliateId: String? = nil, affiliateShipmentId: String? = nil, billingAddressJson: Address? = nil, createdAt: String? = nil, creditNoteId: String? = nil, deliveryAddressJson: Address? = nil, deliveryAwbNumber: String? = nil, ewayBillId: String? = nil, externalShipmentId: String? = nil, fulfilmentPriority: Int? = nil, fyndOrderId: String? = nil, gst: ShipmentGstDetails? = nil, handOverContactJson: Address? = nil, id: String? = nil, isActive: Bool? = nil, lineItems: [LineItem], locationId: Int? = nil, lockStatus: String? = nil, meta: [String: Any]? = nil, orderType: String? = nil, packagingType: String? = nil, parentId: String? = nil, parentType: String? = nil, pdfLinks: [String: Any]? = nil, previousShipmentId: String? = nil, price: Prices? = nil, priority: Int? = nil, processingDates: ProcessingDates? = nil, processAfterConfig: ProcessAfterConfig? = nil, quantity: Double? = nil, status: ShipmentStatusData? = nil, storeInvoiceId: String? = nil, systemMessages: [SystemMessages]? = nil, tags: [Tag]? = nil, type: String? = nil, vertical: String? = nil) { self.lineItems = lineItems @@ -169,6 +177,12 @@ public extension PlatformClient.Order { self.orderType = orderType + self.tags = tags + + self.systemMessages = systemMessages + + self.processAfterConfig = processAfterConfig + self.parentType = parentType self.storeInvoiceId = storeInvoiceId @@ -197,8 +211,6 @@ public extension PlatformClient.Order { self.fyndOrderId = fyndOrderId - self.tags = tags - self.createdAt = createdAt self.deliveryAwbNumber = deliveryAwbNumber @@ -306,6 +318,42 @@ public extension PlatformClient.Order { + do { + tags = try container.decode([Tag].self, forKey: .tags) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + systemMessages = try container.decode([SystemMessages].self, forKey: .systemMessages) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + processAfterConfig = try container.decode(ProcessAfterConfig.self, forKey: .processAfterConfig) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { parentType = try container.decode(String.self, forKey: .parentType) @@ -355,7 +403,7 @@ public extension PlatformClient.Order { do { - billingAddressJson = try container.decode(PlatformDeliveryAddress.self, forKey: .billingAddressJson) + billingAddressJson = try container.decode(Address.self, forKey: .billingAddressJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -427,7 +475,7 @@ public extension PlatformClient.Order { do { - deliveryAddressJson = try container.decode(PlatformDeliveryAddress.self, forKey: .deliveryAddressJson) + deliveryAddressJson = try container.decode(Address.self, forKey: .deliveryAddressJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -474,18 +522,6 @@ public extension PlatformClient.Order { - do { - 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 { - - } - - - do { createdAt = try container.decode(String.self, forKey: .createdAt) @@ -511,7 +547,7 @@ public extension PlatformClient.Order { do { - handOverContactJson = try container.decode(PlatformDeliveryAddress.self, forKey: .handOverContactJson) + handOverContactJson = try container.decode(Address.self, forKey: .handOverContactJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -671,6 +707,21 @@ public extension PlatformClient.Order { + try? container.encodeIfPresent(tags, forKey: .tags) + + + + + try? container.encodeIfPresent(systemMessages, forKey: .systemMessages) + + + + + try? container.encodeIfPresent(processAfterConfig, forKey: .processAfterConfig) + + + + try? container.encodeIfPresent(parentType, forKey: .parentType) @@ -741,11 +792,6 @@ public extension PlatformClient.Order { - try? container.encodeIfPresent(tags, forKey: .tags) - - - - try? container.encodeIfPresent(createdAt, forKey: .createdAt) @@ -834,6 +880,12 @@ public extension PlatformClient.ApplicationClient.Order { public var orderType: String? + public var tags: [Tag]? + + public var systemMessages: [SystemMessages]? + + public var processAfterConfig: ProcessAfterConfig? + public var parentType: String? public var storeInvoiceId: String? @@ -842,7 +894,7 @@ public extension PlatformClient.ApplicationClient.Order { public var type: String? - public var billingAddressJson: PlatformDeliveryAddress? + public var billingAddressJson: Address? public var id: String? @@ -854,7 +906,7 @@ public extension PlatformClient.ApplicationClient.Order { public var pdfLinks: [String: Any]? - public var deliveryAddressJson: PlatformDeliveryAddress? + public var deliveryAddressJson: Address? public var ewayBillId: String? @@ -862,13 +914,11 @@ public extension PlatformClient.ApplicationClient.Order { public var fyndOrderId: String? - public var tags: [String]? - public var createdAt: String? public var deliveryAwbNumber: String? - public var handOverContactJson: PlatformDeliveryAddress? + public var handOverContactJson: Address? public var creditNoteId: String? @@ -905,6 +955,12 @@ public extension PlatformClient.ApplicationClient.Order { case orderType = "order_type" + case tags = "tags" + + case systemMessages = "system_messages" + + case processAfterConfig = "process_after_config" + case parentType = "parent_type" case storeInvoiceId = "store_invoice_id" @@ -933,8 +989,6 @@ public extension PlatformClient.ApplicationClient.Order { case fyndOrderId = "fynd_order_id" - case tags = "tags" - case createdAt = "created_at" case deliveryAwbNumber = "delivery_awb_number" @@ -961,7 +1015,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(affiliateId: String? = nil, affiliateShipmentId: String? = nil, billingAddressJson: PlatformDeliveryAddress? = nil, createdAt: String? = nil, creditNoteId: String? = nil, deliveryAddressJson: PlatformDeliveryAddress? = nil, deliveryAwbNumber: String? = nil, ewayBillId: String? = nil, externalShipmentId: String? = nil, fulfilmentPriority: Int? = nil, fyndOrderId: String? = nil, gst: ShipmentGstDetails? = nil, handOverContactJson: PlatformDeliveryAddress? = nil, id: String? = nil, isActive: Bool? = nil, lineItems: [LineItem], locationId: Int? = nil, lockStatus: String? = nil, meta: [String: Any]? = nil, orderType: String? = nil, packagingType: String? = nil, parentId: String? = nil, parentType: String? = nil, pdfLinks: [String: Any]? = nil, previousShipmentId: String? = nil, price: Prices? = nil, priority: Int? = nil, processingDates: ProcessingDates? = nil, quantity: Double? = nil, status: ShipmentStatusData? = nil, storeInvoiceId: String? = nil, tags: [String]? = nil, type: String? = nil, vertical: String? = nil) { + public init(affiliateId: String? = nil, affiliateShipmentId: String? = nil, billingAddressJson: Address? = nil, createdAt: String? = nil, creditNoteId: String? = nil, deliveryAddressJson: Address? = nil, deliveryAwbNumber: String? = nil, ewayBillId: String? = nil, externalShipmentId: String? = nil, fulfilmentPriority: Int? = nil, fyndOrderId: String? = nil, gst: ShipmentGstDetails? = nil, handOverContactJson: Address? = nil, id: String? = nil, isActive: Bool? = nil, lineItems: [LineItem], locationId: Int? = nil, lockStatus: String? = nil, meta: [String: Any]? = nil, orderType: String? = nil, packagingType: String? = nil, parentId: String? = nil, parentType: String? = nil, pdfLinks: [String: Any]? = nil, previousShipmentId: String? = nil, price: Prices? = nil, priority: Int? = nil, processingDates: ProcessingDates? = nil, processAfterConfig: ProcessAfterConfig? = nil, quantity: Double? = nil, status: ShipmentStatusData? = nil, storeInvoiceId: String? = nil, systemMessages: [SystemMessages]? = nil, tags: [Tag]? = nil, type: String? = nil, vertical: String? = nil) { self.lineItems = lineItems @@ -977,6 +1031,12 @@ public extension PlatformClient.ApplicationClient.Order { self.orderType = orderType + self.tags = tags + + self.systemMessages = systemMessages + + self.processAfterConfig = processAfterConfig + self.parentType = parentType self.storeInvoiceId = storeInvoiceId @@ -1005,8 +1065,6 @@ public extension PlatformClient.ApplicationClient.Order { self.fyndOrderId = fyndOrderId - self.tags = tags - self.createdAt = createdAt self.deliveryAwbNumber = deliveryAwbNumber @@ -1114,6 +1172,42 @@ public extension PlatformClient.ApplicationClient.Order { + do { + tags = try container.decode([Tag].self, forKey: .tags) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + systemMessages = try container.decode([SystemMessages].self, forKey: .systemMessages) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + processAfterConfig = try container.decode(ProcessAfterConfig.self, forKey: .processAfterConfig) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { parentType = try container.decode(String.self, forKey: .parentType) @@ -1163,7 +1257,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - billingAddressJson = try container.decode(PlatformDeliveryAddress.self, forKey: .billingAddressJson) + billingAddressJson = try container.decode(Address.self, forKey: .billingAddressJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1235,7 +1329,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - deliveryAddressJson = try container.decode(PlatformDeliveryAddress.self, forKey: .deliveryAddressJson) + deliveryAddressJson = try container.decode(Address.self, forKey: .deliveryAddressJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1282,18 +1376,6 @@ public extension PlatformClient.ApplicationClient.Order { - do { - 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 { - - } - - - do { createdAt = try container.decode(String.self, forKey: .createdAt) @@ -1319,7 +1401,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - handOverContactJson = try container.decode(PlatformDeliveryAddress.self, forKey: .handOverContactJson) + handOverContactJson = try container.decode(Address.self, forKey: .handOverContactJson) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1479,6 +1561,21 @@ public extension PlatformClient.ApplicationClient.Order { + try? container.encodeIfPresent(tags, forKey: .tags) + + + + + try? container.encodeIfPresent(systemMessages, forKey: .systemMessages) + + + + + try? container.encodeIfPresent(processAfterConfig, forKey: .processAfterConfig) + + + + try? container.encodeIfPresent(parentType, forKey: .parentType) @@ -1549,11 +1646,6 @@ public extension PlatformClient.ApplicationClient.Order { - try? container.encodeIfPresent(tags, forKey: .tags) - - - - try? container.encodeIfPresent(createdAt, forKey: .createdAt) diff --git a/Sources/code/platform/Models/Order/ShipmentReasonsResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentReasonsResponseSchemaOrderPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Order/ShipmentReasonsResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ShipmentReasonsResponseSchemaOrderPlatformModel.swift index ab464f4e1a..0694102eea 100644 --- a/Sources/code/platform/Models/Order/ShipmentReasonsResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShipmentReasonsResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: ShipmentReasonsResponse + Model: ShipmentReasonsResponseSchema Used By: Order */ - class ShipmentReasonsResponse: Codable { + class ShipmentReasonsResponseSchema: Codable { public var reasons: [ShipmentResponseReasons] @@ -86,11 +86,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ShipmentReasonsResponse + Model: ShipmentReasonsResponseSchema Used By: Order */ - class ShipmentReasonsResponse: Codable { + class ShipmentReasonsResponseSchema: Codable { public var reasons: [ShipmentResponseReasons] diff --git a/Sources/code/platform/Models/Order/ShipmentsRequestOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentsRequestSchemaOrderPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Order/ShipmentsRequestOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ShipmentsRequestSchemaOrderPlatformModel.swift index 37096a6e6a..8aa855681f 100644 --- a/Sources/code/platform/Models/Order/ShipmentsRequestOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShipmentsRequestSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: ShipmentsRequest + Model: ShipmentsRequestSchema Used By: Order */ - class ShipmentsRequest: Codable { + class ShipmentsRequestSchema: Codable { public var identifier: String @@ -123,11 +123,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ShipmentsRequest + Model: ShipmentsRequestSchema Used By: Order */ - class ShipmentsRequest: Codable { + class ShipmentsRequestSchema: Codable { public var identifier: String diff --git a/Sources/code/platform/Models/Order/ShipmentsResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShipmentsResponseSchemaOrderPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Order/ShipmentsResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/ShipmentsResponseSchemaOrderPlatformModel.swift index 08ba43615f..44114eb098 100644 --- a/Sources/code/platform/Models/Order/ShipmentsResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShipmentsResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: ShipmentsResponse + Model: ShipmentsResponseSchema Used By: Order */ - class ShipmentsResponse: Codable { + class ShipmentsResponseSchema: Codable { public var status: Int? @@ -222,11 +222,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: ShipmentsResponse + Model: ShipmentsResponseSchema Used By: Order */ - class ShipmentsResponse: Codable { + class ShipmentsResponseSchema: Codable { public var status: Int? diff --git a/Sources/code/platform/Models/Order/ShippingInfoOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ShippingInfoOrderPlatformModel.swift index 91325690e3..1a8ab419a6 100644 --- a/Sources/code/platform/Models/Order/ShippingInfoOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/ShippingInfoOrderPlatformModel.swift @@ -26,7 +26,7 @@ public extension PlatformClient.Order { public var lastName: String? - public var geoLocation: GeoLocationSchema? + public var geoLocation: [String: Any]? public var gender: String? @@ -133,7 +133,7 @@ public extension PlatformClient.Order { } - public init(address: String? = nil, address1: String? = nil, address2: String? = nil, addressType: String? = nil, alternateEmail: String? = nil, alternateMobileNumber: String? = nil, area: String? = nil, city: String? = nil, country: String? = nil, countryCode: String? = nil, countryIsoCode: String? = nil, customerCode: String? = nil, externalCustomerCode: String? = nil, firstName: String? = nil, floorNo: String? = nil, gender: String? = nil, geoLocation: GeoLocationSchema? = nil, houseNo: String? = nil, landmark: String? = nil, lastName: String? = nil, middleName: String? = nil, pincode: String? = nil, primaryEmail: String? = nil, primaryMobileNumber: String? = nil, shippingType: String? = nil, slot: [[String: Any]]? = nil, state: String? = nil, stateCode: String? = nil, title: String? = nil) { + public init(address: String? = nil, address1: String? = nil, address2: String? = nil, addressType: String? = nil, alternateEmail: String? = nil, alternateMobileNumber: String? = nil, area: String? = nil, city: String? = nil, country: String? = nil, countryCode: String? = nil, countryIsoCode: String? = nil, customerCode: String? = nil, externalCustomerCode: String? = nil, firstName: String? = nil, floorNo: String? = nil, gender: String? = nil, geoLocation: [String: Any]? = nil, houseNo: String? = nil, landmark: String? = nil, lastName: String? = nil, middleName: String? = nil, pincode: String? = nil, primaryEmail: String? = nil, primaryMobileNumber: String? = nil, shippingType: String? = nil, slot: [[String: Any]]? = nil, state: String? = nil, stateCode: String? = nil, title: String? = nil) { self.alternateMobileNumber = alternateMobileNumber @@ -284,7 +284,7 @@ public extension PlatformClient.Order { do { - geoLocation = try container.decode(GeoLocationSchema.self, forKey: .geoLocation) + geoLocation = try container.decode([String: Any].self, forKey: .geoLocation) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -726,7 +726,7 @@ public extension PlatformClient.ApplicationClient.Order { public var lastName: String? - public var geoLocation: GeoLocationSchema? + public var geoLocation: [String: Any]? public var gender: String? @@ -833,7 +833,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(address: String? = nil, address1: String? = nil, address2: String? = nil, addressType: String? = nil, alternateEmail: String? = nil, alternateMobileNumber: String? = nil, area: String? = nil, city: String? = nil, country: String? = nil, countryCode: String? = nil, countryIsoCode: String? = nil, customerCode: String? = nil, externalCustomerCode: String? = nil, firstName: String? = nil, floorNo: String? = nil, gender: String? = nil, geoLocation: GeoLocationSchema? = nil, houseNo: String? = nil, landmark: String? = nil, lastName: String? = nil, middleName: String? = nil, pincode: String? = nil, primaryEmail: String? = nil, primaryMobileNumber: String? = nil, shippingType: String? = nil, slot: [[String: Any]]? = nil, state: String? = nil, stateCode: String? = nil, title: String? = nil) { + public init(address: String? = nil, address1: String? = nil, address2: String? = nil, addressType: String? = nil, alternateEmail: String? = nil, alternateMobileNumber: String? = nil, area: String? = nil, city: String? = nil, country: String? = nil, countryCode: String? = nil, countryIsoCode: String? = nil, customerCode: String? = nil, externalCustomerCode: String? = nil, firstName: String? = nil, floorNo: String? = nil, gender: String? = nil, geoLocation: [String: Any]? = nil, houseNo: String? = nil, landmark: String? = nil, lastName: String? = nil, middleName: String? = nil, pincode: String? = nil, primaryEmail: String? = nil, primaryMobileNumber: String? = nil, shippingType: String? = nil, slot: [[String: Any]]? = nil, state: String? = nil, stateCode: String? = nil, title: String? = nil) { self.alternateMobileNumber = alternateMobileNumber @@ -984,7 +984,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - geoLocation = try container.decode(GeoLocationSchema.self, forKey: .geoLocation) + geoLocation = try container.decode([String: Any].self, forKey: .geoLocation) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/SmsDataPayloadOrderPlatformModel.swift b/Sources/code/platform/Models/Order/SmsDataPayloadOrderPlatformModel.swift index 9d8aa188e0..692cf5f3d5 100644 --- a/Sources/code/platform/Models/Order/SmsDataPayloadOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/SmsDataPayloadOrderPlatformModel.swift @@ -12,11 +12,11 @@ public extension PlatformClient.Order { class SmsDataPayload: Codable { - public var shipmentId: Int + public var shipmentId: String - public var phoneNumber: Int + public var phoneNumber: String - public var amountPaid: Int? + public var amountPaid: Double? public var orderId: String @@ -53,7 +53,7 @@ public extension PlatformClient.Order { } - public init(amountPaid: Int? = nil, brandName: String? = nil, countryCode: String, customerName: String? = nil, message: String, orderId: String, paymentMode: String? = nil, phoneNumber: Int, shipmentId: Int) { + public init(amountPaid: Double? = nil, brandName: String? = nil, countryCode: String, customerName: String? = nil, message: String, orderId: String, paymentMode: String? = nil, phoneNumber: String, shipmentId: String) { self.shipmentId = shipmentId @@ -79,18 +79,18 @@ public extension PlatformClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) - shipmentId = try container.decode(Int.self, forKey: .shipmentId) + shipmentId = try container.decode(String.self, forKey: .shipmentId) - phoneNumber = try container.decode(Int.self, forKey: .phoneNumber) + phoneNumber = try container.decode(String.self, forKey: .phoneNumber) do { - amountPaid = try container.decode(Int.self, forKey: .amountPaid) + amountPaid = try container.decode(Double.self, forKey: .amountPaid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -217,11 +217,11 @@ public extension PlatformClient.ApplicationClient.Order { class SmsDataPayload: Codable { - public var shipmentId: Int + public var shipmentId: String - public var phoneNumber: Int + public var phoneNumber: String - public var amountPaid: Int? + public var amountPaid: Double? public var orderId: String @@ -258,7 +258,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(amountPaid: Int? = nil, brandName: String? = nil, countryCode: String, customerName: String? = nil, message: String, orderId: String, paymentMode: String? = nil, phoneNumber: Int, shipmentId: Int) { + public init(amountPaid: Double? = nil, brandName: String? = nil, countryCode: String, customerName: String? = nil, message: String, orderId: String, paymentMode: String? = nil, phoneNumber: String, shipmentId: String) { self.shipmentId = shipmentId @@ -284,18 +284,18 @@ public extension PlatformClient.ApplicationClient.Order { let container = try decoder.container(keyedBy: CodingKeys.self) - shipmentId = try container.decode(Int.self, forKey: .shipmentId) + shipmentId = try container.decode(String.self, forKey: .shipmentId) - phoneNumber = try container.decode(Int.self, forKey: .phoneNumber) + phoneNumber = try container.decode(String.self, forKey: .phoneNumber) do { - amountPaid = try container.decode(Int.self, forKey: .amountPaid) + amountPaid = try container.decode(Double.self, forKey: .amountPaid) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/StatuesRequestOrderPlatformModel.swift b/Sources/code/platform/Models/Order/StatuesRequestSchemaOrderPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Order/StatuesRequestOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/StatuesRequestSchemaOrderPlatformModel.swift index b4697aa8ce..6a8fa1d320 100644 --- a/Sources/code/platform/Models/Order/StatuesRequestOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/StatuesRequestSchemaOrderPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Order { /* - Model: StatuesRequest + Model: StatuesRequestSchema Used By: Order */ - class StatuesRequest: Codable { + class StatuesRequestSchema: Codable { public var status: String? - public var shipments: [ShipmentsRequest]? + public var shipments: [ShipmentsRequestSchema]? public var excludeBagsNextState: String? @@ -33,7 +33,7 @@ public extension PlatformClient.Order { } - public init(excludeBagsNextState: String? = nil, shipments: [ShipmentsRequest]? = nil, splitShipment: Bool? = nil, status: String? = nil) { + public init(excludeBagsNextState: String? = nil, shipments: [ShipmentsRequestSchema]? = nil, splitShipment: Bool? = nil, status: String? = nil) { self.status = status @@ -62,7 +62,7 @@ public extension PlatformClient.Order { do { - shipments = try container.decode([ShipmentsRequest].self, forKey: .shipments) + shipments = try container.decode([ShipmentsRequestSchema].self, forKey: .shipments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -130,16 +130,16 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: StatuesRequest + Model: StatuesRequestSchema Used By: Order */ - class StatuesRequest: Codable { + class StatuesRequestSchema: Codable { public var status: String? - public var shipments: [ShipmentsRequest]? + public var shipments: [ShipmentsRequestSchema]? public var excludeBagsNextState: String? @@ -158,7 +158,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(excludeBagsNextState: String? = nil, shipments: [ShipmentsRequest]? = nil, splitShipment: Bool? = nil, status: String? = nil) { + public init(excludeBagsNextState: String? = nil, shipments: [ShipmentsRequestSchema]? = nil, splitShipment: Bool? = nil, status: String? = nil) { self.status = status @@ -187,7 +187,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - shipments = try container.decode([ShipmentsRequest].self, forKey: .shipments) + shipments = try container.decode([ShipmentsRequestSchema].self, forKey: .shipments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/StatuesResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/StatuesResponseSchemaOrderPlatformModel.swift similarity index 83% rename from Sources/code/platform/Models/Order/StatuesResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/StatuesResponseSchemaOrderPlatformModel.swift index cac1ae0b37..4b8bf04538 100644 --- a/Sources/code/platform/Models/Order/StatuesResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/StatuesResponseSchemaOrderPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Order { /* - Model: StatuesResponse + Model: StatuesResponseSchema Used By: Order */ - class StatuesResponse: Codable { + class StatuesResponseSchema: Codable { - public var shipments: [ShipmentsResponse]? + public var shipments: [ShipmentsResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -21,7 +21,7 @@ public extension PlatformClient.Order { } - public init(shipments: [ShipmentsResponse]? = nil) { + public init(shipments: [ShipmentsResponseSchema]? = nil) { self.shipments = shipments @@ -32,7 +32,7 @@ public extension PlatformClient.Order { do { - shipments = try container.decode([ShipmentsResponse].self, forKey: .shipments) + shipments = try container.decode([ShipmentsResponseSchema].self, forKey: .shipments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,14 +61,14 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: StatuesResponse + Model: StatuesResponseSchema Used By: Order */ - class StatuesResponse: Codable { + class StatuesResponseSchema: Codable { - public var shipments: [ShipmentsResponse]? + public var shipments: [ShipmentsResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -77,7 +77,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(shipments: [ShipmentsResponse]? = nil) { + public init(shipments: [ShipmentsResponseSchema]? = nil) { self.shipments = shipments @@ -88,7 +88,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - shipments = try container.decode([ShipmentsResponse].self, forKey: .shipments) + shipments = try container.decode([ShipmentsResponseSchema].self, forKey: .shipments) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/StoreReassignResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/StoreReassignResponseSchemaOrderPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Order/StoreReassignResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/StoreReassignResponseSchemaOrderPlatformModel.swift index 5123ff00b1..fd982e2ba4 100644 --- a/Sources/code/platform/Models/Order/StoreReassignResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/StoreReassignResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: StoreReassignResponse + Model: StoreReassignResponseSchema Used By: Order */ - class StoreReassignResponse: Codable { + class StoreReassignResponseSchema: Codable { public var success: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: StoreReassignResponse + Model: StoreReassignResponseSchema Used By: Order */ - class StoreReassignResponse: Codable { + class StoreReassignResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Order/SuccessResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/SuccessResponseSchemaOrderPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Order/SuccessResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/SuccessResponseSchemaOrderPlatformModel.swift index a775d970b1..95bb68cbeb 100644 --- a/Sources/code/platform/Models/Order/SuccessResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/SuccessResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: SuccessResponse + Model: SuccessResponseSchema Used By: Order */ - class SuccessResponse: Codable { + class SuccessResponseSchema: Codable { public var success: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: SuccessResponse + Model: SuccessResponseSchema Used By: Order */ - class SuccessResponse: Codable { + class SuccessResponseSchema: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Order/SystemMessagesOrderPlatformModel.swift b/Sources/code/platform/Models/Order/SystemMessagesOrderPlatformModel.swift new file mode 100644 index 0000000000..1a9f57138a --- /dev/null +++ b/Sources/code/platform/Models/Order/SystemMessagesOrderPlatformModel.swift @@ -0,0 +1,212 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: SystemMessages + Used By: Order + */ + + class SystemMessages: Codable { + + + public var messageType: String + + public var priority: Double + + public var message: String + + public var injectAt: [String]? + + + public enum CodingKeys: String, CodingKey { + + case messageType = "message_type" + + case priority = "priority" + + case message = "message" + + case injectAt = "inject_at" + + } + + public init(injectAt: [String]? = nil, message: String, messageType: String, priority: Double) { + + self.messageType = messageType + + self.priority = priority + + self.message = message + + self.injectAt = injectAt + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + messageType = try container.decode(String.self, forKey: .messageType) + + + + + priority = try container.decode(Double.self, forKey: .priority) + + + + + message = try container.decode(String.self, forKey: .message) + + + + + do { + injectAt = try container.decode([String].self, forKey: .injectAt) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(messageType, forKey: .messageType) + + + + + try? container.encodeIfPresent(priority, forKey: .priority) + + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(injectAt, forKey: .injectAt) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: SystemMessages + Used By: Order + */ + + class SystemMessages: Codable { + + + public var messageType: String + + public var priority: Double + + public var message: String + + public var injectAt: [String]? + + + public enum CodingKeys: String, CodingKey { + + case messageType = "message_type" + + case priority = "priority" + + case message = "message" + + case injectAt = "inject_at" + + } + + public init(injectAt: [String]? = nil, message: String, messageType: String, priority: Double) { + + self.messageType = messageType + + self.priority = priority + + self.message = message + + self.injectAt = injectAt + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + messageType = try container.decode(String.self, forKey: .messageType) + + + + + priority = try container.decode(Double.self, forKey: .priority) + + + + + message = try container.decode(String.self, forKey: .message) + + + + + do { + injectAt = try container.decode([String].self, forKey: .injectAt) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(messageType, forKey: .messageType) + + + + + try? container.encodeIfPresent(priority, forKey: .priority) + + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(injectAt, forKey: .injectAt) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/TagOrderPlatformModel.swift b/Sources/code/platform/Models/Order/TagOrderPlatformModel.swift new file mode 100644 index 0000000000..9297441d60 --- /dev/null +++ b/Sources/code/platform/Models/Order/TagOrderPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: Tag + Used By: Order + */ + + class Tag: Codable { + + + public var slug: String? + + public var displayText: String? + + + public enum CodingKeys: String, CodingKey { + + case slug = "slug" + + case displayText = "display_text" + + } + + public init(displayText: String? = nil, slug: String? = nil) { + + self.slug = slug + + self.displayText = displayText + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + slug = try container.decode(String.self, forKey: .slug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + displayText = try container.decode(String.self, forKey: .displayText) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(slug, forKey: .slug) + + + + + try? container.encodeIfPresent(displayText, forKey: .displayText) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: Tag + Used By: Order + */ + + class Tag: Codable { + + + public var slug: String? + + public var displayText: String? + + + public enum CodingKeys: String, CodingKey { + + case slug = "slug" + + case displayText = "display_text" + + } + + public init(displayText: String? = nil, slug: String? = nil) { + + self.slug = slug + + self.displayText = displayText + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + slug = try container.decode(String.self, forKey: .slug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + displayText = try container.decode(String.self, forKey: .displayText) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(slug, forKey: .slug) + + + + + try? container.encodeIfPresent(displayText, forKey: .displayText) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/TemplateDownloadResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/TemplateDownloadResponseSchemaOrderPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Order/TemplateDownloadResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/TemplateDownloadResponseSchemaOrderPlatformModel.swift index a20f0de289..40ea0d4837 100644 --- a/Sources/code/platform/Models/Order/TemplateDownloadResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/TemplateDownloadResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: TemplateDownloadResponse + Model: TemplateDownloadResponseSchema Used By: Order */ - class TemplateDownloadResponse: Codable { + class TemplateDownloadResponseSchema: Codable { public var fileName: String? @@ -84,11 +84,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: TemplateDownloadResponse + Model: TemplateDownloadResponseSchema Used By: Order */ - class TemplateDownloadResponse: Codable { + class TemplateDownloadResponseSchema: Codable { public var fileName: String? diff --git a/Sources/code/platform/Models/Order/UpdateAddressRequestBodyOrderPlatformModel.swift b/Sources/code/platform/Models/Order/UpdateAddressRequestBodyOrderPlatformModel.swift new file mode 100644 index 0000000000..28534e656f --- /dev/null +++ b/Sources/code/platform/Models/Order/UpdateAddressRequestBodyOrderPlatformModel.swift @@ -0,0 +1,208 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: UpdateAddressRequestBody + Used By: Order + */ + + class UpdateAddressRequestBody: Codable { + + + public var updatedAddress: UpdatedAddressSchema? + + public var addressType: String? + + public var addressCategory: String? + + + public enum CodingKeys: String, CodingKey { + + case updatedAddress = "updated_address" + + case addressType = "address_type" + + case addressCategory = "address_category" + + } + + public init(addressCategory: String? = nil, addressType: String? = nil, updatedAddress: UpdatedAddressSchema? = nil) { + + self.updatedAddress = updatedAddress + + self.addressType = addressType + + self.addressCategory = addressCategory + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + updatedAddress = try container.decode(UpdatedAddressSchema.self, forKey: .updatedAddress) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + addressType = try container.decode(String.self, forKey: .addressType) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + addressCategory = try container.decode(String.self, forKey: .addressCategory) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(updatedAddress, forKey: .updatedAddress) + + + + + try? container.encodeIfPresent(addressType, forKey: .addressType) + + + + + try? container.encodeIfPresent(addressCategory, forKey: .addressCategory) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: UpdateAddressRequestBody + Used By: Order + */ + + class UpdateAddressRequestBody: Codable { + + + public var updatedAddress: UpdatedAddressSchema? + + public var addressType: String? + + public var addressCategory: String? + + + public enum CodingKeys: String, CodingKey { + + case updatedAddress = "updated_address" + + case addressType = "address_type" + + case addressCategory = "address_category" + + } + + public init(addressCategory: String? = nil, addressType: String? = nil, updatedAddress: UpdatedAddressSchema? = nil) { + + self.updatedAddress = updatedAddress + + self.addressType = addressType + + self.addressCategory = addressCategory + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + updatedAddress = try container.decode(UpdatedAddressSchema.self, forKey: .updatedAddress) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + addressType = try container.decode(String.self, forKey: .addressType) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + addressCategory = try container.decode(String.self, forKey: .addressCategory) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(updatedAddress, forKey: .updatedAddress) + + + + + try? container.encodeIfPresent(addressType, forKey: .addressType) + + + + + try? container.encodeIfPresent(addressCategory, forKey: .addressCategory) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/UpdatePackagingDimensionsResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/UpdatePackagingDimensionsResponseSchemaOrderPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Order/UpdatePackagingDimensionsResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/UpdatePackagingDimensionsResponseSchemaOrderPlatformModel.swift index c6024d84e4..198e9c74b2 100644 --- a/Sources/code/platform/Models/Order/UpdatePackagingDimensionsResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/UpdatePackagingDimensionsResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: UpdatePackagingDimensionsResponse + Model: UpdatePackagingDimensionsResponseSchema Used By: Order */ - class UpdatePackagingDimensionsResponse: Codable { + class UpdatePackagingDimensionsResponseSchema: Codable { public var message: String? @@ -61,11 +61,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: UpdatePackagingDimensionsResponse + Model: UpdatePackagingDimensionsResponseSchema Used By: Order */ - class UpdatePackagingDimensionsResponse: Codable { + class UpdatePackagingDimensionsResponseSchema: Codable { public var message: String? diff --git a/Sources/code/platform/Models/Order/UpdatePackingErrorResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/UpdatePackingErrorResponseOrderPlatformModel.swift deleted file mode 100644 index 018815ae61..0000000000 --- a/Sources/code/platform/Models/Order/UpdatePackingErrorResponseOrderPlatformModel.swift +++ /dev/null @@ -1,162 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Order { - /* - Model: UpdatePackingErrorResponse - Used By: Order - */ - - class UpdatePackingErrorResponse: Codable { - - - public var status: Int? - - public var error: String? - - - public enum CodingKeys: String, CodingKey { - - case status = "status" - - case error = "error" - - } - - public init(error: String? = nil, status: Int? = nil) { - - self.status = status - - self.error = error - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - status = try container.decode(Int.self, forKey: .status) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - error = try container.decode(String.self, forKey: .error) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(error, forKey: .error) - - - } - - } -} - - - -public extension PlatformClient.ApplicationClient.Order { - /* - Model: UpdatePackingErrorResponse - Used By: Order - */ - - class UpdatePackingErrorResponse: Codable { - - - public var status: Int? - - public var error: String? - - - public enum CodingKeys: String, CodingKey { - - case status = "status" - - case error = "error" - - } - - public init(error: String? = nil, status: Int? = nil) { - - self.status = status - - self.error = error - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - status = try container.decode(Int.self, forKey: .status) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - error = try container.decode(String.self, forKey: .error) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(error, forKey: .error) - - - } - - } -} - - diff --git a/Sources/code/platform/Models/Order/UpdateShipmentLockPayloadOrderPlatformModel.swift b/Sources/code/platform/Models/Order/UpdateShipmentLockPayloadOrderPlatformModel.swift index c5d4bf9027..f74c17dc4a 100644 --- a/Sources/code/platform/Models/Order/UpdateShipmentLockPayloadOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/UpdateShipmentLockPayloadOrderPlatformModel.swift @@ -18,7 +18,7 @@ public extension PlatformClient.Order { public var actionType: String - public var entities: [LockManagerEntities] + public var entities: [Entities] public var resumeTasksAfterUnlock: Bool? @@ -45,7 +45,7 @@ public extension PlatformClient.Order { } - public init(action: String, actionType: String, entities: [LockManagerEntities], entityType: String, lockAfterTransition: Bool? = nil, resumeTasksAfterUnlock: Bool? = nil, unlockBeforeTransition: Bool? = nil) { + public init(action: String, actionType: String, entities: [Entities], entityType: String, lockAfterTransition: Bool? = nil, resumeTasksAfterUnlock: Bool? = nil, unlockBeforeTransition: Bool? = nil) { self.entityType = entityType @@ -82,7 +82,7 @@ public extension PlatformClient.Order { - entities = try container.decode([LockManagerEntities].self, forKey: .entities) + entities = try container.decode([Entities].self, forKey: .entities) @@ -184,7 +184,7 @@ public extension PlatformClient.ApplicationClient.Order { public var actionType: String - public var entities: [LockManagerEntities] + public var entities: [Entities] public var resumeTasksAfterUnlock: Bool? @@ -211,7 +211,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(action: String, actionType: String, entities: [LockManagerEntities], entityType: String, lockAfterTransition: Bool? = nil, resumeTasksAfterUnlock: Bool? = nil, unlockBeforeTransition: Bool? = nil) { + public init(action: String, actionType: String, entities: [Entities], entityType: String, lockAfterTransition: Bool? = nil, resumeTasksAfterUnlock: Bool? = nil, unlockBeforeTransition: Bool? = nil) { self.entityType = entityType @@ -248,7 +248,7 @@ public extension PlatformClient.ApplicationClient.Order { - entities = try container.decode([LockManagerEntities].self, forKey: .entities) + entities = try container.decode([Entities].self, forKey: .entities) diff --git a/Sources/code/platform/Models/Order/UpdateShipmentLockResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/UpdateShipmentLockResponseSchemaOrderPlatformModel.swift similarity index 89% rename from Sources/code/platform/Models/Order/UpdateShipmentLockResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/UpdateShipmentLockResponseSchemaOrderPlatformModel.swift index 96cb3846c1..578a1e8a03 100644 --- a/Sources/code/platform/Models/Order/UpdateShipmentLockResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/UpdateShipmentLockResponseSchemaOrderPlatformModel.swift @@ -5,18 +5,18 @@ import Foundation public extension PlatformClient.Order { /* - Model: UpdateShipmentLockResponse + Model: UpdateShipmentLockResponseSchema Used By: Order */ - class UpdateShipmentLockResponse: Codable { + class UpdateShipmentLockResponseSchema: Codable { public var success: Bool? public var message: String? - public var checkResponse: [CheckResponse]? + public var checkResponse: [CheckResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -29,7 +29,7 @@ public extension PlatformClient.Order { } - public init(checkResponse: [CheckResponse]? = nil, message: String? = nil, success: Bool? = nil) { + public init(checkResponse: [CheckResponseSchema]? = nil, message: String? = nil, success: Bool? = nil) { self.success = success @@ -68,7 +68,7 @@ public extension PlatformClient.Order { do { - checkResponse = try container.decode([CheckResponse].self, forKey: .checkResponse) + checkResponse = try container.decode([CheckResponseSchema].self, forKey: .checkResponse) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -107,18 +107,18 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: UpdateShipmentLockResponse + Model: UpdateShipmentLockResponseSchema Used By: Order */ - class UpdateShipmentLockResponse: Codable { + class UpdateShipmentLockResponseSchema: Codable { public var success: Bool? public var message: String? - public var checkResponse: [CheckResponse]? + public var checkResponse: [CheckResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -131,7 +131,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(checkResponse: [CheckResponse]? = nil, message: String? = nil, success: Bool? = nil) { + public init(checkResponse: [CheckResponseSchema]? = nil, message: String? = nil, success: Bool? = nil) { self.success = success @@ -170,7 +170,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - checkResponse = try container.decode([CheckResponse].self, forKey: .checkResponse) + checkResponse = try container.decode([CheckResponseSchema].self, forKey: .checkResponse) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/UpdateShipmentPaymentModeOrderPlatformModel.swift b/Sources/code/platform/Models/Order/UpdateShipmentPaymentModeOrderPlatformModel.swift new file mode 100644 index 0000000000..c826af3654 --- /dev/null +++ b/Sources/code/platform/Models/Order/UpdateShipmentPaymentModeOrderPlatformModel.swift @@ -0,0 +1,194 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: UpdateShipmentPaymentMode + Used By: Order + */ + + class UpdateShipmentPaymentMode: Codable { + + + public var shipmentId: String + + public var products: [ProductSchema]? + + public var paymentMethods: [PaymentMethodSchema]? + + + public enum CodingKeys: String, CodingKey { + + case shipmentId = "shipment_id" + + case products = "products" + + case paymentMethods = "payment_methods" + + } + + public init(paymentMethods: [PaymentMethodSchema]? = nil, products: [ProductSchema]? = nil, shipmentId: String) { + + self.shipmentId = shipmentId + + self.products = products + + self.paymentMethods = paymentMethods + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + shipmentId = try container.decode(String.self, forKey: .shipmentId) + + + + + do { + products = try container.decode([ProductSchema].self, forKey: .products) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentMethods = try container.decode([PaymentMethodSchema].self, forKey: .paymentMethods) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) + + + + + try? container.encodeIfPresent(products, forKey: .products) + + + + + try? container.encodeIfPresent(paymentMethods, forKey: .paymentMethods) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: UpdateShipmentPaymentMode + Used By: Order + */ + + class UpdateShipmentPaymentMode: Codable { + + + public var shipmentId: String + + public var products: [ProductSchema]? + + public var paymentMethods: [PaymentMethodSchema]? + + + public enum CodingKeys: String, CodingKey { + + case shipmentId = "shipment_id" + + case products = "products" + + case paymentMethods = "payment_methods" + + } + + public init(paymentMethods: [PaymentMethodSchema]? = nil, products: [ProductSchema]? = nil, shipmentId: String) { + + self.shipmentId = shipmentId + + self.products = products + + self.paymentMethods = paymentMethods + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + shipmentId = try container.decode(String.self, forKey: .shipmentId) + + + + + do { + products = try container.decode([ProductSchema].self, forKey: .products) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentMethods = try container.decode([PaymentMethodSchema].self, forKey: .paymentMethods) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(shipmentId, forKey: .shipmentId) + + + + + try? container.encodeIfPresent(products, forKey: .products) + + + + + try? container.encodeIfPresent(paymentMethods, forKey: .paymentMethods) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/UpdateShipmentStatusRequestSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/UpdateShipmentStatusRequestSchemaOrderPlatformModel.swift index 64e0b54ede..9c7f192eec 100644 --- a/Sources/code/platform/Models/Order/UpdateShipmentStatusRequestSchemaOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/UpdateShipmentStatusRequestSchemaOrderPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.Order { public var forceTransition: Bool? - public var statuses: [StatuesRequest]? + public var statuses: [StatuesRequestSchema]? public var lockAfterTransition: Bool? @@ -41,7 +41,7 @@ public extension PlatformClient.Order { } - public init(forceTransition: Bool? = nil, lockAfterTransition: Bool? = nil, resumeTasksAfterUnlock: Bool? = nil, statuses: [StatuesRequest]? = nil, task: Bool? = nil, unlockBeforeTransition: Bool? = nil) { + public init(forceTransition: Bool? = nil, lockAfterTransition: Bool? = nil, resumeTasksAfterUnlock: Bool? = nil, statuses: [StatuesRequestSchema]? = nil, task: Bool? = nil, unlockBeforeTransition: Bool? = nil) { self.forceTransition = forceTransition @@ -74,7 +74,7 @@ public extension PlatformClient.Order { do { - statuses = try container.decode([StatuesRequest].self, forKey: .statuses) + statuses = try container.decode([StatuesRequestSchema].self, forKey: .statuses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -185,7 +185,7 @@ public extension PlatformClient.ApplicationClient.Order { public var forceTransition: Bool? - public var statuses: [StatuesRequest]? + public var statuses: [StatuesRequestSchema]? public var lockAfterTransition: Bool? @@ -212,7 +212,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(forceTransition: Bool? = nil, lockAfterTransition: Bool? = nil, resumeTasksAfterUnlock: Bool? = nil, statuses: [StatuesRequest]? = nil, task: Bool? = nil, unlockBeforeTransition: Bool? = nil) { + public init(forceTransition: Bool? = nil, lockAfterTransition: Bool? = nil, resumeTasksAfterUnlock: Bool? = nil, statuses: [StatuesRequestSchema]? = nil, task: Bool? = nil, unlockBeforeTransition: Bool? = nil) { self.forceTransition = forceTransition @@ -245,7 +245,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - statuses = try container.decode([StatuesRequest].self, forKey: .statuses) + statuses = try container.decode([StatuesRequestSchema].self, forKey: .statuses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/UpdateShipmentStatusResponseBodyOrderPlatformModel.swift b/Sources/code/platform/Models/Order/UpdateShipmentStatusResponseBodyOrderPlatformModel.swift index f02e2c9370..60b4e01ec6 100644 --- a/Sources/code/platform/Models/Order/UpdateShipmentStatusResponseBodyOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/UpdateShipmentStatusResponseBodyOrderPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Order { class UpdateShipmentStatusResponseBody: Codable { - public var statuses: [StatuesResponse]? + public var statuses: [StatuesResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -21,7 +21,7 @@ public extension PlatformClient.Order { } - public init(statuses: [StatuesResponse]? = nil) { + public init(statuses: [StatuesResponseSchema]? = nil) { self.statuses = statuses @@ -32,7 +32,7 @@ public extension PlatformClient.Order { do { - statuses = try container.decode([StatuesResponse].self, forKey: .statuses) + statuses = try container.decode([StatuesResponseSchema].self, forKey: .statuses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ public extension PlatformClient.ApplicationClient.Order { class UpdateShipmentStatusResponseBody: Codable { - public var statuses: [StatuesResponse]? + public var statuses: [StatuesResponseSchema]? public enum CodingKeys: String, CodingKey { @@ -77,7 +77,7 @@ public extension PlatformClient.ApplicationClient.Order { } - public init(statuses: [StatuesResponse]? = nil) { + public init(statuses: [StatuesResponseSchema]? = nil) { self.statuses = statuses @@ -88,7 +88,7 @@ public extension PlatformClient.ApplicationClient.Order { do { - statuses = try container.decode([StatuesResponse].self, forKey: .statuses) + statuses = try container.decode([StatuesResponseSchema].self, forKey: .statuses) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Order/UpdatedAddressSchemaOrderPlatformModel.swift b/Sources/code/platform/Models/Order/UpdatedAddressSchemaOrderPlatformModel.swift new file mode 100644 index 0000000000..a2ef693887 --- /dev/null +++ b/Sources/code/platform/Models/Order/UpdatedAddressSchemaOrderPlatformModel.swift @@ -0,0 +1,668 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: UpdatedAddressSchema + Used By: Order + */ + + class UpdatedAddressSchema: Codable { + + + public var address: String? + + public var area: String? + + public var landmark: String? + + public var pincode: String? + + public var city: String? + + public var state: String? + + public var name: String? + + public var phone: String? + + public var email: String? + + public var country: String? + + public var countryIsoCode: String? + + public var latitude: Double? + + public var longitude: Double? + + + public enum CodingKeys: String, CodingKey { + + case address = "address" + + case area = "area" + + case landmark = "landmark" + + case pincode = "pincode" + + case city = "city" + + case state = "state" + + case name = "name" + + case phone = "phone" + + case email = "email" + + case country = "country" + + case countryIsoCode = "country_iso_code" + + case latitude = "latitude" + + case longitude = "longitude" + + } + + public init(address: String? = nil, area: String? = nil, city: String? = nil, country: String? = nil, countryIsoCode: String? = nil, email: String? = nil, landmark: String? = nil, latitude: Double? = nil, longitude: Double? = nil, name: String? = nil, phone: String? = nil, pincode: String? = nil, state: String? = nil) { + + self.address = address + + self.area = area + + self.landmark = landmark + + self.pincode = pincode + + self.city = city + + self.state = state + + self.name = name + + self.phone = phone + + self.email = email + + self.country = country + + self.countryIsoCode = countryIsoCode + + self.latitude = latitude + + self.longitude = longitude + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + area = try container.decode(String.self, forKey: .area) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + landmark = try container.decode(String.self, forKey: .landmark) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + pincode = try container.decode(String.self, forKey: .pincode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + city = try container.decode(String.self, forKey: .city) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + state = try container.decode(String.self, forKey: .state) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + phone = try container.decode(String.self, forKey: .phone) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + email = try container.decode(String.self, forKey: .email) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + country = try container.decode(String.self, forKey: .country) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + countryIsoCode = try container.decode(String.self, forKey: .countryIsoCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + latitude = try container.decode(Double.self, forKey: .latitude) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + longitude = try container.decode(Double.self, forKey: .longitude) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(address, forKey: .address) + + + + + try? container.encodeIfPresent(area, forKey: .area) + + + + + try? container.encodeIfPresent(landmark, forKey: .landmark) + + + + + try? container.encodeIfPresent(pincode, forKey: .pincode) + + + + + try? container.encodeIfPresent(city, forKey: .city) + + + + + try? container.encodeIfPresent(state, forKey: .state) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(phone, forKey: .phone) + + + + + try? container.encodeIfPresent(email, forKey: .email) + + + + + try? container.encodeIfPresent(country, forKey: .country) + + + + + try? container.encodeIfPresent(countryIsoCode, forKey: .countryIsoCode) + + + + + try? container.encodeIfPresent(latitude, forKey: .latitude) + + + + + try? container.encodeIfPresent(longitude, forKey: .longitude) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: UpdatedAddressSchema + Used By: Order + */ + + class UpdatedAddressSchema: Codable { + + + public var address: String? + + public var area: String? + + public var landmark: String? + + public var pincode: String? + + public var city: String? + + public var state: String? + + public var name: String? + + public var phone: String? + + public var email: String? + + public var country: String? + + public var countryIsoCode: String? + + public var latitude: Double? + + public var longitude: Double? + + + public enum CodingKeys: String, CodingKey { + + case address = "address" + + case area = "area" + + case landmark = "landmark" + + case pincode = "pincode" + + case city = "city" + + case state = "state" + + case name = "name" + + case phone = "phone" + + case email = "email" + + case country = "country" + + case countryIsoCode = "country_iso_code" + + case latitude = "latitude" + + case longitude = "longitude" + + } + + public init(address: String? = nil, area: String? = nil, city: String? = nil, country: String? = nil, countryIsoCode: String? = nil, email: String? = nil, landmark: String? = nil, latitude: Double? = nil, longitude: Double? = nil, name: String? = nil, phone: String? = nil, pincode: String? = nil, state: String? = nil) { + + self.address = address + + self.area = area + + self.landmark = landmark + + self.pincode = pincode + + self.city = city + + self.state = state + + self.name = name + + self.phone = phone + + self.email = email + + self.country = country + + self.countryIsoCode = countryIsoCode + + self.latitude = latitude + + self.longitude = longitude + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + area = try container.decode(String.self, forKey: .area) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + landmark = try container.decode(String.self, forKey: .landmark) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + pincode = try container.decode(String.self, forKey: .pincode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + city = try container.decode(String.self, forKey: .city) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + state = try container.decode(String.self, forKey: .state) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + phone = try container.decode(String.self, forKey: .phone) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + email = try container.decode(String.self, forKey: .email) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + country = try container.decode(String.self, forKey: .country) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + countryIsoCode = try container.decode(String.self, forKey: .countryIsoCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + latitude = try container.decode(Double.self, forKey: .latitude) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + longitude = try container.decode(Double.self, forKey: .longitude) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(address, forKey: .address) + + + + + try? container.encodeIfPresent(area, forKey: .area) + + + + + try? container.encodeIfPresent(landmark, forKey: .landmark) + + + + + try? container.encodeIfPresent(pincode, forKey: .pincode) + + + + + try? container.encodeIfPresent(city, forKey: .city) + + + + + try? container.encodeIfPresent(state, forKey: .state) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(phone, forKey: .phone) + + + + + try? container.encodeIfPresent(email, forKey: .email) + + + + + try? container.encodeIfPresent(country, forKey: .country) + + + + + try? container.encodeIfPresent(countryIsoCode, forKey: .countryIsoCode) + + + + + try? container.encodeIfPresent(latitude, forKey: .latitude) + + + + + try? container.encodeIfPresent(longitude, forKey: .longitude) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/UploadManifestConsentOrderPlatformModel.swift b/Sources/code/platform/Models/Order/UploadConsentOrderPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Order/UploadManifestConsentOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/UploadConsentOrderPlatformModel.swift index 7c29ea3c70..8e87dc5be7 100644 --- a/Sources/code/platform/Models/Order/UploadManifestConsentOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/UploadConsentOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: UploadManifestConsent + Model: UploadConsent Used By: Order */ - class UploadManifestConsent: Codable { + class UploadConsent: Codable { public var consentUrl: String @@ -70,11 +70,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: UploadManifestConsent + Model: UploadConsent Used By: Order */ - class UploadManifestConsent: Codable { + class UploadConsent: Codable { public var consentUrl: String diff --git a/Sources/code/platform/Models/Order/UserDataOrderPlatformModel.swift b/Sources/code/platform/Models/Order/UserDataOrderPlatformModel.swift new file mode 100644 index 0000000000..833dbcba2d --- /dev/null +++ b/Sources/code/platform/Models/Order/UserDataOrderPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: UserData + Used By: Order + */ + + class UserData: Codable { + + + public var shippingUser: OrderUser? + + public var billingUser: OrderUser? + + + public enum CodingKeys: String, CodingKey { + + case shippingUser = "shipping_user" + + case billingUser = "billing_user" + + } + + public init(billingUser: OrderUser? = nil, shippingUser: OrderUser? = nil) { + + self.shippingUser = shippingUser + + self.billingUser = billingUser + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + shippingUser = try container.decode(OrderUser.self, forKey: .shippingUser) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + billingUser = try container.decode(OrderUser.self, forKey: .billingUser) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(shippingUser, forKey: .shippingUser) + + + + + try? container.encodeIfPresent(billingUser, forKey: .billingUser) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: UserData + Used By: Order + */ + + class UserData: Codable { + + + public var shippingUser: OrderUser? + + public var billingUser: OrderUser? + + + public enum CodingKeys: String, CodingKey { + + case shippingUser = "shipping_user" + + case billingUser = "billing_user" + + } + + public init(billingUser: OrderUser? = nil, shippingUser: OrderUser? = nil) { + + self.shippingUser = shippingUser + + self.billingUser = billingUser + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + shippingUser = try container.decode(OrderUser.self, forKey: .shippingUser) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + billingUser = try container.decode(OrderUser.self, forKey: .billingUser) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(shippingUser, forKey: .shippingUser) + + + + + try? container.encodeIfPresent(billingUser, forKey: .billingUser) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/ValidationErrorOrderPlatformModel.swift b/Sources/code/platform/Models/Order/ValidationErrorOrderPlatformModel.swift new file mode 100644 index 0000000000..c754787fea --- /dev/null +++ b/Sources/code/platform/Models/Order/ValidationErrorOrderPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Order { + /* + Model: ValidationError + Used By: Order + */ + + class ValidationError: Codable { + + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Order { + /* + Model: ValidationError + Used By: Order + */ + + class ValidationError: Codable { + + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Order/VerifyOtpResponseOrderPlatformModel.swift b/Sources/code/platform/Models/Order/VerifyOtpResponseSchemaOrderPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Order/VerifyOtpResponseOrderPlatformModel.swift rename to Sources/code/platform/Models/Order/VerifyOtpResponseSchemaOrderPlatformModel.swift index 6014529336..76871f8c4e 100644 --- a/Sources/code/platform/Models/Order/VerifyOtpResponseOrderPlatformModel.swift +++ b/Sources/code/platform/Models/Order/VerifyOtpResponseSchemaOrderPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Order { /* - Model: VerifyOtpResponse + Model: VerifyOtpResponseSchema Used By: Order */ - class VerifyOtpResponse: Codable { + class VerifyOtpResponseSchema: Codable { public var status: Int? @@ -130,11 +130,11 @@ public extension PlatformClient.Order { public extension PlatformClient.ApplicationClient.Order { /* - Model: VerifyOtpResponse + Model: VerifyOtpResponseSchema Used By: Order */ - class VerifyOtpResponse: Codable { + class VerifyOtpResponseSchema: Codable { public var status: Int? diff --git a/Sources/code/platform/Models/Partner/AddProxyResponsePartnerPlatformModel.swift b/Sources/code/platform/Models/Partner/ExtensionProxyPathCreationPartnerPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Partner/AddProxyResponsePartnerPlatformModel.swift rename to Sources/code/platform/Models/Partner/ExtensionProxyPathCreationPartnerPlatformModel.swift index 9daf3c3057..948f35152d 100644 --- a/Sources/code/platform/Models/Partner/AddProxyResponsePartnerPlatformModel.swift +++ b/Sources/code/platform/Models/Partner/ExtensionProxyPathCreationPartnerPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Partner { /* - Model: AddProxyResponse + Model: ExtensionProxyPathCreation Used By: Partner */ - class AddProxyResponse: Codable { + class ExtensionProxyPathCreation: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Partner/RemoveProxyResponsePartnerPlatformModel.swift b/Sources/code/platform/Models/Partner/ExtensionProxyPathDeletePartnerPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Partner/RemoveProxyResponsePartnerPlatformModel.swift rename to Sources/code/platform/Models/Partner/ExtensionProxyPathDeletePartnerPlatformModel.swift index 2ed4421359..b53bee99fd 100644 --- a/Sources/code/platform/Models/Partner/RemoveProxyResponsePartnerPlatformModel.swift +++ b/Sources/code/platform/Models/Partner/ExtensionProxyPathDeletePartnerPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Partner { /* - Model: RemoveProxyResponse + Model: ExtensionProxyPathDelete Used By: Partner */ - class RemoveProxyResponse: Codable { + class ExtensionProxyPathDelete: Codable { public var message: String? diff --git a/Sources/code/platform/Models/Payment/AddBeneficiaryDetailsOTPRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/AddBeneficiaryDetailsOTPCreationPaymentPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Payment/AddBeneficiaryDetailsOTPRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/AddBeneficiaryDetailsOTPCreationPaymentPlatformModel.swift index 6807e5dd7f..92f3c528b0 100644 --- a/Sources/code/platform/Models/Payment/AddBeneficiaryDetailsOTPRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/AddBeneficiaryDetailsOTPCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: AddBeneficiaryDetailsOTPRequest + Model: AddBeneficiaryDetailsOTPCreation Used By: Payment */ - class AddBeneficiaryDetailsOTPRequest: Codable { + class AddBeneficiaryDetailsOTPCreation: Codable { public var orderId: String @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: AddBeneficiaryDetailsOTPRequest + Model: AddBeneficiaryDetailsOTPCreation Used By: Payment */ - class AddBeneficiaryDetailsOTPRequest: Codable { + class AddBeneficiaryDetailsOTPCreation: Codable { public var orderId: String diff --git a/Sources/code/platform/Models/Payment/AggregatorVersionResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/AggregatorVersionDetailsPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/AggregatorVersionResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/AggregatorVersionDetailsPaymentPlatformModel.swift index 5bc28ff43a..29c5f340e5 100644 --- a/Sources/code/platform/Models/Payment/AggregatorVersionResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/AggregatorVersionDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: AggregatorVersionResponse + Model: AggregatorVersionDetails Used By: Payment */ - class AggregatorVersionResponse: Codable { + class AggregatorVersionDetails: Codable { public var message: String @@ -93,11 +93,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: AggregatorVersionResponse + Model: AggregatorVersionDetails Used By: Payment */ - class AggregatorVersionResponse: Codable { + class AggregatorVersionDetails: Codable { public var message: String diff --git a/Sources/code/platform/Models/Payment/CODChargesLimitsResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/CODChargesLimitsDetailsPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/CODChargesLimitsResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/CODChargesLimitsDetailsPaymentPlatformModel.swift index bad37b3941..d64f381c64 100644 --- a/Sources/code/platform/Models/Payment/CODChargesLimitsResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/CODChargesLimitsDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: CODChargesLimitsResponse + Model: CODChargesLimitsDetails Used By: Payment */ - class CODChargesLimitsResponse: Codable { + class CODChargesLimitsDetails: Codable { public var maxCartValue: Double? @@ -107,11 +107,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: CODChargesLimitsResponse + Model: CODChargesLimitsDetails Used By: Payment */ - class CODChargesLimitsResponse: Codable { + class CODChargesLimitsDetails: Codable { public var maxCartValue: Double? diff --git a/Sources/code/platform/Models/Payment/CancelOrResendPaymentLinkRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/CancelOrResendPaymentLinkCreationPaymentPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Payment/CancelOrResendPaymentLinkRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/CancelOrResendPaymentLinkCreationPaymentPlatformModel.swift index b04fc4b4f7..22e0d3a769 100644 --- a/Sources/code/platform/Models/Payment/CancelOrResendPaymentLinkRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/CancelOrResendPaymentLinkCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: CancelOrResendPaymentLinkRequest + Model: CancelOrResendPaymentLinkCreation Used By: Payment */ - class CancelOrResendPaymentLinkRequest: Codable { + class CancelOrResendPaymentLinkCreation: Codable { public var paymentLinkId: String @@ -54,11 +54,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: CancelOrResendPaymentLinkRequest + Model: CancelOrResendPaymentLinkCreation Used By: Payment */ - class CancelOrResendPaymentLinkRequest: Codable { + class CancelOrResendPaymentLinkCreation: Codable { public var paymentLinkId: String diff --git a/Sources/code/platform/Models/Payment/CancelPaymentLinkResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/CancelPaymentLinkDetailsPaymentPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Payment/CancelPaymentLinkResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/CancelPaymentLinkDetailsPaymentPlatformModel.swift index c4edfe014c..7bd74c836a 100644 --- a/Sources/code/platform/Models/Payment/CancelPaymentLinkResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/CancelPaymentLinkDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: CancelPaymentLinkResponse + Model: CancelPaymentLinkDetails Used By: Payment */ - class CancelPaymentLinkResponse: Codable { + class CancelPaymentLinkDetails: Codable { public var statusCode: Int @@ -86,11 +86,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: CancelPaymentLinkResponse + Model: CancelPaymentLinkDetails Used By: Payment */ - class CancelPaymentLinkResponse: Codable { + class CancelPaymentLinkDetails: Codable { public var statusCode: Int diff --git a/Sources/code/platform/Models/Payment/CartDetailsSerializerPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/CartDetailsPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/CartDetailsSerializerPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/CartDetailsPaymentPlatformModel.swift index e46dac27e8..8c0912b035 100644 --- a/Sources/code/platform/Models/Payment/CartDetailsSerializerPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/CartDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: CartDetailsSerializer + Model: CartDetails Used By: Payment */ - class CartDetailsSerializer: Codable { + class CartDetails: Codable { public var items: [String: Any] @@ -132,11 +132,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: CartDetailsSerializer + Model: CartDetails Used By: Payment */ - class CartDetailsSerializer: Codable { + class CartDetails: Codable { public var items: [String: Any] diff --git a/Sources/code/platform/Models/Payment/CreatePaymentLinkRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/CreatePaymentLinkCreationPaymentPlatformModel.swift similarity index 69% rename from Sources/code/platform/Models/Payment/CreatePaymentLinkRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/CreatePaymentLinkCreationPaymentPlatformModel.swift index ac9931afd5..61ee7fce3c 100644 --- a/Sources/code/platform/Models/Payment/CreatePaymentLinkRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/CreatePaymentLinkCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: CreatePaymentLinkRequest + Model: CreatePaymentLinkCreation Used By: Payment */ - class CreatePaymentLinkRequest: Codable { + class CreatePaymentLinkCreation: Codable { public var email: String @@ -26,6 +26,10 @@ public extension PlatformClient.Payment { public var externalOrderId: String + public var successRedirectionUrl: String? + + public var failureRedirectionUrl: String? + public enum CodingKeys: String, CodingKey { @@ -43,9 +47,13 @@ public extension PlatformClient.Payment { case externalOrderId = "external_order_id" + case successRedirectionUrl = "success_redirection_url" + + case failureRedirectionUrl = "failure_redirection_url" + } - public init(amount: Double, countryPhoneCode: String? = nil, description: String? = nil, email: String, externalOrderId: String, meta: CreatePaymentLinkMeta, mobileNumber: String) { + public init(amount: Double, countryPhoneCode: String? = nil, description: String? = nil, email: String, externalOrderId: String, failureRedirectionUrl: String? = nil, meta: CreatePaymentLinkMeta, mobileNumber: String, successRedirectionUrl: String? = nil) { self.email = email @@ -61,6 +69,10 @@ public extension PlatformClient.Payment { self.externalOrderId = externalOrderId + self.successRedirectionUrl = successRedirectionUrl + + self.failureRedirectionUrl = failureRedirectionUrl + } required public init(from decoder: Decoder) throws { @@ -115,6 +127,30 @@ public extension PlatformClient.Payment { + + do { + successRedirectionUrl = try container.decode(String.self, forKey: .successRedirectionUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + failureRedirectionUrl = try container.decode(String.self, forKey: .failureRedirectionUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -155,6 +191,16 @@ public extension PlatformClient.Payment { try? container.encodeIfPresent(externalOrderId, forKey: .externalOrderId) + + + try? container.encodeIfPresent(successRedirectionUrl, forKey: .successRedirectionUrl) + + + + + try? container.encodeIfPresent(failureRedirectionUrl, forKey: .failureRedirectionUrl) + + } } @@ -164,11 +210,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: CreatePaymentLinkRequest + Model: CreatePaymentLinkCreation Used By: Payment */ - class CreatePaymentLinkRequest: Codable { + class CreatePaymentLinkCreation: Codable { public var email: String @@ -185,6 +231,10 @@ public extension PlatformClient.ApplicationClient.Payment { public var externalOrderId: String + public var successRedirectionUrl: String? + + public var failureRedirectionUrl: String? + public enum CodingKeys: String, CodingKey { @@ -202,9 +252,13 @@ public extension PlatformClient.ApplicationClient.Payment { case externalOrderId = "external_order_id" + case successRedirectionUrl = "success_redirection_url" + + case failureRedirectionUrl = "failure_redirection_url" + } - public init(amount: Double, countryPhoneCode: String? = nil, description: String? = nil, email: String, externalOrderId: String, meta: CreatePaymentLinkMeta, mobileNumber: String) { + public init(amount: Double, countryPhoneCode: String? = nil, description: String? = nil, email: String, externalOrderId: String, failureRedirectionUrl: String? = nil, meta: CreatePaymentLinkMeta, mobileNumber: String, successRedirectionUrl: String? = nil) { self.email = email @@ -220,6 +274,10 @@ public extension PlatformClient.ApplicationClient.Payment { self.externalOrderId = externalOrderId + self.successRedirectionUrl = successRedirectionUrl + + self.failureRedirectionUrl = failureRedirectionUrl + } required public init(from decoder: Decoder) throws { @@ -274,6 +332,30 @@ public extension PlatformClient.ApplicationClient.Payment { + + do { + successRedirectionUrl = try container.decode(String.self, forKey: .successRedirectionUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + failureRedirectionUrl = try container.decode(String.self, forKey: .failureRedirectionUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -314,6 +396,16 @@ public extension PlatformClient.ApplicationClient.Payment { try? container.encodeIfPresent(externalOrderId, forKey: .externalOrderId) + + + try? container.encodeIfPresent(successRedirectionUrl, forKey: .successRedirectionUrl) + + + + + try? container.encodeIfPresent(failureRedirectionUrl, forKey: .failureRedirectionUrl) + + } } diff --git a/Sources/code/platform/Models/Payment/CreatePaymentLinkResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/CreatePaymentLinkDetailsPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/CreatePaymentLinkResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/CreatePaymentLinkDetailsPaymentPlatformModel.swift index 7a299cb939..0cd06ac522 100644 --- a/Sources/code/platform/Models/Payment/CreatePaymentLinkResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/CreatePaymentLinkDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: CreatePaymentLinkResponse + Model: CreatePaymentLinkDetails Used By: Payment */ - class CreatePaymentLinkResponse: Codable { + class CreatePaymentLinkDetails: Codable { public var message: String @@ -155,11 +155,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: CreatePaymentLinkResponse + Model: CreatePaymentLinkDetails Used By: Payment */ - class CreatePaymentLinkResponse: Codable { + class CreatePaymentLinkDetails: Codable { public var message: String diff --git a/Sources/code/platform/Models/Payment/DeletePayoutResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/DeletePayoutDetailsPaymentPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Payment/DeletePayoutResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/DeletePayoutDetailsPaymentPlatformModel.swift index b53a88a8cd..ba1d7f8821 100644 --- a/Sources/code/platform/Models/Payment/DeletePayoutResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/DeletePayoutDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: DeletePayoutResponse + Model: DeletePayoutDetails Used By: Payment */ - class DeletePayoutResponse: Codable { + class DeletePayoutDetails: Codable { public var success: Bool @@ -54,11 +54,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: DeletePayoutResponse + Model: DeletePayoutDetails Used By: Payment */ - class DeletePayoutResponse: Codable { + class DeletePayoutDetails: Codable { public var success: Bool diff --git a/Sources/code/platform/Models/Payment/DeleteSubscriptionPaymentMethodResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/DeleteSubscriptionPaymentMethodDetailsPaymentPlatformModel.swift similarity index 89% rename from Sources/code/platform/Models/Payment/DeleteSubscriptionPaymentMethodResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/DeleteSubscriptionPaymentMethodDetailsPaymentPlatformModel.swift index 917e5c28d9..c20a2da58f 100644 --- a/Sources/code/platform/Models/Payment/DeleteSubscriptionPaymentMethodResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/DeleteSubscriptionPaymentMethodDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: DeleteSubscriptionPaymentMethodResponse + Model: DeleteSubscriptionPaymentMethodDetails Used By: Payment */ - class DeleteSubscriptionPaymentMethodResponse: Codable { + class DeleteSubscriptionPaymentMethodDetails: Codable { public var success: Bool @@ -54,11 +54,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: DeleteSubscriptionPaymentMethodResponse + Model: DeleteSubscriptionPaymentMethodDetails Used By: Payment */ - class DeleteSubscriptionPaymentMethodResponse: Codable { + class DeleteSubscriptionPaymentMethodDetails: Codable { public var success: Bool diff --git a/Sources/code/platform/Models/Payment/EdcAddRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/EdcAddCreationPaymentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Payment/EdcAddRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/EdcAddCreationPaymentPlatformModel.swift index fe0d173c43..049b0cfc21 100644 --- a/Sources/code/platform/Models/Payment/EdcAddRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/EdcAddCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: EdcAddRequest + Model: EdcAddCreation Used By: Payment */ - class EdcAddRequest: Codable { + class EdcAddCreation: Codable { public var edcModel: String @@ -141,11 +141,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: EdcAddRequest + Model: EdcAddCreation Used By: Payment */ - class EdcAddRequest: Codable { + class EdcAddCreation: Codable { public var edcModel: String diff --git a/Sources/code/platform/Models/Payment/EdcAggregatorAndModelListResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/EdcAggregatorAndModelListDetailsPaymentPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Payment/EdcAggregatorAndModelListResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/EdcAggregatorAndModelListDetailsPaymentPlatformModel.swift index b8c14f214d..5aa9c91fae 100644 --- a/Sources/code/platform/Models/Payment/EdcAggregatorAndModelListResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/EdcAggregatorAndModelListDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: EdcAggregatorAndModelListResponse + Model: EdcAggregatorAndModelListDetails Used By: Payment */ - class EdcAggregatorAndModelListResponse: Codable { + class EdcAggregatorAndModelListDetails: Codable { public var data: [EdcModelData] @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: EdcAggregatorAndModelListResponse + Model: EdcAggregatorAndModelListDetails Used By: Payment */ - class EdcAggregatorAndModelListResponse: Codable { + class EdcAggregatorAndModelListDetails: Codable { public var data: [EdcModelData] diff --git a/Sources/code/platform/Models/Payment/EdcDeviceAddResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/EdcDeviceAddDetailsPaymentPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Payment/EdcDeviceAddResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/EdcDeviceAddDetailsPaymentPlatformModel.swift index 2f85ab7a65..e42f852f47 100644 --- a/Sources/code/platform/Models/Payment/EdcDeviceAddResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/EdcDeviceAddDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: EdcDeviceAddResponse + Model: EdcDeviceAddDetails Used By: Payment */ - class EdcDeviceAddResponse: Codable { + class EdcDeviceAddDetails: Codable { public var data: EdcDevice @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: EdcDeviceAddResponse + Model: EdcDeviceAddDetails Used By: Payment */ - class EdcDeviceAddResponse: Codable { + class EdcDeviceAddDetails: Codable { public var data: EdcDevice diff --git a/Sources/code/platform/Models/Payment/EdcDeviceDetailsResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/EdcDeviceDetailsPaymentPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Payment/EdcDeviceDetailsResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/EdcDeviceDetailsPaymentPlatformModel.swift index c9ec070246..e1b54f891b 100644 --- a/Sources/code/platform/Models/Payment/EdcDeviceDetailsResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/EdcDeviceDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: EdcDeviceDetailsResponse + Model: EdcDeviceDetails Used By: Payment */ - class EdcDeviceDetailsResponse: Codable { + class EdcDeviceDetails: Codable { public var data: EdcDevice @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: EdcDeviceDetailsResponse + Model: EdcDeviceDetails Used By: Payment */ - class EdcDeviceDetailsResponse: Codable { + class EdcDeviceDetails: Codable { public var data: EdcDevice diff --git a/Sources/code/platform/Models/Payment/EdcDeviceListResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/EdcDeviceListDetailsPaymentPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Payment/EdcDeviceListResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/EdcDeviceListDetailsPaymentPlatformModel.swift index 3761ef5bbe..73c25b104a 100644 --- a/Sources/code/platform/Models/Payment/EdcDeviceListResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/EdcDeviceListDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: EdcDeviceListResponse + Model: EdcDeviceListDetails Used By: Payment */ - class EdcDeviceListResponse: Codable { + class EdcDeviceListDetails: Codable { public var items: [EdcDevice] @@ -86,11 +86,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: EdcDeviceListResponse + Model: EdcDeviceListDetails Used By: Payment */ - class EdcDeviceListResponse: Codable { + class EdcDeviceListDetails: Codable { public var items: [EdcDevice] diff --git a/Sources/code/platform/Models/Payment/EdcDeviceStatsResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/EdcDeviceStatsDetailsPaymentPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Payment/EdcDeviceStatsResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/EdcDeviceStatsDetailsPaymentPlatformModel.swift index cf0b6b59c3..b6c273e57b 100644 --- a/Sources/code/platform/Models/Payment/EdcDeviceStatsResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/EdcDeviceStatsDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: EdcDeviceStatsResponse + Model: EdcDeviceStatsDetails Used By: Payment */ - class EdcDeviceStatsResponse: Codable { + class EdcDeviceStatsDetails: Codable { public var statistics: StatisticsData @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: EdcDeviceStatsResponse + Model: EdcDeviceStatsDetails Used By: Payment */ - class EdcDeviceStatsResponse: Codable { + class EdcDeviceStatsDetails: Codable { public var statistics: StatisticsData diff --git a/Sources/code/platform/Models/Payment/EdcDeviceUpdateResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/EdcDeviceUpdateDetailsPaymentPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Payment/EdcDeviceUpdateResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/EdcDeviceUpdateDetailsPaymentPlatformModel.swift index 554896f3fe..408e45329b 100644 --- a/Sources/code/platform/Models/Payment/EdcDeviceUpdateResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/EdcDeviceUpdateDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: EdcDeviceUpdateResponse + Model: EdcDeviceUpdateDetails Used By: Payment */ - class EdcDeviceUpdateResponse: Codable { + class EdcDeviceUpdateDetails: Codable { public var success: Bool @@ -54,11 +54,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: EdcDeviceUpdateResponse + Model: EdcDeviceUpdateDetails Used By: Payment */ - class EdcDeviceUpdateResponse: Codable { + class EdcDeviceUpdateDetails: Codable { public var success: Bool diff --git a/Sources/code/platform/Models/Payment/EdcUpdateRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/EdcUpdatePaymentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Payment/EdcUpdateRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/EdcUpdatePaymentPlatformModel.swift index ee5ab76271..f36de3534f 100644 --- a/Sources/code/platform/Models/Payment/EdcUpdateRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/EdcUpdatePaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: EdcUpdateRequest + Model: EdcUpdate Used By: Payment */ - class EdcUpdateRequest: Codable { + class EdcUpdate: Codable { public var edcModel: String? @@ -199,11 +199,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: EdcUpdateRequest + Model: EdcUpdate Used By: Payment */ - class EdcUpdateRequest: Codable { + class EdcUpdate: Codable { public var edcModel: String? diff --git a/Sources/code/platform/Models/Payment/ErrorResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/ErrorDetailsPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/ErrorResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/ErrorDetailsPaymentPlatformModel.swift index c1e8c81992..6af5fe98b4 100644 --- a/Sources/code/platform/Models/Payment/ErrorResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/ErrorDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: ErrorResponse + Model: ErrorDetails Used By: Payment */ - class ErrorResponse: Codable { + class ErrorDetails: Codable { public var statusCode: Int @@ -109,11 +109,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: ErrorResponse + Model: ErrorDetails Used By: Payment */ - class ErrorResponse: Codable { + class ErrorDetails: Codable { public var statusCode: Int diff --git a/Sources/code/platform/Models/Payment/GetOauthUrlResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/GetOauthUrlDetailsPaymentPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Payment/GetOauthUrlResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/GetOauthUrlDetailsPaymentPlatformModel.swift index 9284affa13..044117248f 100644 --- a/Sources/code/platform/Models/Payment/GetOauthUrlResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/GetOauthUrlDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: GetOauthUrlResponse + Model: GetOauthUrlDetails Used By: Payment */ - class GetOauthUrlResponse: Codable { + class GetOauthUrlDetails: Codable { public var url: String @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: GetOauthUrlResponse + Model: GetOauthUrlDetails Used By: Payment */ - class GetOauthUrlResponse: Codable { + class GetOauthUrlDetails: Codable { public var url: String diff --git a/Sources/code/platform/Models/Payment/GetPaymentCodeResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/GetPaymentCodeDetailsPaymentPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Payment/GetPaymentCodeResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/GetPaymentCodeDetailsPaymentPlatformModel.swift index 57a1950837..d174ed2591 100644 --- a/Sources/code/platform/Models/Payment/GetPaymentCodeResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/GetPaymentCodeDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: GetPaymentCodeResponse + Model: GetPaymentCodeDetails Used By: Payment */ - class GetPaymentCodeResponse: Codable { + class GetPaymentCodeDetails: Codable { public var data: GetPaymentCode @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: GetPaymentCodeResponse + Model: GetPaymentCodeDetails Used By: Payment */ - class GetPaymentCodeResponse: Codable { + class GetPaymentCodeDetails: Codable { public var data: GetPaymentCode diff --git a/Sources/code/platform/Models/Payment/GetPaymentLinkResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/GetPaymentLinkDetailsPaymentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Payment/GetPaymentLinkResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/GetPaymentLinkDetailsPaymentPlatformModel.swift index e52c1cc8ec..e5cf672ee1 100644 --- a/Sources/code/platform/Models/Payment/GetPaymentLinkResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/GetPaymentLinkDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: GetPaymentLinkResponse + Model: GetPaymentLinkDetails Used By: Payment */ - class GetPaymentLinkResponse: Codable { + class GetPaymentLinkDetails: Codable { public var message: String @@ -224,11 +224,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: GetPaymentLinkResponse + Model: GetPaymentLinkDetails Used By: Payment */ - class GetPaymentLinkResponse: Codable { + class GetPaymentLinkDetails: Codable { public var message: String diff --git a/Sources/code/platform/Models/Payment/GetUserCODLimitResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/GetUserCODLimitDetailsPaymentPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Payment/GetUserCODLimitResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/GetUserCODLimitDetailsPaymentPlatformModel.swift index ad10e93410..8902cfa569 100644 --- a/Sources/code/platform/Models/Payment/GetUserCODLimitResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/GetUserCODLimitDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: GetUserCODLimitResponse + Model: GetUserCODLimitDetails Used By: Payment */ - class GetUserCODLimitResponse: Codable { + class GetUserCODLimitDetails: Codable { public var userCodData: CODdata @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: GetUserCODLimitResponse + Model: GetUserCODLimitDetails Used By: Payment */ - class GetUserCODLimitResponse: Codable { + class GetUserCODLimitDetails: Codable { public var userCodData: CODdata diff --git a/Sources/code/platform/Models/Payment/HttpErrorCodeAndResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/HttpErrorDetailsPaymentPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Payment/HttpErrorCodeAndResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/HttpErrorDetailsPaymentPlatformModel.swift index 3c8ba169bc..7f16f93be7 100644 --- a/Sources/code/platform/Models/Payment/HttpErrorCodeAndResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/HttpErrorDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: HttpErrorCodeAndResponse + Model: HttpErrorDetails Used By: Payment */ - class HttpErrorCodeAndResponse: Codable { + class HttpErrorDetails: Codable { public var error: ErrorCodeAndDescription @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: HttpErrorCodeAndResponse + Model: HttpErrorDetails Used By: Payment */ - class HttpErrorCodeAndResponse: Codable { + class HttpErrorDetails: Codable { public var error: ErrorCodeAndDescription diff --git a/Sources/code/platform/Models/Payment/IfscCodeResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/IfscCodeDetailsPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/IfscCodeResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/IfscCodeDetailsPaymentPlatformModel.swift index 9762002a75..9b2c2d91ce 100644 --- a/Sources/code/platform/Models/Payment/IfscCodeResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/IfscCodeDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: IfscCodeResponse + Model: IfscCodeDetails Used By: Payment */ - class IfscCodeResponse: Codable { + class IfscCodeDetails: Codable { public var branchName: String @@ -93,11 +93,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: IfscCodeResponse + Model: IfscCodeDetails Used By: Payment */ - class IfscCodeResponse: Codable { + class IfscCodeDetails: Codable { public var branchName: String diff --git a/Sources/code/platform/Models/Payment/MerchantOnBoardingRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/MerchantOnBoardingCreationPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/MerchantOnBoardingRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/MerchantOnBoardingCreationPaymentPlatformModel.swift index 83cd763303..8c5a1ed1e8 100644 --- a/Sources/code/platform/Models/Payment/MerchantOnBoardingRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/MerchantOnBoardingCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: MerchantOnBoardingRequest + Model: MerchantOnBoardingCreation Used By: Payment */ - class MerchantOnBoardingRequest: Codable { + class MerchantOnBoardingCreation: Codable { public var creditLineId: String @@ -118,11 +118,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: MerchantOnBoardingRequest + Model: MerchantOnBoardingCreation Used By: Payment */ - class MerchantOnBoardingRequest: Codable { + class MerchantOnBoardingCreation: Codable { public var creditLineId: String diff --git a/Sources/code/platform/Models/Payment/MerchantOnBoardingResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/MerchantOnBoardingDetailsPaymentPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Payment/MerchantOnBoardingResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/MerchantOnBoardingDetailsPaymentPlatformModel.swift index 46a126d923..68de8e15aa 100644 --- a/Sources/code/platform/Models/Payment/MerchantOnBoardingResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/MerchantOnBoardingDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: MerchantOnBoardingResponse + Model: MerchantOnBoardingDetails Used By: Payment */ - class MerchantOnBoardingResponse: Codable { + class MerchantOnBoardingDetails: Codable { public var data: [String: Any] @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: MerchantOnBoardingResponse + Model: MerchantOnBoardingDetails Used By: Payment */ - class MerchantOnBoardingResponse: Codable { + class MerchantOnBoardingDetails: Codable { public var data: [String: Any] diff --git a/Sources/code/platform/Models/Payment/MerchantPaymentModeRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/MerchantPaymentModeCreationPaymentPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Payment/MerchantPaymentModeRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/MerchantPaymentModeCreationPaymentPlatformModel.swift index 8dec7805d8..168d22042f 100644 --- a/Sources/code/platform/Models/Payment/MerchantPaymentModeRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/MerchantPaymentModeCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: MerchantPaymentModeRequest + Model: MerchantPaymentModeCreation Used By: Payment */ - class MerchantPaymentModeRequest: Codable { + class MerchantPaymentModeCreation: Codable { public var businessUnit: String @@ -86,11 +86,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: MerchantPaymentModeRequest + Model: MerchantPaymentModeCreation Used By: Payment */ - class MerchantPaymentModeRequest: Codable { + class MerchantPaymentModeCreation: Codable { public var businessUnit: String diff --git a/Sources/code/platform/Models/Payment/MerchnatPaymentModeRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/MerchnatPaymentModeCreationPaymentPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Payment/MerchnatPaymentModeRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/MerchnatPaymentModeCreationPaymentPlatformModel.swift index 45e08d5ef0..1c46f56255 100644 --- a/Sources/code/platform/Models/Payment/MerchnatPaymentModeRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/MerchnatPaymentModeCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: MerchnatPaymentModeRequest + Model: MerchnatPaymentModeCreation Used By: Payment */ - class MerchnatPaymentModeRequest: Codable { + class MerchnatPaymentModeCreation: Codable { public var offline: [String: Any]? @@ -84,11 +84,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: MerchnatPaymentModeRequest + Model: MerchnatPaymentModeCreation Used By: Payment */ - class MerchnatPaymentModeRequest: Codable { + class MerchnatPaymentModeCreation: Codable { public var offline: [String: Any]? diff --git a/Sources/code/platform/Models/Payment/OrderBeneficiaryResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/OrderBeneficiaryFetchResultsPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/OrderBeneficiaryResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/OrderBeneficiaryFetchResultsPaymentPlatformModel.swift index f2b3d37d2c..872bfe9ee9 100644 --- a/Sources/code/platform/Models/Payment/OrderBeneficiaryResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/OrderBeneficiaryFetchResultsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: OrderBeneficiaryResponse + Model: OrderBeneficiaryFetchResults Used By: Payment */ - class OrderBeneficiaryResponse: Codable { + class OrderBeneficiaryFetchResults: Codable { public var beneficiaries: [OrderBeneficiaryDetails]? @@ -84,11 +84,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: OrderBeneficiaryResponse + Model: OrderBeneficiaryFetchResults Used By: Payment */ - class OrderBeneficiaryResponse: Codable { + class OrderBeneficiaryFetchResults: Codable { public var beneficiaries: [OrderBeneficiaryDetails]? diff --git a/Sources/code/platform/Models/Payment/AggregatorControlRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PatchAggregatorControlPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/AggregatorControlRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PatchAggregatorControlPaymentPlatformModel.swift index b31a24fd66..f2447a195c 100644 --- a/Sources/code/platform/Models/Payment/AggregatorControlRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PatchAggregatorControlPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: AggregatorControlRequest + Model: PatchAggregatorControl Used By: Payment */ - class AggregatorControlRequest: Codable { + class PatchAggregatorControl: Codable { public var businessUnit: String? @@ -130,11 +130,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: AggregatorControlRequest + Model: PatchAggregatorControl Used By: Payment */ - class AggregatorControlRequest: Codable { + class PatchAggregatorControl: Codable { public var businessUnit: String? diff --git a/Sources/code/platform/Models/Payment/PaymentConfirmationRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentConfirmationCreationPaymentPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Payment/PaymentConfirmationRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentConfirmationCreationPaymentPlatformModel.swift index 3582c678e2..4730359ede 100644 --- a/Sources/code/platform/Models/Payment/PaymentConfirmationRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentConfirmationCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentConfirmationRequest + Model: PaymentConfirmationCreation Used By: Payment */ - class PaymentConfirmationRequest: Codable { + class PaymentConfirmationCreation: Codable { public var orderId: String @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentConfirmationRequest + Model: PaymentConfirmationCreation Used By: Payment */ - class PaymentConfirmationRequest: Codable { + class PaymentConfirmationCreation: Codable { public var orderId: String diff --git a/Sources/code/platform/Models/Payment/PaymentConfirmationResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentConfirmationDetailsPaymentPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Payment/PaymentConfirmationResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentConfirmationDetailsPaymentPlatformModel.swift index 2f7a2952dd..231d2f239b 100644 --- a/Sources/code/platform/Models/Payment/PaymentConfirmationResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentConfirmationDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentConfirmationResponse + Model: PaymentConfirmationDetails Used By: Payment */ - class PaymentConfirmationResponse: Codable { + class PaymentConfirmationDetails: Codable { public var orderId: String @@ -86,11 +86,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentConfirmationResponse + Model: PaymentConfirmationDetails Used By: Payment */ - class PaymentConfirmationResponse: Codable { + class PaymentConfirmationDetails: Codable { public var orderId: String diff --git a/Sources/code/platform/Models/Payment/PaymentDetailsSerializerPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentDetailsPaymentPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Payment/PaymentDetailsSerializerPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentDetailsPaymentPlatformModel.swift index 1ad4953ffe..a122f85e76 100644 --- a/Sources/code/platform/Models/Payment/PaymentDetailsSerializerPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentDetailsSerializer + Model: PaymentDetails Used By: Payment */ - class PaymentDetailsSerializer: Codable { + class PaymentDetails: Codable { public var paymentMethods: [[String: Any]] @@ -442,11 +442,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentDetailsSerializer + Model: PaymentDetails Used By: Payment */ - class PaymentDetailsSerializer: Codable { + class PaymentDetails: Codable { public var paymentMethods: [[String: Any]] diff --git a/Sources/code/platform/Models/Payment/PaymentGatewayConfigRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentGatewayConfigCreationPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/PaymentGatewayConfigRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentGatewayConfigCreationPaymentPlatformModel.swift index 3b9f7c399b..c5fee90ac1 100644 --- a/Sources/code/platform/Models/Payment/PaymentGatewayConfigRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentGatewayConfigCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentGatewayConfigRequest + Model: PaymentGatewayConfigCreation Used By: Payment */ - class PaymentGatewayConfigRequest: Codable { + class PaymentGatewayConfigCreation: Codable { public var appId: String @@ -100,11 +100,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentGatewayConfigRequest + Model: PaymentGatewayConfigCreation Used By: Payment */ - class PaymentGatewayConfigRequest: Codable { + class PaymentGatewayConfigCreation: Codable { public var appId: String diff --git a/Sources/code/platform/Models/Payment/PaymentGatewayConfigResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentGatewayConfigDetailsPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/PaymentGatewayConfigResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentGatewayConfigDetailsPaymentPlatformModel.swift index 6eb0ef67b9..3f265e3e0a 100644 --- a/Sources/code/platform/Models/Payment/PaymentGatewayConfigResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentGatewayConfigDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentGatewayConfigResponse + Model: PaymentGatewayConfigDetails Used By: Payment */ - class PaymentGatewayConfigResponse: Codable { + class PaymentGatewayConfigDetails: Codable { public var aggregators: [[String: Any]]? @@ -141,11 +141,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentGatewayConfigResponse + Model: PaymentGatewayConfigDetails Used By: Payment */ - class PaymentGatewayConfigResponse: Codable { + class PaymentGatewayConfigDetails: Codable { public var aggregators: [[String: Any]]? diff --git a/Sources/code/platform/Models/Payment/PaymentInitializationRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentInitializationCreationPaymentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Payment/PaymentInitializationRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentInitializationCreationPaymentPlatformModel.swift index c5b6508152..ab7d7cffda 100644 --- a/Sources/code/platform/Models/Payment/PaymentInitializationRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentInitializationCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentInitializationRequest + Model: PaymentInitializationCreation Used By: Payment */ - class PaymentInitializationRequest: Codable { + class PaymentInitializationCreation: Codable { public var razorpayPaymentId: String? @@ -274,11 +274,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentInitializationRequest + Model: PaymentInitializationCreation Used By: Payment */ - class PaymentInitializationRequest: Codable { + class PaymentInitializationCreation: Codable { public var razorpayPaymentId: String? diff --git a/Sources/code/platform/Models/Payment/PaymentInitializationResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentInitializationDetailsPaymentPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Payment/PaymentInitializationResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentInitializationDetailsPaymentPlatformModel.swift index e46bd04166..94bf03c3cc 100644 --- a/Sources/code/platform/Models/Payment/PaymentInitializationResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentInitializationDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentInitializationResponse + Model: PaymentInitializationDetails Used By: Payment */ - class PaymentInitializationResponse: Codable { + class PaymentInitializationDetails: Codable { public var razorpayPaymentId: String? @@ -394,11 +394,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentInitializationResponse + Model: PaymentInitializationDetails Used By: Payment */ - class PaymentInitializationResponse: Codable { + class PaymentInitializationDetails: Codable { public var razorpayPaymentId: String? diff --git a/Sources/code/platform/Models/Payment/PaymentModeRouteResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentModeRouteDetailsPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/PaymentModeRouteResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentModeRouteDetailsPaymentPlatformModel.swift index 2e07c5594e..73e6627e8d 100644 --- a/Sources/code/platform/Models/Payment/PaymentModeRouteResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentModeRouteDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentModeRouteResponse + Model: PaymentModeRouteDetails Used By: Payment */ - class PaymentModeRouteResponse: Codable { + class PaymentModeRouteDetails: Codable { public var paymentOptions: PaymentOptionAndFlow @@ -116,11 +116,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentModeRouteResponse + Model: PaymentModeRouteDetails Used By: Payment */ - class PaymentModeRouteResponse: Codable { + class PaymentModeRouteDetails: Codable { public var paymentOptions: PaymentOptionAndFlow diff --git a/Sources/code/platform/Models/Payment/PaymentObjectListSerializerPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentObjectListPaymentPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Payment/PaymentObjectListSerializerPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentObjectListPaymentPlatformModel.swift index 49b6a6a8fa..2bed1930bf 100644 --- a/Sources/code/platform/Models/Payment/PaymentObjectListSerializerPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentObjectListPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentObjectListSerializer + Model: PaymentObjectList Used By: Payment */ - class PaymentObjectListSerializer: Codable { + class PaymentObjectList: Codable { public var userObject: [String: Any] @@ -347,11 +347,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentObjectListSerializer + Model: PaymentObjectList Used By: Payment */ - class PaymentObjectListSerializer: Codable { + class PaymentObjectList: Codable { public var userObject: [String: Any] diff --git a/Sources/code/platform/Models/Payment/PaymentOptionsResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentOptionsDetailsPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/PaymentOptionsResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentOptionsDetailsPaymentPlatformModel.swift index bbd56d43c4..a3b43e0bbb 100644 --- a/Sources/code/platform/Models/Payment/PaymentOptionsResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentOptionsDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentOptionsResponse + Model: PaymentOptionsDetails Used By: Payment */ - class PaymentOptionsResponse: Codable { + class PaymentOptionsDetails: Codable { public var paymentOptions: PaymentOptions @@ -93,11 +93,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentOptionsResponse + Model: PaymentOptionsDetails Used By: Payment */ - class PaymentOptionsResponse: Codable { + class PaymentOptionsDetails: Codable { public var paymentOptions: PaymentOptions diff --git a/Sources/code/platform/Models/Payment/PaymentOrderRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentOrderCreationPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/PaymentOrderRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentOrderCreationPaymentPlatformModel.swift index 71f55d7439..1e88b8fcc7 100644 --- a/Sources/code/platform/Models/Payment/PaymentOrderRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentOrderCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentOrderRequest + Model: PaymentOrderCreation Used By: Payment */ - class PaymentOrderRequest: Codable { + class PaymentOrderCreation: Codable { public var orderId: String @@ -100,11 +100,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentOrderRequest + Model: PaymentOrderCreation Used By: Payment */ - class PaymentOrderRequest: Codable { + class PaymentOrderCreation: Codable { public var orderId: String diff --git a/Sources/code/platform/Models/Payment/PaymentOrderResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentOrderDetailsPaymentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Payment/PaymentOrderResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentOrderDetailsPaymentPlatformModel.swift index 53fd528afc..61e7528204 100644 --- a/Sources/code/platform/Models/Payment/PaymentOrderResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentOrderDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentOrderResponse + Model: PaymentOrderDetails Used By: Payment */ - class PaymentOrderResponse: Codable { + class PaymentOrderDetails: Codable { public var message: String @@ -178,11 +178,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentOrderResponse + Model: PaymentOrderDetails Used By: Payment */ - class PaymentOrderResponse: Codable { + class PaymentOrderDetails: Codable { public var message: String diff --git a/Sources/code/platform/Models/Payment/PaymentSessionRequestSerializerPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentSessionCreationPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/PaymentSessionRequestSerializerPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentSessionCreationPaymentPlatformModel.swift index a2481be6ec..8c5dec7912 100644 --- a/Sources/code/platform/Models/Payment/PaymentSessionRequestSerializerPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentSessionCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentSessionRequestSerializer + Model: PaymentSessionCreation Used By: Payment */ - class PaymentSessionRequestSerializer: Codable { + class PaymentSessionCreation: Codable { public var meta: [String: Any]? @@ -173,11 +173,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentSessionRequestSerializer + Model: PaymentSessionCreation Used By: Payment */ - class PaymentSessionRequestSerializer: Codable { + class PaymentSessionCreation: Codable { public var meta: [String: Any]? diff --git a/Sources/code/platform/Models/Payment/PaymentSessionSerializerPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentSessionFetchDetailsPaymentPlatformModel.swift similarity index 88% rename from Sources/code/platform/Models/Payment/PaymentSessionSerializerPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentSessionFetchDetailsPaymentPlatformModel.swift index 1dc51452ad..56ddf7c220 100644 --- a/Sources/code/platform/Models/Payment/PaymentSessionSerializerPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentSessionFetchDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentSessionSerializer + Model: PaymentSessionFetchDetails Used By: Payment */ - class PaymentSessionSerializer: Codable { + class PaymentSessionFetchDetails: Codable { public var paymentDetails: [String: Any] @@ -22,9 +22,9 @@ public extension PlatformClient.Payment { public var gid: String - public var cartDetails: CartDetailsSerializer? + public var cartDetails: CartDetails? - public var refundDetails: [RefundDetailsSerializer] + public var refundDetails: [RefundDetails] public enum CodingKeys: String, CodingKey { @@ -45,7 +45,7 @@ public extension PlatformClient.Payment { } - public init(cartDetails: CartDetailsSerializer? = nil, currency: String? = nil, gid: String, paymentDetails: [String: Any], refundDetails: [RefundDetailsSerializer], status: String, totalAmount: Int) { + public init(cartDetails: CartDetails? = nil, currency: String? = nil, gid: String, paymentDetails: [String: Any], refundDetails: [RefundDetails], status: String, totalAmount: Int) { self.paymentDetails = paymentDetails @@ -100,7 +100,7 @@ public extension PlatformClient.Payment { do { - cartDetails = try container.decode(CartDetailsSerializer.self, forKey: .cartDetails) + cartDetails = try container.decode(CartDetails.self, forKey: .cartDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -111,7 +111,7 @@ public extension PlatformClient.Payment { - refundDetails = try container.decode([RefundDetailsSerializer].self, forKey: .refundDetails) + refundDetails = try container.decode([RefundDetails].self, forKey: .refundDetails) @@ -164,11 +164,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentSessionSerializer + Model: PaymentSessionFetchDetails Used By: Payment */ - class PaymentSessionSerializer: Codable { + class PaymentSessionFetchDetails: Codable { public var paymentDetails: [String: Any] @@ -181,9 +181,9 @@ public extension PlatformClient.ApplicationClient.Payment { public var gid: String - public var cartDetails: CartDetailsSerializer? + public var cartDetails: CartDetails? - public var refundDetails: [RefundDetailsSerializer] + public var refundDetails: [RefundDetails] public enum CodingKeys: String, CodingKey { @@ -204,7 +204,7 @@ public extension PlatformClient.ApplicationClient.Payment { } - public init(cartDetails: CartDetailsSerializer? = nil, currency: String? = nil, gid: String, paymentDetails: [String: Any], refundDetails: [RefundDetailsSerializer], status: String, totalAmount: Int) { + public init(cartDetails: CartDetails? = nil, currency: String? = nil, gid: String, paymentDetails: [String: Any], refundDetails: [RefundDetails], status: String, totalAmount: Int) { self.paymentDetails = paymentDetails @@ -259,7 +259,7 @@ public extension PlatformClient.ApplicationClient.Payment { do { - cartDetails = try container.decode(CartDetailsSerializer.self, forKey: .cartDetails) + cartDetails = try container.decode(CartDetails.self, forKey: .cartDetails) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -270,7 +270,7 @@ public extension PlatformClient.ApplicationClient.Payment { - refundDetails = try container.decode([RefundDetailsSerializer].self, forKey: .refundDetails) + refundDetails = try container.decode([RefundDetails].self, forKey: .refundDetails) diff --git a/Sources/code/platform/Models/Payment/PaymentSessionResponseSerializerPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentSessionPutDetailsPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/PaymentSessionResponseSerializerPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentSessionPutDetailsPaymentPlatformModel.swift index 47a662e1af..a2ebb5ec34 100644 --- a/Sources/code/platform/Models/Payment/PaymentSessionResponseSerializerPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentSessionPutDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentSessionResponseSerializer + Model: PaymentSessionPutDetails Used By: Payment */ - class PaymentSessionResponseSerializer: Codable { + class PaymentSessionPutDetails: Codable { public var gid: String @@ -118,11 +118,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentSessionResponseSerializer + Model: PaymentSessionPutDetails Used By: Payment */ - class PaymentSessionResponseSerializer: Codable { + class PaymentSessionPutDetails: Codable { public var gid: String diff --git a/Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerCreationPaymentPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerCreationPaymentPlatformModel.swift index 05467eea88..9a7a9bbeb3 100644 --- a/Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentStatusBulkHandlerRequest + Model: PaymentStatusBulkHandlerCreation Used By: Payment */ - class PaymentStatusBulkHandlerRequest: Codable { + class PaymentStatusBulkHandlerCreation: Codable { public var merchantOrderId: [String] @@ -54,11 +54,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentStatusBulkHandlerRequest + Model: PaymentStatusBulkHandlerCreation Used By: Payment */ - class PaymentStatusBulkHandlerRequest: Codable { + class PaymentStatusBulkHandlerCreation: Codable { public var merchantOrderId: [String] diff --git a/Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerDetailsPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerDetailsPaymentPlatformModel.swift index a98a752d92..f8ca33df0b 100644 --- a/Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentStatusBulkHandlerDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentStatusBulkHandlerResponse + Model: PaymentStatusBulkHandlerDetails Used By: Payment */ - class PaymentStatusBulkHandlerResponse: Codable { + class PaymentStatusBulkHandlerDetails: Codable { public var count: Int? @@ -139,11 +139,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentStatusBulkHandlerResponse + Model: PaymentStatusBulkHandlerDetails Used By: Payment */ - class PaymentStatusBulkHandlerResponse: Codable { + class PaymentStatusBulkHandlerDetails: Codable { public var count: Int? diff --git a/Sources/code/platform/Models/Payment/PaymentStatusObjectPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentStatusObjectPaymentPlatformModel.swift index 60e3a5eacc..0c2bda08ef 100644 --- a/Sources/code/platform/Models/Payment/PaymentStatusObjectPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentStatusObjectPaymentPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.Payment { public var merchantOrderId: String - public var paymentObjectList: [PaymentObjectListSerializer]? + public var paymentObjectList: [PaymentObjectList]? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Payment { } - public init(merchantOrderId: String, paymentObjectList: [PaymentObjectListSerializer]? = nil) { + public init(merchantOrderId: String, paymentObjectList: [PaymentObjectList]? = nil) { self.merchantOrderId = merchantOrderId @@ -43,7 +43,7 @@ public extension PlatformClient.Payment { do { - paymentObjectList = try container.decode([PaymentObjectListSerializer].self, forKey: .paymentObjectList) + paymentObjectList = try container.decode([PaymentObjectList].self, forKey: .paymentObjectList) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,7 +86,7 @@ public extension PlatformClient.ApplicationClient.Payment { public var merchantOrderId: String - public var paymentObjectList: [PaymentObjectListSerializer]? + public var paymentObjectList: [PaymentObjectList]? public enum CodingKeys: String, CodingKey { @@ -97,7 +97,7 @@ public extension PlatformClient.ApplicationClient.Payment { } - public init(merchantOrderId: String, paymentObjectList: [PaymentObjectListSerializer]? = nil) { + public init(merchantOrderId: String, paymentObjectList: [PaymentObjectList]? = nil) { self.merchantOrderId = merchantOrderId @@ -115,7 +115,7 @@ public extension PlatformClient.ApplicationClient.Payment { do { - paymentObjectList = try container.decode([PaymentObjectListSerializer].self, forKey: .paymentObjectList) + paymentObjectList = try container.decode([PaymentObjectList].self, forKey: .paymentObjectList) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Payment/PaymentStatusUpdateRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentStatusUpdateCreationPaymentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Payment/PaymentStatusUpdateRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentStatusUpdateCreationPaymentPlatformModel.swift index 6a5202264e..1143e94e86 100644 --- a/Sources/code/platform/Models/Payment/PaymentStatusUpdateRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentStatusUpdateCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentStatusUpdateRequest + Model: PaymentStatusUpdateCreation Used By: Payment */ - class PaymentStatusUpdateRequest: Codable { + class PaymentStatusUpdateCreation: Codable { public var deviceId: String? @@ -260,11 +260,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentStatusUpdateRequest + Model: PaymentStatusUpdateCreation Used By: Payment */ - class PaymentStatusUpdateRequest: Codable { + class PaymentStatusUpdateCreation: Codable { public var deviceId: String? diff --git a/Sources/code/platform/Models/Payment/PaymentStatusUpdateResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PaymentStatusUpdateDetailsPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/PaymentStatusUpdateResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PaymentStatusUpdateDetailsPaymentPlatformModel.swift index b452d18231..59717780a7 100644 --- a/Sources/code/platform/Models/Payment/PaymentStatusUpdateResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PaymentStatusUpdateDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PaymentStatusUpdateResponse + Model: PaymentStatusUpdateDetails Used By: Payment */ - class PaymentStatusUpdateResponse: Codable { + class PaymentStatusUpdateDetails: Codable { public var redirectUrl: String? @@ -132,11 +132,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PaymentStatusUpdateResponse + Model: PaymentStatusUpdateDetails Used By: Payment */ - class PaymentStatusUpdateResponse: Codable { + class PaymentStatusUpdateDetails: Codable { public var redirectUrl: String? diff --git a/Sources/code/platform/Models/Payment/PayoutRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PayoutCreationPaymentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Payment/PayoutRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PayoutCreationPaymentPlatformModel.swift index d5e51f7806..e3e5bf4c71 100644 --- a/Sources/code/platform/Models/Payment/PayoutRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PayoutCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PayoutRequest + Model: PayoutCreation Used By: Payment */ - class PayoutRequest: Codable { + class PayoutCreation: Codable { public var aggregator: String @@ -134,11 +134,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PayoutRequest + Model: PayoutCreation Used By: Payment */ - class PayoutRequest: Codable { + class PayoutCreation: Codable { public var aggregator: String diff --git a/Sources/code/platform/Models/Payment/PayoutResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PayoutDetailsPaymentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Payment/PayoutResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PayoutDetailsPaymentPlatformModel.swift index 8a6005c67f..b92e1d3905 100644 --- a/Sources/code/platform/Models/Payment/PayoutResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PayoutDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PayoutResponse + Model: PayoutDetails Used By: Payment */ - class PayoutResponse: Codable { + class PayoutDetails: Codable { public var paymentStatus: String @@ -198,11 +198,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PayoutResponse + Model: PayoutDetails Used By: Payment */ - class PayoutResponse: Codable { + class PayoutDetails: Codable { public var paymentStatus: String diff --git a/Sources/code/platform/Models/Payment/PayoutsResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PayoutsDetailsPaymentPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Payment/PayoutsResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PayoutsDetailsPaymentPlatformModel.swift index 8048052eb0..4c7def174e 100644 --- a/Sources/code/platform/Models/Payment/PayoutsResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PayoutsDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PayoutsResponse + Model: PayoutsDetails Used By: Payment */ - class PayoutsResponse: Codable { + class PayoutsDetails: Codable { public var success: Bool @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PayoutsResponse + Model: PayoutsDetails Used By: Payment */ - class PayoutsResponse: Codable { + class PayoutsDetails: Codable { public var success: Bool diff --git a/Sources/code/platform/Models/Payment/PlatformPaymentModeCopyConfigRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PlatformPaymentModeCopyConfigCreationPaymentPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Payment/PlatformPaymentModeCopyConfigRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PlatformPaymentModeCopyConfigCreationPaymentPlatformModel.swift index 620bbf0d32..8aa221d125 100644 --- a/Sources/code/platform/Models/Payment/PlatformPaymentModeCopyConfigRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PlatformPaymentModeCopyConfigCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PlatformPaymentModeCopyConfigRequest + Model: PlatformPaymentModeCopyConfigCreation Used By: Payment */ - class PlatformPaymentModeCopyConfigRequest: Codable { + class PlatformPaymentModeCopyConfigCreation: Codable { public var fromConfig: FromConfig @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PlatformPaymentModeCopyConfigRequest + Model: PlatformPaymentModeCopyConfigCreation Used By: Payment */ - class PlatformPaymentModeCopyConfigRequest: Codable { + class PlatformPaymentModeCopyConfigCreation: Codable { public var fromConfig: FromConfig diff --git a/Sources/code/platform/Models/Payment/PlatformPaymentModeResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PlatformPaymentModeDetailsPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/PlatformPaymentModeResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PlatformPaymentModeDetailsPaymentPlatformModel.swift index 3350bcb051..becf0ea422 100644 --- a/Sources/code/platform/Models/Payment/PlatformPaymentModeResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PlatformPaymentModeDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PlatformPaymentModeResponse + Model: PlatformPaymentModeDetails Used By: Payment */ - class PlatformPaymentModeResponse: Codable { + class PlatformPaymentModeDetails: Codable { public var message: String? @@ -100,11 +100,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PlatformPaymentModeResponse + Model: PlatformPaymentModeDetails Used By: Payment */ - class PlatformPaymentModeResponse: Codable { + class PlatformPaymentModeDetails: Codable { public var message: String? diff --git a/Sources/code/platform/Models/Payment/PollingPaymentLinkResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/PollingPaymentLinkDetailsPaymentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Payment/PollingPaymentLinkResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/PollingPaymentLinkDetailsPaymentPlatformModel.swift index 55354aeb62..422bb18cc6 100644 --- a/Sources/code/platform/Models/Payment/PollingPaymentLinkResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/PollingPaymentLinkDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: PollingPaymentLinkResponse + Model: PollingPaymentLinkDetails Used By: Payment */ - class PollingPaymentLinkResponse: Codable { + class PollingPaymentLinkDetails: Codable { public var message: String? @@ -268,11 +268,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: PollingPaymentLinkResponse + Model: PollingPaymentLinkDetails Used By: Payment */ - class PollingPaymentLinkResponse: Codable { + class PollingPaymentLinkDetails: Codable { public var message: String? diff --git a/Sources/code/platform/Models/Payment/ProductCODDataPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/ProductCODDataPaymentPlatformModel.swift index a3005c1262..b7f12c7f59 100644 --- a/Sources/code/platform/Models/Payment/ProductCODDataPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/ProductCODDataPaymentPlatformModel.swift @@ -14,7 +14,7 @@ public extension PlatformClient.Payment { public var items: [String: Any]? - public var codCharges: CODChargesLimitsResponse? + public var codCharges: CODChargesLimitsDetails? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Payment { } - public init(codCharges: CODChargesLimitsResponse? = nil, items: [String: Any]? = nil) { + public init(codCharges: CODChargesLimitsDetails? = nil, items: [String: Any]? = nil) { self.items = items @@ -50,7 +50,7 @@ public extension PlatformClient.Payment { do { - codCharges = try container.decode(CODChargesLimitsResponse.self, forKey: .codCharges) + codCharges = try container.decode(CODChargesLimitsDetails.self, forKey: .codCharges) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -93,7 +93,7 @@ public extension PlatformClient.ApplicationClient.Payment { public var items: [String: Any]? - public var codCharges: CODChargesLimitsResponse? + public var codCharges: CODChargesLimitsDetails? public enum CodingKeys: String, CodingKey { @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Payment { } - public init(codCharges: CODChargesLimitsResponse? = nil, items: [String: Any]? = nil) { + public init(codCharges: CODChargesLimitsDetails? = nil, items: [String: Any]? = nil) { self.items = items @@ -129,7 +129,7 @@ public extension PlatformClient.ApplicationClient.Payment { do { - codCharges = try container.decode(CODChargesLimitsResponse.self, forKey: .codCharges) + codCharges = try container.decode(CODChargesLimitsDetails.self, forKey: .codCharges) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Payment/RefundAccountResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/RefundAccountDetailsPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/RefundAccountResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/RefundAccountDetailsPaymentPlatformModel.swift index 63238892c1..0e4e049119 100644 --- a/Sources/code/platform/Models/Payment/RefundAccountResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/RefundAccountDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: RefundAccountResponse + Model: RefundAccountDetails Used By: Payment */ - class RefundAccountResponse: Codable { + class RefundAccountDetails: Codable { public var isVerifiedFlag: Bool? @@ -116,11 +116,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: RefundAccountResponse + Model: RefundAccountDetails Used By: Payment */ - class RefundAccountResponse: Codable { + class RefundAccountDetails: Codable { public var isVerifiedFlag: Bool? diff --git a/Sources/code/platform/Models/Payment/RefundDetailsSerializerPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/RefundDetailsPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/RefundDetailsSerializerPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/RefundDetailsPaymentPlatformModel.swift index 1265b6f9ab..345d41eb11 100644 --- a/Sources/code/platform/Models/Payment/RefundDetailsSerializerPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/RefundDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: RefundDetailsSerializer + Model: RefundDetails Used By: Payment */ - class RefundDetailsSerializer: Codable { + class RefundDetails: Codable { public var amount: Int @@ -134,11 +134,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: RefundDetailsSerializer + Model: RefundDetails Used By: Payment */ - class RefundDetailsSerializer: Codable { + class RefundDetails: Codable { public var amount: Int diff --git a/Sources/code/platform/Models/Payment/RefundPriorityRequestSerializerPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/RefundPriorityCreationPaymentPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Payment/RefundPriorityRequestSerializerPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/RefundPriorityCreationPaymentPlatformModel.swift index 54aa8dd44a..6b35cea6e9 100644 --- a/Sources/code/platform/Models/Payment/RefundPriorityRequestSerializerPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/RefundPriorityCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: RefundPriorityRequestSerializer + Model: RefundPriorityCreation Used By: Payment */ - class RefundPriorityRequestSerializer: Codable { + class RefundPriorityCreation: Codable { public var apportion: Bool @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: RefundPriorityRequestSerializer + Model: RefundPriorityCreation Used By: Payment */ - class RefundPriorityRequestSerializer: Codable { + class RefundPriorityCreation: Codable { public var apportion: Bool diff --git a/Sources/code/platform/Models/Payment/RefundPriorityResponseSerializerPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/RefundPriorityDetailsPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/RefundPriorityResponseSerializerPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/RefundPriorityDetailsPaymentPlatformModel.swift index 9f1c5f2701..124576e873 100644 --- a/Sources/code/platform/Models/Payment/RefundPriorityResponseSerializerPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/RefundPriorityDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: RefundPriorityResponseSerializer + Model: RefundPriorityDetails Used By: Payment */ - class RefundPriorityResponseSerializer: Codable { + class RefundPriorityDetails: Codable { public var configuration: String @@ -125,11 +125,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: RefundPriorityResponseSerializer + Model: RefundPriorityDetails Used By: Payment */ - class RefundPriorityResponseSerializer: Codable { + class RefundPriorityDetails: Codable { public var configuration: String diff --git a/Sources/code/platform/Models/Payment/RefundSessionRequestSerializerPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/RefundSessionCreationPaymentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Payment/RefundSessionRequestSerializerPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/RefundSessionCreationPaymentPlatformModel.swift index 6a869113b0..8aea1c4d0c 100644 --- a/Sources/code/platform/Models/Payment/RefundSessionRequestSerializerPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/RefundSessionCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: RefundSessionRequestSerializer + Model: RefundSessionCreation Used By: Payment */ - class RefundSessionRequestSerializer: Codable { + class RefundSessionCreation: Codable { public var meta: [String: Any]? @@ -219,11 +219,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: RefundSessionRequestSerializer + Model: RefundSessionCreation Used By: Payment */ - class RefundSessionRequestSerializer: Codable { + class RefundSessionCreation: Codable { public var meta: [String: Any]? diff --git a/Sources/code/platform/Models/Payment/RefundSessionResponseSerializerPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/RefundSessionDetailsPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/RefundSessionResponseSerializerPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/RefundSessionDetailsPaymentPlatformModel.swift index 81f9ac0d58..666a672cd6 100644 --- a/Sources/code/platform/Models/Payment/RefundSessionResponseSerializerPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/RefundSessionDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: RefundSessionResponseSerializer + Model: RefundSessionDetails Used By: Payment */ - class RefundSessionResponseSerializer: Codable { + class RefundSessionDetails: Codable { public var gid: String @@ -118,11 +118,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: RefundSessionResponseSerializer + Model: RefundSessionDetails Used By: Payment */ - class RefundSessionResponseSerializer: Codable { + class RefundSessionDetails: Codable { public var gid: String diff --git a/Sources/code/platform/Models/Payment/RepaymentResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/RepaymentDetailsPaymentPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Payment/RepaymentResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/RepaymentDetailsPaymentPlatformModel.swift index c554df9776..d25801d5f7 100644 --- a/Sources/code/platform/Models/Payment/RepaymentResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/RepaymentDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: RepaymentResponse + Model: RepaymentDetails Used By: Payment */ - class RepaymentResponse: Codable { + class RepaymentDetails: Codable { public var data: [String: Any] @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: RepaymentResponse + Model: RepaymentDetails Used By: Payment */ - class RepaymentResponse: Codable { + class RepaymentDetails: Codable { public var data: [String: Any] diff --git a/Sources/code/platform/Models/Payment/ResendOrCancelPaymentRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/ResendOrCancelPaymentCreationPaymentPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Payment/ResendOrCancelPaymentRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/ResendOrCancelPaymentCreationPaymentPlatformModel.swift index e8c83fde73..a3943b6c93 100644 --- a/Sources/code/platform/Models/Payment/ResendOrCancelPaymentRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/ResendOrCancelPaymentCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: ResendOrCancelPaymentRequest + Model: ResendOrCancelPaymentCreation Used By: Payment */ - class ResendOrCancelPaymentRequest: Codable { + class ResendOrCancelPaymentCreation: Codable { public var orderId: String @@ -93,11 +93,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: ResendOrCancelPaymentRequest + Model: ResendOrCancelPaymentCreation Used By: Payment */ - class ResendOrCancelPaymentRequest: Codable { + class ResendOrCancelPaymentCreation: Codable { public var orderId: String diff --git a/Sources/code/platform/Models/Payment/ResendOrCancelPaymentResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/ResendOrCancelPaymentDetailsPaymentPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Payment/ResendOrCancelPaymentResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/ResendOrCancelPaymentDetailsPaymentPlatformModel.swift index df7e31b31b..cb79de8971 100644 --- a/Sources/code/platform/Models/Payment/ResendOrCancelPaymentResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/ResendOrCancelPaymentDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: ResendOrCancelPaymentResponse + Model: ResendOrCancelPaymentDetails Used By: Payment */ - class ResendOrCancelPaymentResponse: Codable { + class ResendOrCancelPaymentDetails: Codable { public var data: LinkStatus @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: ResendOrCancelPaymentResponse + Model: ResendOrCancelPaymentDetails Used By: Payment */ - class ResendOrCancelPaymentResponse: Codable { + class ResendOrCancelPaymentDetails: Codable { public var data: LinkStatus diff --git a/Sources/code/platform/Models/Payment/ResendPaymentLinkResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/ResendPaymentLinkDetailsPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/ResendPaymentLinkResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/ResendPaymentLinkDetailsPaymentPlatformModel.swift index c149343bf2..c137014de7 100644 --- a/Sources/code/platform/Models/Payment/ResendPaymentLinkResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/ResendPaymentLinkDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: ResendPaymentLinkResponse + Model: ResendPaymentLinkDetails Used By: Payment */ - class ResendPaymentLinkResponse: Codable { + class ResendPaymentLinkDetails: Codable { public var statusCode: Int @@ -109,11 +109,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: ResendPaymentLinkResponse + Model: ResendPaymentLinkDetails Used By: Payment */ - class ResendPaymentLinkResponse: Codable { + class ResendPaymentLinkDetails: Codable { public var statusCode: Int diff --git a/Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentCreationPaymentPlatformModel.swift similarity index 90% rename from Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentCreationPaymentPlatformModel.swift index 02c6fbe201..19a2957b81 100644 --- a/Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: SaveSubscriptionSetupIntentRequest + Model: SaveSubscriptionSetupIntentCreation Used By: Payment */ - class SaveSubscriptionSetupIntentRequest: Codable { + class SaveSubscriptionSetupIntentCreation: Codable { public var uniqueExternalId: String @@ -54,11 +54,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: SaveSubscriptionSetupIntentRequest + Model: SaveSubscriptionSetupIntentCreation Used By: Payment */ - class SaveSubscriptionSetupIntentRequest: Codable { + class SaveSubscriptionSetupIntentCreation: Codable { public var uniqueExternalId: String diff --git a/Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentDetailsPaymentPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentDetailsPaymentPlatformModel.swift index 17b53f7d4d..f237cf9123 100644 --- a/Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/SaveSubscriptionSetupIntentDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: SaveSubscriptionSetupIntentResponse + Model: SaveSubscriptionSetupIntentDetails Used By: Payment */ - class SaveSubscriptionSetupIntentResponse: Codable { + class SaveSubscriptionSetupIntentDetails: Codable { public var data: [String: Any] @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: SaveSubscriptionSetupIntentResponse + Model: SaveSubscriptionSetupIntentDetails Used By: Payment */ - class SaveSubscriptionSetupIntentResponse: Codable { + class SaveSubscriptionSetupIntentDetails: Codable { public var data: [String: Any] diff --git a/Sources/code/platform/Models/Payment/SetCODForUserRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/SetCODForUserCreationPaymentPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Payment/SetCODForUserRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/SetCODForUserCreationPaymentPlatformModel.swift index 6afd67b2b8..2d2d6e9259 100644 --- a/Sources/code/platform/Models/Payment/SetCODForUserRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/SetCODForUserCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: SetCODForUserRequest + Model: SetCODForUserCreation Used By: Payment */ - class SetCODForUserRequest: Codable { + class SetCODForUserCreation: Codable { public var businessUnit: String? @@ -109,11 +109,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: SetCODForUserRequest + Model: SetCODForUserCreation Used By: Payment */ - class SetCODForUserRequest: Codable { + class SetCODForUserCreation: Codable { public var businessUnit: String? diff --git a/Sources/code/platform/Models/Payment/SetCODOptionResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/SetCODOptionDetailsPaymentPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Payment/SetCODOptionResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/SetCODOptionDetailsPaymentPlatformModel.swift index 1e3128f026..fb24714e05 100644 --- a/Sources/code/platform/Models/Payment/SetCODOptionResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/SetCODOptionDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: SetCODOptionResponse + Model: SetCODOptionDetails Used By: Payment */ - class SetCODOptionResponse: Codable { + class SetCODOptionDetails: Codable { public var message: String @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: SetCODOptionResponse + Model: SetCODOptionDetails Used By: Payment */ - class SetCODOptionResponse: Codable { + class SetCODOptionDetails: Codable { public var message: String diff --git a/Sources/code/platform/Models/Payment/SubscriptionConfigResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/SubscriptionConfigDetailsPaymentPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Payment/SubscriptionConfigResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/SubscriptionConfigDetailsPaymentPlatformModel.swift index fc445104b1..6c75a2910c 100644 --- a/Sources/code/platform/Models/Payment/SubscriptionConfigResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/SubscriptionConfigDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: SubscriptionConfigResponse + Model: SubscriptionConfigDetails Used By: Payment */ - class SubscriptionConfigResponse: Codable { + class SubscriptionConfigDetails: Codable { public var aggregator: String @@ -86,11 +86,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: SubscriptionConfigResponse + Model: SubscriptionConfigDetails Used By: Payment */ - class SubscriptionConfigResponse: Codable { + class SubscriptionConfigDetails: Codable { public var aggregator: String diff --git a/Sources/code/platform/Models/Payment/SubscriptionPaymentMethodResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/SubscriptionPaymentMethodDetailsPaymentPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Payment/SubscriptionPaymentMethodResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/SubscriptionPaymentMethodDetailsPaymentPlatformModel.swift index 717fa59f6b..156c07cd2f 100644 --- a/Sources/code/platform/Models/Payment/SubscriptionPaymentMethodResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/SubscriptionPaymentMethodDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: SubscriptionPaymentMethodResponse + Model: SubscriptionPaymentMethodDetails Used By: Payment */ - class SubscriptionPaymentMethodResponse: Codable { + class SubscriptionPaymentMethodDetails: Codable { public var data: [[String: Any]] @@ -70,11 +70,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: SubscriptionPaymentMethodResponse + Model: SubscriptionPaymentMethodDetails Used By: Payment */ - class SubscriptionPaymentMethodResponse: Codable { + class SubscriptionPaymentMethodDetails: Codable { public var data: [[String: Any]] diff --git a/Sources/code/platform/Models/Payment/UpdatePayoutRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/UpdatePayoutCreationPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/UpdatePayoutRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/UpdatePayoutCreationPaymentPlatformModel.swift index c6f1fd524a..e8ce015180 100644 --- a/Sources/code/platform/Models/Payment/UpdatePayoutRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/UpdatePayoutCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: UpdatePayoutRequest + Model: UpdatePayoutCreation Used By: Payment */ - class UpdatePayoutRequest: Codable { + class UpdatePayoutCreation: Codable { public var isDefault: Bool @@ -86,11 +86,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: UpdatePayoutRequest + Model: UpdatePayoutCreation Used By: Payment */ - class UpdatePayoutRequest: Codable { + class UpdatePayoutCreation: Codable { public var isDefault: Bool diff --git a/Sources/code/platform/Models/Payment/UpdatePayoutResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/UpdatePayoutDetailsPaymentPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Payment/UpdatePayoutResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/UpdatePayoutDetailsPaymentPlatformModel.swift index 8e05a4d202..3d64cceea3 100644 --- a/Sources/code/platform/Models/Payment/UpdatePayoutResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/UpdatePayoutDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: UpdatePayoutResponse + Model: UpdatePayoutDetails Used By: Payment */ - class UpdatePayoutResponse: Codable { + class UpdatePayoutDetails: Codable { public var isDefault: Bool @@ -86,11 +86,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: UpdatePayoutResponse + Model: UpdatePayoutDetails Used By: Payment */ - class UpdatePayoutResponse: Codable { + class UpdatePayoutDetails: Codable { public var isDefault: Bool diff --git a/Sources/code/platform/Models/Payment/ValidateCustomerRequestPaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/ValidateCustomerCreationPaymentPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Payment/ValidateCustomerRequestPaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/ValidateCustomerCreationPaymentPlatformModel.swift index 610a50f4cf..d22e00cc67 100644 --- a/Sources/code/platform/Models/Payment/ValidateCustomerRequestPaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/ValidateCustomerCreationPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: ValidateCustomerRequest + Model: ValidateCustomerCreation Used By: Payment */ - class ValidateCustomerRequest: Codable { + class ValidateCustomerCreation: Codable { public var phoneNumber: String @@ -201,11 +201,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: ValidateCustomerRequest + Model: ValidateCustomerCreation Used By: Payment */ - class ValidateCustomerRequest: Codable { + class ValidateCustomerCreation: Codable { public var phoneNumber: String diff --git a/Sources/code/platform/Models/Payment/ValidateCustomerResponsePaymentPlatformModel.swift b/Sources/code/platform/Models/Payment/ValidateCustomerDetailsPaymentPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Payment/ValidateCustomerResponsePaymentPlatformModel.swift rename to Sources/code/platform/Models/Payment/ValidateCustomerDetailsPaymentPlatformModel.swift index 11c112617e..8d342ba3d5 100644 --- a/Sources/code/platform/Models/Payment/ValidateCustomerResponsePaymentPlatformModel.swift +++ b/Sources/code/platform/Models/Payment/ValidateCustomerDetailsPaymentPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Payment { /* - Model: ValidateCustomerResponse + Model: ValidateCustomerDetails Used By: Payment */ - class ValidateCustomerResponse: Codable { + class ValidateCustomerDetails: Codable { public var message: String @@ -93,11 +93,11 @@ public extension PlatformClient.Payment { public extension PlatformClient.ApplicationClient.Payment { /* - Model: ValidateCustomerResponse + Model: ValidateCustomerDetails Used By: Payment */ - class ValidateCustomerResponse: Codable { + class ValidateCustomerDetails: Codable { public var message: String diff --git a/Sources/code/platform/Models/Rewards/GiveawayResponseRewardsPlatformModel.swift b/Sources/code/platform/Models/Rewards/ListGiveawayRewardsPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Rewards/GiveawayResponseRewardsPlatformModel.swift rename to Sources/code/platform/Models/Rewards/ListGiveawayRewardsPlatformModel.swift index 1864e698ea..3d89bd60e4 100644 --- a/Sources/code/platform/Models/Rewards/GiveawayResponseRewardsPlatformModel.swift +++ b/Sources/code/platform/Models/Rewards/ListGiveawayRewardsPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Rewards { /* - Model: GiveawayResponse + Model: ListGiveaway Used By: Rewards */ - class GiveawayResponse: Codable { + class ListGiveaway: Codable { public var items: [Giveaway]? diff --git a/Sources/code/platform/Models/Rewards/ConfigurationRequestRewardsPlatformModel.swift b/Sources/code/platform/Models/Rewards/SetConfigurationRewardsPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Rewards/ConfigurationRequestRewardsPlatformModel.swift rename to Sources/code/platform/Models/Rewards/SetConfigurationRewardsPlatformModel.swift index 34e7ae8ef0..dfeda76e10 100644 --- a/Sources/code/platform/Models/Rewards/ConfigurationRequestRewardsPlatformModel.swift +++ b/Sources/code/platform/Models/Rewards/SetConfigurationRewardsPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Rewards { /* - Model: ConfigurationRequest + Model: SetConfiguration Used By: Rewards */ - class ConfigurationRequest: Codable { + class SetConfiguration: Codable { public var validAndroidPackages: [String]? diff --git a/Sources/code/platform/Models/Serviceability/AddressResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/AddressResultServiceabilityPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Serviceability/AddressResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/AddressResultServiceabilityPlatformModel.swift index e70190a8ac..14152a9a18 100644 --- a/Sources/code/platform/Models/Serviceability/AddressResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/AddressResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: AddressResponse + Model: AddressResult Used By: Serviceability */ - class AddressResponse: Codable { + class AddressResult: Codable { public var city: String? @@ -245,11 +245,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: AddressResponse + Model: AddressResult Used By: Serviceability */ - class AddressResponse: Codable { + class AddressResult: Codable { public var city: String? diff --git a/Sources/code/platform/Models/Serviceability/ApplicationSelfShipConfigResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ApplicationSelfShipConfigResultServiceabilityPlatformModel.swift similarity index 90% rename from Sources/code/platform/Models/Serviceability/ApplicationSelfShipConfigResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ApplicationSelfShipConfigResultServiceabilityPlatformModel.swift index fe03347b62..f61b81c5a6 100644 --- a/Sources/code/platform/Models/Serviceability/ApplicationSelfShipConfigResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ApplicationSelfShipConfigResultServiceabilityPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ApplicationSelfShipConfigResponse + Model: ApplicationSelfShipConfigResult Used By: Serviceability */ - class ApplicationSelfShipConfigResponse: Codable { + class ApplicationSelfShipConfigResult: Codable { - public var error: ServiceabilityErrorResponse? + public var error: ServiceabilityErrorResult? public var data: ApplicationSelfShipConfig? @@ -29,7 +29,7 @@ public extension PlatformClient.Serviceability { } - public init(data: ApplicationSelfShipConfig? = nil, error: ServiceabilityErrorResponse? = nil, success: Bool) { + public init(data: ApplicationSelfShipConfig? = nil, error: ServiceabilityErrorResult? = nil, success: Bool) { self.error = error @@ -44,7 +44,7 @@ public extension PlatformClient.Serviceability { do { - error = try container.decode(ServiceabilityErrorResponse.self, forKey: .error) + error = try container.decode(ServiceabilityErrorResult.self, forKey: .error) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -100,14 +100,14 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ApplicationSelfShipConfigResponse + Model: ApplicationSelfShipConfigResult Used By: Serviceability */ - class ApplicationSelfShipConfigResponse: Codable { + class ApplicationSelfShipConfigResult: Codable { - public var error: ServiceabilityErrorResponse? + public var error: ServiceabilityErrorResult? public var data: ApplicationSelfShipConfig? @@ -124,7 +124,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(data: ApplicationSelfShipConfig? = nil, error: ServiceabilityErrorResponse? = nil, success: Bool) { + public init(data: ApplicationSelfShipConfig? = nil, error: ServiceabilityErrorResult? = nil, success: Bool) { self.error = error @@ -139,7 +139,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - error = try container.decode(ServiceabilityErrorResponse.self, forKey: .error) + error = try container.decode(ServiceabilityErrorResult.self, forKey: .error) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Serviceability/ApplicationSelfShipConfigServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ApplicationSelfShipConfigServiceabilityPlatformModel.swift index b91a8274e4..9008f4171f 100644 --- a/Sources/code/platform/Models/Serviceability/ApplicationSelfShipConfigServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ApplicationSelfShipConfigServiceabilityPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Serviceability { class ApplicationSelfShipConfig: Codable { - public var selfShip: SelfShipResponse? + public var selfShip: SelfShipResult? public enum CodingKeys: String, CodingKey { @@ -21,7 +21,7 @@ public extension PlatformClient.Serviceability { } - public init(selfShip: SelfShipResponse? = nil) { + public init(selfShip: SelfShipResult? = nil) { self.selfShip = selfShip @@ -32,7 +32,7 @@ public extension PlatformClient.Serviceability { do { - selfShip = try container.decode(SelfShipResponse.self, forKey: .selfShip) + selfShip = try container.decode(SelfShipResult.self, forKey: .selfShip) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { class ApplicationSelfShipConfig: Codable { - public var selfShip: SelfShipResponse? + public var selfShip: SelfShipResult? public enum CodingKeys: String, CodingKey { @@ -77,7 +77,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(selfShip: SelfShipResponse? = nil) { + public init(selfShip: SelfShipResult? = nil) { self.selfShip = selfShip @@ -88,7 +88,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - selfShip = try container.decode(SelfShipResponse.self, forKey: .selfShip) + selfShip = try container.decode(SelfShipResult.self, forKey: .selfShip) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Serviceability/ApplicationServiceabilityConfigResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ApplicationServiceabilityConfigResultServiceabilityPlatformModel.swift similarity index 89% rename from Sources/code/platform/Models/Serviceability/ApplicationServiceabilityConfigResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ApplicationServiceabilityConfigResultServiceabilityPlatformModel.swift index 099237713a..2503a8aa08 100644 --- a/Sources/code/platform/Models/Serviceability/ApplicationServiceabilityConfigResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ApplicationServiceabilityConfigResultServiceabilityPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ApplicationServiceabilityConfigResponse + Model: ApplicationServiceabilityConfigResult Used By: Serviceability */ - class ApplicationServiceabilityConfigResponse: Codable { + class ApplicationServiceabilityConfigResult: Codable { - public var error: ServiceabilityErrorResponse? + public var error: ServiceabilityErrorResult? public var data: ApplicationServiceabilityConfig? @@ -29,7 +29,7 @@ public extension PlatformClient.Serviceability { } - public init(data: ApplicationServiceabilityConfig? = nil, error: ServiceabilityErrorResponse? = nil, success: Bool) { + public init(data: ApplicationServiceabilityConfig? = nil, error: ServiceabilityErrorResult? = nil, success: Bool) { self.error = error @@ -44,7 +44,7 @@ public extension PlatformClient.Serviceability { do { - error = try container.decode(ServiceabilityErrorResponse.self, forKey: .error) + error = try container.decode(ServiceabilityErrorResult.self, forKey: .error) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -100,14 +100,14 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ApplicationServiceabilityConfigResponse + Model: ApplicationServiceabilityConfigResult Used By: Serviceability */ - class ApplicationServiceabilityConfigResponse: Codable { + class ApplicationServiceabilityConfigResult: Codable { - public var error: ServiceabilityErrorResponse? + public var error: ServiceabilityErrorResult? public var data: ApplicationServiceabilityConfig? @@ -124,7 +124,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(data: ApplicationServiceabilityConfig? = nil, error: ServiceabilityErrorResponse? = nil, success: Bool) { + public init(data: ApplicationServiceabilityConfig? = nil, error: ServiceabilityErrorResult? = nil, success: Bool) { self.error = error @@ -139,7 +139,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - error = try container.decode(ServiceabilityErrorResponse.self, forKey: .error) + error = try container.decode(ServiceabilityErrorResult.self, forKey: .error) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Serviceability/BulkRegionJobSerializerServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/BulkRegionJobDetailsServiceabilityPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Serviceability/BulkRegionJobSerializerServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/BulkRegionJobDetailsServiceabilityPlatformModel.swift index 80d0de7153..a03a40ba08 100644 --- a/Sources/code/platform/Models/Serviceability/BulkRegionJobSerializerServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/BulkRegionJobDetailsServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: BulkRegionJobSerializer + Model: BulkRegionJobDetails Used By: Serviceability */ - class BulkRegionJobSerializer: Codable { + class BulkRegionJobDetails: Codable { public var filePath: String? @@ -109,11 +109,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: BulkRegionJobSerializer + Model: BulkRegionJobDetails Used By: Serviceability */ - class BulkRegionJobSerializer: Codable { + class BulkRegionJobDetails: Codable { public var filePath: String? diff --git a/Sources/code/platform/Models/Serviceability/BulkRegionResponseItemDataServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/BulkRegionResultItemDataServiceabilityPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Serviceability/BulkRegionResponseItemDataServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/BulkRegionResultItemDataServiceabilityPlatformModel.swift index 8126618aab..b5a08d2d41 100644 --- a/Sources/code/platform/Models/Serviceability/BulkRegionResponseItemDataServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/BulkRegionResultItemDataServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: BulkRegionResponseItemData + Model: BulkRegionResultItemData Used By: Serviceability */ - class BulkRegionResponseItemData: Codable { + class BulkRegionResultItemData: Codable { public var filePath: String @@ -249,11 +249,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: BulkRegionResponseItemData + Model: BulkRegionResultItemData Used By: Serviceability */ - class BulkRegionResponseItemData: Codable { + class BulkRegionResultItemData: Codable { public var filePath: String diff --git a/Sources/code/platform/Models/Serviceability/BulkRegionResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/BulkRegionResultServiceabilityPlatformModel.swift similarity index 80% rename from Sources/code/platform/Models/Serviceability/BulkRegionResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/BulkRegionResultServiceabilityPlatformModel.swift index f8367d9db9..69526c1c22 100644 --- a/Sources/code/platform/Models/Serviceability/BulkRegionResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/BulkRegionResultServiceabilityPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: BulkRegionResponse + Model: BulkRegionResult Used By: Serviceability */ - class BulkRegionResponse: Codable { + class BulkRegionResult: Codable { - public var items: [BulkRegionResponseItemData] + public var items: [BulkRegionResultItemData] public var page: Page @@ -25,7 +25,7 @@ public extension PlatformClient.Serviceability { } - public init(items: [BulkRegionResponseItemData], page: Page) { + public init(items: [BulkRegionResultItemData], page: Page) { self.items = items @@ -37,7 +37,7 @@ public extension PlatformClient.Serviceability { let container = try decoder.container(keyedBy: CodingKeys.self) - items = try container.decode([BulkRegionResponseItemData].self, forKey: .items) + items = try container.decode([BulkRegionResultItemData].self, forKey: .items) @@ -70,14 +70,14 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: BulkRegionResponse + Model: BulkRegionResult Used By: Serviceability */ - class BulkRegionResponse: Codable { + class BulkRegionResult: Codable { - public var items: [BulkRegionResponseItemData] + public var items: [BulkRegionResultItemData] public var page: Page @@ -90,7 +90,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(items: [BulkRegionResponseItemData], page: Page) { + public init(items: [BulkRegionResultItemData], page: Page) { self.items = items @@ -102,7 +102,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { let container = try decoder.container(keyedBy: CodingKeys.self) - items = try container.decode([BulkRegionResponseItemData].self, forKey: .items) + items = try container.decode([BulkRegionResultItemData].self, forKey: .items) diff --git a/Sources/code/platform/Models/Serviceability/CompanyCourierPartnerAccountListResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CompanyCourierPartnerAccountListResultServiceabilityPlatformModel.swift similarity index 78% rename from Sources/code/platform/Models/Serviceability/CompanyCourierPartnerAccountListResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/CompanyCourierPartnerAccountListResultServiceabilityPlatformModel.swift index f281931f93..8b17a68f40 100644 --- a/Sources/code/platform/Models/Serviceability/CompanyCourierPartnerAccountListResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/CompanyCourierPartnerAccountListResultServiceabilityPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: CompanyCourierPartnerAccountListResponse + Model: CompanyCourierPartnerAccountListResult Used By: Serviceability */ - class CompanyCourierPartnerAccountListResponse: Codable { + class CompanyCourierPartnerAccountListResult: Codable { - public var items: [CourierAccountResponse] + public var items: [CourierAccountResult] public var page: Page @@ -25,7 +25,7 @@ public extension PlatformClient.Serviceability { } - public init(items: [CourierAccountResponse], page: Page) { + public init(items: [CourierAccountResult], page: Page) { self.items = items @@ -37,7 +37,7 @@ public extension PlatformClient.Serviceability { let container = try decoder.container(keyedBy: CodingKeys.self) - items = try container.decode([CourierAccountResponse].self, forKey: .items) + items = try container.decode([CourierAccountResult].self, forKey: .items) @@ -70,14 +70,14 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: CompanyCourierPartnerAccountListResponse + Model: CompanyCourierPartnerAccountListResult Used By: Serviceability */ - class CompanyCourierPartnerAccountListResponse: Codable { + class CompanyCourierPartnerAccountListResult: Codable { - public var items: [CourierAccountResponse] + public var items: [CourierAccountResult] public var page: Page @@ -90,7 +90,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(items: [CourierAccountResponse], page: Page) { + public init(items: [CourierAccountResult], page: Page) { self.items = items @@ -102,7 +102,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { let container = try decoder.container(keyedBy: CodingKeys.self) - items = try container.decode([CourierAccountResponse].self, forKey: .items) + items = try container.decode([CourierAccountResult].self, forKey: .items) diff --git a/Sources/code/platform/Models/Serviceability/CompanyStoreView_ResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CompanyStoreView_ResultServiceabilityPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Serviceability/CompanyStoreView_ResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/CompanyStoreView_ResultServiceabilityPlatformModel.swift index 7063f96dde..1cd468887b 100644 --- a/Sources/code/platform/Models/Serviceability/CompanyStoreView_ResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/CompanyStoreView_ResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: CompanyStoreView_Response + Model: CompanyStoreView_Result Used By: Serviceability */ - class CompanyStoreView_Response: Codable { + class CompanyStoreView_Result: Codable { public var page: [CompanyStoreView_PageItems] @@ -77,11 +77,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: CompanyStoreView_Response + Model: CompanyStoreView_Result Used By: Serviceability */ - class CompanyStoreView_Response: Codable { + class CompanyStoreView_Result: Codable { public var page: [CompanyStoreView_PageItems] diff --git a/Sources/code/platform/Models/Serviceability/ContactNumberResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ContactNumberResultServiceabilityPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Serviceability/ContactNumberResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ContactNumberResultServiceabilityPlatformModel.swift index a3406f588a..2c9807318c 100644 --- a/Sources/code/platform/Models/Serviceability/ContactNumberResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ContactNumberResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ContactNumberResponse + Model: ContactNumberResult Used By: Serviceability */ - class ContactNumberResponse: Codable { + class ContactNumberResult: Codable { public var number: String? @@ -84,11 +84,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ContactNumberResponse + Model: ContactNumberResult Used By: Serviceability */ - class ContactNumberResponse: Codable { + class ContactNumberResult: Codable { public var number: String? diff --git a/Sources/code/platform/Models/Serviceability/CourierAccountRequestBodyServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CourierAccountDetailsBodyServiceabilityPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Serviceability/CourierAccountRequestBodyServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/CourierAccountDetailsBodyServiceabilityPlatformModel.swift index ee4a95b4a5..87134649f9 100644 --- a/Sources/code/platform/Models/Serviceability/CourierAccountRequestBodyServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/CourierAccountDetailsBodyServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: CourierAccountRequestBody + Model: CourierAccountDetailsBody Used By: Serviceability */ - class CourierAccountRequestBody: Codable { + class CourierAccountDetailsBody: Codable { public var extensionId: String @@ -141,11 +141,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: CourierAccountRequestBody + Model: CourierAccountDetailsBody Used By: Serviceability */ - class CourierAccountRequestBody: Codable { + class CourierAccountDetailsBody: Codable { public var extensionId: String diff --git a/Sources/code/platform/Models/Serviceability/CourierAccountResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CourierAccountResultServiceabilityPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Serviceability/CourierAccountResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/CourierAccountResultServiceabilityPlatformModel.swift index aef1966b97..a6226855b7 100644 --- a/Sources/code/platform/Models/Serviceability/CourierAccountResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/CourierAccountResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: CourierAccountResponse + Model: CourierAccountResult Used By: Serviceability */ - class CourierAccountResponse: Codable { + class CourierAccountResult: Codable { public var accountId: String @@ -134,11 +134,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: CourierAccountResponse + Model: CourierAccountResult Used By: Serviceability */ - class CourierAccountResponse: Codable { + class CourierAccountResult: Codable { public var accountId: String diff --git a/Sources/code/platform/Models/Serviceability/CourierPartnerAccountFailureResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CourierPartnerAccountFailureResultServiceabilityPlatformModel.swift similarity index 80% rename from Sources/code/platform/Models/Serviceability/CourierPartnerAccountFailureResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/CourierPartnerAccountFailureResultServiceabilityPlatformModel.swift index 496f796b04..990789e4ad 100644 --- a/Sources/code/platform/Models/Serviceability/CourierPartnerAccountFailureResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/CourierPartnerAccountFailureResultServiceabilityPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: CourierPartnerAccountFailureResponse + Model: CourierPartnerAccountFailureResult Used By: Serviceability */ - class CourierPartnerAccountFailureResponse: Codable { + class CourierPartnerAccountFailureResult: Codable { public var success: Bool - public var error: [ErrorResponse] + public var error: [ErrorResult] public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Serviceability { } - public init(error: [ErrorResponse], success: Bool) { + public init(error: [ErrorResult], success: Bool) { self.success = success @@ -42,7 +42,7 @@ public extension PlatformClient.Serviceability { - error = try container.decode([ErrorResponse].self, forKey: .error) + error = try container.decode([ErrorResult].self, forKey: .error) @@ -70,16 +70,16 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: CourierPartnerAccountFailureResponse + Model: CourierPartnerAccountFailureResult Used By: Serviceability */ - class CourierPartnerAccountFailureResponse: Codable { + class CourierPartnerAccountFailureResult: Codable { public var success: Bool - public var error: [ErrorResponse] + public var error: [ErrorResult] public enum CodingKeys: String, CodingKey { @@ -90,7 +90,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(error: [ErrorResponse], success: Bool) { + public init(error: [ErrorResult], success: Bool) { self.success = success @@ -107,7 +107,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { - error = try container.decode([ErrorResponse].self, forKey: .error) + error = try container.decode([ErrorResult].self, forKey: .error) diff --git a/Sources/code/platform/Models/Serviceability/CourierPartnerPromiseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CourierPartnerPromiseServiceabilityPlatformModel.swift new file mode 100644 index 0000000000..a51f531961 --- /dev/null +++ b/Sources/code/platform/Models/Serviceability/CourierPartnerPromiseServiceabilityPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Serviceability { + /* + Model: CourierPartnerPromise + Used By: Serviceability + */ + + class CourierPartnerPromise: Codable { + + + public var min: String + + public var max: String + + + public enum CodingKeys: String, CodingKey { + + case min = "min" + + case max = "max" + + } + + public init(max: String, min: String) { + + self.min = min + + self.max = max + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + min = try container.decode(String.self, forKey: .min) + + + + + max = try container.decode(String.self, forKey: .max) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(min, forKey: .min) + + + + + try? container.encodeIfPresent(max, forKey: .max) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Serviceability { + /* + Model: CourierPartnerPromise + Used By: Serviceability + */ + + class CourierPartnerPromise: Codable { + + + public var min: String + + public var max: String + + + public enum CodingKeys: String, CodingKey { + + case min = "min" + + case max = "max" + + } + + public init(max: String, min: String) { + + self.min = min + + self.max = max + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + min = try container.decode(String.self, forKey: .min) + + + + + max = try container.decode(String.self, forKey: .max) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(min, forKey: .min) + + + + + try? container.encodeIfPresent(max, forKey: .max) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Serviceability/CourierPartnerRuleCPListResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CourierPartnerRuleCPListResultServiceabilityPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Serviceability/CourierPartnerRuleCPListResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/CourierPartnerRuleCPListResultServiceabilityPlatformModel.swift index ea6c05f0c8..948fb0218f 100644 --- a/Sources/code/platform/Models/Serviceability/CourierPartnerRuleCPListResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/CourierPartnerRuleCPListResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: CourierPartnerRuleCPListResponse + Model: CourierPartnerRuleCPListResult Used By: Serviceability */ - class CourierPartnerRuleCPListResponse: Codable { + class CourierPartnerRuleCPListResult: Codable { public var accountId: String? @@ -130,11 +130,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: CourierPartnerRuleCPListResponse + Model: CourierPartnerRuleCPListResult Used By: Serviceability */ - class CourierPartnerRuleCPListResponse: Codable { + class CourierPartnerRuleCPListResult: Codable { public var accountId: String? diff --git a/Sources/code/platform/Models/Serviceability/CourierPartnerRuleResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CourierPartnerRuleResultServiceabilityPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Serviceability/CourierPartnerRuleResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/CourierPartnerRuleResultServiceabilityPlatformModel.swift index 2ddf875221..98437ca76b 100644 --- a/Sources/code/platform/Models/Serviceability/CourierPartnerRuleResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/CourierPartnerRuleResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: CourierPartnerRuleResponse + Model: CourierPartnerRuleResult Used By: Serviceability */ - class CourierPartnerRuleResponse: Codable { + class CourierPartnerRuleResult: Codable { public var isActive: Bool? @@ -34,7 +34,7 @@ public extension PlatformClient.Serviceability { public var type: String? - public var cpList: [CourierPartnerRuleCPListResponse]? + public var cpList: [CourierPartnerRuleCPListResult]? public enum CodingKeys: String, CodingKey { @@ -65,7 +65,7 @@ public extension PlatformClient.Serviceability { } - public init(applicationId: String? = nil, companyId: Int? = nil, conditions: CourierPartnerRuleConditions? = nil, cpList: [CourierPartnerRuleCPListResponse]? = nil, createdBy: [String: Any]? = nil, id: String? = nil, isActive: Bool? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String? = nil, sort: [String]? = nil, type: String? = nil) { + public init(applicationId: String? = nil, companyId: Int? = nil, conditions: CourierPartnerRuleConditions? = nil, cpList: [CourierPartnerRuleCPListResult]? = nil, createdBy: [String: Any]? = nil, id: String? = nil, isActive: Bool? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String? = nil, sort: [String]? = nil, type: String? = nil) { self.isActive = isActive @@ -230,7 +230,7 @@ public extension PlatformClient.Serviceability { do { - cpList = try container.decode([CourierPartnerRuleCPListResponse].self, forKey: .cpList) + cpList = try container.decode([CourierPartnerRuleCPListResult].self, forKey: .cpList) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -314,11 +314,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: CourierPartnerRuleResponse + Model: CourierPartnerRuleResult Used By: Serviceability */ - class CourierPartnerRuleResponse: Codable { + class CourierPartnerRuleResult: Codable { public var isActive: Bool? @@ -343,7 +343,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { public var type: String? - public var cpList: [CourierPartnerRuleCPListResponse]? + public var cpList: [CourierPartnerRuleCPListResult]? public enum CodingKeys: String, CodingKey { @@ -374,7 +374,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(applicationId: String? = nil, companyId: Int? = nil, conditions: CourierPartnerRuleConditions? = nil, cpList: [CourierPartnerRuleCPListResponse]? = nil, createdBy: [String: Any]? = nil, id: String? = nil, isActive: Bool? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String? = nil, sort: [String]? = nil, type: String? = nil) { + public init(applicationId: String? = nil, companyId: Int? = nil, conditions: CourierPartnerRuleConditions? = nil, cpList: [CourierPartnerRuleCPListResult]? = nil, createdBy: [String: Any]? = nil, id: String? = nil, isActive: Bool? = nil, modifiedBy: [String: Any]? = nil, modifiedOn: String? = nil, name: String? = nil, sort: [String]? = nil, type: String? = nil) { self.isActive = isActive @@ -539,7 +539,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - cpList = try container.decode([CourierPartnerRuleCPListResponse].self, forKey: .cpList) + cpList = try container.decode([CourierPartnerRuleCPListResult].self, forKey: .cpList) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Serviceability/CourierPartnerRulesListResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CourierPartnerRulesListResultServiceabilityPlatformModel.swift similarity index 83% rename from Sources/code/platform/Models/Serviceability/CourierPartnerRulesListResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/CourierPartnerRulesListResultServiceabilityPlatformModel.swift index 387b914616..11c2069fb9 100644 --- a/Sources/code/platform/Models/Serviceability/CourierPartnerRulesListResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/CourierPartnerRulesListResultServiceabilityPlatformModel.swift @@ -5,14 +5,14 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: CourierPartnerRulesListResponse + Model: CourierPartnerRulesListResult Used By: Serviceability */ - class CourierPartnerRulesListResponse: Codable { + class CourierPartnerRulesListResult: Codable { - public var items: [CourierPartnerRuleResponse] + public var items: [CourierPartnerRuleResult] public var page: Page @@ -25,7 +25,7 @@ public extension PlatformClient.Serviceability { } - public init(items: [CourierPartnerRuleResponse], page: Page) { + public init(items: [CourierPartnerRuleResult], page: Page) { self.items = items @@ -37,7 +37,7 @@ public extension PlatformClient.Serviceability { let container = try decoder.container(keyedBy: CodingKeys.self) - items = try container.decode([CourierPartnerRuleResponse].self, forKey: .items) + items = try container.decode([CourierPartnerRuleResult].self, forKey: .items) @@ -70,14 +70,14 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: CourierPartnerRulesListResponse + Model: CourierPartnerRulesListResult Used By: Serviceability */ - class CourierPartnerRulesListResponse: Codable { + class CourierPartnerRulesListResult: Codable { - public var items: [CourierPartnerRuleResponse] + public var items: [CourierPartnerRuleResult] public var page: Page @@ -90,7 +90,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(items: [CourierPartnerRuleResponse], page: Page) { + public init(items: [CourierPartnerRuleResult], page: Page) { self.items = items @@ -102,7 +102,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { let container = try decoder.container(keyedBy: CodingKeys.self) - items = try container.decode([CourierPartnerRuleResponse].self, forKey: .items) + items = try container.decode([CourierPartnerRuleResult].self, forKey: .items) diff --git a/Sources/code/platform/Models/Serviceability/CourierPartnersServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CourierPartnersServiceabilityPlatformModel.swift new file mode 100644 index 0000000000..ca9af897e3 --- /dev/null +++ b/Sources/code/platform/Models/Serviceability/CourierPartnersServiceabilityPlatformModel.swift @@ -0,0 +1,254 @@ + + +import Foundation + + +public extension PlatformClient.Serviceability { + /* + Model: CourierPartners + Used By: Serviceability + */ + + class CourierPartners: Codable { + + + public var extensionId: String? + + public var schemeId: String? + + public var name: String? + + public var deliveryPromise: CourierPartnerPromise? + + + public enum CodingKeys: String, CodingKey { + + case extensionId = "extension_id" + + case schemeId = "scheme_id" + + case name = "name" + + case deliveryPromise = "delivery_promise" + + } + + public init(deliveryPromise: CourierPartnerPromise? = nil, extensionId: String? = nil, name: String? = nil, schemeId: String? = nil) { + + self.extensionId = extensionId + + self.schemeId = schemeId + + self.name = name + + self.deliveryPromise = deliveryPromise + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + extensionId = try container.decode(String.self, forKey: .extensionId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + schemeId = try container.decode(String.self, forKey: .schemeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + deliveryPromise = try container.decode(CourierPartnerPromise.self, forKey: .deliveryPromise) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(extensionId, forKey: .extensionId) + + + + + try? container.encodeIfPresent(schemeId, forKey: .schemeId) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(deliveryPromise, forKey: .deliveryPromise) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Serviceability { + /* + Model: CourierPartners + Used By: Serviceability + */ + + class CourierPartners: Codable { + + + public var extensionId: String? + + public var schemeId: String? + + public var name: String? + + public var deliveryPromise: CourierPartnerPromise? + + + public enum CodingKeys: String, CodingKey { + + case extensionId = "extension_id" + + case schemeId = "scheme_id" + + case name = "name" + + case deliveryPromise = "delivery_promise" + + } + + public init(deliveryPromise: CourierPartnerPromise? = nil, extensionId: String? = nil, name: String? = nil, schemeId: String? = nil) { + + self.extensionId = extensionId + + self.schemeId = schemeId + + self.name = name + + self.deliveryPromise = deliveryPromise + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + extensionId = try container.decode(String.self, forKey: .extensionId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + schemeId = try container.decode(String.self, forKey: .schemeId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + deliveryPromise = try container.decode(CourierPartnerPromise.self, forKey: .deliveryPromise) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(extensionId, forKey: .extensionId) + + + + + try? container.encodeIfPresent(schemeId, forKey: .schemeId) + + + + + try? container.encodeIfPresent(name, forKey: .name) + + + + + try? container.encodeIfPresent(deliveryPromise, forKey: .deliveryPromise) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Serviceability/CreateStoreRuleRequestSchemaServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CreateStoreRuleDetailsSchemaServiceabilityPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Serviceability/CreateStoreRuleRequestSchemaServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/CreateStoreRuleDetailsSchemaServiceabilityPlatformModel.swift index 58998d24a0..463e92ec30 100644 --- a/Sources/code/platform/Models/Serviceability/CreateStoreRuleRequestSchemaServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/CreateStoreRuleDetailsSchemaServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: CreateStoreRuleRequestSchema + Model: CreateStoreRuleDetailsSchema Used By: Serviceability */ - class CreateStoreRuleRequestSchema: Codable { + class CreateStoreRuleDetailsSchema: Codable { public var name: String? @@ -199,11 +199,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: CreateStoreRuleRequestSchema + Model: CreateStoreRuleDetailsSchema Used By: Serviceability */ - class CreateStoreRuleRequestSchema: Codable { + class CreateStoreRuleDetailsSchema: Codable { public var name: String? diff --git a/Sources/code/platform/Models/Serviceability/CreatedByResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/CreatedByResultServiceabilityPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Serviceability/CreatedByResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/CreatedByResultServiceabilityPlatformModel.swift index e1e524cd10..e722d194a1 100644 --- a/Sources/code/platform/Models/Serviceability/CreatedByResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/CreatedByResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: CreatedByResponse + Model: CreatedByResult Used By: Serviceability */ - class CreatedByResponse: Codable { + class CreatedByResult: Codable { public var username: String? @@ -84,11 +84,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: CreatedByResponse + Model: CreatedByResult Used By: Serviceability */ - class CreatedByResponse: Codable { + class CreatedByResult: Codable { public var username: String? diff --git a/Sources/code/platform/Models/Serviceability/DocumentsResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/DocumentsResultServiceabilityPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Serviceability/DocumentsResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/DocumentsResultServiceabilityPlatformModel.swift index f6eb41d3f8..59732e2885 100644 --- a/Sources/code/platform/Models/Serviceability/DocumentsResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/DocumentsResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: DocumentsResponse + Model: DocumentsResult Used By: Serviceability */ - class DocumentsResponse: Codable { + class DocumentsResult: Codable { public var legalName: String? @@ -130,11 +130,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: DocumentsResponse + Model: DocumentsResult Used By: Serviceability */ - class DocumentsResponse: Codable { + class DocumentsResult: Codable { public var legalName: String? diff --git a/Sources/code/platform/Models/Serviceability/EinvoiceResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/EinvoiceResultServiceabilityPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Serviceability/EinvoiceResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/EinvoiceResultServiceabilityPlatformModel.swift index a3fabfee18..0834426b39 100644 --- a/Sources/code/platform/Models/Serviceability/EinvoiceResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/EinvoiceResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: EinvoiceResponse + Model: EinvoiceResult Used By: Serviceability */ - class EinvoiceResponse: Codable { + class EinvoiceResult: Codable { public var enabled: Bool? @@ -61,11 +61,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: EinvoiceResponse + Model: EinvoiceResult Used By: Serviceability */ - class EinvoiceResponse: Codable { + class EinvoiceResult: Codable { public var enabled: Bool? diff --git a/Sources/code/platform/Models/Serviceability/EntityRegionView_RequestServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/EntityRegionView_DetailsServiceabilityPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Serviceability/EntityRegionView_RequestServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/EntityRegionView_DetailsServiceabilityPlatformModel.swift index 57f5f55efa..53cc1aed95 100644 --- a/Sources/code/platform/Models/Serviceability/EntityRegionView_RequestServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/EntityRegionView_DetailsServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: EntityRegionView_Request + Model: EntityRegionView_Details Used By: Serviceability */ - class EntityRegionView_Request: Codable { + class EntityRegionView_Details: Codable { public var subType: [String] @@ -77,11 +77,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: EntityRegionView_Request + Model: EntityRegionView_Details Used By: Serviceability */ - class EntityRegionView_Request: Codable { + class EntityRegionView_Details: Codable { public var subType: [String] diff --git a/Sources/code/platform/Models/Serviceability/EntityRegionView_ResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/EntityRegionView_ResultServiceabilityPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Serviceability/EntityRegionView_ResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/EntityRegionView_ResultServiceabilityPlatformModel.swift index 7bde142c5b..e18ab11d68 100644 --- a/Sources/code/platform/Models/Serviceability/EntityRegionView_ResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/EntityRegionView_ResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: EntityRegionView_Response + Model: EntityRegionView_Result Used By: Serviceability */ - class EntityRegionView_Response: Codable { + class EntityRegionView_Result: Codable { public var error: EntityRegionView_Error @@ -102,11 +102,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: EntityRegionView_Response + Model: EntityRegionView_Result Used By: Serviceability */ - class EntityRegionView_Response: Codable { + class EntityRegionView_Result: Codable { public var error: EntityRegionView_Error diff --git a/Sources/code/platform/Models/Serviceability/ErrorResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ErrorResultServiceabilityPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Serviceability/ErrorResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ErrorResultServiceabilityPlatformModel.swift index 9032dcbb5b..e8a2c9b61e 100644 --- a/Sources/code/platform/Models/Serviceability/ErrorResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ErrorResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ErrorResponse + Model: ErrorResult Used By: Serviceability */ - class ErrorResponse: Codable { + class ErrorResult: Codable { public var value: String @@ -86,11 +86,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ErrorResponse + Model: ErrorResult Used By: Serviceability */ - class ErrorResponse: Codable { + class ErrorResult: Codable { public var value: String diff --git a/Sources/code/platform/Models/Serviceability/EwayBillResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/EwayBillResultServiceabilityPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Serviceability/EwayBillResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/EwayBillResultServiceabilityPlatformModel.swift index 720bd12f3e..feab67a567 100644 --- a/Sources/code/platform/Models/Serviceability/EwayBillResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/EwayBillResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: EwayBillResponse + Model: EwayBillResult Used By: Serviceability */ - class EwayBillResponse: Codable { + class EwayBillResult: Codable { public var enabled: Bool? @@ -61,11 +61,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: EwayBillResponse + Model: EwayBillResult Used By: Serviceability */ - class EwayBillResponse: Codable { + class EwayBillResult: Codable { public var enabled: Bool? diff --git a/Sources/code/platform/Models/Serviceability/FailureResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/FailureResultServiceabilityPlatformModel.swift similarity index 83% rename from Sources/code/platform/Models/Serviceability/FailureResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/FailureResultServiceabilityPlatformModel.swift index d4af4619d2..76fcbf40a9 100644 --- a/Sources/code/platform/Models/Serviceability/FailureResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/FailureResultServiceabilityPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: FailureResponse + Model: FailureResult Used By: Serviceability */ - class FailureResponse: Codable { + class FailureResult: Codable { public var success: Bool - public var error: [ErrorResponse] + public var error: [ErrorResult] public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Serviceability { } - public init(error: [ErrorResponse], success: Bool) { + public init(error: [ErrorResult], success: Bool) { self.success = success @@ -42,7 +42,7 @@ public extension PlatformClient.Serviceability { - error = try container.decode([ErrorResponse].self, forKey: .error) + error = try container.decode([ErrorResult].self, forKey: .error) @@ -70,16 +70,16 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: FailureResponse + Model: FailureResult Used By: Serviceability */ - class FailureResponse: Codable { + class FailureResult: Codable { public var success: Bool - public var error: [ErrorResponse] + public var error: [ErrorResult] public enum CodingKeys: String, CodingKey { @@ -90,7 +90,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(error: [ErrorResponse], success: Bool) { + public init(error: [ErrorResult], success: Bool) { self.success = success @@ -107,7 +107,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { - error = try container.decode([ErrorResponse].self, forKey: .error) + error = try container.decode([ErrorResult].self, forKey: .error) diff --git a/Sources/code/platform/Models/Serviceability/GetSingleZoneDataViewResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/GetSingleZoneDataViewResultServiceabilityPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Serviceability/GetSingleZoneDataViewResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/GetSingleZoneDataViewResultServiceabilityPlatformModel.swift index 85517ad160..81caf25258 100644 --- a/Sources/code/platform/Models/Serviceability/GetSingleZoneDataViewResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/GetSingleZoneDataViewResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: GetSingleZoneDataViewResponse + Model: GetSingleZoneDataViewResult Used By: Serviceability */ - class GetSingleZoneDataViewResponse: Codable { + class GetSingleZoneDataViewResult: Codable { public var data: GetZoneDataViewItems @@ -54,11 +54,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: GetSingleZoneDataViewResponse + Model: GetSingleZoneDataViewResult Used By: Serviceability */ - class GetSingleZoneDataViewResponse: Codable { + class GetSingleZoneDataViewResult: Codable { public var data: GetZoneDataViewItems diff --git a/Sources/code/platform/Models/Serviceability/GetStoreRulesApiResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/GetStoreRulesApiResultServiceabilityPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Serviceability/GetStoreRulesApiResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/GetStoreRulesApiResultServiceabilityPlatformModel.swift index 9c70192197..d2d4fe9938 100644 --- a/Sources/code/platform/Models/Serviceability/GetStoreRulesApiResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/GetStoreRulesApiResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: GetStoreRulesApiResponse + Model: GetStoreRulesApiResult Used By: Serviceability */ - class GetStoreRulesApiResponse: Codable { + class GetStoreRulesApiResult: Codable { public var items: [StoreRuleDataSchema]? @@ -84,11 +84,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: GetStoreRulesApiResponse + Model: GetStoreRulesApiResult Used By: Serviceability */ - class GetStoreRulesApiResponse: Codable { + class GetStoreRulesApiResult: Codable { public var items: [StoreRuleDataSchema]? diff --git a/Sources/code/platform/Models/Serviceability/GetStoresViewResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/GetStoresViewResultServiceabilityPlatformModel.swift similarity index 79% rename from Sources/code/platform/Models/Serviceability/GetStoresViewResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/GetStoresViewResultServiceabilityPlatformModel.swift index 64232b38fe..6c1144b33a 100644 --- a/Sources/code/platform/Models/Serviceability/GetStoresViewResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/GetStoresViewResultServiceabilityPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: GetStoresViewResponse + Model: GetStoresViewResult Used By: Serviceability */ - class GetStoresViewResponse: Codable { + class GetStoresViewResult: Codable { - public var page: ServiceabilityPageResponse + public var page: ServiceabilityPageResult - public var items: [ItemResponse]? + public var items: [ItemResult]? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Serviceability { } - public init(items: [ItemResponse]? = nil, page: ServiceabilityPageResponse) { + public init(items: [ItemResult]? = nil, page: ServiceabilityPageResult) { self.page = page @@ -37,13 +37,13 @@ public extension PlatformClient.Serviceability { let container = try decoder.container(keyedBy: CodingKeys.self) - page = try container.decode(ServiceabilityPageResponse.self, forKey: .page) + page = try container.decode(ServiceabilityPageResult.self, forKey: .page) do { - items = try container.decode([ItemResponse].self, forKey: .items) + items = try container.decode([ItemResult].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,16 +77,16 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: GetStoresViewResponse + Model: GetStoresViewResult Used By: Serviceability */ - class GetStoresViewResponse: Codable { + class GetStoresViewResult: Codable { - public var page: ServiceabilityPageResponse + public var page: ServiceabilityPageResult - public var items: [ItemResponse]? + public var items: [ItemResult]? public enum CodingKeys: String, CodingKey { @@ -97,7 +97,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(items: [ItemResponse]? = nil, page: ServiceabilityPageResponse) { + public init(items: [ItemResult]? = nil, page: ServiceabilityPageResult) { self.page = page @@ -109,13 +109,13 @@ public extension PlatformClient.ApplicationClient.Serviceability { let container = try decoder.container(keyedBy: CodingKeys.self) - page = try container.decode(ServiceabilityPageResponse.self, forKey: .page) + page = try container.decode(ServiceabilityPageResult.self, forKey: .page) do { - items = try container.decode([ItemResponse].self, forKey: .items) + items = try container.decode([ItemResult].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Serviceability/GetZoneFromApplicationIdViewResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/GetZoneFromApplicationIdViewResultServiceabilityPlatformModel.swift similarity index 92% rename from Sources/code/platform/Models/Serviceability/GetZoneFromApplicationIdViewResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/GetZoneFromApplicationIdViewResultServiceabilityPlatformModel.swift index 3838a251de..5c92221fc4 100644 --- a/Sources/code/platform/Models/Serviceability/GetZoneFromApplicationIdViewResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/GetZoneFromApplicationIdViewResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: GetZoneFromApplicationIdViewResponse + Model: GetZoneFromApplicationIdViewResult Used By: Serviceability */ - class GetZoneFromApplicationIdViewResponse: Codable { + class GetZoneFromApplicationIdViewResult: Codable { public var page: [ZoneDataItem] @@ -70,11 +70,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: GetZoneFromApplicationIdViewResponse + Model: GetZoneFromApplicationIdViewResult Used By: Serviceability */ - class GetZoneFromApplicationIdViewResponse: Codable { + class GetZoneFromApplicationIdViewResult: Codable { public var page: [ZoneDataItem] diff --git a/Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewRequestServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewDetailsServiceabilityPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewRequestServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewDetailsServiceabilityPlatformModel.swift index 87aad24cd2..07bcf9042e 100644 --- a/Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewRequestServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewDetailsServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: GetZoneFromPincodeViewRequest + Model: GetZoneFromPincodeViewDetails Used By: Serviceability */ - class GetZoneFromPincodeViewRequest: Codable { + class GetZoneFromPincodeViewDetails: Codable { public var country: String @@ -70,11 +70,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: GetZoneFromPincodeViewRequest + Model: GetZoneFromPincodeViewDetails Used By: Serviceability */ - class GetZoneFromPincodeViewRequest: Codable { + class GetZoneFromPincodeViewDetails: Codable { public var country: String diff --git a/Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewResultServiceabilityPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewResultServiceabilityPlatformModel.swift index f587bb4740..c8de8887b7 100644 --- a/Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/GetZoneFromPincodeViewResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: GetZoneFromPincodeViewResponse + Model: GetZoneFromPincodeViewResult Used By: Serviceability */ - class GetZoneFromPincodeViewResponse: Codable { + class GetZoneFromPincodeViewResult: Codable { public var serviceabilityType: String @@ -70,11 +70,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: GetZoneFromPincodeViewResponse + Model: GetZoneFromPincodeViewResult Used By: Serviceability */ - class GetZoneFromPincodeViewResponse: Codable { + class GetZoneFromPincodeViewResult: Codable { public var serviceabilityType: String diff --git a/Sources/code/platform/Models/Serviceability/GstCredentialsResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/GstCredentialsResultServiceabilityPlatformModel.swift similarity index 79% rename from Sources/code/platform/Models/Serviceability/GstCredentialsResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/GstCredentialsResultServiceabilityPlatformModel.swift index 0b2058adb4..c18568e5e9 100644 --- a/Sources/code/platform/Models/Serviceability/GstCredentialsResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/GstCredentialsResultServiceabilityPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: GstCredentialsResponse + Model: GstCredentialsResult Used By: Serviceability */ - class GstCredentialsResponse: Codable { + class GstCredentialsResult: Codable { - public var eWaybill: EwayBillResponse? + public var eWaybill: EwayBillResult? - public var eInvoice: EinvoiceResponse? + public var eInvoice: EinvoiceResult? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Serviceability { } - public init(eInvoice: EinvoiceResponse? = nil, eWaybill: EwayBillResponse? = nil) { + public init(eInvoice: EinvoiceResult? = nil, eWaybill: EwayBillResult? = nil) { self.eWaybill = eWaybill @@ -38,7 +38,7 @@ public extension PlatformClient.Serviceability { do { - eWaybill = try container.decode(EwayBillResponse.self, forKey: .eWaybill) + eWaybill = try container.decode(EwayBillResult.self, forKey: .eWaybill) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient.Serviceability { do { - eInvoice = try container.decode(EinvoiceResponse.self, forKey: .eInvoice) + eInvoice = try container.decode(EinvoiceResult.self, forKey: .eInvoice) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,16 +84,16 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: GstCredentialsResponse + Model: GstCredentialsResult Used By: Serviceability */ - class GstCredentialsResponse: Codable { + class GstCredentialsResult: Codable { - public var eWaybill: EwayBillResponse? + public var eWaybill: EwayBillResult? - public var eInvoice: EinvoiceResponse? + public var eInvoice: EinvoiceResult? public enum CodingKeys: String, CodingKey { @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(eInvoice: EinvoiceResponse? = nil, eWaybill: EwayBillResponse? = nil) { + public init(eInvoice: EinvoiceResult? = nil, eWaybill: EwayBillResult? = nil) { self.eWaybill = eWaybill @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - eWaybill = try container.decode(EwayBillResponse.self, forKey: .eWaybill) + eWaybill = try container.decode(EwayBillResult.self, forKey: .eWaybill) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -129,7 +129,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - eInvoice = try container.decode(EinvoiceResponse.self, forKey: .eInvoice) + eInvoice = try container.decode(EinvoiceResult.self, forKey: .eInvoice) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Serviceability/IntegrationTypeResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/IntegrationTypeResultServiceabilityPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Serviceability/IntegrationTypeResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/IntegrationTypeResultServiceabilityPlatformModel.swift index 5c77a64566..216b3e6b7a 100644 --- a/Sources/code/platform/Models/Serviceability/IntegrationTypeResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/IntegrationTypeResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: IntegrationTypeResponse + Model: IntegrationTypeResult Used By: Serviceability */ - class IntegrationTypeResponse: Codable { + class IntegrationTypeResult: Codable { public var inventory: String? @@ -84,11 +84,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: IntegrationTypeResponse + Model: IntegrationTypeResult Used By: Serviceability */ - class IntegrationTypeResponse: Codable { + class IntegrationTypeResult: Codable { public var inventory: String? diff --git a/Sources/code/platform/Models/Serviceability/ItemResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ItemResultServiceabilityPlatformModel.swift similarity index 89% rename from Sources/code/platform/Models/Serviceability/ItemResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ItemResultServiceabilityPlatformModel.swift index b165d403ff..16105c3de7 100644 --- a/Sources/code/platform/Models/Serviceability/ItemResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ItemResultServiceabilityPlatformModel.swift @@ -5,38 +5,38 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ItemResponse + Model: ItemResult Used By: Serviceability */ - class ItemResponse: Codable { + class ItemResult: Codable { public var createdOn: String? - public var manager: ManagerResponse? + public var manager: ManagerResult? - public var modifiedBy: ModifiedByResponse? + public var modifiedBy: ModifiedByResult? - public var integrationType: IntegrationTypeResponse? + public var integrationType: IntegrationTypeResult? public var verifiedOn: String? - public var productReturnConfig: ProductReturnConfigResponse? + public var productReturnConfig: ProductReturnConfigResult? - public var contactNumbers: [ContactNumberResponse]? + public var contactNumbers: [ContactNumberResult]? - public var verifiedBy: ModifiedByResponse? + public var verifiedBy: ModifiedByResult? public var stage: String? - public var address: AddressResponse? + public var address: AddressResult? public var modifiedOn: String? - public var createdBy: CreatedByResponse? + public var createdBy: CreatedByResult? - public var gstCredentials: GstCredentialsResponse? + public var gstCredentials: GstCredentialsResult? public var displayName: String? @@ -48,13 +48,13 @@ public extension PlatformClient.Serviceability { public var code: String? - public var warnings: WarningsResponse? + public var warnings: WarningsResult? public var name: String? - public var timing: [TimmingResponse]? + public var timing: [TimmingResult]? - public var documents: [DocumentsResponse]? + public var documents: [DocumentsResult]? public var storeType: String? @@ -64,7 +64,7 @@ public extension PlatformClient.Serviceability { public var cls: String? - public var logistics: LogisticsResponse? + public var logistics: LogisticsResult? public var notificationEmails: [String]? @@ -129,7 +129,7 @@ public extension PlatformClient.Serviceability { } - public init(address: AddressResponse? = nil, code: String? = nil, company: Int? = nil, companyId: Int? = nil, contactNumbers: [ContactNumberResponse]? = nil, createdBy: CreatedByResponse? = nil, createdOn: String? = nil, displayName: String? = nil, documents: [DocumentsResponse]? = nil, gstCredentials: GstCredentialsResponse? = nil, integrationType: IntegrationTypeResponse? = nil, logistics: LogisticsResponse? = nil, manager: ManagerResponse? = nil, modifiedBy: ModifiedByResponse? = nil, modifiedOn: String? = nil, name: String? = nil, notificationEmails: [String]? = nil, productReturnConfig: ProductReturnConfigResponse? = nil, stage: String? = nil, storeType: String? = nil, subType: String? = nil, timing: [TimmingResponse]? = nil, uid: Int? = nil, verifiedBy: ModifiedByResponse? = nil, verifiedOn: String? = nil, warnings: WarningsResponse? = nil, cls: String? = nil, customJson: [String: Any]? = nil) { + public init(address: AddressResult? = nil, code: String? = nil, company: Int? = nil, companyId: Int? = nil, contactNumbers: [ContactNumberResult]? = nil, createdBy: CreatedByResult? = nil, createdOn: String? = nil, displayName: String? = nil, documents: [DocumentsResult]? = nil, gstCredentials: GstCredentialsResult? = nil, integrationType: IntegrationTypeResult? = nil, logistics: LogisticsResult? = nil, manager: ManagerResult? = nil, modifiedBy: ModifiedByResult? = nil, modifiedOn: String? = nil, name: String? = nil, notificationEmails: [String]? = nil, productReturnConfig: ProductReturnConfigResult? = nil, stage: String? = nil, storeType: String? = nil, subType: String? = nil, timing: [TimmingResult]? = nil, uid: Int? = nil, verifiedBy: ModifiedByResult? = nil, verifiedOn: String? = nil, warnings: WarningsResult? = nil, cls: String? = nil, customJson: [String: Any]? = nil) { self.createdOn = createdOn @@ -206,7 +206,7 @@ public extension PlatformClient.Serviceability { do { - manager = try container.decode(ManagerResponse.self, forKey: .manager) + manager = try container.decode(ManagerResult.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +218,7 @@ public extension PlatformClient.Serviceability { do { - modifiedBy = try container.decode(ModifiedByResponse.self, forKey: .modifiedBy) + modifiedBy = try container.decode(ModifiedByResult.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,7 +230,7 @@ public extension PlatformClient.Serviceability { do { - integrationType = try container.decode(IntegrationTypeResponse.self, forKey: .integrationType) + integrationType = try container.decode(IntegrationTypeResult.self, forKey: .integrationType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -254,7 +254,7 @@ public extension PlatformClient.Serviceability { do { - productReturnConfig = try container.decode(ProductReturnConfigResponse.self, forKey: .productReturnConfig) + productReturnConfig = try container.decode(ProductReturnConfigResult.self, forKey: .productReturnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -266,7 +266,7 @@ public extension PlatformClient.Serviceability { do { - contactNumbers = try container.decode([ContactNumberResponse].self, forKey: .contactNumbers) + contactNumbers = try container.decode([ContactNumberResult].self, forKey: .contactNumbers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -278,7 +278,7 @@ public extension PlatformClient.Serviceability { do { - verifiedBy = try container.decode(ModifiedByResponse.self, forKey: .verifiedBy) + verifiedBy = try container.decode(ModifiedByResult.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -302,7 +302,7 @@ public extension PlatformClient.Serviceability { do { - address = try container.decode(AddressResponse.self, forKey: .address) + address = try container.decode(AddressResult.self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -326,7 +326,7 @@ public extension PlatformClient.Serviceability { do { - createdBy = try container.decode(CreatedByResponse.self, forKey: .createdBy) + createdBy = try container.decode(CreatedByResult.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -338,7 +338,7 @@ public extension PlatformClient.Serviceability { do { - gstCredentials = try container.decode(GstCredentialsResponse.self, forKey: .gstCredentials) + gstCredentials = try container.decode(GstCredentialsResult.self, forKey: .gstCredentials) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -410,7 +410,7 @@ public extension PlatformClient.Serviceability { do { - warnings = try container.decode(WarningsResponse.self, forKey: .warnings) + warnings = try container.decode(WarningsResult.self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -434,7 +434,7 @@ public extension PlatformClient.Serviceability { do { - timing = try container.decode([TimmingResponse].self, forKey: .timing) + timing = try container.decode([TimmingResult].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -446,7 +446,7 @@ public extension PlatformClient.Serviceability { do { - documents = try container.decode([DocumentsResponse].self, forKey: .documents) + documents = try container.decode([DocumentsResult].self, forKey: .documents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -506,7 +506,7 @@ public extension PlatformClient.Serviceability { do { - logistics = try container.decode(LogisticsResponse.self, forKey: .logistics) + logistics = try container.decode(LogisticsResult.self, forKey: .logistics) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -682,38 +682,38 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ItemResponse + Model: ItemResult Used By: Serviceability */ - class ItemResponse: Codable { + class ItemResult: Codable { public var createdOn: String? - public var manager: ManagerResponse? + public var manager: ManagerResult? - public var modifiedBy: ModifiedByResponse? + public var modifiedBy: ModifiedByResult? - public var integrationType: IntegrationTypeResponse? + public var integrationType: IntegrationTypeResult? public var verifiedOn: String? - public var productReturnConfig: ProductReturnConfigResponse? + public var productReturnConfig: ProductReturnConfigResult? - public var contactNumbers: [ContactNumberResponse]? + public var contactNumbers: [ContactNumberResult]? - public var verifiedBy: ModifiedByResponse? + public var verifiedBy: ModifiedByResult? public var stage: String? - public var address: AddressResponse? + public var address: AddressResult? public var modifiedOn: String? - public var createdBy: CreatedByResponse? + public var createdBy: CreatedByResult? - public var gstCredentials: GstCredentialsResponse? + public var gstCredentials: GstCredentialsResult? public var displayName: String? @@ -725,13 +725,13 @@ public extension PlatformClient.ApplicationClient.Serviceability { public var code: String? - public var warnings: WarningsResponse? + public var warnings: WarningsResult? public var name: String? - public var timing: [TimmingResponse]? + public var timing: [TimmingResult]? - public var documents: [DocumentsResponse]? + public var documents: [DocumentsResult]? public var storeType: String? @@ -741,7 +741,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { public var cls: String? - public var logistics: LogisticsResponse? + public var logistics: LogisticsResult? public var notificationEmails: [String]? @@ -806,7 +806,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(address: AddressResponse? = nil, code: String? = nil, company: Int? = nil, companyId: Int? = nil, contactNumbers: [ContactNumberResponse]? = nil, createdBy: CreatedByResponse? = nil, createdOn: String? = nil, displayName: String? = nil, documents: [DocumentsResponse]? = nil, gstCredentials: GstCredentialsResponse? = nil, integrationType: IntegrationTypeResponse? = nil, logistics: LogisticsResponse? = nil, manager: ManagerResponse? = nil, modifiedBy: ModifiedByResponse? = nil, modifiedOn: String? = nil, name: String? = nil, notificationEmails: [String]? = nil, productReturnConfig: ProductReturnConfigResponse? = nil, stage: String? = nil, storeType: String? = nil, subType: String? = nil, timing: [TimmingResponse]? = nil, uid: Int? = nil, verifiedBy: ModifiedByResponse? = nil, verifiedOn: String? = nil, warnings: WarningsResponse? = nil, cls: String? = nil, customJson: [String: Any]? = nil) { + public init(address: AddressResult? = nil, code: String? = nil, company: Int? = nil, companyId: Int? = nil, contactNumbers: [ContactNumberResult]? = nil, createdBy: CreatedByResult? = nil, createdOn: String? = nil, displayName: String? = nil, documents: [DocumentsResult]? = nil, gstCredentials: GstCredentialsResult? = nil, integrationType: IntegrationTypeResult? = nil, logistics: LogisticsResult? = nil, manager: ManagerResult? = nil, modifiedBy: ModifiedByResult? = nil, modifiedOn: String? = nil, name: String? = nil, notificationEmails: [String]? = nil, productReturnConfig: ProductReturnConfigResult? = nil, stage: String? = nil, storeType: String? = nil, subType: String? = nil, timing: [TimmingResult]? = nil, uid: Int? = nil, verifiedBy: ModifiedByResult? = nil, verifiedOn: String? = nil, warnings: WarningsResult? = nil, cls: String? = nil, customJson: [String: Any]? = nil) { self.createdOn = createdOn @@ -883,7 +883,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - manager = try container.decode(ManagerResponse.self, forKey: .manager) + manager = try container.decode(ManagerResult.self, forKey: .manager) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -895,7 +895,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - modifiedBy = try container.decode(ModifiedByResponse.self, forKey: .modifiedBy) + modifiedBy = try container.decode(ModifiedByResult.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -907,7 +907,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - integrationType = try container.decode(IntegrationTypeResponse.self, forKey: .integrationType) + integrationType = try container.decode(IntegrationTypeResult.self, forKey: .integrationType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -931,7 +931,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - productReturnConfig = try container.decode(ProductReturnConfigResponse.self, forKey: .productReturnConfig) + productReturnConfig = try container.decode(ProductReturnConfigResult.self, forKey: .productReturnConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -943,7 +943,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - contactNumbers = try container.decode([ContactNumberResponse].self, forKey: .contactNumbers) + contactNumbers = try container.decode([ContactNumberResult].self, forKey: .contactNumbers) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -955,7 +955,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - verifiedBy = try container.decode(ModifiedByResponse.self, forKey: .verifiedBy) + verifiedBy = try container.decode(ModifiedByResult.self, forKey: .verifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -979,7 +979,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - address = try container.decode(AddressResponse.self, forKey: .address) + address = try container.decode(AddressResult.self, forKey: .address) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1003,7 +1003,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - createdBy = try container.decode(CreatedByResponse.self, forKey: .createdBy) + createdBy = try container.decode(CreatedByResult.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1015,7 +1015,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - gstCredentials = try container.decode(GstCredentialsResponse.self, forKey: .gstCredentials) + gstCredentials = try container.decode(GstCredentialsResult.self, forKey: .gstCredentials) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1087,7 +1087,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - warnings = try container.decode(WarningsResponse.self, forKey: .warnings) + warnings = try container.decode(WarningsResult.self, forKey: .warnings) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1111,7 +1111,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - timing = try container.decode([TimmingResponse].self, forKey: .timing) + timing = try container.decode([TimmingResult].self, forKey: .timing) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1123,7 +1123,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - documents = try container.decode([DocumentsResponse].self, forKey: .documents) + documents = try container.decode([DocumentsResult].self, forKey: .documents) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -1183,7 +1183,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - logistics = try container.decode(LogisticsResponse.self, forKey: .logistics) + logistics = try container.decode(LogisticsResult.self, forKey: .logistics) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Serviceability/ListViewResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ListViewResultServiceabilityPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Serviceability/ListViewResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ListViewResultServiceabilityPlatformModel.swift index 8347ef3437..a93b0409fe 100644 --- a/Sources/code/platform/Models/Serviceability/ListViewResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ListViewResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ListViewResponse + Model: ListViewResult Used By: Serviceability */ - class ListViewResponse: Codable { + class ListViewResult: Codable { public var page: ZoneDataItem @@ -70,11 +70,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ListViewResponse + Model: ListViewResult Used By: Serviceability */ - class ListViewResponse: Codable { + class ListViewResult: Codable { public var page: ZoneDataItem diff --git a/Sources/code/platform/Models/Serviceability/LogisticsResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/LogisticsResultServiceabilityPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Serviceability/LogisticsResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/LogisticsResultServiceabilityPlatformModel.swift index 56ce65d134..6455cd1520 100644 --- a/Sources/code/platform/Models/Serviceability/LogisticsResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/LogisticsResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: LogisticsResponse + Model: LogisticsResult Used By: Serviceability */ - class LogisticsResponse: Codable { + class LogisticsResult: Codable { public var override: Bool? @@ -84,11 +84,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: LogisticsResponse + Model: LogisticsResult Used By: Serviceability */ - class LogisticsResponse: Codable { + class LogisticsResult: Codable { public var override: Bool? diff --git a/Sources/code/platform/Models/Serviceability/ManagerResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ManagerResultServiceabilityPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Serviceability/ManagerResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ManagerResultServiceabilityPlatformModel.swift index 0636792b05..61bdfd76db 100644 --- a/Sources/code/platform/Models/Serviceability/ManagerResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ManagerResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ManagerResponse + Model: ManagerResult Used By: Serviceability */ - class ManagerResponse: Codable { + class ManagerResult: Codable { public var email: String? @@ -107,11 +107,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ManagerResponse + Model: ManagerResult Used By: Serviceability */ - class ManagerResponse: Codable { + class ManagerResult: Codable { public var email: String? diff --git a/Sources/code/platform/Models/Serviceability/ModifiedByResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ModifiedByResultServiceabilityPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Serviceability/ModifiedByResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ModifiedByResultServiceabilityPlatformModel.swift index 82f9ba1649..688cb3cd25 100644 --- a/Sources/code/platform/Models/Serviceability/ModifiedByResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ModifiedByResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ModifiedByResponse + Model: ModifiedByResult Used By: Serviceability */ - class ModifiedByResponse: Codable { + class ModifiedByResult: Codable { public var username: String? @@ -84,11 +84,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ModifiedByResponse + Model: ModifiedByResult Used By: Serviceability */ - class ModifiedByResponse: Codable { + class ModifiedByResult: Codable { public var username: String? diff --git a/Sources/code/platform/Models/Serviceability/OptimalLocationArticlesResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/OptimalLocationArticlesResultServiceabilityPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Serviceability/OptimalLocationArticlesResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/OptimalLocationArticlesResultServiceabilityPlatformModel.swift index 00bef7f7b1..3b5879ea75 100644 --- a/Sources/code/platform/Models/Serviceability/OptimalLocationArticlesResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/OptimalLocationArticlesResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: OptimalLocationArticlesResponse + Model: OptimalLocationArticlesResult Used By: Serviceability */ - class OptimalLocationArticlesResponse: Codable { + class OptimalLocationArticlesResult: Codable { public var itemId: Int @@ -290,11 +290,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: OptimalLocationArticlesResponse + Model: OptimalLocationArticlesResult Used By: Serviceability */ - class OptimalLocationArticlesResponse: Codable { + class OptimalLocationArticlesResult: Codable { public var itemId: Int diff --git a/Sources/code/platform/Models/Serviceability/OptimalLocationAssignedStoresResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/OptimalLocationAssignedStoresResultServiceabilityPlatformModel.swift similarity index 81% rename from Sources/code/platform/Models/Serviceability/OptimalLocationAssignedStoresResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/OptimalLocationAssignedStoresResultServiceabilityPlatformModel.swift index 8a576d8b0c..48cb4f6586 100644 --- a/Sources/code/platform/Models/Serviceability/OptimalLocationAssignedStoresResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/OptimalLocationAssignedStoresResultServiceabilityPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: OptimalLocationAssignedStoresResponse + Model: OptimalLocationAssignedStoresResult Used By: Serviceability */ - class OptimalLocationAssignedStoresResponse: Codable { + class OptimalLocationAssignedStoresResult: Codable { public var storeId: Int - public var articles: [OptimalLocationArticlesResponse] + public var articles: [OptimalLocationArticlesResult] public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Serviceability { } - public init(articles: [OptimalLocationArticlesResponse], storeId: Int) { + public init(articles: [OptimalLocationArticlesResult], storeId: Int) { self.storeId = storeId @@ -42,7 +42,7 @@ public extension PlatformClient.Serviceability { - articles = try container.decode([OptimalLocationArticlesResponse].self, forKey: .articles) + articles = try container.decode([OptimalLocationArticlesResult].self, forKey: .articles) @@ -70,16 +70,16 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: OptimalLocationAssignedStoresResponse + Model: OptimalLocationAssignedStoresResult Used By: Serviceability */ - class OptimalLocationAssignedStoresResponse: Codable { + class OptimalLocationAssignedStoresResult: Codable { public var storeId: Int - public var articles: [OptimalLocationArticlesResponse] + public var articles: [OptimalLocationArticlesResult] public enum CodingKeys: String, CodingKey { @@ -90,7 +90,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(articles: [OptimalLocationArticlesResponse], storeId: Int) { + public init(articles: [OptimalLocationArticlesResult], storeId: Int) { self.storeId = storeId @@ -107,7 +107,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { - articles = try container.decode([OptimalLocationArticlesResponse].self, forKey: .articles) + articles = try container.decode([OptimalLocationArticlesResult].self, forKey: .articles) diff --git a/Sources/code/platform/Models/Serviceability/OptimalLocationsArticlesServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/OptimalLocationsArticlesServiceabilityPlatformModel.swift index d8764b80a0..1fbe749e9c 100644 --- a/Sources/code/platform/Models/Serviceability/OptimalLocationsArticlesServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/OptimalLocationsArticlesServiceabilityPlatformModel.swift @@ -16,7 +16,7 @@ public extension PlatformClient.Serviceability { public var size: String - public var quantity: String + public var quantity: Int public var groupId: String? @@ -57,7 +57,7 @@ public extension PlatformClient.Serviceability { } - public init(articleAssignment: ArticleAssignment, assignLocations: [Int], groupId: String? = nil, ignoreLocations: [Int], isPrimaryItem: Bool? = nil, itemId: Int, meta: [String: Any]? = nil, quantity: String, sellerId: Int? = nil, size: String) { + public init(articleAssignment: ArticleAssignment, assignLocations: [Int], groupId: String? = nil, ignoreLocations: [Int], isPrimaryItem: Bool? = nil, itemId: Int, meta: [String: Any]? = nil, quantity: Int, sellerId: Int? = nil, size: String) { self.itemId = itemId @@ -95,7 +95,7 @@ public extension PlatformClient.Serviceability { - quantity = try container.decode(String.self, forKey: .quantity) + quantity = try container.decode(Int.self, forKey: .quantity) @@ -237,7 +237,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { public var size: String - public var quantity: String + public var quantity: Int public var groupId: String? @@ -278,7 +278,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(articleAssignment: ArticleAssignment, assignLocations: [Int], groupId: String? = nil, ignoreLocations: [Int], isPrimaryItem: Bool? = nil, itemId: Int, meta: [String: Any]? = nil, quantity: String, sellerId: Int? = nil, size: String) { + public init(articleAssignment: ArticleAssignment, assignLocations: [Int], groupId: String? = nil, ignoreLocations: [Int], isPrimaryItem: Bool? = nil, itemId: Int, meta: [String: Any]? = nil, quantity: Int, sellerId: Int? = nil, size: String) { self.itemId = itemId @@ -316,7 +316,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { - quantity = try container.decode(String.self, forKey: .quantity) + quantity = try container.decode(Int.self, forKey: .quantity) diff --git a/Sources/code/platform/Models/Serviceability/OptimalLocationsResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/OptimalLocationsResultServiceabilityPlatformModel.swift similarity index 85% rename from Sources/code/platform/Models/Serviceability/OptimalLocationsResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/OptimalLocationsResultServiceabilityPlatformModel.swift index 86ecc44d7c..c123ee3d00 100644 --- a/Sources/code/platform/Models/Serviceability/OptimalLocationsResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/OptimalLocationsResultServiceabilityPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: OptimalLocationsResponse + Model: OptimalLocationsResult Used By: Serviceability */ - class OptimalLocationsResponse: Codable { + class OptimalLocationsResult: Codable { - public var assignedStores: [OptimalLocationAssignedStoresResponse] + public var assignedStores: [OptimalLocationAssignedStoresResult] - public var faultyArticles: [ErrorResponse]? + public var faultyArticles: [ErrorResult]? public enum CodingKeys: String, CodingKey { @@ -25,7 +25,7 @@ public extension PlatformClient.Serviceability { } - public init(assignedStores: [OptimalLocationAssignedStoresResponse], faultyArticles: [ErrorResponse]? = nil) { + public init(assignedStores: [OptimalLocationAssignedStoresResult], faultyArticles: [ErrorResult]? = nil) { self.assignedStores = assignedStores @@ -37,13 +37,13 @@ public extension PlatformClient.Serviceability { let container = try decoder.container(keyedBy: CodingKeys.self) - assignedStores = try container.decode([OptimalLocationAssignedStoresResponse].self, forKey: .assignedStores) + assignedStores = try container.decode([OptimalLocationAssignedStoresResult].self, forKey: .assignedStores) do { - faultyArticles = try container.decode([ErrorResponse].self, forKey: .faultyArticles) + faultyArticles = try container.decode([ErrorResult].self, forKey: .faultyArticles) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -77,16 +77,16 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: OptimalLocationsResponse + Model: OptimalLocationsResult Used By: Serviceability */ - class OptimalLocationsResponse: Codable { + class OptimalLocationsResult: Codable { - public var assignedStores: [OptimalLocationAssignedStoresResponse] + public var assignedStores: [OptimalLocationAssignedStoresResult] - public var faultyArticles: [ErrorResponse]? + public var faultyArticles: [ErrorResult]? public enum CodingKeys: String, CodingKey { @@ -97,7 +97,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(assignedStores: [OptimalLocationAssignedStoresResponse], faultyArticles: [ErrorResponse]? = nil) { + public init(assignedStores: [OptimalLocationAssignedStoresResult], faultyArticles: [ErrorResult]? = nil) { self.assignedStores = assignedStores @@ -109,13 +109,13 @@ public extension PlatformClient.ApplicationClient.Serviceability { let container = try decoder.container(keyedBy: CodingKeys.self) - assignedStores = try container.decode([OptimalLocationAssignedStoresResponse].self, forKey: .assignedStores) + assignedStores = try container.decode([OptimalLocationAssignedStoresResult].self, forKey: .assignedStores) do { - faultyArticles = try container.decode([ErrorResponse].self, forKey: .faultyArticles) + faultyArticles = try container.decode([ErrorResult].self, forKey: .faultyArticles) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Serviceability/OptimlLocationsRequestSchemaServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/OptimlLocationsDetailsSchemaServiceabilityPlatformModel.swift similarity index 84% rename from Sources/code/platform/Models/Serviceability/OptimlLocationsRequestSchemaServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/OptimlLocationsDetailsSchemaServiceabilityPlatformModel.swift index 7f6fe26e42..316bf77227 100644 --- a/Sources/code/platform/Models/Serviceability/OptimlLocationsRequestSchemaServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/OptimlLocationsDetailsSchemaServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: OptimlLocationsRequestSchema + Model: OptimlLocationsDetailsSchema Used By: Serviceability */ - class OptimlLocationsRequestSchema: Codable { + class OptimlLocationsDetailsSchema: Codable { public var channelId: String @@ -20,7 +20,7 @@ public extension PlatformClient.Serviceability { public var toServiceability: LocationDetailsServiceability - public var article: OptimalLocationsArticles? + public var articles: [OptimalLocationsArticles]? public enum CodingKeys: String, CodingKey { @@ -33,11 +33,11 @@ public extension PlatformClient.Serviceability { case toServiceability = "to_serviceability" - case article = "article" + case articles = "articles" } - public init(article: OptimalLocationsArticles? = nil, channelId: String, channelIdentifier: String? = nil, channelType: String, toServiceability: LocationDetailsServiceability) { + public init(articles: [OptimalLocationsArticles]? = nil, channelId: String, channelIdentifier: String? = nil, channelType: String, toServiceability: LocationDetailsServiceability) { self.channelId = channelId @@ -47,7 +47,7 @@ public extension PlatformClient.Serviceability { self.toServiceability = toServiceability - self.article = article + self.articles = articles } @@ -83,7 +83,7 @@ public extension PlatformClient.Serviceability { do { - article = try container.decode(OptimalLocationsArticles.self, forKey: .article) + articles = try container.decode([OptimalLocationsArticles].self, forKey: .articles) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -120,7 +120,7 @@ public extension PlatformClient.Serviceability { - try? container.encodeIfPresent(article, forKey: .article) + try? container.encodeIfPresent(articles, forKey: .articles) } @@ -132,11 +132,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: OptimlLocationsRequestSchema + Model: OptimlLocationsDetailsSchema Used By: Serviceability */ - class OptimlLocationsRequestSchema: Codable { + class OptimlLocationsDetailsSchema: Codable { public var channelId: String @@ -147,7 +147,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { public var toServiceability: LocationDetailsServiceability - public var article: OptimalLocationsArticles? + public var articles: [OptimalLocationsArticles]? public enum CodingKeys: String, CodingKey { @@ -160,11 +160,11 @@ public extension PlatformClient.ApplicationClient.Serviceability { case toServiceability = "to_serviceability" - case article = "article" + case articles = "articles" } - public init(article: OptimalLocationsArticles? = nil, channelId: String, channelIdentifier: String? = nil, channelType: String, toServiceability: LocationDetailsServiceability) { + public init(articles: [OptimalLocationsArticles]? = nil, channelId: String, channelIdentifier: String? = nil, channelType: String, toServiceability: LocationDetailsServiceability) { self.channelId = channelId @@ -174,7 +174,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { self.toServiceability = toServiceability - self.article = article + self.articles = articles } @@ -210,7 +210,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - article = try container.decode(OptimalLocationsArticles.self, forKey: .article) + articles = try container.decode([OptimalLocationsArticles].self, forKey: .articles) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -247,7 +247,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { - try? container.encodeIfPresent(article, forKey: .article) + try? container.encodeIfPresent(articles, forKey: .articles) } diff --git a/Sources/code/platform/Models/Serviceability/PackageMaterialListServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PackageMaterialListServiceabilityPlatformModel.swift index b1e5843784..f993b5c462 100644 --- a/Sources/code/platform/Models/Serviceability/PackageMaterialListServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PackageMaterialListServiceabilityPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Serviceability { class PackageMaterialList: Codable { - public var items: PackageMaterialResponse? + public var items: PackageMaterialResult? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.Serviceability { } - public init(items: PackageMaterialResponse? = nil, page: Page? = nil) { + public init(items: PackageMaterialResult? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.Serviceability { do { - items = try container.decode(PackageMaterialResponse.self, forKey: .items) + items = try container.decode(PackageMaterialResult.self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { class PackageMaterialList: Codable { - public var items: PackageMaterialResponse? + public var items: PackageMaterialResult? public var page: Page? @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(items: PackageMaterialResponse? = nil, page: Page? = nil) { + public init(items: PackageMaterialResult? = nil, page: Page? = nil) { self.items = items @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - items = try container.decode(PackageMaterialResponse.self, forKey: .items) + items = try container.decode(PackageMaterialResult.self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Serviceability/PackageMaterialResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PackageMaterialResultServiceabilityPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Serviceability/PackageMaterialResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/PackageMaterialResultServiceabilityPlatformModel.swift index 846ee69717..edefaabfd7 100644 --- a/Sources/code/platform/Models/Serviceability/PackageMaterialResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PackageMaterialResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: PackageMaterialResponse + Model: PackageMaterialResult Used By: Serviceability */ - class PackageMaterialResponse: Codable { + class PackageMaterialResult: Codable { public var name: String @@ -398,11 +398,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: PackageMaterialResponse + Model: PackageMaterialResult Used By: Serviceability */ - class PackageMaterialResponse: Codable { + class PackageMaterialResult: Codable { public var name: String diff --git a/Sources/code/platform/Models/Serviceability/PackageMaterialRuleListServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PackageMaterialRuleListServiceabilityPlatformModel.swift index 36e4db6f61..6c5c29bba3 100644 --- a/Sources/code/platform/Models/Serviceability/PackageMaterialRuleListServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PackageMaterialRuleListServiceabilityPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Serviceability { class PackageMaterialRuleList: Codable { - public var items: PackageRuleResponse? + public var items: PackageRuleResult? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.Serviceability { } - public init(items: PackageRuleResponse? = nil, page: Page? = nil) { + public init(items: PackageRuleResult? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.Serviceability { do { - items = try container.decode(PackageRuleResponse.self, forKey: .items) + items = try container.decode(PackageRuleResult.self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -91,7 +91,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { class PackageMaterialRuleList: Codable { - public var items: PackageRuleResponse? + public var items: PackageRuleResult? public var page: Page? @@ -104,7 +104,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(items: PackageRuleResponse? = nil, page: Page? = nil) { + public init(items: PackageRuleResult? = nil, page: Page? = nil) { self.items = items @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - items = try container.decode(PackageRuleResponse.self, forKey: .items) + items = try container.decode(PackageRuleResult.self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Serviceability/PackageRuleResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PackageRuleResultServiceabilityPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Serviceability/PackageRuleResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/PackageRuleResultServiceabilityPlatformModel.swift index fff5cd9b07..3a4a119ffd 100644 --- a/Sources/code/platform/Models/Serviceability/PackageRuleResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PackageRuleResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: PackageRuleResponse + Model: PackageRuleResult Used By: Serviceability */ - class PackageRuleResponse: Codable { + class PackageRuleResult: Codable { public var id: String? @@ -201,11 +201,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: PackageRuleResponse + Model: PackageRuleResult Used By: Serviceability */ - class PackageRuleResponse: Codable { + class PackageRuleResult: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Serviceability/PincodeBulkViewResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PincodeBulkViewResultServiceabilityPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Serviceability/PincodeBulkViewResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/PincodeBulkViewResultServiceabilityPlatformModel.swift index 6c4b840a5e..d73c2a5d04 100644 --- a/Sources/code/platform/Models/Serviceability/PincodeBulkViewResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PincodeBulkViewResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: PincodeBulkViewResponse + Model: PincodeBulkViewResult Used By: Serviceability */ - class PincodeBulkViewResponse: Codable { + class PincodeBulkViewResult: Codable { public var batchId: String @@ -70,11 +70,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: PincodeBulkViewResponse + Model: PincodeBulkViewResult Used By: Serviceability */ - class PincodeBulkViewResponse: Codable { + class PincodeBulkViewResult: Codable { public var batchId: String diff --git a/Sources/code/platform/Models/Serviceability/PincodeCodStatusListingRequestServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PincodeCodStatusListingDetailsServiceabilityPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Serviceability/PincodeCodStatusListingRequestServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/PincodeCodStatusListingDetailsServiceabilityPlatformModel.swift index e7604d0866..beba40c6ae 100644 --- a/Sources/code/platform/Models/Serviceability/PincodeCodStatusListingRequestServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PincodeCodStatusListingDetailsServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: PincodeCodStatusListingRequest + Model: PincodeCodStatusListingDetails Used By: Serviceability */ - class PincodeCodStatusListingRequest: Codable { + class PincodeCodStatusListingDetails: Codable { public var country: String? @@ -153,11 +153,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: PincodeCodStatusListingRequest + Model: PincodeCodStatusListingDetails Used By: Serviceability */ - class PincodeCodStatusListingRequest: Codable { + class PincodeCodStatusListingDetails: Codable { public var country: String? diff --git a/Sources/code/platform/Models/Serviceability/PincodeCodStatusListingResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PincodeCodStatusListingResultServiceabilityPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/Serviceability/PincodeCodStatusListingResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/PincodeCodStatusListingResultServiceabilityPlatformModel.swift index 5270bca634..80663f624a 100644 --- a/Sources/code/platform/Models/Serviceability/PincodeCodStatusListingResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PincodeCodStatusListingResultServiceabilityPlatformModel.swift @@ -5,16 +5,16 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: PincodeCodStatusListingResponse + Model: PincodeCodStatusListingResult Used By: Serviceability */ - class PincodeCodStatusListingResponse: Codable { + class PincodeCodStatusListingResult: Codable { public var country: String - public var data: [PincodeCodStatusListingResponse] + public var data: [PincodeCodStatusListingResult] public var success: Bool @@ -41,7 +41,7 @@ public extension PlatformClient.Serviceability { } - public init(country: String, data: [PincodeCodStatusListingResponse], errors: [Error]? = nil, page: PincodeCodStatusListingPage, success: Bool, summary: PincodeCodStatusListingSummary) { + public init(country: String, data: [PincodeCodStatusListingResult], errors: [Error]? = nil, page: PincodeCodStatusListingPage, success: Bool, summary: PincodeCodStatusListingSummary) { self.country = country @@ -66,7 +66,7 @@ public extension PlatformClient.Serviceability { - data = try container.decode([PincodeCodStatusListingResponse].self, forKey: .data) + data = try container.decode([PincodeCodStatusListingResult].self, forKey: .data) @@ -141,16 +141,16 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: PincodeCodStatusListingResponse + Model: PincodeCodStatusListingResult Used By: Serviceability */ - class PincodeCodStatusListingResponse: Codable { + class PincodeCodStatusListingResult: Codable { public var country: String - public var data: [PincodeCodStatusListingResponse] + public var data: [PincodeCodStatusListingResult] public var success: Bool @@ -177,7 +177,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(country: String, data: [PincodeCodStatusListingResponse], errors: [Error]? = nil, page: PincodeCodStatusListingPage, success: Bool, summary: PincodeCodStatusListingSummary) { + public init(country: String, data: [PincodeCodStatusListingResult], errors: [Error]? = nil, page: PincodeCodStatusListingPage, success: Bool, summary: PincodeCodStatusListingSummary) { self.country = country @@ -202,7 +202,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { - data = try container.decode([PincodeCodStatusListingResponse].self, forKey: .data) + data = try container.decode([PincodeCodStatusListingResult].self, forKey: .data) diff --git a/Sources/code/platform/Models/Serviceability/PincodeMOPresponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PincodeMOPResultServiceabilityPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Serviceability/PincodeMOPresponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/PincodeMOPResultServiceabilityPlatformModel.swift index cfe54454aa..e1f9b92188 100644 --- a/Sources/code/platform/Models/Serviceability/PincodeMOPresponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PincodeMOPResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: PincodeMOPresponse + Model: PincodeMOPResult Used By: Serviceability */ - class PincodeMOPresponse: Codable { + class PincodeMOPResult: Codable { public var success: Bool @@ -24,7 +24,7 @@ public extension PlatformClient.Serviceability { public var pincodes: [Int]? - public var updatedPincodes: [PincodeMopUpdateResponse]? + public var updatedPincodes: [PincodeMopUpdateResult]? public enum CodingKeys: String, CodingKey { @@ -45,7 +45,7 @@ public extension PlatformClient.Serviceability { } - public init(action: String, batchId: String, country: String, pincodes: [Int]? = nil, statusCode: Int, success: Bool, updatedPincodes: [PincodeMopUpdateResponse]? = nil) { + public init(action: String, batchId: String, country: String, pincodes: [Int]? = nil, statusCode: Int, success: Bool, updatedPincodes: [PincodeMopUpdateResult]? = nil) { self.success = success @@ -105,7 +105,7 @@ public extension PlatformClient.Serviceability { do { - updatedPincodes = try container.decode([PincodeMopUpdateResponse].self, forKey: .updatedPincodes) + updatedPincodes = try container.decode([PincodeMopUpdateResult].self, forKey: .updatedPincodes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -164,11 +164,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: PincodeMOPresponse + Model: PincodeMOPResult Used By: Serviceability */ - class PincodeMOPresponse: Codable { + class PincodeMOPResult: Codable { public var success: Bool @@ -183,7 +183,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { public var pincodes: [Int]? - public var updatedPincodes: [PincodeMopUpdateResponse]? + public var updatedPincodes: [PincodeMopUpdateResult]? public enum CodingKeys: String, CodingKey { @@ -204,7 +204,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(action: String, batchId: String, country: String, pincodes: [Int]? = nil, statusCode: Int, success: Bool, updatedPincodes: [PincodeMopUpdateResponse]? = nil) { + public init(action: String, batchId: String, country: String, pincodes: [Int]? = nil, statusCode: Int, success: Bool, updatedPincodes: [PincodeMopUpdateResult]? = nil) { self.success = success @@ -264,7 +264,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { do { - updatedPincodes = try container.decode([PincodeMopUpdateResponse].self, forKey: .updatedPincodes) + updatedPincodes = try container.decode([PincodeMopUpdateResult].self, forKey: .updatedPincodes) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryRequestServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryDetailsServiceabilityPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryRequestServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryDetailsServiceabilityPlatformModel.swift index 5b5fbca237..9ec17c953f 100644 --- a/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryRequestServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryDetailsServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: PincodeMopUpdateAuditHistoryRequest + Model: PincodeMopUpdateAuditHistoryDetails Used By: Serviceability */ - class PincodeMopUpdateAuditHistoryRequest: Codable { + class PincodeMopUpdateAuditHistoryDetails: Codable { public var entityType: String @@ -77,11 +77,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: PincodeMopUpdateAuditHistoryRequest + Model: PincodeMopUpdateAuditHistoryDetails Used By: Serviceability */ - class PincodeMopUpdateAuditHistoryRequest: Codable { + class PincodeMopUpdateAuditHistoryDetails: Codable { public var entityType: String diff --git a/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResponseDataServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResultDataServiceabilityPlatformModel.swift similarity index 85% rename from Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResponseDataServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResultDataServiceabilityPlatformModel.swift index d9482954eb..a043dccdfd 100644 --- a/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResponseDataServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResultDataServiceabilityPlatformModel.swift @@ -5,18 +5,18 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: PincodeMopUpdateAuditHistoryResponseData + Model: PincodeMopUpdateAuditHistoryResultData Used By: Serviceability */ - class PincodeMopUpdateAuditHistoryResponseData: Codable { + class PincodeMopUpdateAuditHistoryResultData: Codable { public var entityType: String? public var page: PincodeMopUpdateAuditHistoryPaging - public var data: [PincodeMopUpdateAuditHistoryResponse] + public var data: [PincodeMopUpdateAuditHistoryResult] public enum CodingKeys: String, CodingKey { @@ -29,7 +29,7 @@ public extension PlatformClient.Serviceability { } - public init(data: [PincodeMopUpdateAuditHistoryResponse], entityType: String? = nil, page: PincodeMopUpdateAuditHistoryPaging) { + public init(data: [PincodeMopUpdateAuditHistoryResult], entityType: String? = nil, page: PincodeMopUpdateAuditHistoryPaging) { self.entityType = entityType @@ -60,7 +60,7 @@ public extension PlatformClient.Serviceability { - data = try container.decode([PincodeMopUpdateAuditHistoryResponse].self, forKey: .data) + data = try container.decode([PincodeMopUpdateAuditHistoryResult].self, forKey: .data) @@ -93,18 +93,18 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: PincodeMopUpdateAuditHistoryResponseData + Model: PincodeMopUpdateAuditHistoryResultData Used By: Serviceability */ - class PincodeMopUpdateAuditHistoryResponseData: Codable { + class PincodeMopUpdateAuditHistoryResultData: Codable { public var entityType: String? public var page: PincodeMopUpdateAuditHistoryPaging - public var data: [PincodeMopUpdateAuditHistoryResponse] + public var data: [PincodeMopUpdateAuditHistoryResult] public enum CodingKeys: String, CodingKey { @@ -117,7 +117,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(data: [PincodeMopUpdateAuditHistoryResponse], entityType: String? = nil, page: PincodeMopUpdateAuditHistoryPaging) { + public init(data: [PincodeMopUpdateAuditHistoryResult], entityType: String? = nil, page: PincodeMopUpdateAuditHistoryPaging) { self.entityType = entityType @@ -148,7 +148,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { - data = try container.decode([PincodeMopUpdateAuditHistoryResponse].self, forKey: .data) + data = try container.decode([PincodeMopUpdateAuditHistoryResult].self, forKey: .data) diff --git a/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResultServiceabilityPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResultServiceabilityPlatformModel.swift index 234083396e..e5ad822eb6 100644 --- a/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PincodeMopUpdateAuditHistoryResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: PincodeMopUpdateAuditHistoryResponse + Model: PincodeMopUpdateAuditHistoryResult Used By: Serviceability */ - class PincodeMopUpdateAuditHistoryResponse: Codable { + class PincodeMopUpdateAuditHistoryResult: Codable { public var batchId: String? @@ -222,11 +222,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: PincodeMopUpdateAuditHistoryResponse + Model: PincodeMopUpdateAuditHistoryResult Used By: Serviceability */ - class PincodeMopUpdateAuditHistoryResponse: Codable { + class PincodeMopUpdateAuditHistoryResult: Codable { public var batchId: String? diff --git a/Sources/code/platform/Models/Serviceability/PincodeMopUpdateResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/PincodeMopUpdateResultServiceabilityPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Serviceability/PincodeMopUpdateResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/PincodeMopUpdateResultServiceabilityPlatformModel.swift index 705990d1d7..b01545714e 100644 --- a/Sources/code/platform/Models/Serviceability/PincodeMopUpdateResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/PincodeMopUpdateResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: PincodeMopUpdateResponse + Model: PincodeMopUpdateResult Used By: Serviceability */ - class PincodeMopUpdateResponse: Codable { + class PincodeMopUpdateResult: Codable { public var pincode: Int @@ -102,11 +102,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: PincodeMopUpdateResponse + Model: PincodeMopUpdateResult Used By: Serviceability */ - class PincodeMopUpdateResponse: Codable { + class PincodeMopUpdateResult: Codable { public var pincode: Int diff --git a/Sources/code/platform/Models/Serviceability/ProductReturnConfigResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ProductReturnConfigResultServiceabilityPlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Serviceability/ProductReturnConfigResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ProductReturnConfigResultServiceabilityPlatformModel.swift index 25c1cf6d2d..8970565690 100644 --- a/Sources/code/platform/Models/Serviceability/ProductReturnConfigResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ProductReturnConfigResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ProductReturnConfigResponse + Model: ProductReturnConfigResult Used By: Serviceability */ - class ProductReturnConfigResponse: Codable { + class ProductReturnConfigResult: Codable { public var onSameStore: Bool? @@ -61,11 +61,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ProductReturnConfigResponse + Model: ProductReturnConfigResult Used By: Serviceability */ - class ProductReturnConfigResponse: Codable { + class ProductReturnConfigResult: Codable { public var onSameStore: Bool? diff --git a/Sources/code/platform/Models/Serviceability/RulePriorityRequestServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/RulePriorityDetailsServiceabilityPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Serviceability/RulePriorityRequestServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/RulePriorityDetailsServiceabilityPlatformModel.swift index f1de8c03b2..b7a6506029 100644 --- a/Sources/code/platform/Models/Serviceability/RulePriorityRequestServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/RulePriorityDetailsServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: RulePriorityRequest + Model: RulePriorityDetails Used By: Serviceability */ - class RulePriorityRequest: Codable { + class RulePriorityDetails: Codable { public var ruleId: String @@ -70,11 +70,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: RulePriorityRequest + Model: RulePriorityDetails Used By: Serviceability */ - class RulePriorityRequest: Codable { + class RulePriorityDetails: Codable { public var ruleId: String diff --git a/Sources/code/platform/Models/Serviceability/RulePriorityResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/RulePriorityResultServiceabilityPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Serviceability/RulePriorityResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/RulePriorityResultServiceabilityPlatformModel.swift index fe4ca5f1e4..648dab674e 100644 --- a/Sources/code/platform/Models/Serviceability/RulePriorityResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/RulePriorityResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: RulePriorityResponse + Model: RulePriorityResult Used By: Serviceability */ - class RulePriorityResponse: Codable { + class RulePriorityResult: Codable { public var success: Bool? @@ -61,11 +61,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: RulePriorityResponse + Model: RulePriorityResult Used By: Serviceability */ - class RulePriorityResponse: Codable { + class RulePriorityResult: Codable { public var success: Bool? diff --git a/Sources/code/platform/Models/Serviceability/SelfShipResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/SelfShipResultServiceabilityPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Serviceability/SelfShipResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/SelfShipResultServiceabilityPlatformModel.swift index 0b5f425b15..69025af095 100644 --- a/Sources/code/platform/Models/Serviceability/SelfShipResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/SelfShipResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: SelfShipResponse + Model: SelfShipResult Used By: Serviceability */ - class SelfShipResponse: Codable { + class SelfShipResult: Codable { public var isActive: Bool @@ -70,11 +70,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: SelfShipResponse + Model: SelfShipResult Used By: Serviceability */ - class SelfShipResponse: Codable { + class SelfShipResult: Codable { public var isActive: Bool diff --git a/Sources/code/platform/Models/Serviceability/ServiceabilityErrorResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ServiceabilityErrorResultServiceabilityPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Serviceability/ServiceabilityErrorResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ServiceabilityErrorResultServiceabilityPlatformModel.swift index f171a8d3e3..6e32b1e88b 100644 --- a/Sources/code/platform/Models/Serviceability/ServiceabilityErrorResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ServiceabilityErrorResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ServiceabilityErrorResponse + Model: ServiceabilityErrorResult Used By: Serviceability */ - class ServiceabilityErrorResponse: Codable { + class ServiceabilityErrorResult: Codable { public var message: String @@ -86,11 +86,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ServiceabilityErrorResponse + Model: ServiceabilityErrorResult Used By: Serviceability */ - class ServiceabilityErrorResponse: Codable { + class ServiceabilityErrorResult: Codable { public var message: String diff --git a/Sources/code/platform/Models/Serviceability/ServiceabilityModelServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ServiceabilityModelServiceabilityPlatformModel.swift index f2f47eef5d..685c16fc0c 100644 --- a/Sources/code/platform/Models/Serviceability/ServiceabilityModelServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ServiceabilityModelServiceabilityPlatformModel.swift @@ -16,9 +16,9 @@ public extension PlatformClient.Serviceability { public var isQc: Bool - public var pickupCutoff: String + public var pickupCutoff: String? - public var routeCode: String + public var routeCode: String? public var isFirstMile: Bool @@ -49,7 +49,7 @@ public extension PlatformClient.Serviceability { } - public init(isFirstMile: Bool, isInstallation: Bool, isLastMile: Bool, isQc: Bool, isReturn: Bool, lmCodLimit: Int, pickupCutoff: String, routeCode: String) { + public init(isFirstMile: Bool, isInstallation: Bool, isLastMile: Bool, isQc: Bool, isReturn: Bool, lmCodLimit: Int, pickupCutoff: String? = nil, routeCode: String? = nil) { self.lmCodLimit = lmCodLimit @@ -83,14 +83,28 @@ public extension PlatformClient.Serviceability { - pickupCutoff = try container.decode(String.self, forKey: .pickupCutoff) + do { + pickupCutoff = try container.decode(String.self, forKey: .pickupCutoff) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - routeCode = try container.decode(String.self, forKey: .routeCode) + do { + routeCode = try container.decode(String.self, forKey: .routeCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - isFirstMile = try container.decode(Bool.self, forKey: .isFirstMile) @@ -177,9 +191,9 @@ public extension PlatformClient.ApplicationClient.Serviceability { public var isQc: Bool - public var pickupCutoff: String + public var pickupCutoff: String? - public var routeCode: String + public var routeCode: String? public var isFirstMile: Bool @@ -210,7 +224,7 @@ public extension PlatformClient.ApplicationClient.Serviceability { } - public init(isFirstMile: Bool, isInstallation: Bool, isLastMile: Bool, isQc: Bool, isReturn: Bool, lmCodLimit: Int, pickupCutoff: String, routeCode: String) { + public init(isFirstMile: Bool, isInstallation: Bool, isLastMile: Bool, isQc: Bool, isReturn: Bool, lmCodLimit: Int, pickupCutoff: String? = nil, routeCode: String? = nil) { self.lmCodLimit = lmCodLimit @@ -244,14 +258,28 @@ public extension PlatformClient.ApplicationClient.Serviceability { - pickupCutoff = try container.decode(String.self, forKey: .pickupCutoff) + do { + pickupCutoff = try container.decode(String.self, forKey: .pickupCutoff) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - - routeCode = try container.decode(String.self, forKey: .routeCode) + do { + routeCode = try container.decode(String.self, forKey: .routeCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } - isFirstMile = try container.decode(Bool.self, forKey: .isFirstMile) diff --git a/Sources/code/platform/Models/Serviceability/ServiceabilityPageResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ServiceabilityPageResultServiceabilityPlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Serviceability/ServiceabilityPageResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ServiceabilityPageResultServiceabilityPlatformModel.swift index aa4fcc6a44..ea089e6e6c 100644 --- a/Sources/code/platform/Models/Serviceability/ServiceabilityPageResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ServiceabilityPageResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ServiceabilityPageResponse + Model: ServiceabilityPageResult Used By: Serviceability */ - class ServiceabilityPageResponse: Codable { + class ServiceabilityPageResult: Codable { public var type: String? @@ -153,11 +153,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ServiceabilityPageResponse + Model: ServiceabilityPageResult Used By: Serviceability */ - class ServiceabilityPageResponse: Codable { + class ServiceabilityPageResult: Codable { public var type: String? diff --git a/Sources/code/platform/Models/Serviceability/ShipmentCourierPartnerDetailsServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ShipmentCourierPartnerDetailsServiceabilityPlatformModel.swift new file mode 100644 index 0000000000..85b2b99f4f --- /dev/null +++ b/Sources/code/platform/Models/Serviceability/ShipmentCourierPartnerDetailsServiceabilityPlatformModel.swift @@ -0,0 +1,272 @@ + + +import Foundation + + +public extension PlatformClient.Serviceability { + /* + Model: ShipmentCourierPartnerDetails + Used By: Serviceability + */ + + class ShipmentCourierPartnerDetails: Codable { + + + public var fromLocation: ShipmentsCourierPartnersServiceability + + public var toLocation: ShipmentsCourierPartnersServiceability + + public var shipments: [Shipments]? + + public var journey: String? + + public var paymentMode: String? + + + public enum CodingKeys: String, CodingKey { + + case fromLocation = "from_location" + + case toLocation = "to_location" + + case shipments = "shipments" + + case journey = "journey" + + case paymentMode = "payment_mode" + + } + + public init(fromLocation: ShipmentsCourierPartnersServiceability, journey: String? = nil, paymentMode: String? = nil, shipments: [Shipments]? = nil, toLocation: ShipmentsCourierPartnersServiceability) { + + self.fromLocation = fromLocation + + self.toLocation = toLocation + + self.shipments = shipments + + self.journey = journey + + self.paymentMode = paymentMode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + fromLocation = try container.decode(ShipmentsCourierPartnersServiceability.self, forKey: .fromLocation) + + + + + toLocation = try container.decode(ShipmentsCourierPartnersServiceability.self, forKey: .toLocation) + + + + + do { + shipments = try container.decode([Shipments].self, forKey: .shipments) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + journey = try container.decode(String.self, forKey: .journey) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentMode = try container.decode(String.self, forKey: .paymentMode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(fromLocation, forKey: .fromLocation) + + + + + try? container.encodeIfPresent(toLocation, forKey: .toLocation) + + + + + try? container.encodeIfPresent(shipments, forKey: .shipments) + + + + + try? container.encodeIfPresent(journey, forKey: .journey) + + + + + try? container.encodeIfPresent(paymentMode, forKey: .paymentMode) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Serviceability { + /* + Model: ShipmentCourierPartnerDetails + Used By: Serviceability + */ + + class ShipmentCourierPartnerDetails: Codable { + + + public var fromLocation: ShipmentsCourierPartnersServiceability + + public var toLocation: ShipmentsCourierPartnersServiceability + + public var shipments: [Shipments]? + + public var journey: String? + + public var paymentMode: String? + + + public enum CodingKeys: String, CodingKey { + + case fromLocation = "from_location" + + case toLocation = "to_location" + + case shipments = "shipments" + + case journey = "journey" + + case paymentMode = "payment_mode" + + } + + public init(fromLocation: ShipmentsCourierPartnersServiceability, journey: String? = nil, paymentMode: String? = nil, shipments: [Shipments]? = nil, toLocation: ShipmentsCourierPartnersServiceability) { + + self.fromLocation = fromLocation + + self.toLocation = toLocation + + self.shipments = shipments + + self.journey = journey + + self.paymentMode = paymentMode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + fromLocation = try container.decode(ShipmentsCourierPartnersServiceability.self, forKey: .fromLocation) + + + + + toLocation = try container.decode(ShipmentsCourierPartnersServiceability.self, forKey: .toLocation) + + + + + do { + shipments = try container.decode([Shipments].self, forKey: .shipments) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + journey = try container.decode(String.self, forKey: .journey) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + paymentMode = try container.decode(String.self, forKey: .paymentMode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(fromLocation, forKey: .fromLocation) + + + + + try? container.encodeIfPresent(toLocation, forKey: .toLocation) + + + + + try? container.encodeIfPresent(shipments, forKey: .shipments) + + + + + try? container.encodeIfPresent(journey, forKey: .journey) + + + + + try? container.encodeIfPresent(paymentMode, forKey: .paymentMode) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Serviceability/ShipmentCourierPartnerResultServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ShipmentCourierPartnerResultServiceabilityPlatformModel.swift new file mode 100644 index 0000000000..893ef67006 --- /dev/null +++ b/Sources/code/platform/Models/Serviceability/ShipmentCourierPartnerResultServiceabilityPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Serviceability { + /* + Model: ShipmentCourierPartnerResult + Used By: Serviceability + */ + + class ShipmentCourierPartnerResult: Codable { + + + public var courierPartners: [CourierPartners]? + + public var shipments: [ShipmentCourierPartners]? + + + public enum CodingKeys: String, CodingKey { + + case courierPartners = "courier_partners" + + case shipments = "shipments" + + } + + public init(courierPartners: [CourierPartners]? = nil, shipments: [ShipmentCourierPartners]? = nil) { + + self.courierPartners = courierPartners + + self.shipments = shipments + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + courierPartners = try container.decode([CourierPartners].self, forKey: .courierPartners) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipments = try container.decode([ShipmentCourierPartners].self, forKey: .shipments) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(courierPartners, forKey: .courierPartners) + + + + + try? container.encodeIfPresent(shipments, forKey: .shipments) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Serviceability { + /* + Model: ShipmentCourierPartnerResult + Used By: Serviceability + */ + + class ShipmentCourierPartnerResult: Codable { + + + public var courierPartners: [CourierPartners]? + + public var shipments: [ShipmentCourierPartners]? + + + public enum CodingKeys: String, CodingKey { + + case courierPartners = "courier_partners" + + case shipments = "shipments" + + } + + public init(courierPartners: [CourierPartners]? = nil, shipments: [ShipmentCourierPartners]? = nil) { + + self.courierPartners = courierPartners + + self.shipments = shipments + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + courierPartners = try container.decode([CourierPartners].self, forKey: .courierPartners) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipments = try container.decode([ShipmentCourierPartners].self, forKey: .shipments) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(courierPartners, forKey: .courierPartners) + + + + + try? container.encodeIfPresent(shipments, forKey: .shipments) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Serviceability/ShipmentCourierPartnersServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ShipmentCourierPartnersServiceabilityPlatformModel.swift new file mode 100644 index 0000000000..aaa414100c --- /dev/null +++ b/Sources/code/platform/Models/Serviceability/ShipmentCourierPartnersServiceabilityPlatformModel.swift @@ -0,0 +1,162 @@ + + +import Foundation + + +public extension PlatformClient.Serviceability { + /* + Model: ShipmentCourierPartners + Used By: Serviceability + */ + + class ShipmentCourierPartners: Codable { + + + public var id: String? + + public var courierPartners: [CourierPartners]? + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case courierPartners = "courier_partners" + + } + + public init(courierPartners: [CourierPartners]? = nil, id: String? = nil) { + + self.id = id + + self.courierPartners = courierPartners + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + courierPartners = try container.decode([CourierPartners].self, forKey: .courierPartners) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(courierPartners, forKey: .courierPartners) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Serviceability { + /* + Model: ShipmentCourierPartners + Used By: Serviceability + */ + + class ShipmentCourierPartners: Codable { + + + public var id: String? + + public var courierPartners: [CourierPartners]? + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case courierPartners = "courier_partners" + + } + + public init(courierPartners: [CourierPartners]? = nil, id: String? = nil) { + + self.id = id + + self.courierPartners = courierPartners + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + courierPartners = try container.decode([CourierPartners].self, forKey: .courierPartners) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(courierPartners, forKey: .courierPartners) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Serviceability/ShipmentDimensionServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ShipmentDimensionServiceabilityPlatformModel.swift new file mode 100644 index 0000000000..ada86fd47e --- /dev/null +++ b/Sources/code/platform/Models/Serviceability/ShipmentDimensionServiceabilityPlatformModel.swift @@ -0,0 +1,166 @@ + + +import Foundation + + +public extension PlatformClient.Serviceability { + /* + Model: ShipmentDimension + Used By: Serviceability + */ + + class ShipmentDimension: Codable { + + + public var height: Double + + public var length: Double + + public var width: Double + + + public enum CodingKeys: String, CodingKey { + + case height = "height" + + case length = "length" + + case width = "width" + + } + + public init(height: Double, length: Double, width: Double) { + + self.height = height + + self.length = length + + self.width = width + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + height = try container.decode(Double.self, forKey: .height) + + + + + length = try container.decode(Double.self, forKey: .length) + + + + + width = try container.decode(Double.self, forKey: .width) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(height, forKey: .height) + + + + + try? container.encodeIfPresent(length, forKey: .length) + + + + + try? container.encodeIfPresent(width, forKey: .width) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Serviceability { + /* + Model: ShipmentDimension + Used By: Serviceability + */ + + class ShipmentDimension: Codable { + + + public var height: Double + + public var length: Double + + public var width: Double + + + public enum CodingKeys: String, CodingKey { + + case height = "height" + + case length = "length" + + case width = "width" + + } + + public init(height: Double, length: Double, width: Double) { + + self.height = height + + self.length = length + + self.width = width + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + height = try container.decode(Double.self, forKey: .height) + + + + + length = try container.decode(Double.self, forKey: .length) + + + + + width = try container.decode(Double.self, forKey: .width) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(height, forKey: .height) + + + + + try? container.encodeIfPresent(length, forKey: .length) + + + + + try? container.encodeIfPresent(width, forKey: .width) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Serviceability/ShipmentsArticlesServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ShipmentsArticlesServiceabilityPlatformModel.swift new file mode 100644 index 0000000000..dd62f10390 --- /dev/null +++ b/Sources/code/platform/Models/Serviceability/ShipmentsArticlesServiceabilityPlatformModel.swift @@ -0,0 +1,300 @@ + + +import Foundation + + +public extension PlatformClient.Serviceability { + /* + Model: ShipmentsArticles + Used By: Serviceability + */ + + class ShipmentsArticles: Codable { + + + public var itemId: Int? + + public var categoryId: Int? + + public var brandId: Int? + + public var departmentId: Int? + + public var tags: [String]? + + + public enum CodingKeys: String, CodingKey { + + case itemId = "item_id" + + case categoryId = "category_id" + + case brandId = "brand_id" + + case departmentId = "department_id" + + case tags = "tags" + + } + + public init(brandId: Int? = nil, categoryId: Int? = nil, departmentId: Int? = nil, itemId: Int? = nil, tags: [String]? = nil) { + + self.itemId = itemId + + self.categoryId = categoryId + + self.brandId = brandId + + self.departmentId = departmentId + + self.tags = tags + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + itemId = try container.decode(Int.self, forKey: .itemId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + categoryId = try container.decode(Int.self, forKey: .categoryId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + brandId = try container.decode(Int.self, forKey: .brandId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + departmentId = try container.decode(Int.self, forKey: .departmentId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + + try? container.encodeIfPresent(categoryId, forKey: .categoryId) + + + + + try? container.encodeIfPresent(brandId, forKey: .brandId) + + + + + try? container.encodeIfPresent(departmentId, forKey: .departmentId) + + + + + try? container.encodeIfPresent(tags, forKey: .tags) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Serviceability { + /* + Model: ShipmentsArticles + Used By: Serviceability + */ + + class ShipmentsArticles: Codable { + + + public var itemId: Int? + + public var categoryId: Int? + + public var brandId: Int? + + public var departmentId: Int? + + public var tags: [String]? + + + public enum CodingKeys: String, CodingKey { + + case itemId = "item_id" + + case categoryId = "category_id" + + case brandId = "brand_id" + + case departmentId = "department_id" + + case tags = "tags" + + } + + public init(brandId: Int? = nil, categoryId: Int? = nil, departmentId: Int? = nil, itemId: Int? = nil, tags: [String]? = nil) { + + self.itemId = itemId + + self.categoryId = categoryId + + self.brandId = brandId + + self.departmentId = departmentId + + self.tags = tags + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + itemId = try container.decode(Int.self, forKey: .itemId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + categoryId = try container.decode(Int.self, forKey: .categoryId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + brandId = try container.decode(Int.self, forKey: .brandId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + departmentId = try container.decode(Int.self, forKey: .departmentId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(itemId, forKey: .itemId) + + + + + try? container.encodeIfPresent(categoryId, forKey: .categoryId) + + + + + try? container.encodeIfPresent(brandId, forKey: .brandId) + + + + + try? container.encodeIfPresent(departmentId, forKey: .departmentId) + + + + + try? container.encodeIfPresent(tags, forKey: .tags) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Serviceability/ShipmentsCourierPartnersServiceabilityServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ShipmentsCourierPartnersServiceabilityServiceabilityPlatformModel.swift new file mode 100644 index 0000000000..2bf2e48d7c --- /dev/null +++ b/Sources/code/platform/Models/Serviceability/ShipmentsCourierPartnersServiceabilityServiceabilityPlatformModel.swift @@ -0,0 +1,286 @@ + + +import Foundation + + +public extension PlatformClient.Serviceability { + /* + Model: ShipmentsCourierPartnersServiceability + Used By: Serviceability + */ + + class ShipmentsCourierPartnersServiceability: Codable { + + + public var pincode: String? + + public var sectorCode: String? + + public var stateCode: String? + + public var cityCode: String? + + public var countryCode: String + + + public enum CodingKeys: String, CodingKey { + + case pincode = "pincode" + + case sectorCode = "sector_code" + + case stateCode = "state_code" + + case cityCode = "city_code" + + case countryCode = "country_code" + + } + + public init(cityCode: String? = nil, countryCode: String, pincode: String? = nil, sectorCode: String? = nil, stateCode: String? = nil) { + + self.pincode = pincode + + self.sectorCode = sectorCode + + self.stateCode = stateCode + + self.cityCode = cityCode + + self.countryCode = countryCode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pincode = try container.decode(String.self, forKey: .pincode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + sectorCode = try container.decode(String.self, forKey: .sectorCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + stateCode = try container.decode(String.self, forKey: .stateCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + cityCode = try container.decode(String.self, forKey: .cityCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + countryCode = try container.decode(String.self, forKey: .countryCode) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pincode, forKey: .pincode) + + + + + try? container.encodeIfPresent(sectorCode, forKey: .sectorCode) + + + + + try? container.encodeIfPresent(stateCode, forKey: .stateCode) + + + + + try? container.encodeIfPresent(cityCode, forKey: .cityCode) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Serviceability { + /* + Model: ShipmentsCourierPartnersServiceability + Used By: Serviceability + */ + + class ShipmentsCourierPartnersServiceability: Codable { + + + public var pincode: String? + + public var sectorCode: String? + + public var stateCode: String? + + public var cityCode: String? + + public var countryCode: String + + + public enum CodingKeys: String, CodingKey { + + case pincode = "pincode" + + case sectorCode = "sector_code" + + case stateCode = "state_code" + + case cityCode = "city_code" + + case countryCode = "country_code" + + } + + public init(cityCode: String? = nil, countryCode: String, pincode: String? = nil, sectorCode: String? = nil, stateCode: String? = nil) { + + self.pincode = pincode + + self.sectorCode = sectorCode + + self.stateCode = stateCode + + self.cityCode = cityCode + + self.countryCode = countryCode + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + pincode = try container.decode(String.self, forKey: .pincode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + sectorCode = try container.decode(String.self, forKey: .sectorCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + stateCode = try container.decode(String.self, forKey: .stateCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + cityCode = try container.decode(String.self, forKey: .cityCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + countryCode = try container.decode(String.self, forKey: .countryCode) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(pincode, forKey: .pincode) + + + + + try? container.encodeIfPresent(sectorCode, forKey: .sectorCode) + + + + + try? container.encodeIfPresent(stateCode, forKey: .stateCode) + + + + + try? container.encodeIfPresent(cityCode, forKey: .cityCode) + + + + + try? container.encodeIfPresent(countryCode, forKey: .countryCode) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Serviceability/ShipmentsServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ShipmentsServiceabilityPlatformModel.swift new file mode 100644 index 0000000000..3d3fae5d61 --- /dev/null +++ b/Sources/code/platform/Models/Serviceability/ShipmentsServiceabilityPlatformModel.swift @@ -0,0 +1,484 @@ + + +import Foundation + + +public extension PlatformClient.Serviceability { + /* + Model: Shipments + Used By: Serviceability + */ + + class Shipments: Codable { + + + public var id: String? + + public var locationId: Double? + + public var locationTags: [String]? + + public var shipmentWeight: Double? + + public var shipmentVolumetricWeight: Double? + + public var shipmentCost: Double? + + public var shipmentDimension: ShipmentDimension? + + public var courierPartnerSchemes: [String]? + + public var articles: [ShipmentsArticles]? + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case locationId = "location_id" + + case locationTags = "location_tags" + + case shipmentWeight = "shipment_weight" + + case shipmentVolumetricWeight = "shipment_volumetric_weight" + + case shipmentCost = "shipment_cost" + + case shipmentDimension = "shipment_dimension" + + case courierPartnerSchemes = "courier_partner_schemes" + + case articles = "articles" + + } + + public init(articles: [ShipmentsArticles]? = nil, courierPartnerSchemes: [String]? = nil, id: String? = nil, locationId: Double? = nil, locationTags: [String]? = nil, shipmentCost: Double? = nil, shipmentDimension: ShipmentDimension? = nil, shipmentVolumetricWeight: Double? = nil, shipmentWeight: Double? = nil) { + + self.id = id + + self.locationId = locationId + + self.locationTags = locationTags + + self.shipmentWeight = shipmentWeight + + self.shipmentVolumetricWeight = shipmentVolumetricWeight + + self.shipmentCost = shipmentCost + + self.shipmentDimension = shipmentDimension + + self.courierPartnerSchemes = courierPartnerSchemes + + self.articles = articles + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + locationId = try container.decode(Double.self, forKey: .locationId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + locationTags = try container.decode([String].self, forKey: .locationTags) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentWeight = try container.decode(Double.self, forKey: .shipmentWeight) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentVolumetricWeight = try container.decode(Double.self, forKey: .shipmentVolumetricWeight) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentCost = try container.decode(Double.self, forKey: .shipmentCost) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentDimension = try container.decode(ShipmentDimension.self, forKey: .shipmentDimension) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + courierPartnerSchemes = try container.decode([String].self, forKey: .courierPartnerSchemes) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + articles = try container.decode([ShipmentsArticles].self, forKey: .articles) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(locationId, forKey: .locationId) + + + + + try? container.encodeIfPresent(locationTags, forKey: .locationTags) + + + + + try? container.encodeIfPresent(shipmentWeight, forKey: .shipmentWeight) + + + + + try? container.encodeIfPresent(shipmentVolumetricWeight, forKey: .shipmentVolumetricWeight) + + + + + try? container.encodeIfPresent(shipmentCost, forKey: .shipmentCost) + + + + + try? container.encodeIfPresent(shipmentDimension, forKey: .shipmentDimension) + + + + + try? container.encodeIfPresent(courierPartnerSchemes, forKey: .courierPartnerSchemes) + + + + + try? container.encodeIfPresent(articles, forKey: .articles) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Serviceability { + /* + Model: Shipments + Used By: Serviceability + */ + + class Shipments: Codable { + + + public var id: String? + + public var locationId: Double? + + public var locationTags: [String]? + + public var shipmentWeight: Double? + + public var shipmentVolumetricWeight: Double? + + public var shipmentCost: Double? + + public var shipmentDimension: ShipmentDimension? + + public var courierPartnerSchemes: [String]? + + public var articles: [ShipmentsArticles]? + + + public enum CodingKeys: String, CodingKey { + + case id = "id" + + case locationId = "location_id" + + case locationTags = "location_tags" + + case shipmentWeight = "shipment_weight" + + case shipmentVolumetricWeight = "shipment_volumetric_weight" + + case shipmentCost = "shipment_cost" + + case shipmentDimension = "shipment_dimension" + + case courierPartnerSchemes = "courier_partner_schemes" + + case articles = "articles" + + } + + public init(articles: [ShipmentsArticles]? = nil, courierPartnerSchemes: [String]? = nil, id: String? = nil, locationId: Double? = nil, locationTags: [String]? = nil, shipmentCost: Double? = nil, shipmentDimension: ShipmentDimension? = nil, shipmentVolumetricWeight: Double? = nil, shipmentWeight: Double? = nil) { + + self.id = id + + self.locationId = locationId + + self.locationTags = locationTags + + self.shipmentWeight = shipmentWeight + + self.shipmentVolumetricWeight = shipmentVolumetricWeight + + self.shipmentCost = shipmentCost + + self.shipmentDimension = shipmentDimension + + self.courierPartnerSchemes = courierPartnerSchemes + + self.articles = articles + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + locationId = try container.decode(Double.self, forKey: .locationId) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + locationTags = try container.decode([String].self, forKey: .locationTags) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentWeight = try container.decode(Double.self, forKey: .shipmentWeight) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentVolumetricWeight = try container.decode(Double.self, forKey: .shipmentVolumetricWeight) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentCost = try container.decode(Double.self, forKey: .shipmentCost) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + shipmentDimension = try container.decode(ShipmentDimension.self, forKey: .shipmentDimension) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + courierPartnerSchemes = try container.decode([String].self, forKey: .courierPartnerSchemes) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + articles = try container.decode([ShipmentsArticles].self, forKey: .articles) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(id, forKey: .id) + + + + + try? container.encodeIfPresent(locationId, forKey: .locationId) + + + + + try? container.encodeIfPresent(locationTags, forKey: .locationTags) + + + + + try? container.encodeIfPresent(shipmentWeight, forKey: .shipmentWeight) + + + + + try? container.encodeIfPresent(shipmentVolumetricWeight, forKey: .shipmentVolumetricWeight) + + + + + try? container.encodeIfPresent(shipmentCost, forKey: .shipmentCost) + + + + + try? container.encodeIfPresent(shipmentDimension, forKey: .shipmentDimension) + + + + + try? container.encodeIfPresent(courierPartnerSchemes, forKey: .courierPartnerSchemes) + + + + + try? container.encodeIfPresent(articles, forKey: .articles) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Serviceability/StandardErrorServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/StandardErrorServiceabilityPlatformModel.swift new file mode 100644 index 0000000000..d695244f92 --- /dev/null +++ b/Sources/code/platform/Models/Serviceability/StandardErrorServiceabilityPlatformModel.swift @@ -0,0 +1,102 @@ + + +import Foundation + + +public extension PlatformClient.Serviceability { + /* + Model: StandardError + Used By: Serviceability + */ + + class StandardError: Codable { + + + public var message: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + } + + public init(message: String) { + + self.message = message + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + 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(message, forKey: .message) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Serviceability { + /* + Model: StandardError + Used By: Serviceability + */ + + class StandardError: Codable { + + + public var message: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + } + + public init(message: String) { + + self.message = message + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + 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(message, forKey: .message) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Serviceability/StoreRuleResponseSchemaServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/StoreRuleResultSchemaServiceabilityPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Serviceability/StoreRuleResponseSchemaServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/StoreRuleResultSchemaServiceabilityPlatformModel.swift index de4a705a1c..47df7475fc 100644 --- a/Sources/code/platform/Models/Serviceability/StoreRuleResponseSchemaServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/StoreRuleResultSchemaServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: StoreRuleResponseSchema + Model: StoreRuleResultSchema Used By: Serviceability */ - class StoreRuleResponseSchema: Codable { + class StoreRuleResultSchema: Codable { public var id: String? @@ -245,11 +245,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: StoreRuleResponseSchema + Model: StoreRuleResultSchema Used By: Serviceability */ - class StoreRuleResponseSchema: Codable { + class StoreRuleResultSchema: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Serviceability/StoreRuleUpdateResponseSchemaServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/StoreRuleUpdateResultSchemaServiceabilityPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Serviceability/StoreRuleUpdateResponseSchemaServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/StoreRuleUpdateResultSchemaServiceabilityPlatformModel.swift index ac73d6fdb6..52e22a6d07 100644 --- a/Sources/code/platform/Models/Serviceability/StoreRuleUpdateResponseSchemaServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/StoreRuleUpdateResultSchemaServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: StoreRuleUpdateResponseSchema + Model: StoreRuleUpdateResultSchema Used By: Serviceability */ - class StoreRuleUpdateResponseSchema: Codable { + class StoreRuleUpdateResultSchema: Codable { public var id: String? @@ -291,11 +291,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: StoreRuleUpdateResponseSchema + Model: StoreRuleUpdateResultSchema Used By: Serviceability */ - class StoreRuleUpdateResponseSchema: Codable { + class StoreRuleUpdateResultSchema: Codable { public var id: String? diff --git a/Sources/code/platform/Models/Serviceability/TimmingResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/TimmingResultServiceabilityPlatformModel.swift similarity index 98% rename from Sources/code/platform/Models/Serviceability/TimmingResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/TimmingResultServiceabilityPlatformModel.swift index 3af019f380..ab00792fe1 100644 --- a/Sources/code/platform/Models/Serviceability/TimmingResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/TimmingResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: TimmingResponse + Model: TimmingResult Used By: Serviceability */ - class TimmingResponse: Codable { + class TimmingResult: Codable { public var open: Bool? @@ -130,11 +130,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: TimmingResponse + Model: TimmingResult Used By: Serviceability */ - class TimmingResponse: Codable { + class TimmingResult: Codable { public var open: Bool? diff --git a/Sources/code/platform/Models/Serviceability/UpdateZoneConfigRequestServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/UpdateZoneConfigDetailsServiceabilityPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Serviceability/UpdateZoneConfigRequestServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/UpdateZoneConfigDetailsServiceabilityPlatformModel.swift index 3ed7b3e8e1..00a614fec8 100644 --- a/Sources/code/platform/Models/Serviceability/UpdateZoneConfigRequestServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/UpdateZoneConfigDetailsServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: UpdateZoneConfigRequest + Model: UpdateZoneConfigDetails Used By: Serviceability */ - class UpdateZoneConfigRequest: Codable { + class UpdateZoneConfigDetails: Codable { public var serviceabilityType: String? @@ -61,11 +61,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: UpdateZoneConfigRequest + Model: UpdateZoneConfigDetails Used By: Serviceability */ - class UpdateZoneConfigRequest: Codable { + class UpdateZoneConfigDetails: Codable { public var serviceabilityType: String? diff --git a/Sources/code/platform/Models/Serviceability/ValidationErrorServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ValidationErrorServiceabilityPlatformModel.swift new file mode 100644 index 0000000000..2e8e02ce82 --- /dev/null +++ b/Sources/code/platform/Models/Serviceability/ValidationErrorServiceabilityPlatformModel.swift @@ -0,0 +1,134 @@ + + +import Foundation + + +public extension PlatformClient.Serviceability { + /* + Model: ValidationError + Used By: Serviceability + */ + + class ValidationError: Codable { + + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} + + + +public extension PlatformClient.ApplicationClient.Serviceability { + /* + Model: ValidationError + Used By: Serviceability + */ + + class ValidationError: Codable { + + + public var message: String + + public var field: String + + + public enum CodingKeys: String, CodingKey { + + case message = "message" + + case field = "field" + + } + + public init(field: String, message: String) { + + self.message = message + + self.field = field + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + message = try container.decode(String.self, forKey: .message) + + + + + field = try container.decode(String.self, forKey: .field) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(message, forKey: .message) + + + + + try? container.encodeIfPresent(field, forKey: .field) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Serviceability/WarningsResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/WarningsResultServiceabilityPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Serviceability/WarningsResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/WarningsResultServiceabilityPlatformModel.swift index 3cb2521657..d8549badc5 100644 --- a/Sources/code/platform/Models/Serviceability/WarningsResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/WarningsResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: WarningsResponse + Model: WarningsResult Used By: Serviceability */ - class WarningsResponse: Codable { + class WarningsResult: Codable { public var storeAddress: String? @@ -61,11 +61,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: WarningsResponse + Model: WarningsResult Used By: Serviceability */ - class WarningsResponse: Codable { + class WarningsResult: Codable { public var storeAddress: String? diff --git a/Sources/code/platform/Models/Serviceability/ZoneResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ZoneResultServiceabilityPlatformModel.swift similarity index 96% rename from Sources/code/platform/Models/Serviceability/ZoneResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ZoneResultServiceabilityPlatformModel.swift index 59e4001274..348baad930 100644 --- a/Sources/code/platform/Models/Serviceability/ZoneResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ZoneResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ZoneResponse + Model: ZoneResult Used By: Serviceability */ - class ZoneResponse: Codable { + class ZoneResult: Codable { public var statusCode: Int @@ -86,11 +86,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ZoneResponse + Model: ZoneResult Used By: Serviceability */ - class ZoneResponse: Codable { + class ZoneResult: Codable { public var statusCode: Int diff --git a/Sources/code/platform/Models/Serviceability/ZoneSuccessResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ZoneSuccessResultServiceabilityPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Serviceability/ZoneSuccessResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ZoneSuccessResultServiceabilityPlatformModel.swift index 6e808ba82a..e0b7fd3be7 100644 --- a/Sources/code/platform/Models/Serviceability/ZoneSuccessResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ZoneSuccessResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ZoneSuccessResponse + Model: ZoneSuccessResult Used By: Serviceability */ - class ZoneSuccessResponse: Codable { + class ZoneSuccessResult: Codable { public var statusCode: Int @@ -70,11 +70,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ZoneSuccessResponse + Model: ZoneSuccessResult Used By: Serviceability */ - class ZoneSuccessResponse: Codable { + class ZoneSuccessResult: Codable { public var statusCode: Int diff --git a/Sources/code/platform/Models/Serviceability/ZoneUpdateRequestServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/ZoneUpdateDetailsServiceabilityPlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Serviceability/ZoneUpdateRequestServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/ZoneUpdateDetailsServiceabilityPlatformModel.swift index 68d39be1e2..4ea2e31484 100644 --- a/Sources/code/platform/Models/Serviceability/ZoneUpdateRequestServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/ZoneUpdateDetailsServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: ZoneUpdateRequest + Model: ZoneUpdateDetails Used By: Serviceability */ - class ZoneUpdateRequest: Codable { + class ZoneUpdateDetails: Codable { public var identifier: String @@ -70,11 +70,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: ZoneUpdateRequest + Model: ZoneUpdateDetails Used By: Serviceability */ - class ZoneUpdateRequest: Codable { + class ZoneUpdateDetails: Codable { public var identifier: String diff --git a/Sources/code/platform/Models/Serviceability/getAppRegionZonesResponseServiceabilityPlatformModel.swift b/Sources/code/platform/Models/Serviceability/getAppRegionZonesResultServiceabilityPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Serviceability/getAppRegionZonesResponseServiceabilityPlatformModel.swift rename to Sources/code/platform/Models/Serviceability/getAppRegionZonesResultServiceabilityPlatformModel.swift index 662b4bf778..9acf4cbf18 100644 --- a/Sources/code/platform/Models/Serviceability/getAppRegionZonesResponseServiceabilityPlatformModel.swift +++ b/Sources/code/platform/Models/Serviceability/getAppRegionZonesResultServiceabilityPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Serviceability { /* - Model: getAppRegionZonesResponse + Model: getAppRegionZonesResult Used By: Serviceability */ - class getAppRegionZonesResponse: Codable { + class getAppRegionZonesResult: Codable { public var page: [PageSchema] @@ -70,11 +70,11 @@ public extension PlatformClient.Serviceability { public extension PlatformClient.ApplicationClient.Serviceability { /* - Model: getAppRegionZonesResponse + Model: getAppRegionZonesResult Used By: Serviceability */ - class getAppRegionZonesResponse: Codable { + class getAppRegionZonesResult: Codable { public var page: [PageSchema] diff --git a/Sources/code/platform/Models/Share/ClickStatsResponseSharePlatformModel.swift b/Sources/code/platform/Models/Share/ClickStatsResultSharePlatformModel.swift similarity index 93% rename from Sources/code/platform/Models/Share/ClickStatsResponseSharePlatformModel.swift rename to Sources/code/platform/Models/Share/ClickStatsResultSharePlatformModel.swift index f0b428ed66..195a7d8ce8 100644 --- a/Sources/code/platform/Models/Share/ClickStatsResponseSharePlatformModel.swift +++ b/Sources/code/platform/Models/Share/ClickStatsResultSharePlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.Share { /* - Model: ClickStatsResponse + Model: ClickStatsResult Used By: Share */ - class ClickStatsResponse: Codable { + class ClickStatsResult: Codable { public var clickStats: [ClickStatsItem] diff --git a/Sources/code/platform/Models/Share/ShortLinkReqSharePlatformModel.swift b/Sources/code/platform/Models/Share/ShortLinkReqSharePlatformModel.swift index 37fbec9c0c..4956e60f26 100644 --- a/Sources/code/platform/Models/Share/ShortLinkReqSharePlatformModel.swift +++ b/Sources/code/platform/Models/Share/ShortLinkReqSharePlatformModel.swift @@ -38,6 +38,8 @@ public extension PlatformClient.ApplicationClient.Share { public var count: Int? + public var meta: shortLinkReqMeta? + public enum CodingKeys: String, CodingKey { @@ -65,9 +67,11 @@ public extension PlatformClient.ApplicationClient.Share { case count = "count" + case meta = "meta" + } - public init(active: Bool? = nil, attribution: Attribution? = nil, campaign: CampaignShortLink? = nil, count: Int? = nil, enableTracking: Bool? = nil, expireAt: String? = nil, hash: String? = nil, personalized: Bool? = nil, redirects: Redirects? = nil, socialMediaTags: SocialMediaTags? = nil, title: String, url: String) { + public init(active: Bool? = nil, attribution: Attribution? = nil, campaign: CampaignShortLink? = nil, count: Int? = nil, enableTracking: Bool? = nil, expireAt: String? = nil, hash: String? = nil, meta: shortLinkReqMeta? = nil, personalized: Bool? = nil, redirects: Redirects? = nil, socialMediaTags: SocialMediaTags? = nil, title: String, url: String) { self.title = title @@ -93,6 +97,8 @@ public extension PlatformClient.ApplicationClient.Share { self.count = count + self.meta = meta + } required public init(from decoder: Decoder) throws { @@ -228,6 +234,18 @@ public extension PlatformClient.ApplicationClient.Share { } + + do { + meta = try container.decode(shortLinkReqMeta.self, forKey: .meta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -293,6 +311,11 @@ public extension PlatformClient.ApplicationClient.Share { try? container.encodeIfPresent(count, forKey: .count) + + + try? container.encodeIfPresent(meta, forKey: .meta) + + } } diff --git a/Sources/code/platform/Models/Share/UrlInfoSharePlatformModel.swift b/Sources/code/platform/Models/Share/UrlInfoSharePlatformModel.swift index f21e3c9d31..50070da34a 100644 --- a/Sources/code/platform/Models/Share/UrlInfoSharePlatformModel.swift +++ b/Sources/code/platform/Models/Share/UrlInfoSharePlatformModel.swift @@ -20,6 +20,8 @@ public extension PlatformClient.ApplicationClient.Share { public var shortUrl: String? + public var alias: String? + public enum CodingKeys: String, CodingKey { @@ -29,9 +31,11 @@ public extension PlatformClient.ApplicationClient.Share { case shortUrl = "short_url" + case alias = "alias" + } - public init(hash: String? = nil, original: String? = nil, shortUrl: String? = nil) { + public init(alias: String? = nil, hash: String? = nil, original: String? = nil, shortUrl: String? = nil) { self.original = original @@ -39,6 +43,8 @@ public extension PlatformClient.ApplicationClient.Share { self.shortUrl = shortUrl + self.alias = alias + } required public init(from decoder: Decoder) throws { @@ -80,6 +86,18 @@ public extension PlatformClient.ApplicationClient.Share { } + + do { + alias = try container.decode(String.self, forKey: .alias) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -100,6 +118,11 @@ public extension PlatformClient.ApplicationClient.Share { try? container.encodeIfPresent(shortUrl, forKey: .shortUrl) + + + try? container.encodeIfPresent(alias, forKey: .alias) + + } } diff --git a/Sources/code/platform/Models/Share/shortLinkReqMetaSharePlatformModel.swift b/Sources/code/platform/Models/Share/shortLinkReqMetaSharePlatformModel.swift new file mode 100644 index 0000000000..c407a69f5b --- /dev/null +++ b/Sources/code/platform/Models/Share/shortLinkReqMetaSharePlatformModel.swift @@ -0,0 +1,85 @@ + + +import Foundation + + + + +public extension PlatformClient.ApplicationClient.Share { + /* + Model: shortLinkReqMeta + Used By: Share + */ + + class shortLinkReqMeta: Codable { + + + public var forSms: Bool? + + public var smsHeader: String? + + + public enum CodingKeys: String, CodingKey { + + case forSms = "for_sms" + + case smsHeader = "sms_header" + + } + + public init(forSms: Bool? = nil, smsHeader: String? = nil) { + + self.forSms = forSms + + self.smsHeader = smsHeader + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + forSms = try container.decode(Bool.self, forKey: .forSms) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + smsHeader = try container.decode(String.self, forKey: .smsHeader) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(forSms, forKey: .forSms) + + + + + try? container.encodeIfPresent(smsHeader, forKey: .smsHeader) + + + } + + } +} + + diff --git a/Sources/code/platform/Models/Theme/AvailablePageSchemaSectionsThemePlatformModel.swift b/Sources/code/platform/Models/Theme/AvailablePageSchemaSectionsThemePlatformModel.swift index b6f10fdd26..1b5520169b 100644 --- a/Sources/code/platform/Models/Theme/AvailablePageSchemaSectionsThemePlatformModel.swift +++ b/Sources/code/platform/Models/Theme/AvailablePageSchemaSectionsThemePlatformModel.swift @@ -24,7 +24,7 @@ public extension PlatformClient.Theme { public var predicate: AvailablePagePredicate? - public var source: String? + public var source: SectionSource? public enum CodingKeys: String, CodingKey { @@ -41,11 +41,11 @@ public extension PlatformClient.Theme { case predicate = "predicate" - case source = "source" + case source = "__source" } - public init(blocks: [[String: Any]]? = nil, label: String? = nil, name: String? = nil, predicate: AvailablePagePredicate? = nil, preset: [String: Any]? = nil, props: [String: Any]? = nil, source: String? = nil) { + public init(blocks: [[String: Any]]? = nil, label: String? = nil, name: String? = nil, predicate: AvailablePagePredicate? = nil, preset: [String: Any]? = nil, props: [String: Any]? = nil, source: SectionSource? = nil) { self.name = name @@ -140,7 +140,7 @@ public extension PlatformClient.Theme { do { - source = try container.decode(String.self, forKey: .source) + source = try container.decode(SectionSource.self, forKey: .source) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +218,7 @@ public extension PlatformClient.ApplicationClient.Theme { public var predicate: AvailablePagePredicate? - public var source: String? + public var source: SectionSource? public enum CodingKeys: String, CodingKey { @@ -235,11 +235,11 @@ public extension PlatformClient.ApplicationClient.Theme { case predicate = "predicate" - case source = "source" + case source = "__source" } - public init(blocks: [[String: Any]]? = nil, label: String? = nil, name: String? = nil, predicate: AvailablePagePredicate? = nil, preset: [String: Any]? = nil, props: [String: Any]? = nil, source: String? = nil) { + public init(blocks: [[String: Any]]? = nil, label: String? = nil, name: String? = nil, predicate: AvailablePagePredicate? = nil, preset: [String: Any]? = nil, props: [String: Any]? = nil, source: SectionSource? = nil) { self.name = name @@ -334,7 +334,7 @@ public extension PlatformClient.ApplicationClient.Theme { do { - source = try container.decode(String.self, forKey: .source) + source = try container.decode(SectionSource.self, forKey: .source) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Theme/DummyResponseThemePlatformModel.swift b/Sources/code/platform/Models/Theme/DummyThemeThemePlatformModel.swift similarity index 95% rename from Sources/code/platform/Models/Theme/DummyResponseThemePlatformModel.swift rename to Sources/code/platform/Models/Theme/DummyThemeThemePlatformModel.swift index 4010167582..6af6581d19 100644 --- a/Sources/code/platform/Models/Theme/DummyResponseThemePlatformModel.swift +++ b/Sources/code/platform/Models/Theme/DummyThemeThemePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Theme { /* - Model: DummyResponse + Model: DummyTheme Used By: Theme */ - class DummyResponse: Codable { + class DummyTheme: Codable { public var message: String? @@ -61,11 +61,11 @@ public extension PlatformClient.Theme { public extension PlatformClient.ApplicationClient.Theme { /* - Model: DummyResponse + Model: DummyTheme Used By: Theme */ - class DummyResponse: Codable { + class DummyTheme: Codable { public var message: String? diff --git a/Sources/code/platform/Models/Catalog/BrandMediaCatalogPlatformModel.swift b/Sources/code/platform/Models/Theme/SectionSourceThemePlatformModel.swift similarity index 73% rename from Sources/code/platform/Models/Catalog/BrandMediaCatalogPlatformModel.swift rename to Sources/code/platform/Models/Theme/SectionSourceThemePlatformModel.swift index e3d13df9c5..b5e8249b6a 100644 --- a/Sources/code/platform/Models/Catalog/BrandMediaCatalogPlatformModel.swift +++ b/Sources/code/platform/Models/Theme/SectionSourceThemePlatformModel.swift @@ -3,39 +3,39 @@ import Foundation -public extension PlatformClient.Catalog { +public extension PlatformClient.Theme { /* - Model: BrandMedia - Used By: Catalog + Model: SectionSource + Used By: Theme */ - class BrandMedia: Codable { + class SectionSource: Codable { - public var aspectRatio: String? + public var id: String? - public var type: String? + public var bundleName: String? - public var url: String? + public var type: String? public enum CodingKeys: String, CodingKey { - case aspectRatio = "aspect_ratio" + case id = "id" - case type = "type" + case bundleName = "bundle_name" - case url = "url" + case type = "type" } - public init(aspectRatio: String? = nil, type: String? = nil, url: String? = nil) { + public init(bundleName: String? = nil, id: String? = nil, type: String? = nil) { - self.aspectRatio = aspectRatio + self.id = id - self.type = type + self.bundleName = bundleName - self.url = url + self.type = type } @@ -44,7 +44,7 @@ public extension PlatformClient.Catalog { do { - aspectRatio = try container.decode(String.self, forKey: .aspectRatio) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +56,7 @@ public extension PlatformClient.Catalog { do { - type = try container.decode(String.self, forKey: .type) + bundleName = try container.decode(String.self, forKey: .bundleName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ public extension PlatformClient.Catalog { 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) @@ -85,17 +85,17 @@ public extension PlatformClient.Catalog { - try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(bundleName, forKey: .bundleName) - try? container.encodeIfPresent(url, forKey: .url) + try? container.encodeIfPresent(type, forKey: .type) } @@ -105,39 +105,39 @@ public extension PlatformClient.Catalog { -public extension PlatformClient.ApplicationClient.Catalog { +public extension PlatformClient.ApplicationClient.Theme { /* - Model: BrandMedia - Used By: Catalog + Model: SectionSource + Used By: Theme */ - class BrandMedia: Codable { + class SectionSource: Codable { - public var aspectRatio: String? + public var id: String? - public var type: String? + public var bundleName: String? - public var url: String? + public var type: String? public enum CodingKeys: String, CodingKey { - case aspectRatio = "aspect_ratio" + case id = "id" - case type = "type" + case bundleName = "bundle_name" - case url = "url" + case type = "type" } - public init(aspectRatio: String? = nil, type: String? = nil, url: String? = nil) { + public init(bundleName: String? = nil, id: String? = nil, type: String? = nil) { - self.aspectRatio = aspectRatio + self.id = id - self.type = type + self.bundleName = bundleName - self.url = url + self.type = type } @@ -146,7 +146,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - aspectRatio = try container.decode(String.self, forKey: .aspectRatio) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +158,7 @@ public extension PlatformClient.ApplicationClient.Catalog { do { - type = try container.decode(String.self, forKey: .type) + bundleName = try container.decode(String.self, forKey: .bundleName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +170,7 @@ public extension PlatformClient.ApplicationClient.Catalog { 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) @@ -187,17 +187,17 @@ public extension PlatformClient.ApplicationClient.Catalog { - try? container.encodeIfPresent(aspectRatio, forKey: .aspectRatio) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(bundleName, forKey: .bundleName) - try? container.encodeIfPresent(url, forKey: .url) + try? container.encodeIfPresent(type, forKey: .type) } diff --git a/Sources/code/platform/Models/Theme/ThemeUpgradableResponseThemePlatformModel.swift b/Sources/code/platform/Models/Theme/ThemeUpgradableThemePlatformModel.swift similarity index 97% rename from Sources/code/platform/Models/Theme/ThemeUpgradableResponseThemePlatformModel.swift rename to Sources/code/platform/Models/Theme/ThemeUpgradableThemePlatformModel.swift index 3817c9b36f..30e7d0f750 100644 --- a/Sources/code/platform/Models/Theme/ThemeUpgradableResponseThemePlatformModel.swift +++ b/Sources/code/platform/Models/Theme/ThemeUpgradableThemePlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Theme { /* - Model: ThemeUpgradableResponse + Model: ThemeUpgradable Used By: Theme */ - class ThemeUpgradableResponse: Codable { + class ThemeUpgradable: Codable { public var upgrade: Bool? @@ -107,11 +107,11 @@ public extension PlatformClient.Theme { public extension PlatformClient.ApplicationClient.Theme { /* - Model: ThemeUpgradableResponse + Model: ThemeUpgradable Used By: Theme */ - class ThemeUpgradableResponse: Codable { + class ThemeUpgradable: Codable { public var upgrade: Bool? diff --git a/Sources/code/platform/Models/User/CreateUserAttributeRequestUserPlatformModel.swift b/Sources/code/platform/Models/User/CreateUserAttributeUserPlatformModel.swift similarity index 79% rename from Sources/code/platform/Models/User/CreateUserAttributeRequestUserPlatformModel.swift rename to Sources/code/platform/Models/User/CreateUserAttributeUserPlatformModel.swift index 75efd10a63..f0a9037416 100644 --- a/Sources/code/platform/Models/User/CreateUserAttributeRequestUserPlatformModel.swift +++ b/Sources/code/platform/Models/User/CreateUserAttributeUserPlatformModel.swift @@ -7,29 +7,29 @@ import Foundation public extension PlatformClient.ApplicationClient.User { /* - Model: CreateUserAttributeRequest + Model: CreateUserAttribute Used By: User */ - class CreateUserAttributeRequest: Codable { + class CreateUserAttribute: Codable { - public var customerOverriden: Bool? + public var customerOverridden: Bool? public var attribute: [String: Any]? public enum CodingKeys: String, CodingKey { - case customerOverriden = "customer_overriden" + case customerOverridden = "customer_overridden" case attribute = "attribute" } - public init(attribute: [String: Any]? = nil, customerOverriden: Bool? = nil) { + public init(attribute: [String: Any]? = nil, customerOverridden: Bool? = nil) { - self.customerOverriden = customerOverriden + self.customerOverridden = customerOverridden self.attribute = attribute @@ -40,7 +40,7 @@ public extension PlatformClient.ApplicationClient.User { do { - customerOverriden = try container.decode(Bool.self, forKey: .customerOverriden) + customerOverridden = try container.decode(Bool.self, forKey: .customerOverridden) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -69,7 +69,7 @@ public extension PlatformClient.ApplicationClient.User { - try? container.encodeIfPresent(customerOverriden, forKey: .customerOverriden) + try? container.encodeIfPresent(customerOverridden, forKey: .customerOverridden) diff --git a/Sources/code/platform/Models/User/SuccessMessageResponseUserPlatformModel.swift b/Sources/code/platform/Models/User/SuccessMessageUserPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/User/SuccessMessageResponseUserPlatformModel.swift rename to Sources/code/platform/Models/User/SuccessMessageUserPlatformModel.swift index 0351cb01b3..196967edfa 100644 --- a/Sources/code/platform/Models/User/SuccessMessageResponseUserPlatformModel.swift +++ b/Sources/code/platform/Models/User/SuccessMessageUserPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.User { /* - Model: SuccessMessageResponse + Model: SuccessMessage Used By: User */ - class SuccessMessageResponse: Codable { + class SuccessMessage: Codable { public var success: String? diff --git a/Sources/code/platform/Models/User/UserAttributeDefinitionResponseUserPlatformModel.swift b/Sources/code/platform/Models/User/UserAttributeDefinitionDetailsUserPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/User/UserAttributeDefinitionResponseUserPlatformModel.swift rename to Sources/code/platform/Models/User/UserAttributeDefinitionDetailsUserPlatformModel.swift index 27620ec2cd..91d6a9f512 100644 --- a/Sources/code/platform/Models/User/UserAttributeDefinitionResponseUserPlatformModel.swift +++ b/Sources/code/platform/Models/User/UserAttributeDefinitionDetailsUserPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.User { /* - Model: UserAttributeDefinitionResponse + Model: UserAttributeDefinitionDetails Used By: User */ - class UserAttributeDefinitionResponse: Codable { + class UserAttributeDefinitionDetails: Codable { public var id: String? diff --git a/Sources/code/platform/Models/User/UserAttributeResponseUserPlatformModel.swift b/Sources/code/platform/Models/User/UserAttributeUserPlatformModel.swift similarity index 91% rename from Sources/code/platform/Models/User/UserAttributeResponseUserPlatformModel.swift rename to Sources/code/platform/Models/User/UserAttributeUserPlatformModel.swift index 7d155fc6ac..d0426c77a8 100644 --- a/Sources/code/platform/Models/User/UserAttributeResponseUserPlatformModel.swift +++ b/Sources/code/platform/Models/User/UserAttributeUserPlatformModel.swift @@ -7,11 +7,11 @@ import Foundation public extension PlatformClient.ApplicationClient.User { /* - Model: UserAttributeResponse + Model: UserAttribute Used By: User */ - class UserAttributeResponse: Codable { + class UserAttribute: Codable { public var id: String? @@ -24,7 +24,7 @@ public extension PlatformClient.ApplicationClient.User { public var type: String? - public var customerOverriden: Bool? + public var customerOverridden: Bool? public var attribute: [String: Any]? @@ -43,7 +43,7 @@ public extension PlatformClient.ApplicationClient.User { case type = "type" - case customerOverriden = "customer_overriden" + case customerOverridden = "customer_overridden" case attribute = "attribute" @@ -51,7 +51,7 @@ public extension PlatformClient.ApplicationClient.User { } - public init(applicationId: String? = nil, attribute: [String: Any]? = nil, customerOverriden: Bool? = nil, name: String? = nil, type: String? = nil, updatedBy: String? = nil, userId: String? = nil, id: String? = nil) { + public init(applicationId: String? = nil, attribute: [String: Any]? = nil, customerOverridden: Bool? = nil, name: String? = nil, type: String? = nil, updatedBy: String? = nil, userId: String? = nil, id: String? = nil) { self.id = id @@ -63,7 +63,7 @@ public extension PlatformClient.ApplicationClient.User { self.type = type - self.customerOverriden = customerOverriden + self.customerOverridden = customerOverridden self.attribute = attribute @@ -136,7 +136,7 @@ public extension PlatformClient.ApplicationClient.User { do { - customerOverriden = try container.decode(Bool.self, forKey: .customerOverriden) + customerOverridden = try container.decode(Bool.self, forKey: .customerOverridden) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -202,7 +202,7 @@ public extension PlatformClient.ApplicationClient.User { - try? container.encodeIfPresent(customerOverriden, forKey: .customerOverriden) + try? container.encodeIfPresent(customerOverridden, forKey: .customerOverridden) diff --git a/Sources/code/platform/Models/Finance/InvoiceListingPayloadDataFinancePlatformModel.swift b/Sources/code/platform/Models/Webhook/BroadcasterConfigWebhookPlatformModel.swift similarity index 61% rename from Sources/code/platform/Models/Finance/InvoiceListingPayloadDataFinancePlatformModel.swift rename to Sources/code/platform/Models/Webhook/BroadcasterConfigWebhookPlatformModel.swift index fedcfe0dd3..dbf54a3758 100644 --- a/Sources/code/platform/Models/Finance/InvoiceListingPayloadDataFinancePlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/BroadcasterConfigWebhookPlatformModel.swift @@ -3,57 +3,57 @@ import Foundation -public extension PlatformClient.Finance { +public extension PlatformClient.Webhook { /* - Model: InvoiceListingPayloadData - Used By: Finance + Model: BroadcasterConfig + Used By: Webhook */ - class InvoiceListingPayloadData: Codable { + class BroadcasterConfig: Codable { - public var pageSize: Int? + public var topic: String? - public var page: Int? + public var queue: String? - public var startDate: String? + public var eventBridgeName: String? - public var endDate: String? + public var workflowName: String? - public var search: String? + public var accountId: String? - public var filters: InoviceListingPayloadDataFilters? + public var detailType: String? public enum CodingKeys: String, CodingKey { - case pageSize = "page_size" + case topic = "topic" - case page = "page" + case queue = "queue" - case startDate = "start_date" + case eventBridgeName = "event_bridge_name" - case endDate = "end_date" + case workflowName = "workflow_name" - case search = "search" + case accountId = "account_id" - case filters = "filters" + case detailType = "detail_type" } - public init(endDate: String? = nil, filters: InoviceListingPayloadDataFilters? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, startDate: String? = nil) { + public init(accountId: String? = nil, detailType: String? = nil, eventBridgeName: String? = nil, queue: String? = nil, topic: String? = nil, workflowName: String? = nil) { - self.pageSize = pageSize + self.topic = topic - self.page = page + self.queue = queue - self.startDate = startDate + self.eventBridgeName = eventBridgeName - self.endDate = endDate + self.workflowName = workflowName - self.search = search + self.accountId = accountId - self.filters = filters + self.detailType = detailType } @@ -62,7 +62,7 @@ public extension PlatformClient.Finance { do { - pageSize = try container.decode(Int.self, forKey: .pageSize) + topic = try container.decode(String.self, forKey: .topic) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +74,7 @@ public extension PlatformClient.Finance { do { - page = try container.decode(Int.self, forKey: .page) + queue = try container.decode(String.self, forKey: .queue) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,7 +86,7 @@ public extension PlatformClient.Finance { do { - startDate = try container.decode(String.self, forKey: .startDate) + eventBridgeName = try container.decode(String.self, forKey: .eventBridgeName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,7 @@ public extension PlatformClient.Finance { do { - endDate = try container.decode(String.self, forKey: .endDate) + workflowName = try container.decode(String.self, forKey: .workflowName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +110,7 @@ public extension PlatformClient.Finance { do { - search = try container.decode(String.self, forKey: .search) + accountId = try container.decode(String.self, forKey: .accountId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient.Finance { do { - filters = try container.decode(InoviceListingPayloadDataFilters.self, forKey: .filters) + detailType = try container.decode(String.self, forKey: .detailType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -139,32 +139,32 @@ public extension PlatformClient.Finance { - try? container.encodeIfPresent(pageSize, forKey: .pageSize) + try? container.encodeIfPresent(topic, forKey: .topic) - try? container.encodeIfPresent(page, forKey: .page) + try? container.encodeIfPresent(queue, forKey: .queue) - try? container.encodeIfPresent(startDate, forKey: .startDate) + try? container.encodeIfPresent(eventBridgeName, forKey: .eventBridgeName) - try? container.encodeIfPresent(endDate, forKey: .endDate) + try? container.encodeIfPresent(workflowName, forKey: .workflowName) - try? container.encodeIfPresent(search, forKey: .search) + try? container.encodeIfPresent(accountId, forKey: .accountId) - try? container.encodeIfPresent(filters, forKey: .filters) + try? container.encodeIfPresent(detailType, forKey: .detailType) } diff --git a/Sources/code/platform/Models/Cart/UpdateCartRequestCartPlatformModel.swift b/Sources/code/platform/Models/Webhook/EventBridgeConfigWebhookPlatformModel.swift similarity index 58% rename from Sources/code/platform/Models/Cart/UpdateCartRequestCartPlatformModel.swift rename to Sources/code/platform/Models/Webhook/EventBridgeConfigWebhookPlatformModel.swift index ded18ad2d7..bb24fb6da1 100644 --- a/Sources/code/platform/Models/Cart/UpdateCartRequestCartPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/EventBridgeConfigWebhookPlatformModel.swift @@ -3,35 +3,33 @@ import Foundation - - -public extension PlatformClient.ApplicationClient.Cart { +public extension PlatformClient.Webhook { /* - Model: UpdateCartRequest - Used By: Cart + Model: EventBridgeConfig + Used By: Webhook */ - class UpdateCartRequest: Codable { + class EventBridgeConfig: Codable { - public var items: [UpdateProductCart]? + public var type: String? - public var operation: String + public var events: [EventBridgeData] public enum CodingKeys: String, CodingKey { - case items = "items" + case type = "type" - case operation = "operation" + case events = "events" } - public init(items: [UpdateProductCart]? = nil, operation: String) { + public init(events: [EventBridgeData], type: String? = nil) { - self.items = items + self.type = type - self.operation = operation + self.events = events } @@ -40,7 +38,7 @@ public extension PlatformClient.ApplicationClient.Cart { do { - items = try container.decode([UpdateProductCart].self, forKey: .items) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -51,7 +49,7 @@ public extension PlatformClient.ApplicationClient.Cart { - operation = try container.decode(String.self, forKey: .operation) + events = try container.decode([EventBridgeData].self, forKey: .events) @@ -62,12 +60,12 @@ public extension PlatformClient.ApplicationClient.Cart { - try? container.encodeIfPresent(items, forKey: .items) + try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(operation, forKey: .operation) + try? container.encodeIfPresent(events, forKey: .events) } @@ -76,3 +74,5 @@ public extension PlatformClient.ApplicationClient.Cart { } + + diff --git a/Sources/code/platform/Models/Webhook/EventBridgeDataWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/EventBridgeDataWebhookPlatformModel.swift new file mode 100644 index 0000000000..54564f675e --- /dev/null +++ b/Sources/code/platform/Models/Webhook/EventBridgeDataWebhookPlatformModel.swift @@ -0,0 +1,126 @@ + + +import Foundation + + +public extension PlatformClient.Webhook { + /* + Model: EventBridgeData + Used By: Webhook + */ + + class EventBridgeData: Codable { + + + public var eventCategory: String + + public var eventName: String + + public var eventType: String + + public var version: Double + + public var eventBridgeName: String? + + + public enum CodingKeys: String, CodingKey { + + case eventCategory = "event_category" + + case eventName = "event_name" + + case eventType = "event_type" + + case version = "version" + + case eventBridgeName = "event_bridge_name" + + } + + public init(eventBridgeName: String? = nil, eventCategory: String, eventName: String, eventType: String, version: Double) { + + self.eventCategory = eventCategory + + self.eventName = eventName + + self.eventType = eventType + + self.version = version + + self.eventBridgeName = eventBridgeName + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + eventCategory = try container.decode(String.self, forKey: .eventCategory) + + + + + eventName = try container.decode(String.self, forKey: .eventName) + + + + + eventType = try container.decode(String.self, forKey: .eventType) + + + + + version = try container.decode(Double.self, forKey: .version) + + + + + do { + eventBridgeName = try container.decode(String.self, forKey: .eventBridgeName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(eventCategory, forKey: .eventCategory) + + + + + try? container.encodeIfPresent(eventName, forKey: .eventName) + + + + + try? container.encodeIfPresent(eventType, forKey: .eventType) + + + + + try? container.encodeIfPresent(version, forKey: .version) + + + + + try? container.encodeIfPresent(eventBridgeName, forKey: .eventBridgeName) + + + } + + } +} + + + + diff --git a/Sources/code/platform/Models/Webhook/EventConfigResponseWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/EventConfigResultWebhookPlatformModel.swift similarity index 94% rename from Sources/code/platform/Models/Webhook/EventConfigResponseWebhookPlatformModel.swift rename to Sources/code/platform/Models/Webhook/EventConfigResultWebhookPlatformModel.swift index 6805ddd62a..86e1c71bc9 100644 --- a/Sources/code/platform/Models/Webhook/EventConfigResponseWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/EventConfigResultWebhookPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Webhook { /* - Model: EventConfigResponse + Model: EventConfigResult Used By: Webhook */ - class EventConfigResponse: Codable { + class EventConfigResult: Codable { public var eventConfigs: [EventConfig]? diff --git a/Sources/code/platform/Models/Webhook/EventConfigWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/EventConfigWebhookPlatformModel.swift index cce6c7b9b3..813a5a5714 100644 --- a/Sources/code/platform/Models/Webhook/EventConfigWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/EventConfigWebhookPlatformModel.swift @@ -14,12 +14,16 @@ public extension PlatformClient.Webhook { public var id: Int? + public var type: String? + public var eventName: String? public var eventType: String? public var eventCategory: String? + public var modifiedBy: String? + public var subscriberEventMapping: SubscriberEventMapping? public var eventSchema: [String: Any]? @@ -41,12 +45,16 @@ public extension PlatformClient.Webhook { case id = "id" + case type = "type" + case eventName = "event_name" case eventType = "event_type" case eventCategory = "event_category" + case modifiedBy = "modified_by" + case subscriberEventMapping = "subscriber_event_mapping" case eventSchema = "event_schema" @@ -65,16 +73,20 @@ public extension PlatformClient.Webhook { } - public init(createdOn: String? = nil, description: String? = nil, displayName: String? = nil, eventCategory: String? = nil, eventName: String? = nil, eventSchema: [String: Any]? = nil, eventType: String? = nil, group: String? = nil, id: Int? = nil, subscriberEventMapping: SubscriberEventMapping? = nil, updatedOn: String? = nil, version: String? = nil) { + public init(createdOn: String? = nil, description: String? = nil, displayName: String? = nil, eventCategory: String? = nil, eventName: String? = nil, eventSchema: [String: Any]? = nil, eventType: String? = nil, group: String? = nil, id: Int? = nil, modifiedBy: String? = nil, subscriberEventMapping: SubscriberEventMapping? = nil, type: String? = nil, updatedOn: String? = nil, version: String? = nil) { self.id = id + self.type = type + self.eventName = eventName self.eventType = eventType self.eventCategory = eventCategory + self.modifiedBy = modifiedBy + self.subscriberEventMapping = subscriberEventMapping self.eventSchema = eventSchema @@ -109,6 +121,18 @@ public extension PlatformClient.Webhook { + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { eventName = try container.decode(String.self, forKey: .eventName) @@ -145,6 +169,18 @@ public extension PlatformClient.Webhook { + do { + modifiedBy = try container.decode(String.self, forKey: .modifiedBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { subscriberEventMapping = try container.decode(SubscriberEventMapping.self, forKey: .subscriberEventMapping) @@ -252,6 +288,11 @@ public extension PlatformClient.Webhook { + try? container.encodeIfPresent(type, forKey: .type) + + + + try? container.encodeIfPresent(eventName, forKey: .eventName) @@ -267,6 +308,11 @@ public extension PlatformClient.Webhook { + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + + + + try? container.encodeIfPresent(subscriberEventMapping, forKey: .subscriberEventMapping) diff --git a/Sources/code/platform/Models/Finance/GetReportingNestedFiltersFinancePlatformModel.swift b/Sources/code/platform/Models/Webhook/EventMapBodyWebhookPlatformModel.swift similarity index 62% rename from Sources/code/platform/Models/Finance/GetReportingNestedFiltersFinancePlatformModel.swift rename to Sources/code/platform/Models/Webhook/EventMapBodyWebhookPlatformModel.swift index b26a7c76d3..5a907987d3 100644 --- a/Sources/code/platform/Models/Finance/GetReportingNestedFiltersFinancePlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/EventMapBodyWebhookPlatformModel.swift @@ -3,57 +3,57 @@ import Foundation -public extension PlatformClient.Finance { +public extension PlatformClient.Webhook { /* - Model: GetReportingNestedFilters - Used By: Finance + Model: EventMapBody + Used By: Webhook */ - class GetReportingNestedFilters: Codable { + class EventMapBody: Codable { - public var text: String? + public var rest: RestConfig? - public var options: [[String: Any]]? + public var kafka: KafkaConfig? - public var required: Bool? + public var pubSub: PubSubConfig? - public var placeholderText: String? + public var temporal: TemporalConfig? - public var type: String? + public var sqs: SqsConfig? - public var value: String? + public var eventBridge: EventBridgeConfig? public enum CodingKeys: String, CodingKey { - case text = "text" + case rest = "rest" - case options = "options" + case kafka = "kafka" - case required = "required" + case pubSub = "pub_sub" - case placeholderText = "placeholder_text" + case temporal = "temporal" - case type = "type" + case sqs = "sqs" - case value = "value" + case eventBridge = "event_bridge" } - public init(options: [[String: Any]]? = nil, placeholderText: String? = nil, required: Bool? = nil, text: String? = nil, type: String? = nil, value: String? = nil) { + public init(eventBridge: EventBridgeConfig? = nil, kafka: KafkaConfig? = nil, pubSub: PubSubConfig? = nil, rest: RestConfig? = nil, sqs: SqsConfig? = nil, temporal: TemporalConfig? = nil) { - self.text = text + self.rest = rest - self.options = options + self.kafka = kafka - self.required = required + self.pubSub = pubSub - self.placeholderText = placeholderText + self.temporal = temporal - self.type = type + self.sqs = sqs - self.value = value + self.eventBridge = eventBridge } @@ -62,7 +62,7 @@ public extension PlatformClient.Finance { do { - text = try container.decode(String.self, forKey: .text) + rest = try container.decode(RestConfig.self, forKey: .rest) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +74,7 @@ public extension PlatformClient.Finance { do { - options = try container.decode([[String: Any]].self, forKey: .options) + kafka = try container.decode(KafkaConfig.self, forKey: .kafka) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,7 +86,7 @@ public extension PlatformClient.Finance { do { - required = try container.decode(Bool.self, forKey: .required) + pubSub = try container.decode(PubSubConfig.self, forKey: .pubSub) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +98,7 @@ public extension PlatformClient.Finance { do { - placeholderText = try container.decode(String.self, forKey: .placeholderText) + temporal = try container.decode(TemporalConfig.self, forKey: .temporal) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +110,7 @@ public extension PlatformClient.Finance { do { - type = try container.decode(String.self, forKey: .type) + sqs = try container.decode(SqsConfig.self, forKey: .sqs) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +122,7 @@ public extension PlatformClient.Finance { do { - value = try container.decode(String.self, forKey: .value) + eventBridge = try container.decode(EventBridgeConfig.self, forKey: .eventBridge) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -139,32 +139,32 @@ public extension PlatformClient.Finance { - try? container.encodeIfPresent(text, forKey: .text) + try? container.encodeIfPresent(rest, forKey: .rest) - try? container.encodeIfPresent(options, forKey: .options) + try? container.encodeIfPresent(kafka, forKey: .kafka) - try? container.encodeIfPresent(required, forKey: .required) + try? container.encodeIfPresent(pubSub, forKey: .pubSub) - try? container.encodeIfPresent(placeholderText, forKey: .placeholderText) + try? container.encodeIfPresent(temporal, forKey: .temporal) - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(sqs, forKey: .sqs) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(eventBridge, forKey: .eventBridge) } diff --git a/Sources/code/platform/Models/Webhook/EventProcessRequestWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/EventProcessRequestWebhookPlatformModel.swift deleted file mode 100644 index 9c44590736..0000000000 --- a/Sources/code/platform/Models/Webhook/EventProcessRequestWebhookPlatformModel.swift +++ /dev/null @@ -1,163 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Webhook { - /* - Model: EventProcessRequest - Used By: Webhook - */ - - class EventProcessRequest: Codable { - - - public var searchText: String? - - public var endDate: String - - public var startDate: String - - public var subscriberIds: [Int]? - - public var status: String? - - public var event: [Event]? - - - public enum CodingKeys: String, CodingKey { - - case searchText = "search_text" - - case endDate = "end_date" - - case startDate = "start_date" - - case subscriberIds = "subscriber_ids" - - case status = "status" - - case event = "event" - - } - - public init(endDate: String, event: [Event]? = nil, searchText: String? = nil, startDate: String, status: String? = nil, subscriberIds: [Int]? = nil) { - - self.searchText = searchText - - self.endDate = endDate - - self.startDate = startDate - - self.subscriberIds = subscriberIds - - self.status = status - - self.event = event - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - searchText = try container.decode(String.self, forKey: .searchText) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - endDate = try container.decode(String.self, forKey: .endDate) - - - - - startDate = try container.decode(String.self, forKey: .startDate) - - - - - do { - subscriberIds = try container.decode([Int].self, forKey: .subscriberIds) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - event = try container.decode([Event].self, forKey: .event) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(searchText, forKey: .searchText) - - - - - try? container.encodeIfPresent(endDate, forKey: .endDate) - - - - - try? container.encodeIfPresent(startDate, forKey: .startDate) - - - - - try? container.encodeIfPresent(subscriberIds, forKey: .subscriberIds) - - - - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(event, forKey: .event) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Webhook/EventsWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/EventsWebhookPlatformModel.swift index 2abb4672d4..1255446ada 100644 --- a/Sources/code/platform/Models/Webhook/EventsWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/EventsWebhookPlatformModel.swift @@ -16,6 +16,14 @@ public extension PlatformClient.Webhook { public var topic: String? + public var queue: String? + + public var eventBridgeName: String? + + public var workflowName: String? + + public var detailType: String? + public enum CodingKeys: String, CodingKey { @@ -23,14 +31,30 @@ public extension PlatformClient.Webhook { case topic = "topic" + case queue = "queue" + + case eventBridgeName = "event_bridge_name" + + case workflowName = "workflow_name" + + case detailType = "detail_type" + } - public init(slug: String? = nil, topic: String? = nil) { + public init(detailType: String? = nil, eventBridgeName: String? = nil, queue: String? = nil, slug: String? = nil, topic: String? = nil, workflowName: String? = nil) { self.slug = slug self.topic = topic + self.queue = queue + + self.eventBridgeName = eventBridgeName + + self.workflowName = workflowName + + self.detailType = detailType + } required public init(from decoder: Decoder) throws { @@ -60,6 +84,54 @@ public extension PlatformClient.Webhook { } + + do { + queue = try container.decode(String.self, forKey: .queue) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + eventBridgeName = try container.decode(String.self, forKey: .eventBridgeName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + workflowName = try container.decode(String.self, forKey: .workflowName) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + detailType = try container.decode(String.self, forKey: .detailType) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { @@ -75,6 +147,26 @@ public extension PlatformClient.Webhook { try? container.encodeIfPresent(topic, forKey: .topic) + + + try? container.encodeIfPresent(queue, forKey: .queue) + + + + + try? container.encodeIfPresent(eventBridgeName, forKey: .eventBridgeName) + + + + + try? container.encodeIfPresent(workflowName, forKey: .workflowName) + + + + + try? container.encodeIfPresent(detailType, forKey: .detailType) + + } } diff --git a/Sources/code/platform/Models/Webhook/HistoryAssociationWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/HistoryAssociationWebhookPlatformModel.swift deleted file mode 100644 index a4cd64edf7..0000000000 --- a/Sources/code/platform/Models/Webhook/HistoryAssociationWebhookPlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Webhook { - /* - Model: HistoryAssociation - Used By: Webhook - */ - - class HistoryAssociation: Codable { - - - public var companyId: Int? - - public var subscriberIds: [Int]? - - - public enum CodingKeys: String, CodingKey { - - case companyId = "company_id" - - case subscriberIds = "subscriber_ids" - - } - - public init(companyId: Int? = nil, subscriberIds: [Int]? = nil) { - - self.companyId = companyId - - self.subscriberIds = subscriberIds - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - 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 { - - } - - - - do { - subscriberIds = try container.decode([Int].self, forKey: .subscriberIds) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(companyId, forKey: .companyId) - - - - - try? container.encodeIfPresent(subscriberIds, forKey: .subscriberIds) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Webhook/HistoryFiltersWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/HistoryFiltersWebhookPlatformModel.swift deleted file mode 100644 index 1e43dc8026..0000000000 --- a/Sources/code/platform/Models/Webhook/HistoryFiltersWebhookPlatformModel.swift +++ /dev/null @@ -1,200 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Webhook { - /* - Model: HistoryFilters - Used By: Webhook - */ - - class HistoryFilters: Codable { - - - public var events: [String]? - - public var searchText: String? - - public var status: String? - - public var endDate: String? - - public var startDate: String? - - public var subscribers: [Int]? - - public var webhookType: [String]? - - - public enum CodingKeys: String, CodingKey { - - case events = "events" - - case searchText = "search_text" - - case status = "status" - - case endDate = "end_date" - - case startDate = "start_date" - - case subscribers = "subscribers" - - case webhookType = "webhook_type" - - } - - public init(endDate: String? = nil, events: [String]? = nil, searchText: String? = nil, startDate: String? = nil, status: String? = nil, subscribers: [Int]? = nil, webhookType: [String]? = nil) { - - self.events = events - - self.searchText = searchText - - self.status = status - - self.endDate = endDate - - self.startDate = startDate - - self.subscribers = subscribers - - self.webhookType = webhookType - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - events = try container.decode([String].self, forKey: .events) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - searchText = try container.decode(String.self, forKey: .searchText) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - 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 { - - } - - - - do { - endDate = try container.decode(String.self, forKey: .endDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - startDate = try container.decode(String.self, forKey: .startDate) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - subscribers = try container.decode([Int].self, forKey: .subscribers) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - webhookType = try container.decode([String].self, forKey: .webhookType) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(events, forKey: .events) - - - - - try? container.encodeIfPresent(searchText, forKey: .searchText) - - - - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(endDate, forKey: .endDate) - - - - - try? container.encodeIfPresent(startDate, forKey: .startDate) - - - - - try? container.encodeIfPresent(subscribers, forKey: .subscribers) - - - - - try? container.encodeIfPresent(webhookType, forKey: .webhookType) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Webhook/HistoryPayloadWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/HistoryPayloadWebhookPlatformModel.swift deleted file mode 100644 index 0f94e5570f..0000000000 --- a/Sources/code/platform/Models/Webhook/HistoryPayloadWebhookPlatformModel.swift +++ /dev/null @@ -1,101 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Webhook { - /* - Model: HistoryPayload - Used By: Webhook - */ - - class HistoryPayload: Codable { - - - public var type: String - - public var pageNo: Int? - - public var pageSize: Int? - - - public enum CodingKeys: String, CodingKey { - - case type = "type" - - case pageNo = "page_no" - - case pageSize = "page_size" - - } - - public init(pageNo: Int? = nil, pageSize: Int? = nil, type: String) { - - self.type = type - - self.pageNo = pageNo - - self.pageSize = pageSize - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - type = try container.decode(String.self, forKey: .type) - - - - - do { - pageNo = try container.decode(Int.self, forKey: .pageNo) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - pageSize = try container.decode(Int.self, forKey: .pageSize) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(type, forKey: .type) - - - - - try? container.encodeIfPresent(pageNo, forKey: .pageNo) - - - - - try? container.encodeIfPresent(pageSize, forKey: .pageSize) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Webhook/DownloadReportResponseWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/KafkaConfigWebhookPlatformModel.swift similarity index 56% rename from Sources/code/platform/Models/Webhook/DownloadReportResponseWebhookPlatformModel.swift rename to Sources/code/platform/Models/Webhook/KafkaConfigWebhookPlatformModel.swift index 1cc7ffd600..97d04c2019 100644 --- a/Sources/code/platform/Models/Webhook/DownloadReportResponseWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/KafkaConfigWebhookPlatformModel.swift @@ -5,25 +5,31 @@ import Foundation public extension PlatformClient.Webhook { /* - Model: DownloadReportResponse + Model: KafkaConfig Used By: Webhook */ - class DownloadReportResponse: Codable { + class KafkaConfig: Codable { - public var fileName: String? + public var type: String? + + public var events: [QueueEventData] public enum CodingKeys: String, CodingKey { - case fileName = "file_name" + case type = "type" + + case events = "events" } - public init(fileName: String? = nil) { + public init(events: [QueueEventData], type: String? = nil) { + + self.type = type - self.fileName = fileName + self.events = events } @@ -32,7 +38,7 @@ public extension PlatformClient.Webhook { do { - fileName = try container.decode(String.self, forKey: .fileName) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,6 +48,11 @@ public extension PlatformClient.Webhook { } + + events = try container.decode([QueueEventData].self, forKey: .events) + + + } public func encode(to encoder: Encoder) throws { @@ -49,7 +60,12 @@ public extension PlatformClient.Webhook { - try? container.encodeIfPresent(fileName, forKey: .fileName) + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(events, forKey: .events) } diff --git a/Sources/code/platform/Models/Webhook/PingWebhookResponseWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/PingWebhookResponseWebhookPlatformModel.swift deleted file mode 100644 index 72fbde8665..0000000000 --- a/Sources/code/platform/Models/Webhook/PingWebhookResponseWebhookPlatformModel.swift +++ /dev/null @@ -1,108 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Webhook { - /* - Model: PingWebhookResponse - Used By: Webhook - */ - - class PingWebhookResponse: Codable { - - - public var status: String? - - public var message: String? - - public var code: Int? - - - public enum CodingKeys: String, CodingKey { - - case status = "status" - - case message = "message" - - case code = "code" - - } - - public init(code: Int? = nil, message: String? = nil, status: String? = nil) { - - self.status = status - - self.message = message - - self.code = code - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - 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 { - - } - - - - do { - message = try container.decode(String.self, forKey: .message) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - code = try container.decode(Int.self, forKey: .code) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(message, forKey: .message) - - - - - try? container.encodeIfPresent(code, forKey: .code) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Webhook/PubSubConfigWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/PubSubConfigWebhookPlatformModel.swift new file mode 100644 index 0000000000..6e4e3a5237 --- /dev/null +++ b/Sources/code/platform/Models/Webhook/PubSubConfigWebhookPlatformModel.swift @@ -0,0 +1,78 @@ + + +import Foundation + + +public extension PlatformClient.Webhook { + /* + Model: PubSubConfig + Used By: Webhook + */ + + class PubSubConfig: Codable { + + + public var type: String? + + public var events: [QueueEventData] + + + public enum CodingKeys: String, CodingKey { + + case type = "type" + + case events = "events" + + } + + public init(events: [QueueEventData], type: String? = nil) { + + self.type = type + + self.events = events + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + events = try container.decode([QueueEventData].self, forKey: .events) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(events, forKey: .events) + + + } + + } +} + + + + diff --git a/Sources/code/platform/Models/Webhook/QueueEventDataWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/QueueEventDataWebhookPlatformModel.swift new file mode 100644 index 0000000000..aa3538185d --- /dev/null +++ b/Sources/code/platform/Models/Webhook/QueueEventDataWebhookPlatformModel.swift @@ -0,0 +1,119 @@ + + +import Foundation + + +public extension PlatformClient.Webhook { + /* + Model: QueueEventData + Used By: Webhook + */ + + class QueueEventData: Codable { + + + public var eventCategory: String + + public var eventName: String + + public var eventType: String + + public var version: Double + + public var topic: String + + + public enum CodingKeys: String, CodingKey { + + case eventCategory = "event_category" + + case eventName = "event_name" + + case eventType = "event_type" + + case version = "version" + + case topic = "topic" + + } + + public init(eventCategory: String, eventName: String, eventType: String, topic: String, version: Double) { + + self.eventCategory = eventCategory + + self.eventName = eventName + + self.eventType = eventType + + self.version = version + + self.topic = topic + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + eventCategory = try container.decode(String.self, forKey: .eventCategory) + + + + + eventName = try container.decode(String.self, forKey: .eventName) + + + + + eventType = try container.decode(String.self, forKey: .eventType) + + + + + version = try container.decode(Double.self, forKey: .version) + + + + + topic = try container.decode(String.self, forKey: .topic) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(eventCategory, forKey: .eventCategory) + + + + + try? container.encodeIfPresent(eventName, forKey: .eventName) + + + + + try? container.encodeIfPresent(eventType, forKey: .eventType) + + + + + try? container.encodeIfPresent(version, forKey: .version) + + + + + try? container.encodeIfPresent(topic, forKey: .topic) + + + } + + } +} + + + + diff --git a/Sources/code/platform/Models/Webhook/ReportFilterResponseWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/ReportFilterResponseWebhookPlatformModel.swift deleted file mode 100644 index a2898bcbc0..0000000000 --- a/Sources/code/platform/Models/Webhook/ReportFilterResponseWebhookPlatformModel.swift +++ /dev/null @@ -1,85 +0,0 @@ - - -import Foundation - - -public extension PlatformClient.Webhook { - /* - Model: ReportFilterResponse - Used By: Webhook - */ - - class ReportFilterResponse: Codable { - - - public var filterName: String? - - public var values: [[String: Any]]? - - - public enum CodingKeys: String, CodingKey { - - case filterName = "filter_name" - - case values = "values" - - } - - public init(filterName: String? = nil, values: [[String: Any]]? = nil) { - - self.filterName = filterName - - self.values = values - - } - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - - do { - filterName = try container.decode(String.self, forKey: .filterName) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - values = try container.decode([[String: Any]].self, forKey: .values) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - - - try? container.encodeIfPresent(filterName, forKey: .filterName) - - - - - try? container.encodeIfPresent(values, forKey: .values) - - - } - - } -} - - - - diff --git a/Sources/code/platform/Models/Webhook/PingWebhookWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/RestConfigWebhookPlatformModel.swift similarity index 68% rename from Sources/code/platform/Models/Webhook/PingWebhookWebhookPlatformModel.swift rename to Sources/code/platform/Models/Webhook/RestConfigWebhookPlatformModel.swift index 98657db3c1..56d88f07a9 100644 --- a/Sources/code/platform/Models/Webhook/PingWebhookWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/RestConfigWebhookPlatformModel.swift @@ -5,38 +5,50 @@ import Foundation public extension PlatformClient.Webhook { /* - Model: PingWebhook + Model: RestConfig Used By: Webhook */ - class PingWebhook: Codable { + class RestConfig: Codable { public var webhookUrl: String - public var authMeta: [String: Any]? + public var type: String public var customHeaders: [String: Any]? + public var authMeta: AuthMeta? + + public var events: [RestEventData] + public enum CodingKeys: String, CodingKey { case webhookUrl = "webhook_url" - case authMeta = "auth_meta" + case type = "type" case customHeaders = "custom_headers" + case authMeta = "auth_meta" + + case events = "events" + } - public init(authMeta: [String: Any]? = nil, customHeaders: [String: Any]? = nil, webhookUrl: String) { + public init(authMeta: AuthMeta? = nil, customHeaders: [String: Any]? = nil, events: [RestEventData], type: String, webhookUrl: String) { self.webhookUrl = webhookUrl - self.authMeta = authMeta + self.type = type self.customHeaders = customHeaders + self.authMeta = authMeta + + self.events = events + } required public init(from decoder: Decoder) throws { @@ -48,8 +60,13 @@ public extension PlatformClient.Webhook { + type = try container.decode(String.self, forKey: .type) + + + + do { - authMeta = try container.decode([String: Any].self, forKey: .authMeta) + customHeaders = try container.decode([String: Any].self, forKey: .customHeaders) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -61,7 +78,7 @@ public extension PlatformClient.Webhook { do { - customHeaders = try container.decode([String: Any].self, forKey: .customHeaders) + authMeta = try container.decode(AuthMeta.self, forKey: .authMeta) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -71,6 +88,11 @@ public extension PlatformClient.Webhook { } + + events = try container.decode([RestEventData].self, forKey: .events) + + + } public func encode(to encoder: Encoder) throws { @@ -83,7 +105,7 @@ public extension PlatformClient.Webhook { - try? container.encodeIfPresent(authMeta, forKey: .authMeta) + try? container.encodeIfPresent(type, forKey: .type) @@ -91,6 +113,16 @@ public extension PlatformClient.Webhook { try? container.encodeIfPresent(customHeaders, forKey: .customHeaders) + + + try? container.encodeIfPresent(authMeta, forKey: .authMeta) + + + + + try? container.encodeIfPresent(events, forKey: .events) + + } } diff --git a/Sources/code/platform/Models/Webhook/RestEventDataWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/RestEventDataWebhookPlatformModel.swift new file mode 100644 index 0000000000..5d61d7f07c --- /dev/null +++ b/Sources/code/platform/Models/Webhook/RestEventDataWebhookPlatformModel.swift @@ -0,0 +1,103 @@ + + +import Foundation + + +public extension PlatformClient.Webhook { + /* + Model: RestEventData + Used By: Webhook + */ + + class RestEventData: Codable { + + + public var eventCategory: String + + public var eventName: String + + public var eventType: String + + public var version: Double + + + public enum CodingKeys: String, CodingKey { + + case eventCategory = "event_category" + + case eventName = "event_name" + + case eventType = "event_type" + + case version = "version" + + } + + public init(eventCategory: String, eventName: String, eventType: String, version: Double) { + + self.eventCategory = eventCategory + + self.eventName = eventName + + self.eventType = eventType + + self.version = version + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + eventCategory = try container.decode(String.self, forKey: .eventCategory) + + + + + eventName = try container.decode(String.self, forKey: .eventName) + + + + + eventType = try container.decode(String.self, forKey: .eventType) + + + + + version = try container.decode(Double.self, forKey: .version) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(eventCategory, forKey: .eventCategory) + + + + + try? container.encodeIfPresent(eventName, forKey: .eventName) + + + + + try? container.encodeIfPresent(eventType, forKey: .eventType) + + + + + try? container.encodeIfPresent(version, forKey: .version) + + + } + + } +} + + + + diff --git a/Sources/code/platform/Models/Webhook/CancelResponseWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/SqsConfigWebhookPlatformModel.swift similarity index 57% rename from Sources/code/platform/Models/Webhook/CancelResponseWebhookPlatformModel.swift rename to Sources/code/platform/Models/Webhook/SqsConfigWebhookPlatformModel.swift index c2a1330e9d..4007304a52 100644 --- a/Sources/code/platform/Models/Webhook/CancelResponseWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/SqsConfigWebhookPlatformModel.swift @@ -5,25 +5,31 @@ import Foundation public extension PlatformClient.Webhook { /* - Model: CancelResponse + Model: SqsConfig Used By: Webhook */ - class CancelResponse: Codable { + class SqsConfig: Codable { - public var message: String? + public var type: String? + + public var events: [SqsEventData] public enum CodingKeys: String, CodingKey { - case message = "message" + case type = "type" + + case events = "events" } - public init(message: String? = nil) { + public init(events: [SqsEventData], type: String? = nil) { + + self.type = type - self.message = message + self.events = events } @@ -32,7 +38,7 @@ public extension PlatformClient.Webhook { do { - message = try container.decode(String.self, forKey: .message) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -42,6 +48,11 @@ public extension PlatformClient.Webhook { } + + events = try container.decode([SqsEventData].self, forKey: .events) + + + } public func encode(to encoder: Encoder) throws { @@ -49,7 +60,12 @@ public extension PlatformClient.Webhook { - try? container.encodeIfPresent(message, forKey: .message) + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(events, forKey: .events) } diff --git a/Sources/code/platform/Models/Webhook/SqsEventDataWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/SqsEventDataWebhookPlatformModel.swift new file mode 100644 index 0000000000..ae7228d3c8 --- /dev/null +++ b/Sources/code/platform/Models/Webhook/SqsEventDataWebhookPlatformModel.swift @@ -0,0 +1,126 @@ + + +import Foundation + + +public extension PlatformClient.Webhook { + /* + Model: SqsEventData + Used By: Webhook + */ + + class SqsEventData: Codable { + + + public var eventCategory: String + + public var eventName: String + + public var eventType: String + + public var version: Double + + public var queue: String? + + + public enum CodingKeys: String, CodingKey { + + case eventCategory = "event_category" + + case eventName = "event_name" + + case eventType = "event_type" + + case version = "version" + + case queue = "queue" + + } + + public init(eventCategory: String, eventName: String, eventType: String, queue: String? = nil, version: Double) { + + self.eventCategory = eventCategory + + self.eventName = eventName + + self.eventType = eventType + + self.version = version + + self.queue = queue + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + eventCategory = try container.decode(String.self, forKey: .eventCategory) + + + + + eventName = try container.decode(String.self, forKey: .eventName) + + + + + eventType = try container.decode(String.self, forKey: .eventType) + + + + + version = try container.decode(Double.self, forKey: .version) + + + + + do { + queue = try container.decode(String.self, forKey: .queue) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(eventCategory, forKey: .eventCategory) + + + + + try? container.encodeIfPresent(eventName, forKey: .eventName) + + + + + try? container.encodeIfPresent(eventType, forKey: .eventType) + + + + + try? container.encodeIfPresent(version, forKey: .version) + + + + + try? container.encodeIfPresent(queue, forKey: .queue) + + + } + + } +} + + + + diff --git a/Sources/code/platform/Models/Webhook/SubscriberConfigListWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/SubscriberConfigListWebhookPlatformModel.swift index a4507ddf71..7d666b8ea0 100644 --- a/Sources/code/platform/Models/Webhook/SubscriberConfigListWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/SubscriberConfigListWebhookPlatformModel.swift @@ -12,7 +12,7 @@ public extension PlatformClient.Webhook { class SubscriberConfigList: Codable { - public var items: [SubscriberResponse]? + public var items: [SubscriberDetails]? public var page: Page? @@ -25,7 +25,7 @@ public extension PlatformClient.Webhook { } - public init(items: [SubscriberResponse]? = nil, page: Page? = nil) { + public init(items: [SubscriberDetails]? = nil, page: Page? = nil) { self.items = items @@ -38,7 +38,7 @@ public extension PlatformClient.Webhook { do { - items = try container.decode([SubscriberResponse].self, forKey: .items) + items = try container.decode([SubscriberDetails].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) diff --git a/Sources/code/platform/Models/Webhook/SubscriberConfigPostRequestV2WebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/SubscriberConfigPostRequestV2WebhookPlatformModel.swift index 9e62596ee3..51aa0a7869 100644 --- a/Sources/code/platform/Models/Webhook/SubscriberConfigPostRequestV2WebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/SubscriberConfigPostRequestV2WebhookPlatformModel.swift @@ -14,6 +14,8 @@ public extension PlatformClient.Webhook { public var name: String + public var type: String? + public var webhookUrl: String? public var provider: String @@ -35,6 +37,8 @@ public extension PlatformClient.Webhook { case name = "name" + case type = "type" + case webhookUrl = "webhook_url" case provider = "provider" @@ -53,10 +57,12 @@ public extension PlatformClient.Webhook { } - public init(association: Association, authMeta: AuthMeta? = nil, customHeaders: [String: Any]? = nil, emailId: String, events: [Events], name: String, provider: String, status: SubscriberStatus, webhookUrl: String? = nil) { + public init(association: Association, authMeta: AuthMeta? = nil, customHeaders: [String: Any]? = nil, emailId: String, events: [Events], name: String, provider: String, status: SubscriberStatus, type: String? = nil, webhookUrl: String? = nil) { self.name = name + self.type = type + self.webhookUrl = webhookUrl self.provider = provider @@ -84,6 +90,18 @@ public extension PlatformClient.Webhook { + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { webhookUrl = try container.decode(String.self, forKey: .webhookUrl) @@ -156,6 +174,11 @@ public extension PlatformClient.Webhook { + try? container.encodeIfPresent(type, forKey: .type) + + + + try? container.encodeIfPresent(webhookUrl, forKey: .webhookUrl) diff --git a/Sources/code/platform/Models/Webhook/SubscriberConfigPostWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/SubscriberConfigPostWebhookPlatformModel.swift index 35b68b2931..33e710d92c 100644 --- a/Sources/code/platform/Models/Webhook/SubscriberConfigPostWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/SubscriberConfigPostWebhookPlatformModel.swift @@ -14,6 +14,8 @@ public extension PlatformClient.Webhook { public var name: String + public var type: String? + public var webhookUrl: String public var association: Association @@ -33,6 +35,8 @@ public extension PlatformClient.Webhook { case name = "name" + case type = "type" + case webhookUrl = "webhook_url" case association = "association" @@ -49,10 +53,12 @@ public extension PlatformClient.Webhook { } - public init(association: Association, authMeta: AuthMeta? = nil, customHeaders: [String: Any]? = nil, emailId: String, eventId: [Int], name: String, status: SubscriberStatus, webhookUrl: String) { + public init(association: Association, authMeta: AuthMeta? = nil, customHeaders: [String: Any]? = nil, emailId: String, eventId: [Int], name: String, status: SubscriberStatus, type: String? = nil, webhookUrl: String) { self.name = name + self.type = type + self.webhookUrl = webhookUrl self.association = association @@ -78,6 +84,18 @@ public extension PlatformClient.Webhook { + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + webhookUrl = try container.decode(String.self, forKey: .webhookUrl) @@ -138,6 +156,11 @@ public extension PlatformClient.Webhook { + try? container.encodeIfPresent(type, forKey: .type) + + + + try? container.encodeIfPresent(webhookUrl, forKey: .webhookUrl) diff --git a/Sources/code/platform/Models/Webhook/SubscriberConfigResponseWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/SubscriberConfigResultWebhookPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Webhook/SubscriberConfigResponseWebhookPlatformModel.swift rename to Sources/code/platform/Models/Webhook/SubscriberConfigResultWebhookPlatformModel.swift index 8374e9b9b8..82819df2d1 100644 --- a/Sources/code/platform/Models/Webhook/SubscriberConfigResponseWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/SubscriberConfigResultWebhookPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Webhook { /* - Model: SubscriberConfigResponse + Model: SubscriberConfigResult Used By: Webhook */ - class SubscriberConfigResponse: Codable { + class SubscriberConfigResult: Codable { public var id: Int? diff --git a/Sources/code/platform/Models/Webhook/SubscriberConfigUpdateRequestV2WebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/SubscriberConfigUpdateRequestV2WebhookPlatformModel.swift index 17cc1504ad..8c9b2ebf7a 100644 --- a/Sources/code/platform/Models/Webhook/SubscriberConfigUpdateRequestV2WebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/SubscriberConfigUpdateRequestV2WebhookPlatformModel.swift @@ -16,6 +16,8 @@ public extension PlatformClient.Webhook { public var name: String? + public var type: String? + public var webhookUrl: String? public var provider: String @@ -39,6 +41,8 @@ public extension PlatformClient.Webhook { case name = "name" + case type = "type" + case webhookUrl = "webhook_url" case provider = "provider" @@ -57,12 +61,14 @@ public extension PlatformClient.Webhook { } - public init(association: Association? = nil, authMeta: AuthMeta? = nil, customHeaders: [String: Any]? = nil, emailId: String? = nil, events: [Events]? = nil, id: Int, name: String? = nil, provider: String, status: SubscriberStatus, webhookUrl: String? = nil) { + public init(association: Association? = nil, authMeta: AuthMeta? = nil, customHeaders: [String: Any]? = nil, emailId: String? = nil, events: [Events]? = nil, id: Int, name: String? = nil, provider: String, status: SubscriberStatus, type: String? = nil, webhookUrl: String? = nil) { self.id = id self.name = name + self.type = type + self.webhookUrl = webhookUrl self.provider = provider @@ -102,6 +108,18 @@ public extension PlatformClient.Webhook { + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { webhookUrl = try container.decode(String.self, forKey: .webhookUrl) @@ -200,6 +218,11 @@ public extension PlatformClient.Webhook { + try? container.encodeIfPresent(type, forKey: .type) + + + + try? container.encodeIfPresent(webhookUrl, forKey: .webhookUrl) diff --git a/Sources/code/platform/Models/Webhook/SubscriberConfigUpdateWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/SubscriberConfigUpdateWebhookPlatformModel.swift index 0b7c172f38..196ea6b425 100644 --- a/Sources/code/platform/Models/Webhook/SubscriberConfigUpdateWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/SubscriberConfigUpdateWebhookPlatformModel.swift @@ -16,6 +16,8 @@ public extension PlatformClient.Webhook { public var name: String? + public var type: String? + public var webhookUrl: String? public var association: Association? @@ -37,6 +39,8 @@ public extension PlatformClient.Webhook { case name = "name" + case type = "type" + case webhookUrl = "webhook_url" case association = "association" @@ -53,12 +57,14 @@ public extension PlatformClient.Webhook { } - public init(association: Association? = nil, authMeta: AuthMeta? = nil, customHeaders: [String: Any]? = nil, emailId: String? = nil, eventId: [Int], id: Int, name: String? = nil, status: SubscriberStatus? = nil, webhookUrl: String? = nil) { + public init(association: Association? = nil, authMeta: AuthMeta? = nil, customHeaders: [String: Any]? = nil, emailId: String? = nil, eventId: [Int], id: Int, name: String? = nil, status: SubscriberStatus? = nil, type: String? = nil, webhookUrl: String? = nil) { self.id = id self.name = name + self.type = type + self.webhookUrl = webhookUrl self.association = association @@ -96,6 +102,18 @@ public extension PlatformClient.Webhook { + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + do { webhookUrl = try container.decode(String.self, forKey: .webhookUrl) @@ -189,6 +207,11 @@ public extension PlatformClient.Webhook { + try? container.encodeIfPresent(type, forKey: .type) + + + + try? container.encodeIfPresent(webhookUrl, forKey: .webhookUrl) diff --git a/Sources/code/platform/Models/Webhook/SubscriberResponseWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/SubscriberDetailsWebhookPlatformModel.swift similarity index 99% rename from Sources/code/platform/Models/Webhook/SubscriberResponseWebhookPlatformModel.swift rename to Sources/code/platform/Models/Webhook/SubscriberDetailsWebhookPlatformModel.swift index 17dc205fb8..2678566b22 100644 --- a/Sources/code/platform/Models/Webhook/SubscriberResponseWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/SubscriberDetailsWebhookPlatformModel.swift @@ -5,11 +5,11 @@ import Foundation public extension PlatformClient.Webhook { /* - Model: SubscriberResponse + Model: SubscriberDetails Used By: Webhook */ - class SubscriberResponse: Codable { + class SubscriberDetails: Codable { public var id: Int? diff --git a/Sources/code/platform/Models/Webhook/SubscriberEventMappingWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/SubscriberEventMappingWebhookPlatformModel.swift index 7f0ed536db..19468938c1 100644 --- a/Sources/code/platform/Models/Webhook/SubscriberEventMappingWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/SubscriberEventMappingWebhookPlatformModel.swift @@ -18,7 +18,7 @@ public extension PlatformClient.Webhook { public var subscriberId: Double? - public var topic: String? + public var broadcasterConfig: BroadcasterConfig? public var createdOn: String? @@ -31,13 +31,13 @@ public extension PlatformClient.Webhook { case subscriberId = "subscriber_id" - case topic = "topic" + case broadcasterConfig = "broadcaster_config" case createdOn = "created_on" } - public init(createdOn: String? = nil, eventId: Double? = nil, id: Double? = nil, subscriberId: Double? = nil, topic: String? = nil) { + public init(broadcasterConfig: BroadcasterConfig? = nil, createdOn: String? = nil, eventId: Double? = nil, id: Double? = nil, subscriberId: Double? = nil) { self.id = id @@ -45,7 +45,7 @@ public extension PlatformClient.Webhook { self.subscriberId = subscriberId - self.topic = topic + self.broadcasterConfig = broadcasterConfig self.createdOn = createdOn @@ -92,7 +92,7 @@ public extension PlatformClient.Webhook { do { - topic = try container.decode(String.self, forKey: .topic) + broadcasterConfig = try container.decode(BroadcasterConfig.self, forKey: .broadcasterConfig) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -136,7 +136,7 @@ public extension PlatformClient.Webhook { - try? container.encodeIfPresent(topic, forKey: .topic) + try? container.encodeIfPresent(broadcasterConfig, forKey: .broadcasterConfig) diff --git a/Sources/code/platform/Models/Webhook/TemporalConfigWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/TemporalConfigWebhookPlatformModel.swift new file mode 100644 index 0000000000..0d24de2868 --- /dev/null +++ b/Sources/code/platform/Models/Webhook/TemporalConfigWebhookPlatformModel.swift @@ -0,0 +1,78 @@ + + +import Foundation + + +public extension PlatformClient.Webhook { + /* + Model: TemporalConfig + Used By: Webhook + */ + + class TemporalConfig: Codable { + + + public var type: String? + + public var events: [TemporalEventData] + + + public enum CodingKeys: String, CodingKey { + + case type = "type" + + case events = "events" + + } + + public init(events: [TemporalEventData], type: String? = nil) { + + self.type = type + + self.events = events + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + events = try container.decode([TemporalEventData].self, forKey: .events) + + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + + try? container.encodeIfPresent(events, forKey: .events) + + + } + + } +} + + + + diff --git a/Sources/code/platform/Models/Webhook/EventWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/TemporalEventDataWebhookPlatformModel.swift similarity index 60% rename from Sources/code/platform/Models/Webhook/EventWebhookPlatformModel.swift rename to Sources/code/platform/Models/Webhook/TemporalEventDataWebhookPlatformModel.swift index 15048d6346..64230beed3 100644 --- a/Sources/code/platform/Models/Webhook/EventWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/TemporalEventDataWebhookPlatformModel.swift @@ -5,76 +5,84 @@ import Foundation public extension PlatformClient.Webhook { /* - Model: Event + Model: TemporalEventData Used By: Webhook */ - class Event: Codable { + class TemporalEventData: Codable { - public var eventName: String? + public var eventCategory: String - public var eventType: String? + public var eventName: String - public var eventCategory: String? + public var eventType: String - public var version: String? + public var version: Double + + public var queue: String? + + public var workflowName: String? public enum CodingKeys: String, CodingKey { + case eventCategory = "event_category" + case eventName = "event_name" case eventType = "event_type" - case eventCategory = "event_category" - case version = "version" + case queue = "queue" + + case workflowName = "workflow_name" + } - public init(eventCategory: String? = nil, eventName: String? = nil, eventType: String? = nil, version: String? = nil) { + public init(eventCategory: String, eventName: String, eventType: String, queue: String? = nil, version: Double, workflowName: String? = nil) { + + self.eventCategory = eventCategory self.eventName = eventName self.eventType = eventType - self.eventCategory = eventCategory - self.version = version + self.queue = queue + + self.workflowName = workflowName + } required public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - do { - eventName = try container.decode(String.self, forKey: .eventName) + eventCategory = try container.decode(String.self, forKey: .eventCategory) - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } + + + + eventName = try container.decode(String.self, forKey: .eventName) - do { - eventType = try container.decode(String.self, forKey: .eventType) + + eventType = try container.decode(String.self, forKey: .eventType) - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } + + + + version = try container.decode(Double.self, forKey: .version) + do { - eventCategory = try container.decode(String.self, forKey: .eventCategory) + queue = try container.decode(String.self, forKey: .queue) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,7 +94,7 @@ public extension PlatformClient.Webhook { do { - version = try container.decode(String.self, forKey: .version) + workflowName = try container.decode(String.self, forKey: .workflowName) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -103,6 +111,11 @@ public extension PlatformClient.Webhook { + try? container.encodeIfPresent(eventCategory, forKey: .eventCategory) + + + + try? container.encodeIfPresent(eventName, forKey: .eventName) @@ -113,12 +126,17 @@ public extension PlatformClient.Webhook { - try? container.encodeIfPresent(eventCategory, forKey: .eventCategory) + try? container.encodeIfPresent(version, forKey: .version) - try? container.encodeIfPresent(version, forKey: .version) + try? container.encodeIfPresent(queue, forKey: .queue) + + + + + try? container.encodeIfPresent(workflowName, forKey: .workflowName) } diff --git a/Sources/code/platform/Models/AuditTrail/InternalServerErrorAuditTrailPlatformModel.swift b/Sources/code/platform/Models/Webhook/UpsertSubscriberConfigResultWebhookPlatformModel.swift similarity index 77% rename from Sources/code/platform/Models/AuditTrail/InternalServerErrorAuditTrailPlatformModel.swift rename to Sources/code/platform/Models/Webhook/UpsertSubscriberConfigResultWebhookPlatformModel.swift index e9c6408454..995f5c4d9d 100644 --- a/Sources/code/platform/Models/AuditTrail/InternalServerErrorAuditTrailPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/UpsertSubscriberConfigResultWebhookPlatformModel.swift @@ -3,33 +3,33 @@ import Foundation -public extension PlatformClient.AuditTrail { +public extension PlatformClient.Webhook { /* - Model: InternalServerError - Used By: AuditTrail + Model: UpsertSubscriberConfigResult + Used By: Webhook */ - class InternalServerError: Codable { + class UpsertSubscriberConfigResult: Codable { - public var message: String? + public var status: Bool? - public var code: String? + public var message: String? public enum CodingKeys: String, CodingKey { - case message = "message" + case status = "status" - case code = "code" + case message = "message" } - public init(code: String? = nil, message: String? = nil) { + public init(message: String? = nil, status: Bool? = nil) { - self.message = message + self.status = status - self.code = code + self.message = message } @@ -38,7 +38,7 @@ public extension PlatformClient.AuditTrail { do { - message = try container.decode(String.self, forKey: .message) + status = try container.decode(Bool.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +50,7 @@ public extension PlatformClient.AuditTrail { do { - code = try container.decode(String.self, forKey: .code) + message = try container.decode(String.self, forKey: .message) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -67,12 +67,12 @@ public extension PlatformClient.AuditTrail { - try? container.encodeIfPresent(message, forKey: .message) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(code, forKey: .code) + try? container.encodeIfPresent(message, forKey: .message) } diff --git a/Sources/code/platform/Models/Webhook/ReportFiltersPayloadWebhookPlatformModel.swift b/Sources/code/platform/Models/Webhook/UpsertSubscriberConfigWebhookPlatformModel.swift similarity index 60% rename from Sources/code/platform/Models/Webhook/ReportFiltersPayloadWebhookPlatformModel.swift rename to Sources/code/platform/Models/Webhook/UpsertSubscriberConfigWebhookPlatformModel.swift index 2c629bd218..09e05e2606 100644 --- a/Sources/code/platform/Models/Webhook/ReportFiltersPayloadWebhookPlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/UpsertSubscriberConfigWebhookPlatformModel.swift @@ -5,25 +5,25 @@ import Foundation public extension PlatformClient.Webhook { /* - Model: ReportFiltersPayload + Model: UpsertSubscriberConfig Used By: Webhook */ - class ReportFiltersPayload: Codable { + class UpsertSubscriberConfig: Codable { - public var subscriberIds: [Int] + public var webhookConfig: WebhookConfig public enum CodingKeys: String, CodingKey { - case subscriberIds = "subscriber_ids" + case webhookConfig = "webhook_config" } - public init(subscriberIds: [Int]) { + public init(webhookConfig: WebhookConfig) { - self.subscriberIds = subscriberIds + self.webhookConfig = webhookConfig } @@ -31,7 +31,7 @@ public extension PlatformClient.Webhook { let container = try decoder.container(keyedBy: CodingKeys.self) - subscriberIds = try container.decode([Int].self, forKey: .subscriberIds) + webhookConfig = try container.decode(WebhookConfig.self, forKey: .webhookConfig) @@ -42,7 +42,7 @@ public extension PlatformClient.Webhook { - try? container.encodeIfPresent(subscriberIds, forKey: .subscriberIds) + try? container.encodeIfPresent(webhookConfig, forKey: .webhookConfig) } diff --git a/Sources/code/platform/Models/Finance/CreditlineDataPlatformPayloadFinancePlatformModel.swift b/Sources/code/platform/Models/Webhook/WebhookConfigWebhookPlatformModel.swift similarity index 61% rename from Sources/code/platform/Models/Finance/CreditlineDataPlatformPayloadFinancePlatformModel.swift rename to Sources/code/platform/Models/Webhook/WebhookConfigWebhookPlatformModel.swift index 5f8816c57d..d842d896fc 100644 --- a/Sources/code/platform/Models/Finance/CreditlineDataPlatformPayloadFinancePlatformModel.swift +++ b/Sources/code/platform/Models/Webhook/WebhookConfigWebhookPlatformModel.swift @@ -3,51 +3,51 @@ import Foundation -public extension PlatformClient.Finance { +public extension PlatformClient.Webhook { /* - Model: CreditlineDataPlatformPayload - Used By: Finance + Model: WebhookConfig + Used By: Webhook */ - class CreditlineDataPlatformPayload: Codable { + class WebhookConfig: Codable { - public var page: Int? + public var notificationEmail: String? - public var sellerId: String? + public var name: String? - public var endDate: String? + public var status: String? - public var startDate: String? + public var association: Association? - public var pageSize: Int? + public var eventMap: EventMapBody? public enum CodingKeys: String, CodingKey { - case page = "page" + case notificationEmail = "notification_email" - case sellerId = "seller_id" + case name = "name" - case endDate = "end_date" + case status = "status" - case startDate = "start_date" + case association = "association" - case pageSize = "page_size" + case eventMap = "event_map" } - public init(endDate: String? = nil, page: Int? = nil, pageSize: Int? = nil, sellerId: String? = nil, startDate: String? = nil) { + public init(association: Association? = nil, eventMap: EventMapBody? = nil, name: String? = nil, notificationEmail: String? = nil, status: String? = nil) { - self.page = page + self.notificationEmail = notificationEmail - self.sellerId = sellerId + self.name = name - self.endDate = endDate + self.status = status - self.startDate = startDate + self.association = association - self.pageSize = pageSize + self.eventMap = eventMap } @@ -56,7 +56,7 @@ public extension PlatformClient.Finance { do { - page = try container.decode(Int.self, forKey: .page) + notificationEmail = try container.decode(String.self, forKey: .notificationEmail) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +68,7 @@ public extension PlatformClient.Finance { do { - sellerId = try container.decode(String.self, forKey: .sellerId) + 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.Finance { do { - endDate = try container.decode(String.self, forKey: .endDate) + status = try container.decode(String.self, forKey: .status) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +92,7 @@ public extension PlatformClient.Finance { do { - startDate = try container.decode(String.self, forKey: .startDate) + association = try container.decode(Association.self, forKey: .association) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +104,7 @@ public extension PlatformClient.Finance { do { - pageSize = try container.decode(Int.self, forKey: .pageSize) + eventMap = try container.decode(EventMapBody.self, forKey: .eventMap) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -121,27 +121,27 @@ public extension PlatformClient.Finance { - try? container.encodeIfPresent(page, forKey: .page) + try? container.encodeIfPresent(notificationEmail, forKey: .notificationEmail) - try? container.encodeIfPresent(sellerId, forKey: .sellerId) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(endDate, forKey: .endDate) + try? container.encodeIfPresent(status, forKey: .status) - try? container.encodeIfPresent(startDate, forKey: .startDate) + try? container.encodeIfPresent(association, forKey: .association) - try? container.encodeIfPresent(pageSize, forKey: .pageSize) + try? container.encodeIfPresent(eventMap, forKey: .eventMap) } diff --git a/Sources/code/platform/PlatformAPIClient.swift b/Sources/code/platform/PlatformAPIClient.swift index afd70a8abc..98593976da 100644 --- a/Sources/code/platform/PlatformAPIClient.swift +++ b/Sources/code/platform/PlatformAPIClient.swift @@ -13,7 +13,7 @@ public class PlatformAPIClient { if let token = token { var finalHeaders = [(key: String, value: String)]() finalHeaders.append((key: "Authorization", value: "Bearer " + token.accessToken)) - finalHeaders.append((key: "x-fp-sdk-version", value: "1.4.13")) + finalHeaders.append((key: "x-fp-sdk-version", value: "1.4.14")) finalHeaders.append(contentsOf: config.extraHeaders) if let userAgent = config.userAgent { finalHeaders.append((key: "User-Agent", value: userAgent)) diff --git a/Sources/code/platform/PlatformClient.swift b/Sources/code/platform/PlatformClient.swift index 62b2d389cd..4f1da0e801 100644 --- a/Sources/code/platform/PlatformClient.swift +++ b/Sources/code/platform/PlatformClient.swift @@ -25,8 +25,6 @@ public class PlatformClient { public let fileStorage: FileStorage - public let finance: Finance - public let lead: Lead public let serviceability: Serviceability @@ -62,8 +60,6 @@ public class PlatformClient { fileStorage = FileStorage(config: config) - finance = Finance(config: config) - lead = Lead(config: config) serviceability = Serviceability(config: config) @@ -187,7 +183,7 @@ public class PlatformClient { public func executeJobForProvidedParametersV2( body: JobExecute, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: [String: Any]?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: JobExecutionResult?, _ error: FDKError?) -> Void ) { @@ -215,7 +211,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = data.dictionary + let response = Utility.decode(JobExecutionResult.self, from: data) onResponse(response, nil) } else { @@ -290,7 +286,7 @@ public class PlatformClient { fileName: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: [String: Any]?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: JobStatus?, _ error: FDKError?) -> Void ) { @@ -318,7 +314,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = data.dictionary + let response = Utility.decode(JobStatus.self, from: data) onResponse(response, nil) } else { @@ -349,7 +345,7 @@ public class PlatformClient { /** * - * Summary: List coupons + * Summary: List of coupons * Description: Retrieve a list of all created coupons for specific sales channel. It also supports searching based on text search, pagination and other flags to filter coupons. **/ public func getCoupons( @@ -361,9 +357,16 @@ public class PlatformClient { isDisplay: Bool?, typeSlug: String?, code: String?, + createdBy: String?, + reviewedBy: String?, + approvedStartTime: String?, + approvedEndTime: String?, + reviewStartTime: String?, + reviewEndTime: String?, + status: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CouponsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CouponsResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -400,6 +403,34 @@ public class PlatformClient { xQuery["code"] = value } + if let value = createdBy { + xQuery["created_by"] = value + } + + if let value = reviewedBy { + xQuery["reviewed_by"] = value + } + + if let value = approvedStartTime { + xQuery["approved_start_time"] = value + } + + if let value = approvedEndTime { + xQuery["approved_end_time"] = value + } + + if let value = reviewStartTime { + xQuery["review_start_time"] = value + } + + if let value = reviewEndTime { + xQuery["review_end_time"] = value + } + + if let value = status { + xQuery["status"] = value + } + var xHeaders: [(key: String, value: String)] = [] @@ -423,7 +454,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CouponsResponse.self, from: data) + let response = Utility.decode(CouponsResult.self, from: data) onResponse(response, nil) } else { @@ -445,7 +476,7 @@ public class PlatformClient { public func createCoupon( body: CouponAdd, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessMessage?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CouponCreateResult?, _ error: FDKError?) -> Void ) { @@ -473,7 +504,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessMessage.self, from: data) + let response = Utility.decode(CouponCreateResult.self, from: data) onResponse(response, nil) } else { @@ -547,7 +578,7 @@ public class PlatformClient { id: String, body: CouponUpdate, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessMessage?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CouponCreateResult?, _ error: FDKError?) -> Void ) { @@ -575,7 +606,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessMessage.self, from: data) + let response = Utility.decode(CouponCreateResult.self, from: data) onResponse(response, nil) } else { @@ -642,7 +673,58 @@ public class PlatformClient { /** * - * Summary: List promotions + * Summary: Delete a coupon which is in draft state + * Description: Delete details of a draft coupon by providing its unique identifier to delete information such as coupon type, rules, validity period and other related information. + **/ + public func deleteCoupon( + id: String, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: SuccessMessage?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "DELETE", + url: "/service/platform/cart/v1.0/company/\(companyId)/application/\(applicationId)/coupon/\(id)", + query: nil, + body: nil, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(SuccessMessage.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: List of promotions * Description: Retrieve a list of all created promotions for specific sales channel. It also supports efficient text search and pagination functionalities, ensuring optimized promotion listing for streamlined navigation and management. **/ public func getPromotions( @@ -654,9 +736,16 @@ public class PlatformClient { promotionType: String?, fpPanel: String?, promotionId: String?, + createdBy: String?, + reviewedBy: String?, + approvedStartTime: String?, + approvedEndTime: String?, + reviewStartTime: String?, + reviewEndTime: String?, + status: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PromotionsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PromotionsResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -693,6 +782,34 @@ public class PlatformClient { xQuery["promotion_id"] = value } + if let value = createdBy { + xQuery["created_by"] = value + } + + if let value = reviewedBy { + xQuery["reviewed_by"] = value + } + + if let value = approvedStartTime { + xQuery["approved_start_time"] = value + } + + if let value = approvedEndTime { + xQuery["approved_end_time"] = value + } + + if let value = reviewStartTime { + xQuery["review_start_time"] = value + } + + if let value = reviewEndTime { + xQuery["review_end_time"] = value + } + + if let value = status { + xQuery["status"] = value + } + var xHeaders: [(key: String, value: String)] = [] @@ -716,7 +833,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PromotionsResponse.self, from: data) + let response = Utility.decode(PromotionsResult.self, from: data) onResponse(response, nil) } else { @@ -738,7 +855,7 @@ public class PlatformClient { public func createPromotion( body: PromotionAdd, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PromotionAdd?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PromotionAddResult?, _ error: FDKError?) -> Void ) { @@ -766,7 +883,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PromotionAdd.self, from: data) + let response = Utility.decode(PromotionAddResult.self, from: data) onResponse(response, nil) } else { @@ -782,14 +899,14 @@ public class PlatformClient { /** * - * Summary: Get a promotion + * Summary: Get a specific promotion * Description: Retrieve details of a specific promotion by providing its unique identifier to obtain information such as promotion type, rules, validity period and other related information. **/ public func getPromotionById( id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PromotionUpdate?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PromotionUpdateResult?, _ error: FDKError?) -> Void ) { @@ -817,7 +934,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PromotionUpdate.self, from: data) + let response = Utility.decode(PromotionUpdateResult.self, from: data) onResponse(response, nil) } else { @@ -840,7 +957,7 @@ public class PlatformClient { id: String, body: PromotionUpdate, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PromotionUpdate?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PromotionUpdateResult?, _ error: FDKError?) -> Void ) { @@ -868,7 +985,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PromotionUpdate.self, from: data) + let response = Utility.decode(PromotionUpdateResult.self, from: data) onResponse(response, nil) } else { @@ -933,6 +1050,57 @@ public class PlatformClient { + /** + * + * Summary: Delete a promotion which is in draft state + * Description: Delete details of a draft promotion by providing its unique identifier to delete information such as promotion type, rules, validity period and other related information. + **/ + public func deletePromotion( + id: String, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: SuccessMessage?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "DELETE", + url: "/service/platform/cart/v1.0/company/\(companyId)/application/\(applicationId)/promotion/\(id)", + query: nil, + body: nil, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(SuccessMessage.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** * * Summary: Get promotion and coupon type @@ -943,7 +1111,7 @@ public class PlatformClient { isHidden: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ActivePromosResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ActivePromosResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -979,7 +1147,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ActivePromosResponse.self, from: data) + let response = Utility.decode(ActivePromosResult.self, from: data) onResponse(response, nil) } else { @@ -995,7 +1163,7 @@ public class PlatformClient { /** * - * Summary: List available promotion offers + * Summary: List of all available promotion offers * Description: Retrieve a list of all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. **/ public func getPromotionOffers( @@ -1006,7 +1174,7 @@ public class PlatformClient { cartType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PromotionOffersResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PromotionOffersDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1054,7 +1222,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PromotionOffersResponse.self, from: data) + let response = Utility.decode(PromotionOffersDetails.self, from: data) onResponse(response, nil) } else { @@ -1078,7 +1246,7 @@ public class PlatformClient { uid: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PromotionPaymentOffersResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PromotionPaymentOffersDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1114,7 +1282,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PromotionPaymentOffersResponse.self, from: data) + let response = Utility.decode(PromotionPaymentOffersDetails.self, from: data) onResponse(response, nil) } else { @@ -1288,7 +1456,7 @@ public class PlatformClient { id: String, body: PriceAdjustmentUpdate, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PriceAdjustmentResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetPriceAdjustmentResult?, _ error: FDKError?) -> Void ) { @@ -1316,7 +1484,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PriceAdjustmentResponse.self, from: data) + let response = Utility.decode(GetPriceAdjustmentResult.self, from: data) onResponse(response, nil) } else { @@ -1389,7 +1557,7 @@ public class PlatformClient { public func addPriceAdjustment( body: PriceAdjustmentAdd, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PriceAdjustmentResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetPriceAdjustmentResult?, _ error: FDKError?) -> Void ) { @@ -1417,7 +1585,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PriceAdjustmentResponse.self, from: data) + let response = Utility.decode(GetPriceAdjustmentResult.self, from: data) onResponse(response, nil) } else { @@ -1440,7 +1608,7 @@ public class PlatformClient { cartId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetPriceAdjustmentResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetPriceAdjustmentResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1469,7 +1637,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetPriceAdjustmentResponse.self, from: data) + let response = Utility.decode(GetPriceAdjustmentResult.self, from: data) onResponse(response, nil) } else { @@ -1489,9 +1657,9 @@ public class PlatformClient { * Description: Retrieve cart details for a provided list of cart items and validate its contents. This ensures accuracy and completeness in cart information, including item quantities, prices, discounts, and applicable taxes. **/ public func fetchAndvalidateCartItems( - body: OpenapiCartDetailsRequest, + body: OpenapiCartDetailsCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OpenapiCartDetailsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OpenapiCartDetailsResult?, _ error: FDKError?) -> Void ) { @@ -1519,7 +1687,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OpenapiCartDetailsResponse.self, from: data) + let response = Utility.decode(OpenapiCartDetailsResult.self, from: data) onResponse(response, nil) } else { @@ -1539,9 +1707,9 @@ public class PlatformClient { * Description: Verify the serviceability of items in the cart at a specific pin code and ensure accurate delivery promises. System checks each item's availability and delivery feasibility, providing real-time information on serviceability and estimated delivery times. **/ public func checkCartServiceability( - body: OpenApiCartServiceabilityRequest, + body: OpenApiCartServiceabilityCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OpenApiCartServiceabilityResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OpenApiCartServiceabilityResult?, _ error: FDKError?) -> Void ) { @@ -1569,7 +1737,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OpenApiCartServiceabilityResponse.self, from: data) + let response = Utility.decode(OpenApiCartServiceabilityResult.self, from: data) onResponse(response, nil) } else { @@ -1591,7 +1759,7 @@ public class PlatformClient { public func checkoutCart( body: OpenApiPlatformCheckoutReq, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OpenApiCheckoutResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OpenApiCheckoutResult?, _ error: FDKError?) -> Void ) { @@ -1619,7 +1787,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OpenApiCheckoutResponse.self, from: data) + let response = Utility.decode(OpenApiCheckoutResult.self, from: data) onResponse(response, nil) } else { @@ -1648,7 +1816,7 @@ public class PlatformClient { sortOn: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AbandonedCartResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AbandonedCartResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1704,7 +1872,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AbandonedCartResponse.self, from: data) + let response = Utility.decode(AbandonedCartResult.self, from: data) onResponse(response, nil) } else { @@ -1730,7 +1898,7 @@ public class PlatformClient { c: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1774,7 +1942,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -1796,9 +1964,9 @@ public class PlatformClient { public func addItems( cartId: String, b: Bool?, - body: AddCartRequest, + body: AddCartCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AddCartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AddCartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1830,7 +1998,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AddCartDetailResponse.self, from: data) + let response = Utility.decode(AddCartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -1852,9 +2020,9 @@ public class PlatformClient { public func updateCart( cartId: String, b: Bool?, - body: UpdateCartRequest, + body: UpdateCartCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdateCartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UpdateCartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -1886,7 +2054,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdateCartDetailResponse.self, from: data) + let response = Utility.decode(UpdateCartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -2068,7 +2236,7 @@ public class PlatformClient { public func overrideCart( body: OverrideCheckoutReq, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OverrideCheckoutResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OverrideCheckoutResult?, _ error: FDKError?) -> Void ) { @@ -2096,7 +2264,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OverrideCheckoutResponse.self, from: data) + let response = Utility.decode(OverrideCheckoutResult.self, from: data) onResponse(response, nil) } else { @@ -2116,9 +2284,9 @@ public class PlatformClient { * Description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. **/ public func getCartShareLink( - body: GetShareCartLinkRequest, + body: GetShareCartLinkCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetShareCartLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetShareCartLinkResult?, _ error: FDKError?) -> Void ) { @@ -2146,7 +2314,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetShareCartLinkResponse.self, from: data) + let response = Utility.decode(GetShareCartLinkResult.self, from: data) onResponse(response, nil) } else { @@ -2169,7 +2337,7 @@ public class PlatformClient { token: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SharedCartResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SharedCartResult?, _ error: FDKError?) -> Void ) { @@ -2197,7 +2365,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SharedCartResponse.self, from: data) + let response = Utility.decode(SharedCartResult.self, from: data) onResponse(response, nil) } else { @@ -2222,7 +2390,7 @@ public class PlatformClient { cartId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SharedCartResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SharedCartResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2254,7 +2422,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SharedCartResponse.self, from: data) + let response = Utility.decode(SharedCartResult.self, from: data) onResponse(response, nil) } else { @@ -2270,8 +2438,8 @@ public class PlatformClient { /** * - * Summary: List carts - * Description: Retrieve the list of active carts associated with a specific customer. + * Summary: List of carts + * Description: Retrieve the list of active carts associated with a specific customer. **/ public func getCartList( fromDate: String?, @@ -2279,7 +2447,7 @@ public class PlatformClient { filterOn: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: MultiCartResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: MultiCartResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2319,7 +2487,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(MultiCartResponse.self, from: data) + let response = Utility.decode(MultiCartResult.self, from: data) onResponse(response, nil) } else { @@ -2342,7 +2510,7 @@ public class PlatformClient { id: String?, body: UpdateUserCartMapping, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UserCartMappingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UserCartMappingResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2374,7 +2542,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UserCartMappingResponse.self, from: data) + let response = Utility.decode(UserCartMappingResult.self, from: data) onResponse(response, nil) } else { @@ -2403,7 +2571,7 @@ public class PlatformClient { buyNow: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2459,7 +2627,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -2484,9 +2652,9 @@ public class PlatformClient { buyNow: Bool?, orderType: String?, id: String?, - body: PlatformAddCartRequest, + body: PlatformAddCartDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AddCartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AddCartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2534,7 +2702,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AddCartDetailResponse.self, from: data) + let response = Utility.decode(AddCartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -2559,9 +2727,9 @@ public class PlatformClient { orderType: String?, b: Bool?, buyNow: Bool?, - body: PlatformUpdateCartRequest, + body: PlatformUpdateCartDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdateCartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UpdateCartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2609,7 +2777,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdateCartDetailResponse.self, from: data) + let response = Utility.decode(UpdateCartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -2630,9 +2798,9 @@ public class PlatformClient { **/ public func deleteCart( id: String?, - body: DeleteCartRequest, + body: DeleteCartDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DeleteCartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DeleteCartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2664,7 +2832,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteCartDetailResponse.self, from: data) + let response = Utility.decode(DeleteCartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -2688,7 +2856,7 @@ public class PlatformClient { buyNow: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartItemCountResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartItemCountResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2724,7 +2892,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartItemCountResponse.self, from: data) + let response = Utility.decode(CartItemCountResult.self, from: data) onResponse(response, nil) } else { @@ -2740,7 +2908,7 @@ public class PlatformClient { /** * - * Summary: List coupons + * Summary: List of coupons * Description: Retrieve a list of all available coupons that customer can apply to their carts. It provides details about each coupon, including its code, discount amount, and applicable conditions. **/ public func getAppCoupons( @@ -2750,7 +2918,7 @@ public class PlatformClient { storeId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetCouponResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetCouponResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2794,7 +2962,7 @@ public class PlatformClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetCouponResponse.self, from: data) + let response = Utility.decode(GetCouponResult.self, from: data) onResponse(response, nil) } else { @@ -2811,8 +2979,7 @@ public class PlatformClient { /** * * Summary: Apply coupon - * Description: -Apply a coupon code to the customer's cart to trigger discounts on eligible items + * Description: Apply a coupon code to the customer's cart to trigger discounts on eligible items **/ public func applyCoupon( i: Bool?, @@ -2820,9 +2987,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item p: Bool?, id: String?, buyNow: Bool?, - body: ApplyCouponRequest, + body: ApplyCouponDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2870,7 +3037,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -2894,7 +3061,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item buyNow: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -2930,7 +3097,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -2959,7 +3126,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item userId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformGetAddressesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformGetAddressesDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3015,7 +3182,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformGetAddressesResponse.self, from: data) + let response = Utility.decode(PlatformGetAddressesDetails.self, from: data) onResponse(response, nil) } else { @@ -3037,7 +3204,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func addAddress( body: PlatformAddress, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SaveAddressResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SaveAddressDetails?, _ error: FDKError?) -> Void ) { @@ -3065,7 +3232,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SaveAddressResponse.self, from: data) + let response = Utility.decode(SaveAddressDetails.self, from: data) onResponse(response, nil) } else { @@ -3174,7 +3341,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item id: String, body: PlatformAddress, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdateAddressResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UpdateAddressDetails?, _ error: FDKError?) -> Void ) { @@ -3202,7 +3369,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdateAddressResponse.self, from: data) + let response = Utility.decode(UpdateAddressDetails.self, from: data) onResponse(response, nil) } else { @@ -3226,7 +3393,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item userId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DeleteAddressResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DeleteAddressResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3258,7 +3425,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteAddressResponse.self, from: data) + let response = Utility.decode(DeleteAddressResult.self, from: data) onResponse(response, nil) } else { @@ -3282,9 +3449,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item buyNow: Bool?, i: Bool?, b: Bool?, - body: PlatformSelectCartAddressRequest, + body: PlatformSelectCartAddress, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3328,7 +3495,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -3358,7 +3525,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item orderType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformCartShipmentsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformCartShipmentsResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3418,7 +3585,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformCartShipmentsResponse.self, from: data) + let response = Utility.decode(PlatformCartShipmentsResult.self, from: data) onResponse(response, nil) } else { @@ -3444,9 +3611,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item addressId: String?, areaCode: String?, orderType: String?, - body: UpdateCartShipmentRequest, + body: UpdateCartShipmentCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformCartShipmentsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformCartShipmentsResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3498,7 +3665,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformCartShipmentsResponse.self, from: data) + let response = Utility.decode(PlatformCartShipmentsResult.self, from: data) onResponse(response, nil) } else { @@ -3520,9 +3687,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func updateCartMeta( id: String?, buyNow: Bool?, - body: PlatformCartMetaRequest, + body: PlatformCartMetaCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartMetaResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartMetaDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3558,7 +3725,62 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartMetaResponse.self, from: data) + let response = Utility.decode(CartMetaDetails.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: Checkout cart + * Description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. + **/ + public func platformCheckoutCart( + id: String?, + body: PlatformCartCheckoutDetailCreation, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: CartCheckoutResult?, _ error: FDKError?) -> Void + ) { + + var xQuery: [String: Any] = [:] + + if let value = id { + xQuery["id"] = value + } + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "POST", + url: "/service/platform/cart/v1.0/company/\(companyId)/application/\(applicationId)/checkout", + query: xQuery, + body: body.dictionary, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(CartCheckoutResult.self, from: data) onResponse(response, nil) } else { @@ -3582,7 +3804,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item id: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDeliveryModesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDeliveryModesDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3615,7 +3837,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDeliveryModesResponse.self, from: data) + let response = Utility.decode(CartDeliveryModesDetails.self, from: data) onResponse(response, nil) } else { @@ -3638,7 +3860,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item storeUid: Int, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: StoreDetailsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: StoreDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3667,7 +3889,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(StoreDetailsResponse.self, from: data) + let response = Utility.decode(StoreDetails.self, from: data) onResponse(response, nil) } else { @@ -3690,9 +3912,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item id: String?, buyNow: Bool?, orderType: String?, - body: UpdateCartPaymentRequest, + body: CartPaymentUpdate, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3732,7 +3954,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -3838,9 +4060,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item **/ public func platformCheckoutCartV2( id: String?, - body: PlatformCartCheckoutDetailV2Request, + body: PlatformCartCheckoutDetailV2Creation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartCheckoutResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartCheckoutDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3872,7 +4094,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartCheckoutResponse.self, from: data) + let response = Utility.decode(CartCheckoutDetails.self, from: data) onResponse(response, nil) } else { @@ -3897,7 +4119,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item orderType: String?, body: UpdateCartPaymentRequestV2, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CartDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CartDetailResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -3937,7 +4159,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CartDetailResponse.self, from: data) + let response = Utility.decode(CartDetailResult.self, from: data) onResponse(response, nil) } else { @@ -3975,7 +4197,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item brand: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CatalogInsightResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CatalogInsightResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -4007,7 +4229,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CatalogInsightResponse.self, from: data) + let response = Utility.decode(CatalogInsightResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4127,10 +4349,10 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Modify data associated to the brand for that particular sales channel. **/ public func updateAppBrand( - brandUid: Int, + brandUid: String, body: ApplicationBrandJson, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponseObject?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponse1?, _ error: FDKError?) -> Void ) { @@ -4158,7 +4380,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponseObject.self, from: data) + let response = Utility.decode(SuccessResponse1.self, from: data) onResponse(response, nil) } else { @@ -4175,7 +4397,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * * Summary: List brands - * Description: List all the brands. + * Description: List all the brands, and have search capabilities on brand uid, name etc **/ public func getApplicationBrands( department: String?, @@ -4185,7 +4407,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item brandId: [Int]?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BrandListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BrandListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -4233,7 +4455,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BrandListingResponse.self, from: data) + let response = Utility.decode(BrandListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4264,9 +4486,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item q: String?, brandId: [Int]?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getApplicationBrands( department: department, @@ -4299,7 +4521,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item department: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CategoryListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CategoryListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -4331,7 +4553,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CategoryListingResponse.self, from: data) + let response = Utility.decode(CategoryListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4463,7 +4685,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item categoryUid: String, body: ApplicationCategoryJson, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponseObject?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponse1?, _ error: FDKError?) -> Void ) { @@ -4491,7 +4713,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponseObject.self, from: data) + let response = Utility.decode(SuccessResponse1.self, from: data) onResponse(response, nil) } else { @@ -4520,7 +4742,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetCollectionListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetCollectionListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -4576,7 +4798,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetCollectionListingResponse.self, from: data) + let response = Utility.decode(GetCollectionListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4613,9 +4835,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item isActive: Bool?, pageSize: Int?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getAllCollections( q: q, @@ -4649,7 +4871,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func createCollection( body: CreateCollection, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CollectionCreateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CollectionCreateResponseSchema?, _ error: FDKError?) -> Void ) { @@ -4677,7 +4899,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CollectionCreateResponse.self, from: data) + let response = Utility.decode(CollectionCreateResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4706,7 +4928,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item q: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetQueryFiltersValuesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetQueryFiltersValuesResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -4754,7 +4976,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetQueryFiltersValuesResponse.self, from: data) + let response = Utility.decode(GetQueryFiltersValuesResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4777,7 +4999,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item c: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetQueryFiltersKeysResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetQueryFiltersKeysResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -4809,7 +5031,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetQueryFiltersKeysResponse.self, from: data) + let response = Utility.decode(GetQueryFiltersKeysResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4831,7 +5053,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getQueryFilters( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetQueryFiltersResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetQueryFiltersResponseSchema?, _ error: FDKError?) -> Void ) { @@ -4859,7 +5081,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetQueryFiltersResponse.self, from: data) + let response = Utility.decode(GetQueryFiltersResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -4987,7 +5209,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetCollectionItemsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetCollectionItemsResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -5027,7 +5249,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetCollectionItemsResponse.self, from: data) + let response = Utility.decode(GetCollectionItemsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -5101,7 +5323,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item slug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetCollectionDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetCollectionDetailResponseSchema?, _ error: FDKError?) -> Void ) { @@ -5129,7 +5351,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetCollectionDetailResponse.self, from: data) + let response = Utility.decode(GetCollectionDetailResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -5154,7 +5376,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item q: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ApplicationDepartmentListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ApplicationDepartmentListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -5194,7 +5416,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ApplicationDepartmentListingResponse.self, from: data) + let response = Utility.decode(ApplicationDepartmentListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -5219,9 +5441,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, q: String?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getApplicationDepartmentListing( pageNo: paginator.pageNo, @@ -5252,7 +5474,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item departmentUid: String, body: ApplicationDepartmentJson, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponseObject?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponse1?, _ error: FDKError?) -> Void ) { @@ -5280,7 +5502,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponseObject.self, from: data) + let response = Utility.decode(SuccessResponse1.self, from: data) onResponse(response, nil) } else { @@ -5302,7 +5524,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getDepartments( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DepartmentResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DepartmentResponseSchema?, _ error: FDKError?) -> Void ) { @@ -5330,7 +5552,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DepartmentResponse.self, from: data) + let response = Utility.decode(DepartmentResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -5364,7 +5586,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item toDate: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InventoryStockResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: InventoryStockResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -5440,7 +5662,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(InventoryStockResponse.self, from: data) + let response = Utility.decode(InventoryStockResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -5470,7 +5692,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item storeTypes: [String]?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: LocationListSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: LocationListSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -5530,7 +5752,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(LocationListSerializer.self, from: data) + let response = Utility.decode(LocationListSchema.self, from: data) onResponse(response, nil) } else { @@ -5570,9 +5792,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item tags: [String]?, storeTypes: [String]?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getAppLocations( storeType: storeType, @@ -5860,7 +6082,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item itemId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OwnerAppItemResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OwnerAppItemResponseSchema?, _ error: FDKError?) -> Void ) { @@ -5888,7 +6110,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OwnerAppItemResponse.self, from: data) + let response = Utility.decode(OwnerAppItemResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -5911,7 +6133,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item itemId: String, body: ApplicationItemMeta, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponseObject?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponse1?, _ error: FDKError?) -> Void ) { @@ -5939,7 +6161,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponseObject.self, from: data) + let response = Utility.decode(SuccessResponse1.self, from: data) onResponse(response, nil) } else { @@ -5958,7 +6180,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Summary: List sales channel products * Description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order. **/ - public func getAppicationProducts( + public func getApplicationProducts( q: String?, f: String?, c: String?, @@ -5972,7 +6194,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item itemIds: [Int]?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ApplicationProductListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ApplicationProductListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -6044,7 +6266,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ApplicationProductListingResponse.self, from: data) + let response = Utility.decode(ApplicationProductListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -6078,10 +6300,10 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: get paginator for getAppicationProducts + * Summary: get paginator for getApplicationProducts * Description: fetch the next page by calling .next(...) function **/ - public func getAppicationProductsPaginator( + public func getApplicationProductsPaginator( q: String?, f: String?, c: String?, @@ -6091,11 +6313,11 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, itemIds: [Int]?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "cursor") + let paginator = Paginator(pageSize: pageSize, type: "cursor") paginator.onPage = { - self.getAppicationProducts( + self.getApplicationProducts( q: q, f: f, c: c, @@ -6310,7 +6532,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item q: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RawProductListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RawProductListingResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -6370,7 +6592,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RawProductListingResponse.self, from: data) + let response = Utility.decode(RawProductListingResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -6410,9 +6632,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, q: String?, headers: [(key: String, value: String)]? = nil - ) -> Paginator { + ) -> Paginator { let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") + let paginator = Paginator(pageSize: pageSize, type: "number") paginator.onPage = { self.getAppProducts( brandIds: brandIds, @@ -6447,7 +6669,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getAppReturnConfiguration( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AppReturnConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AppReturnConfigResponseSchema?, _ error: FDKError?) -> Void ) { @@ -6475,7 +6697,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AppReturnConfigResponse.self, from: data) + let response = Utility.decode(AppReturnConfigResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -6497,7 +6719,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func createAppReturnConfiguration( body: CreateUpdateAppReturnConfig, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponseObject?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponse1?, _ error: FDKError?) -> Void ) { @@ -6525,7 +6747,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponseObject.self, from: data) + let response = Utility.decode(SuccessResponse1.self, from: data) onResponse(response, nil) } else { @@ -6547,7 +6769,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func updateAppReturnConfiguration( body: CreateUpdateAppReturnConfig, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponseObject?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponse1?, _ error: FDKError?) -> Void ) { @@ -6575,7 +6797,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponseObject.self, from: data) + let response = Utility.decode(SuccessResponse1.self, from: data) onResponse(response, nil) } else { @@ -6597,7 +6819,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func deleteAppCategoryReturnConfiguration( body: DeleteAppCategoryReturnConfig, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -6625,7 +6847,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -6650,7 +6872,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BaseAppCategoryReturnConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BaseAppCategoryReturnConfigResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -6690,7 +6912,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BaseAppCategoryReturnConfigResponse.self, from: data) + let response = Utility.decode(BaseAppCategoryReturnConfigResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -6712,7 +6934,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func createAppCategoryReturnConfiguration( body: BaseAppCategoryReturnConfig, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponseObject?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponse1?, _ error: FDKError?) -> Void ) { @@ -6740,7 +6962,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponseObject.self, from: data) + let response = Utility.decode(SuccessResponse1.self, from: data) onResponse(response, nil) } else { @@ -6762,7 +6984,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func updateAppCategoryReturnConfiguration( body: BaseAppCategoryReturnConfig, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -6790,7 +7012,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponse.self, from: data) + let response = Utility.decode(SuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -6812,7 +7034,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getAutocompleteConfig( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetAutocompleteWordsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetAutocompleteWordsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -6840,7 +7062,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetAutocompleteWordsResponse.self, from: data) + let response = Utility.decode(GetAutocompleteWordsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -6862,7 +7084,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func createCustomAutocompleteRule( body: CreateAutocompleteKeyword, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreateAutocompleteWordsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreateAutocompleteWordsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -6890,7 +7112,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CreateAutocompleteWordsResponse.self, from: data) + let response = Utility.decode(CreateAutocompleteWordsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -6913,7 +7135,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DeleteResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DeleteResponseSchema?, _ error: FDKError?) -> Void ) { @@ -6941,7 +7163,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteResponse.self, from: data) + let response = Utility.decode(DeleteResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -6964,7 +7186,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetAutocompleteWordsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetAutocompleteWordsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -6992,7 +7214,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetAutocompleteWordsResponse.self, from: data) + let response = Utility.decode(GetAutocompleteWordsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7015,7 +7237,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item id: String, body: CreateAutocompleteKeyword, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetAutocompleteWordsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetAutocompleteWordsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -7043,7 +7265,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetAutocompleteWordsResponse.self, from: data) + let response = Utility.decode(GetAutocompleteWordsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7065,7 +7287,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func deleteSearchConfiguration( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DeleteSearchConfigurationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DeleteSearchConfigurationResponseSchema?, _ error: FDKError?) -> Void ) { @@ -7093,7 +7315,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteSearchConfigurationResponse.self, from: data) + let response = Utility.decode(DeleteSearchConfigurationResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7115,7 +7337,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getSearchConfiguration( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetSearchConfigurationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetSearchConfigurationResponseSchema?, _ error: FDKError?) -> Void ) { @@ -7143,7 +7365,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetSearchConfigurationResponse.self, from: data) + let response = Utility.decode(GetSearchConfigurationResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7163,9 +7385,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Create search configuration for the catalog for a specific company and sales channel. **/ public func createSearchConfiguration( - body: CreateSearchConfigurationRequest, + body: CreateSearchConfigurationRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreateSearchConfigurationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreateSearchConfigurationResponseSchema?, _ error: FDKError?) -> Void ) { @@ -7193,7 +7415,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CreateSearchConfigurationResponse.self, from: data) + let response = Utility.decode(CreateSearchConfigurationResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7213,9 +7435,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Allows you to modify searchable attributes for an sales channel. searchable attributes are the fields on which the products are searched. **/ public func updateSearchConfiguration( - body: UpdateSearchConfigurationRequest, + body: UpdateSearchConfigurationRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UpdateSearchConfigurationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UpdateSearchConfigurationResponseSchema?, _ error: FDKError?) -> Void ) { @@ -7243,7 +7465,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UpdateSearchConfigurationResponse.self, from: data) + let response = Utility.decode(UpdateSearchConfigurationResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7265,7 +7487,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getAllSearchKeyword( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetSearchWordsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetSearchWordsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -7293,7 +7515,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetSearchWordsResponse.self, from: data) + let response = Utility.decode(GetSearchWordsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7366,7 +7588,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DeleteResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DeleteResponseSchema?, _ error: FDKError?) -> Void ) { @@ -7394,7 +7616,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DeleteResponse.self, from: data) + let response = Utility.decode(DeleteResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7417,7 +7639,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetSearchWordsDetailResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetSearchWordsDetailResponseSchema?, _ error: FDKError?) -> Void ) { @@ -7445,7 +7667,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetSearchWordsDetailResponse.self, from: data) + let response = Utility.decode(GetSearchWordsDetailResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7519,7 +7741,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item storeUid: String, body: ApplicationStoreJson, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessResponseObject?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessResponse1?, _ error: FDKError?) -> Void ) { @@ -7547,7 +7769,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessResponseObject.self, from: data) + let response = Utility.decode(SuccessResponse1.self, from: data) onResponse(response, nil) } else { @@ -7622,9 +7844,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Modify allow single flag for filters of the sales channel for a company and an sales channel. **/ public func updateAllowSingle( - body: AllowSingleRequest, + body: AllowSingleRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ConfigSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ConfigSuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -7652,7 +7874,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ConfigSuccessResponse.self, from: data) + let response = Utility.decode(ConfigSuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7672,9 +7894,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Modify the default sort key configuration for a company and an sales channel. **/ public func updateDefaultSort( - body: DefaultKeyRequest, + body: DefaultKeyRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ConfigSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ConfigSuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -7702,7 +7924,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ConfigSuccessResponse.self, from: data) + let response = Utility.decode(ConfigSuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7728,7 +7950,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item search: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetConfigResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -7768,7 +7990,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetConfigResponse.self, from: data) + let response = Utility.decode(GetConfigResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7846,7 +8068,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item templateSlug: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetConfigResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -7890,7 +8112,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetConfigResponse.self, from: data) + let response = Utility.decode(GetConfigResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -7965,7 +8187,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item groupSlug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ConfigSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ConfigSuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -7993,7 +8215,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ConfigSuccessResponse.self, from: data) + let response = Utility.decode(ConfigSuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -8069,7 +8291,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item configId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ConfigSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ConfigSuccessResponseSchema?, _ error: FDKError?) -> Void ) { @@ -8097,7 +8319,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ConfigSuccessResponse.self, from: data) + let response = Utility.decode(ConfigSuccessResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -8176,7 +8398,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item q: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetConfigMetadataResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetConfigMetadataResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -8220,7 +8442,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetConfigMetadataResponse.self, from: data) + let response = Utility.decode(GetConfigMetadataResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -10845,9 +11067,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Sends real-time communications to sellers with immediate delivery. **/ public func sendCommunicationSynchronously( - body: EngineRequest, + body: EnginePayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EngineResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EngineResult?, _ error: FDKError?) -> Void ) { @@ -10875,7 +11097,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EngineResponse.self, from: data) + let response = Utility.decode(EngineResult.self, from: data) onResponse(response, nil) } else { @@ -10895,9 +11117,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Sends communications to sellers with deffered delivery. **/ public func sendCommunicationAsynchronously( - body: EngineRequest, + body: EnginePayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EngineResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EngineResult?, _ error: FDKError?) -> Void ) { @@ -10925,7 +11147,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EngineResponse.self, from: data) + let response = Utility.decode(EngineResult.self, from: data) onResponse(response, nil) } else { @@ -11012,7 +11234,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func createEventSubscriptions( body: SubscriptionsObject, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EventSubscriptionsBulkUpdateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EventSubscriptionsBulkUpdateResult?, _ error: FDKError?) -> Void ) { @@ -11040,7 +11262,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EventSubscriptionsBulkUpdateResponse.self, from: data) + let response = Utility.decode(EventSubscriptionsBulkUpdateResult.self, from: data) onResponse(response, nil) } else { @@ -11119,7 +11341,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item id: String, body: SubscriptionsObject, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EventSubscriptionsBulkUpdateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EventSubscriptionsBulkUpdateResult?, _ error: FDKError?) -> Void ) { @@ -11147,7 +11369,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EventSubscriptionsBulkUpdateResponse.self, from: data) + let response = Utility.decode(EventSubscriptionsBulkUpdateResult.self, from: data) onResponse(response, nil) } else { @@ -11218,9 +11440,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Creates a new event subscription in bulk. **/ public func createEventSubscriptionsByBulk( - body: EventSubscriptionsBulkUpdateRequest, + body: EventSubscriptionsBulkUpdatePayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: [EventSubscriptionsBulkUpdateResponse]?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: [EventSubscriptionsBulkUpdateResult]?, _ error: FDKError?) -> Void ) { @@ -11248,7 +11470,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode([EventSubscriptionsBulkUpdateResponse].self, from: data) + let response = Utility.decode([EventSubscriptionsBulkUpdateResult].self, from: data) onResponse(response, nil) } else { @@ -11270,7 +11492,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getGlobalVariables( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GlobalVariablesGetResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetGlobalVariablesResult?, _ error: FDKError?) -> Void ) { @@ -11298,7 +11520,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GlobalVariablesGetResponse.self, from: data) + let response = Utility.decode(GetGlobalVariablesResult.self, from: data) onResponse(response, nil) } else { @@ -11320,7 +11542,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func postGlobalVariables( body: GlobalVariablesReq, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GlobalVariablesPostResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreateGlobalVariablesResult?, _ error: FDKError?) -> Void ) { @@ -11348,7 +11570,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GlobalVariablesPostResponse.self, from: data) + let response = Utility.decode(CreateGlobalVariablesResult.self, from: data) onResponse(response, nil) } else { @@ -11488,9 +11710,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Initiates a job to execute a communication campaign. **/ public func triggerCampaignJob( - body: TriggerJobRequest, + body: TriggerJobPayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: TriggerJobResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: TriggerJobResult?, _ error: FDKError?) -> Void ) { @@ -11518,7 +11740,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(TriggerJobResponse.self, from: data) + let response = Utility.decode(TriggerJobResult.self, from: data) onResponse(response, nil) } else { @@ -11946,7 +12168,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item **/ public func updateBuildConfig( platformType: String, - body: MobileAppConfigRequest, + body: MobileAppConfigRequestSchema, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: MobileAppConfiguration?, _ error: FDKError?) -> Void ) { @@ -12049,7 +12271,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getAppFeatures( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AppFeatureResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AppFeatureResponseSchema?, _ error: FDKError?) -> Void ) { @@ -12077,7 +12299,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AppFeatureResponse.self, from: data) + let response = Utility.decode(AppFeatureResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -12097,7 +12319,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Modify the feature configuration of sales channel websites, such as product detail, landing page, options in the login/registration screen, home page, listing page, reward points, communication opt-in, cart options and many more. **/ public func updateAppFeatures( - body: AppFeatureRequest, + body: AppFeatureRequestSchema, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: AppFeature?, _ error: FDKError?) -> Void ) { @@ -12147,7 +12369,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Modify the feature configuration of sales channel websites, such as product detail, landing page, options in the login/registration screen, home page, listing page, reward points, communication opt-in, cart options and many more. **/ public func modifyAppFeatures( - body: AppFeatureRequest, + body: AppFeatureRequestSchema, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: AppFeature?, _ error: FDKError?) -> Void ) { @@ -12399,7 +12621,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getAppApiTokens( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: TokenResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: TokenResponseSchema?, _ error: FDKError?) -> Void ) { @@ -12427,7 +12649,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(TokenResponse.self, from: data) + let response = Utility.decode(TokenResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -12447,9 +12669,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Add and edit the tokens used for integrating Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map, Google and Facebook auth. **/ public func updateAppApiTokens( - body: TokenResponse, + body: TokenResponseSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: TokenResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: TokenResponseSchema?, _ error: FDKError?) -> Void ) { @@ -12477,7 +12699,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(TokenResponse.self, from: data) + let response = Utility.decode(TokenResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -12502,7 +12724,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CompaniesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CompaniesResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -12542,7 +12764,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CompaniesResponse.self, from: data) + let response = Utility.decode(CompaniesResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -12566,7 +12788,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: StoresResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: StoresResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -12602,7 +12824,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(StoresResponse.self, from: data) + let response = Utility.decode(StoresResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -12874,7 +13096,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getAppSupportedCurrency( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AppCurrencyResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AppCurrencyResponseSchema?, _ error: FDKError?) -> Void ) { @@ -12902,7 +13124,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AppCurrencyResponse.self, from: data) + let response = Utility.decode(AppCurrencyResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -12924,7 +13146,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getOrderingStoresByFilter( pageNo: Int?, pageSize: Int?, - body: FilterOrderingStoreRequest, + body: FilterOrderingStoreRequestSchema, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: OrderingStores?, _ error: FDKError?) -> Void ) { @@ -13087,7 +13309,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item q: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OrderingStoresResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OrderingStoresResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -13127,7 +13349,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OrderingStoresResponse.self, from: data) + let response = Utility.decode(OrderingStoresResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -13147,9 +13369,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Use this API to get an Ordering Store signed cookie upon selecting an ordering store. This will be used by the cart service to verify a coupon against the selected ordering store in cart. **/ public func getOrderingStoreCookie( - body: OrderingStoreSelectRequest, + body: OrderingStoreSelectRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessMessageResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessMessageResponseSchema?, _ error: FDKError?) -> Void ) { @@ -13177,7 +13399,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessMessageResponse.self, from: data) + let response = Utility.decode(SuccessMessageResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -13199,7 +13421,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func removeOrderingStoreCookie( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessMessageResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessMessageResponseSchema?, _ error: FDKError?) -> Void ) { @@ -13227,7 +13449,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessMessageResponse.self, from: data) + let response = Utility.decode(SuccessMessageResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -13249,7 +13471,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getDomains( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DomainsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DomainsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -13277,7 +13499,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DomainsResponse.self, from: data) + let response = Utility.decode(DomainsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -13297,7 +13519,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Creates a domain for an sales channel. Note - Only 15 domains can be added to the sales channel **/ public func addDomain( - body: DomainAddRequest, + body: DomainAddRequestSchema, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: Domain?, _ error: FDKError?) -> Void ) { @@ -13350,7 +13572,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item id: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessMessageResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessMessageResponseSchema?, _ error: FDKError?) -> Void ) { @@ -13378,7 +13600,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessMessageResponse.self, from: data) + let response = Utility.decode(SuccessMessageResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -13398,9 +13620,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Modify the type of a specific domain. Primary domain is used as the URL of your website. Short link domain is comparatively smaller and used while generating short links. **/ public func changeDomainType( - body: UpdateDomainTypeRequest, + body: UpdateDomainTypeRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DomainsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DomainsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -13428,7 +13650,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DomainsResponse.self, from: data) + let response = Utility.decode(DomainsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -13448,9 +13670,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Retrieve the status of a specific domain. Shows if the A records and TXT records of the domain correctly points to appropriate IP on Fynd Servers. **/ public func getDomainStatus( - body: DomainStatusRequest, + body: DomainStatusRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DomainStatusResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DomainStatusResponseSchema?, _ error: FDKError?) -> Void ) { @@ -13478,7 +13700,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DomainStatusResponse.self, from: data) + let response = Utility.decode(DomainStatusResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -13549,6 +13771,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item + } @@ -13887,7 +14110,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Generate and add a new blog. **/ public func createBlog( - body: BlogRequest, + body: BlogPayload, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: BlogSchema?, _ error: FDKError?) -> Void ) { @@ -13946,7 +14169,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item status: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: BlogGetResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: BlogGetDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -14002,7 +14225,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(BlogGetResponse.self, from: data) + let response = Utility.decode(BlogGetDetails.self, from: data) onResponse(response, nil) } else { @@ -14023,7 +14246,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item **/ public func updateBlog( id: String, - body: BlogRequest, + body: BlogPayload, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: BlogSchema?, _ error: FDKError?) -> Void ) { @@ -15045,7 +15268,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: LandingPageGetResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: LandingPageGetDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -15081,7 +15304,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(LandingPageGetResponse.self, from: data) + let response = Utility.decode(LandingPageGetDetails.self, from: data) onResponse(response, nil) } else { @@ -15358,7 +15581,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: NavigationGetResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: NavigationGetDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -15395,7 +15618,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(NavigationGetResponse.self, from: data) + let response = Utility.decode(NavigationGetDetails.self, from: data) onResponse(response, nil) } else { @@ -15415,7 +15638,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Generate and add a new navigation element. **/ public func createNavigation( - body: NavigationRequest, + body: NavigationPayload, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: NavigationSchema?, _ error: FDKError?) -> Void ) { @@ -15467,7 +15690,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getDefaultNavigations( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DefaultNavigationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: DefaultNavigationDetails?, _ error: FDKError?) -> Void ) { @@ -15495,7 +15718,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DefaultNavigationResponse.self, from: data) + let response = Utility.decode(DefaultNavigationDetails.self, from: data) onResponse(response, nil) } else { @@ -15516,14 +15739,17 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item **/ public func getNavigationBySlug( slug: String, - devicePlatform: String, + devicePlatform: String?, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: NavigationSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] - xQuery["device_platform"] = devicePlatform + + if let value = devicePlatform { + xQuery["device_platform"] = value + } var xHeaders: [(key: String, value: String)] = [] @@ -15569,7 +15795,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item **/ public func updateNavigation( id: String, - body: NavigationRequest, + body: NavigationPayload, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: NavigationSchema?, _ error: FDKError?) -> Void ) { @@ -15770,7 +15996,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Generate and add a new page preview. **/ public func createPagePreview( - body: PageRequest, + body: PagePayload, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: PageSchema?, _ error: FDKError?) -> Void ) { @@ -15821,7 +16047,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item **/ public func updatePagePreview( slug: String, - body: PagePublishRequest, + body: PagePublishPayload, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: PageSchema?, _ error: FDKError?) -> Void ) { @@ -16618,7 +16844,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SlideshowGetResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SlideshowGetDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -16655,7 +16881,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SlideshowGetResponse.self, from: data) + let response = Utility.decode(SlideshowGetDetails.self, from: data) onResponse(response, nil) } else { @@ -16669,48 +16895,13 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item - - - /** - * - * Summary: get paginator for getSlideshows - * Description: fetch the next page by calling .next(...) function - **/ - public func getSlideshowsPaginator( - devicePlatform: String, - pageSize: Int?, - headers: [(key: String, value: String)]? = nil - ) -> Paginator { - let pageSize = pageSize ?? 20 - let paginator = Paginator(pageSize: pageSize, type: "number") - paginator.onPage = { - self.getSlideshows( - devicePlatform: devicePlatform, - pageNo: paginator.pageNo, - pageSize: paginator.pageSize, - - headers: headers - ) { response, error in - if let response = response { - paginator.hasNext = response.page?.hasNext ?? false - paginator.pageNo = (paginator.pageNo ?? 0) + 1 - } - paginator.onNext?(response, error) - } - } - return paginator - } - - - - /** * * Summary: Create a slideshow * Description: Use this API to create a slideshow. **/ public func createSlideshow( - body: SlideshowRequest, + body: SlideshowPayload, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: SlideshowSchema?, _ error: FDKError?) -> Void ) { @@ -16814,7 +17005,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item **/ public func updateSlideshow( id: String, - body: SlideshowRequest, + body: SlideshowPayload, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: SlideshowSchema?, _ error: FDKError?) -> Void ) { @@ -17172,7 +17363,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func removeInjectableTag( body: RemoveHandpickedSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: TagDeleteSuccessResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: TagDeleteSuccessDetails?, _ error: FDKError?) -> Void ) { @@ -17200,7 +17391,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(TagDeleteSuccessResponse.self, from: data) + let response = Utility.decode(TagDeleteSuccessDetails.self, from: data) onResponse(response, nil) } else { @@ -17322,7 +17513,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Description: Generate and add a new page to the platform. **/ public func createPage( - body: PageRequest, + body: PagePayload, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: PageSchema?, _ error: FDKError?) -> Void ) { @@ -17376,7 +17567,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item pageSize: Int?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PageGetResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PageGetDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -17412,7 +17603,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PageGetResponse.self, from: data) + let response = Utility.decode(PageGetDetails.self, from: data) onResponse(response, nil) } else { @@ -17550,6 +17741,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item + /** @@ -17560,7 +17752,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getAppCustomFieldTypes( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectByIdSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: MetafieldTypesSchema?, _ error: FDKError?) -> Void ) { @@ -17588,7 +17780,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectByIdSchema.self, from: data) + let response = Utility.decode(MetafieldTypesSchema.self, from: data) onResponse(response, nil) } else { @@ -17660,9 +17852,11 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func getAppCustomFieldDefinitions( pageNo: String, pageSize: String, - resource: String?, - type: String?, + resources: String?, + types: String?, search: String?, + slugs: String?, + namespaces: String?, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomFieldDefinitionsSchema?, _ error: FDKError?) -> Void @@ -17672,18 +17866,26 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item xQuery["page_no"] = pageNo xQuery["page_size"] = pageSize - if let value = resource { - xQuery["resource"] = value + if let value = resources { + xQuery["resources"] = value } - if let value = type { - xQuery["type"] = value + if let value = types { + xQuery["types"] = value } if let value = search { xQuery["search"] = value } + if let value = slugs { + xQuery["slugs"] = value + } + + if let value = namespaces { + xQuery["namespaces"] = value + } + var xHeaders: [(key: String, value: String)] = [] @@ -17693,7 +17895,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metafields/definitions", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customfields/definition", query: xQuery, body: nil, headers: xHeaders, @@ -17723,18 +17925,43 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Create custom field definition - * Description: You can create custom fields definition to any resource so you can extend property of resource. + * Summary: Get custom fields definitions for a given resource type + * Description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. **/ - public func createAppCustomFieldDefinition( - body: CustomFieldDefinitionRequestSchema, + public func getAppCustomFieldDefinitionByResource( + pageNo: String, + pageSize: String, + resource: String, + types: String?, + search: String?, + slugs: String?, + namespaces: String?, + headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomFieldDefinitionDetailResSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomFieldDefinitionsSchema?, _ error: FDKError?) -> Void ) { - - - var xHeaders: [(key: String, value: String)] = [] + var xQuery: [String: Any] = [:] + xQuery["page_no"] = pageNo + xQuery["page_size"] = pageSize + + if let value = types { + xQuery["types"] = value + } + + if let value = search { + xQuery["search"] = value + } + + if let value = slugs { + xQuery["slugs"] = value + } + + if let value = namespaces { + xQuery["namespaces"] = value + } + + var xHeaders: [(key: String, value: String)] = [] if let headers = headers { @@ -17742,10 +17969,10 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item } PlatformAPIClient.execute( config: config, - method: "POST", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metafields/definitions", - query: nil, - body: body.dictionary, + method: "GET", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customfields/resource/\(resource)/definition", + query: xQuery, + body: nil, headers: xHeaders, responseType: "application/json", onResponse: { (responseData, error, responseCode) in @@ -17757,7 +17984,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomFieldDefinitionDetailResSchema.self, from: data) + let response = Utility.decode(CustomFieldDefinitionsSchema.self, from: data) onResponse(response, nil) } else { @@ -17773,12 +18000,12 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Get custom fields definition - * Description: Custom field definitions can be fetch using definition id. + * Summary: Create custom field definition for a given resource type + * Description: You can create custom fields definition to any resource so you can extend property of resource. **/ - public func getAppCustomFieldDefinition( - definitionId: String, - + public func createAppCustomFieldDefinition( + resource: String, + body: CustomFieldDefinitionRequestSchema, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomFieldDefinitionDetailResSchema?, _ error: FDKError?) -> Void ) { @@ -17793,10 +18020,10 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item } PlatformAPIClient.execute( config: config, - method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metafields/definitions/\(definitionId)", + method: "POST", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customfields/resource/\(resource)/definition", query: nil, - body: nil, + body: body.dictionary, headers: xHeaders, responseType: "application/json", onResponse: { (responseData, error, responseCode) in @@ -17824,14 +18051,16 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Update custom field definition - * Description: Custom fields definition can be update using this api, You can update custom field definition name and description. + * Summary: Get custom fields definition by resource, slug and namespace + * Description: Custom field definitions can be retrived from this using its slug, namespace and resource **/ - public func updateAppCustomFieldDefinition( - definitionId: String, - body: CustomFieldDefinitionRequestSchema, + public func getAppCustomFieldDefinitionBySlug( + slug: String, + resource: String, + namespace: String, + headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomFieldDefinitionDetailResSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: MetaFieldDefinitionDetailResSchema?, _ error: FDKError?) -> Void ) { @@ -17844,10 +18073,10 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item } PlatformAPIClient.execute( config: config, - method: "PUT", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metafields/definitions/\(definitionId)", + method: "GET", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customfields/resource/\(resource)/namespace/\(namespace)/definition/\(slug)", query: nil, - body: body.dictionary, + body: nil, headers: xHeaders, responseType: "application/json", onResponse: { (responseData, error, responseCode) in @@ -17859,7 +18088,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomFieldDefinitionDetailResSchema.self, from: data) + let response = Utility.decode(MetaFieldDefinitionDetailResSchema.self, from: data) onResponse(response, nil) } else { @@ -17875,14 +18104,16 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Delete custom fields definition - * Description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. + * Summary: Update custom field definition + * Description: Custom fields definition can be update using this api, You can update custom field definition name and description. **/ - public func deleteAppCustomFieldDefinition( - definitionId: String, - + public func updateAppCustomFieldDefinitionBySlug( + slug: String, + resource: String, + namespace: String, + body: CustomFieldDefinitionRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomDataDeleteSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomFieldDefinitionDetailResSchema?, _ error: FDKError?) -> Void ) { @@ -17895,10 +18126,10 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item } PlatformAPIClient.execute( config: config, - method: "DELETE", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metafields/definitions/\(definitionId)", + method: "PUT", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customfields/resource/\(resource)/namespace/\(namespace)/definition/\(slug)", query: nil, - body: nil, + body: body.dictionary, headers: xHeaders, responseType: "application/json", onResponse: { (responseData, error, responseCode) in @@ -17910,7 +18141,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomDataDeleteSchema.self, from: data) + let response = Utility.decode(CustomFieldDefinitionDetailResSchema.self, from: data) onResponse(response, nil) } else { @@ -17926,14 +18157,16 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Get list of custom fields of gives resource - * Description: Retrieves a list of custom fields attached to a particular resource by using the resource. + * Summary: Delete custom fields definition + * Description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. **/ - public func getAppCustomFields( + public func deleteAppCustomFieldDefinitionBySlug( + slug: String, resource: String, + namespace: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomFieldsResponseSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomDataDeleteSchema?, _ error: FDKError?) -> Void ) { @@ -17946,8 +18179,8 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item } PlatformAPIClient.execute( config: config, - method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metafields/\(resource)", + method: "DELETE", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customfields/resource/\(resource)/namespace/\(namespace)/definition/\(slug)", query: nil, body: nil, headers: xHeaders, @@ -17961,7 +18194,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomFieldsResponseSchema.self, from: data) + let response = Utility.decode(CustomDataDeleteSchema.self, from: data) onResponse(response, nil) } else { @@ -17977,12 +18210,12 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Get list of custom fields of given resource and resource id - * Description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource id. + * Summary: Get list of custom fields of given resource and resource slug + * Description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. **/ - public func getAppCustomFieldsByResourceId( + public func getAppCustomFieldsByResourceSlug( resource: String, - resourceId: String, + resourceSlug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomFieldsResponseByResourceIdSchema?, _ error: FDKError?) -> Void @@ -17999,7 +18232,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metafields/\(resource)/\(resourceId)", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customfields/resource/\(resource)/\(resourceSlug)", query: nil, body: nil, headers: xHeaders, @@ -18029,12 +18262,12 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Create custom field entries for gives resource and resource_id - * Description: You can add a custom field using this endpoint to any resource by providing the resource ID. + * Summary: Create custom field entries for gives resource and resource slug + * Description: You can add a custom field using this endpoint to any resource by providing the resource slug. **/ - public func createAppCustomFieldByResourceId( + public func updateAppCustomFieldByResourceSlug( resource: String, - resourceId: String, + resourceSlug: String, body: CustomFieldRequestSchema, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomFieldsResponseByResourceIdSchema?, _ error: FDKError?) -> Void @@ -18051,7 +18284,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "PUT", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metafields/\(resource)/\(resourceId)", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customfields/resource/\(resource)/\(resourceSlug)", query: nil, body: body.dictionary, headers: xHeaders, @@ -18087,7 +18320,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item public func createAppCustomObjectDefinition( body: CustomObjectDefinitionRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectDefinitionSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectDefinitionSlugSchema?, _ error: FDKError?) -> Void ) { @@ -18101,7 +18334,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects/definitions", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition", query: nil, body: body.dictionary, headers: xHeaders, @@ -18115,7 +18348,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectDefinitionSchema.self, from: data) + let response = Utility.decode(CustomObjectDefinitionSlugSchema.self, from: data) onResponse(response, nil) } else { @@ -18160,7 +18393,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects/definitions", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition", query: xQuery, body: nil, headers: xHeaders, @@ -18191,13 +18424,13 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * * Summary: Get custom object definition - * Description: Custom object definitions can be fetched using their definition ID. + * Description: Custom object definitions can be fetched using their custom object definition slug. **/ - public func getAppCustomObjectDefinition( - definitionId: String, + public func getAppCustomObjectDefinitionBySlug( + slug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectDefinitionSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectDefinitionSlugSchema?, _ error: FDKError?) -> Void ) { @@ -18211,7 +18444,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects/definitions/\(definitionId)", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition/\(slug)", query: nil, body: nil, headers: xHeaders, @@ -18225,7 +18458,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectDefinitionSchema.self, from: data) + let response = Utility.decode(CustomObjectDefinitionSlugSchema.self, from: data) onResponse(response, nil) } else { @@ -18244,11 +18477,11 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Summary: Update custom object definition * Description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. **/ - public func updateAppCustomObjectDefinition( - definitionId: String, + public func updateAppCustomObjectDefinitionBySlug( + slug: String, body: CustomObjectDefinitionUpdateRequestSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectDefinitionSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectDefinitionSlugSchema?, _ error: FDKError?) -> Void ) { @@ -18262,7 +18495,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "PUT", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects/definitions/\(definitionId)", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition/\(slug)", query: nil, body: body.dictionary, headers: xHeaders, @@ -18276,7 +18509,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectDefinitionSchema.self, from: data) + let response = Utility.decode(CustomObjectDefinitionSlugSchema.self, from: data) onResponse(response, nil) } else { @@ -18295,8 +18528,8 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Summary: Delete custom object definition * Description: Custom object definitions can be deleted using this endpoint by providing the definition ID. **/ - public func deleteAppCustomObjectDefinition( - definitionId: String, + public func deleteAppCustomObjectDefinitionBySlug( + slug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomObjectDefinitionDeleteResponseSchema?, _ error: FDKError?) -> Void @@ -18313,7 +18546,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "DELETE", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects/definitions/\(definitionId)", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition/\(slug)", query: nil, body: nil, headers: xHeaders, @@ -18346,20 +18579,16 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Summary: Get list of custom objects * Description: Custom object entries can fetch using this endpoint. **/ - public func getAppCustomObjects( - definitionId: String?, + public func getAppCustomObjectsBySlug( pageNo: String, pageSize: String, + definitionSlug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomObjectsSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] - - if let value = definitionId { - xQuery["definition_id"] = value - } xQuery["page_no"] = pageNo xQuery["page_size"] = pageSize @@ -18372,7 +18601,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition/\(definitionSlug)/entries", query: xQuery, body: nil, headers: xHeaders, @@ -18405,8 +18634,9 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Summary: Create custom object entries * Description: Custom object entries against the custom object definition can be added using this API. **/ - public func createAppCustomObject( - body: CustomObjectRequestSchema, + public func createAppCustomObjectBySlug( + definitionSlug: String, + body: CustomObjectRequestSchemaWithoutId, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomObjectSchema?, _ error: FDKError?) -> Void ) { @@ -18422,7 +18652,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition/\(definitionSlug)/entries", query: nil, body: body.dictionary, headers: xHeaders, @@ -18453,13 +18683,14 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * * Summary: Get custom object details - * Description: Details of custom objects, their field details, definitions, and references can be obtained using this endpoint. + * Description: Details of a custom object entry can be obtained using this endpoint. **/ - public func getAppCustomObject( - metaobjectId: String, + public func getAppCustomObjectBySlug( + definitionSlug: String, + slug: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectByIdSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectBySlugSchema?, _ error: FDKError?) -> Void ) { @@ -18473,7 +18704,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects/\(metaobjectId)", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition/\(definitionSlug)/entries/\(slug)", query: nil, body: nil, headers: xHeaders, @@ -18487,7 +18718,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectByIdSchema.self, from: data) + let response = Utility.decode(CustomObjectBySlugSchema.self, from: data) onResponse(response, nil) } else { @@ -18504,10 +18735,11 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * * Summary: Delete custom object - * Description: Custom object entries can be deleted by providing the delete ID using this endpoint. + * Description: A Custom object entry can be deleted by providing the custom object definition slug and custom object entry slug using this endpoint. **/ - public func deleteAppCustomObject( - metaobjectId: String, + public func deleteAppCustomObjectBySlug( + definitionSlug: String, + slug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomDataDeleteSchema?, _ error: FDKError?) -> Void @@ -18524,7 +18756,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "DELETE", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects/\(metaobjectId)", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition/\(definitionSlug)/entries/\(slug)", query: nil, body: nil, headers: xHeaders, @@ -18557,11 +18789,12 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Summary: Update custom object details * Description: Custom object entries can be updated using this endpoint. **/ - public func updateAppCustomObject( - metaobjectId: String, - body: CustomObjectRequestSchema, + public func updateAppCustomObjectBySlug( + definitionSlug: String, + slug: String, + body: CustomObjectRequestSchemaWithoutId, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectByIdSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectBySlugSchema?, _ error: FDKError?) -> Void ) { @@ -18575,7 +18808,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "PUT", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects/\(metaobjectId)", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition/\(definitionSlug)/entries/\(slug)", query: nil, body: body.dictionary, headers: xHeaders, @@ -18589,7 +18822,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectByIdSchema.self, from: data) + let response = Utility.decode(CustomObjectBySlugSchema.self, from: data) onResponse(response, nil) } else { @@ -18664,11 +18897,11 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Summary: Bulk custom object entries upload * Description: Custom object bulk import of bulk entries can be performed using this endpoint. **/ - public func importAppCustomObjectEntries( - definitionId: String, + public func importAppCustomObjectEntriesBySlug( + slug: String, body: CustomObjectBulkSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CustomObjectEntryBulkUploadResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CustomObjectEntryBulkUploadDetails?, _ error: FDKError?) -> Void ) { @@ -18682,7 +18915,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects/bulk/\(definitionId)/upload", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition/\(slug)/bulk/upload", query: nil, body: body.dictionary, headers: xHeaders, @@ -18696,7 +18929,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CustomObjectEntryBulkUploadResponse.self, from: data) + let response = Utility.decode(CustomObjectEntryBulkUploadDetails.self, from: data) onResponse(response, nil) } else { @@ -18715,8 +18948,8 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Summary: Initiate download for bulk custom object entries * Description: Custom object bulk export of bulk entries can be perform using this endpoint. **/ - public func exportAppCustomObjectEntries( - definitionId: String, + public func exportAppCustomObjectEntriesBySlug( + slug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CustomObjectBulkEntryInitiateDownload?, _ error: FDKError?) -> Void @@ -18733,7 +18966,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects/bulk/\(definitionId)/download", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition/\(slug)/bulk/download", query: nil, body: nil, headers: xHeaders, @@ -18766,8 +18999,8 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item * Summary: Download sample for custom object bulk entry * Description: Sample files for custom object bulk import can be obtained from this endpoint. **/ - public func sampleAppCustomObjectBulkEntry( - definitionId: String, + public func sampleAppCustomObjectBulkEntryBySlug( + slug: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: String?, _ error: FDKError?) -> Void @@ -18784,7 +19017,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "GET", - url: "/service/platform/content/v1.0/company/\(companyId)/application/\(applicationId)/metaobjects/bulk/\(definitionId)/sample", + url: "/service/platform/content/v2.0/company/\(companyId)/application/\(applicationId)/customobjects/definition/\(slug)/bulk/sample", query: nil, body: nil, headers: xHeaders, @@ -18831,14 +19064,14 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Initiates file upload for Application - * Description: Inititates the process of uploading a file to storage location, and returns a storage link in response on platofrm at application level. Please refer group description for more details. + * Summary: Application start upload. + * Description: Start uploading a file from an application and returns a storage link in response. **/ public func appStartUpload( namespace: String, - body: StartRequest, + body: FileUploadStart, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: StartResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileUpload?, _ error: FDKError?) -> Void ) { @@ -18852,7 +19085,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/assets/v1.0/company/\(companyId)/application/\(applicationId)/namespaces/\(namespace)/upload/start", + url: "/service/platform/assets/v2.0/company/\(companyId)/application/\(applicationId)/namespaces/\(namespace)/upload/start", query: nil, body: body.dictionary, headers: xHeaders, @@ -18866,7 +19099,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(StartResponse.self, from: data) + let response = Utility.decode(FileUpload.self, from: data) onResponse(response, nil) } else { @@ -18882,14 +19115,14 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Complete file upload for Application - * Description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database on platform at application level + * Summary: Application complete upload. + * Description: Finish uploading a file from an application. **/ public func appCompleteUpload( namespace: String, - body: StartResponse, + body: FileUpload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CompleteResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: FileUploadComplete?, _ error: FDKError?) -> Void ) { @@ -18903,7 +19136,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item PlatformAPIClient.execute( config: config, method: "POST", - url: "/service/platform/assets/v1.0/company/\(companyId)/application/\(applicationId)/namespaces/\(namespace)/upload/complete", + url: "/service/platform/assets/v2.0/company/\(companyId)/application/\(applicationId)/namespaces/\(namespace)/upload/complete", query: nil, body: body.dictionary, headers: xHeaders, @@ -18917,7 +19150,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CompleteResponse.self, from: data) + let response = Utility.decode(FileUploadComplete.self, from: data) onResponse(response, nil) } else { @@ -18935,8 +19168,8 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Copy files for Application - * Description: Handle multiple file uploads, updating progress and providing detailed status reports. + * Summary: Application copy files. + * Description: Copy files from an application to another location. **/ public func appCopyFiles( sync: Bool?, @@ -18991,8 +19224,8 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Browse files for Application - * Description: View and navigate through available files. + * Summary: Application browse files. + * Description: Browse files within an application. **/ public func appbrowse( namespace: String, @@ -19057,8 +19290,8 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Browse files for Application - * Description: View and navigate through available files. + * Summary: Browse Files + * Description: Browse Files **/ public func browsefiles( namespace: String, @@ -19121,17 +19354,17 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item - /** * - * Summary: Get PDF types - * Description: Retrieve a list of available invoice types. + * Summary: Get all the supported invoice pdf types + * Description: Get all the supported invoice pdf types such as Invoice, Label, Delivery challan **/ public func getPdfTypes( countryCode: String?, + storeOs: Bool, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: InvoiceTypesResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: InvoiceTypes?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -19139,6 +19372,7 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item if let value = countryCode { xQuery["country_code"] = value } + xQuery["store_os"] = storeOs var xHeaders: [(key: String, value: String)] = [] @@ -19163,7 +19397,58 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(InvoiceTypesResponse.self, from: data) + let response = Utility.decode(InvoiceTypes.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: Get the pdf types of by id + * Description: Get the pdf types of PDF formats for filter + **/ + public func fetchPdfTypeById( + id: String, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: PdfTypeByIdDetails?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "GET", + url: "/service/platform/assets/v1.0/company/\(companyId)/application/\(applicationId)/pdf/types/\(id)", + query: nil, + body: nil, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(PdfTypeByIdDetails.self, from: data) onResponse(response, nil) } else { @@ -19179,15 +19464,15 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Get default PDF data - * Description: Retrieve default pdf payload data for invoice generation. + * Summary: Get default PDF data. + * Description: Retrieve default data for PDF generation. **/ public func getDefaultPdfData( pdfTypeId: Int, countryCode: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: DummyTemplateDataItems?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PdfDataItemsDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -19220,7 +19505,109 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(DummyTemplateDataItems.self, from: data) + let response = Utility.decode(PdfDataItemsDetails.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: Get default PDF data. + * Description: Retrieve default data for PDF generation. + **/ + public func getPdfPayloadById( + id: String, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: MapperDetails?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "GET", + url: "/service/platform/assets/v1.0/company/\(companyId)/application/\(applicationId)/pdf/mapper/\(id)", + query: nil, + body: nil, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(MapperDetails.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: Update html template for invoice or label + * Description: Update html template for invoice such as Invoice, Label, Deliver challan + **/ + public func getConfigHtmlTemplateById( + id: String, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: [String: Any]?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "GET", + url: "/service/platform/assets/v1.0/company/\(companyId)/application/\(applicationId)/pdf/config/\(id)", + query: nil, + body: nil, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = data.dictionary onResponse(response, nil) } else { @@ -19287,12 +19674,61 @@ Apply a coupon code to the customer's cart to trigger discounts on eligible item /** * - * Summary: Get html template for Application - * Description: -Get the saved html template for provided sales channel - + * Summary: Delete a PDF generator configuration + * Description: Deletes a specific PDF generator configuration based on the provided id. + **/ + public func deletePdfGeneratorConfig( + id: String, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: [String: Any]?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "DELETE", + url: "/service/platform/assets/v1.0/company/\(companyId)/application/\(applicationId)/pdf/config/\(id)", + query: nil, + body: nil, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = data.dictionary + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: Get html template for sales channel + * Description: Get default html template for invoice or label **/ - public func getDefaultHtmlTemplate( + public func getHtmlTemplateConfig( pdfTypeId: Int, format: String, countryCode: String?, @@ -19348,8 +19784,8 @@ Get the saved html template for provided sales channel /** * - * Summary: Save PDF template - * Description: Save html template for provided sales channel + * Summary: Save HTML template. + * Description: Store an HTML template. **/ public func saveHtmlTemplate( body: PdfConfig, @@ -19398,8 +19834,8 @@ Get the saved html template for provided sales channel /** * - * Summary: Get default PDF template - * Description: Retrieve to get the default Invoice template. + * Summary: Get default PDF template. + * Description: Retrieve the default PDF template. **/ public func getDefaultPdfTemplate( pdfTypeId: Int, @@ -19457,7 +19893,7 @@ Get the saved html template for provided sales channel /** * - * Summary: Generate payment receipt + * Summary: Generate payment receipt. * Description: Generate Payment Receipt for Jiomart Digital **/ public func generatePaymentReceipt( @@ -19502,6 +19938,58 @@ Get the saved html template for provided sales channel } }); } + + + + /** + * + * Summary: get default html template for invoice or label + * Description: get default html template for invoice such as Invoice, Label, Deliver challan + **/ + public func fetchPdfDefaultTemplateById( + id: String, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: PdfDefaultTemplateById?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "GET", + url: "/service/platform/assets/v1.0/company/\(companyId)/application/\(applicationId)/pdf/default-template/\(id)", + query: nil, + body: nil, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(PdfDefaultTemplateById.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + } @@ -20094,7 +20582,7 @@ Get the saved html template for provided sales channel public func updatePincodeMopView( body: PincodeMopData, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PincodeMOPresponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PincodeMOPResult?, _ error: FDKError?) -> Void ) { @@ -20122,7 +20610,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PincodeMOPresponse.self, from: data) + let response = Utility.decode(PincodeMOPResult.self, from: data) onResponse(response, nil) } else { @@ -20144,7 +20632,7 @@ Get the saved html template for provided sales channel public func updatePincodeBulkView( body: PincodeMopBulkData, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PincodeBulkViewResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PincodeBulkViewResult?, _ error: FDKError?) -> Void ) { @@ -20172,7 +20660,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PincodeBulkViewResponse.self, from: data) + let response = Utility.decode(PincodeBulkViewResult.self, from: data) onResponse(response, nil) } else { @@ -20192,9 +20680,9 @@ Get the saved html template for provided sales channel * Description: Retrieves a list of pincodes along with the count based on whether cash on delivery settings. **/ public func updatePincodeCoDListing( - body: PincodeCodStatusListingRequest, + body: PincodeCodStatusListingDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PincodeCodStatusListingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PincodeCodStatusListingResult?, _ error: FDKError?) -> Void ) { @@ -20222,7 +20710,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PincodeCodStatusListingResponse.self, from: data) + let response = Utility.decode(PincodeCodStatusListingResult.self, from: data) onResponse(response, nil) } else { @@ -20242,9 +20730,9 @@ Get the saved html template for provided sales channel * Description: Retrieves the history of changes made to cash on delivery settings for pincodes. **/ public func updatePincodeAuditHistory( - body: PincodeMopUpdateAuditHistoryRequest, + body: PincodeMopUpdateAuditHistoryDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PincodeMopUpdateAuditHistoryResponseData?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PincodeMopUpdateAuditHistoryResultData?, _ error: FDKError?) -> Void ) { @@ -20272,7 +20760,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PincodeMopUpdateAuditHistoryResponseData.self, from: data) + let response = Utility.decode(PincodeMopUpdateAuditHistoryResultData.self, from: data) onResponse(response, nil) } else { @@ -20299,7 +20787,7 @@ Get the saved html template for provided sales channel ruleId: String, body: CourierPartnerRule, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CourierPartnerRuleResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CourierPartnerRuleResult?, _ error: FDKError?) -> Void ) { @@ -20327,7 +20815,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CourierPartnerRuleResponse.self, from: data) + let response = Utility.decode(CourierPartnerRuleResult.self, from: data) onResponse(response, nil) } else { @@ -20350,7 +20838,7 @@ Get the saved html template for provided sales channel ruleId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CourierPartnerRuleResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CourierPartnerRuleResult?, _ error: FDKError?) -> Void ) { @@ -20378,7 +20866,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CourierPartnerRuleResponse.self, from: data) + let response = Utility.decode(CourierPartnerRuleResult.self, from: data) onResponse(response, nil) } else { @@ -20400,7 +20888,7 @@ Get the saved html template for provided sales channel public func createCourierPartnerRule( body: CourierPartnerRule, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CourierPartnerRuleResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CourierPartnerRuleResult?, _ error: FDKError?) -> Void ) { @@ -20428,7 +20916,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CourierPartnerRuleResponse.self, from: data) + let response = Utility.decode(CourierPartnerRuleResult.self, from: data) onResponse(response, nil) } else { @@ -20453,7 +20941,7 @@ Get the saved html template for provided sales channel status: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CourierPartnerRulesListResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CourierPartnerRulesListResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -20493,7 +20981,57 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CourierPartnerRulesListResponse.self, from: data) + let response = Utility.decode(CourierPartnerRulesListResult.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + + /** + * + * Summary: Serviceable Courier Partners. + * Description: Get all the serviceable courier partners of a destination and the shipments. + **/ + public func getCourierPartners( + body: ShipmentCourierPartnerDetails, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: ShipmentCourierPartnerResult?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "POST", + url: "/service/platform/logistics/v1.0/company/\(companyId)/application/\(applicationId)/shipment/courier-partners", + query: nil, + body: body.dictionary, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(ShipmentCourierPartnerResult.self, from: data) onResponse(response, nil) } else { @@ -20617,9 +21155,9 @@ Get the saved html template for provided sales channel * Description: Updates self ship setup for an existing application **/ public func patchApplicationServiceabilitySelfShipment( - body: SelfShipResponse, + body: SelfShipResult, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ApplicationSelfShipConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ApplicationSelfShipConfigResult?, _ error: FDKError?) -> Void ) { @@ -20647,7 +21185,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ApplicationSelfShipConfigResponse.self, from: data) + let response = Utility.decode(ApplicationSelfShipConfigResult.self, from: data) onResponse(response, nil) } else { @@ -20669,7 +21207,7 @@ Get the saved html template for provided sales channel public func getApplicationServiceabilitySelfShipment( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ApplicationSelfShipConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ApplicationSelfShipConfigResult?, _ error: FDKError?) -> Void ) { @@ -20697,7 +21235,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ApplicationSelfShipConfigResponse.self, from: data) + let response = Utility.decode(ApplicationSelfShipConfigResult.self, from: data) onResponse(response, nil) } else { @@ -20872,7 +21410,7 @@ Get the saved html template for provided sales channel status: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetStoreRulesApiResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetStoreRulesApiResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -20912,7 +21450,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetStoreRulesApiResponse.self, from: data) + let response = Utility.decode(GetStoreRulesApiResult.self, from: data) onResponse(response, nil) } else { @@ -20932,9 +21470,9 @@ Get the saved html template for provided sales channel * Description: Create a rule within the order routing rules **/ public func createStoreRules( - body: CreateStoreRuleRequestSchema, + body: CreateStoreRuleDetailsSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: StoreRuleResponseSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: StoreRuleResultSchema?, _ error: FDKError?) -> Void ) { @@ -20962,7 +21500,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(StoreRuleResponseSchema.self, from: data) + let response = Utility.decode(StoreRuleResultSchema.self, from: data) onResponse(response, nil) } else { @@ -21034,9 +21572,9 @@ Get the saved html template for provided sales channel **/ public func updateStoreRules( ruleUid: String, - body: CreateStoreRuleRequestSchema, + body: CreateStoreRuleDetailsSchema, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: StoreRuleUpdateResponseSchema?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: StoreRuleUpdateResultSchema?, _ error: FDKError?) -> Void ) { @@ -21064,7 +21602,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(StoreRuleUpdateResponseSchema.self, from: data) + let response = Utility.decode(StoreRuleUpdateResultSchema.self, from: data) onResponse(response, nil) } else { @@ -21096,9 +21634,9 @@ Get the saved html template for provided sales channel * Description: Updates a courier partner rule priority for a single application **/ public func updateCourierPartnerRulePriority( - body: RulePriorityRequest, + body: RulePriorityDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RulePriorityResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RulePriorityResult?, _ error: FDKError?) -> Void ) { @@ -21126,7 +21664,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RulePriorityResponse.self, from: data) + let response = Utility.decode(RulePriorityResult.self, from: data) onResponse(response, nil) } else { @@ -21191,7 +21729,62 @@ Get the saved html template for provided sales channel + + + + + + + + + /** + * + * Summary: List of RMA rules based on the given input conditions. + * Description: Retrieves a comprehensive list of RMA (Return Merchandise Authorization) rules associated with a specific company and application. These rules dictate the processes for handling returns, including actions, reasons, quality control (QC) types, and associated questions. The endpoint allows for filtering and pagination based on input conditions, providing a tailored set of rules that match the criteria specified. + **/ + public func getRules( + body: RuleListRequestSchema, + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: RuleListResponseSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PlatformAPIClient.execute( + config: config, + method: "POST", + url: "/service/platform/order-manage/v1.0/company/\(companyId)/application/\(applicationId)/rule_list", + query: nil, + body: body.dictionary, + headers: xHeaders, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(RuleListResponseSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } @@ -21276,7 +21869,7 @@ Get the saved html template for provided sales channel excludeLockedShipments: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ShipmentInternalPlatformViewResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ShipmentInternalPlatformViewResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -21364,7 +21957,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ShipmentInternalPlatformViewResponse.self, from: data) + let response = Utility.decode(ShipmentInternalPlatformViewResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -21443,7 +22036,7 @@ Get the saved html template for provided sales channel action: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ShipmentReasonsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ShipmentReasonsResponseSchema?, _ error: FDKError?) -> Void ) { @@ -21471,7 +22064,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ShipmentReasonsResponse.self, from: data) + let response = Utility.decode(ShipmentReasonsResponseSchema.self, from: data) onResponse(response, nil) } else { @@ -21514,7 +22107,7 @@ Get the saved html template for provided sales channel extensionId: String, body: AddProxyReq, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AddProxyResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ExtensionProxyPathCreation?, _ error: FDKError?) -> Void ) { @@ -21542,7 +22135,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AddProxyResponse.self, from: data) + let response = Utility.decode(ExtensionProxyPathCreation.self, from: data) onResponse(response, nil) } else { @@ -21566,7 +22159,7 @@ Get the saved html template for provided sales channel attachedPath: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RemoveProxyResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ExtensionProxyPathDelete?, _ error: FDKError?) -> Void ) { @@ -21594,7 +22187,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RemoveProxyResponse.self, from: data) + let response = Utility.decode(ExtensionProxyPathDelete.self, from: data) onResponse(response, nil) } else { @@ -21633,7 +22226,7 @@ Get the saved html template for provided sales channel configType: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentGatewayConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentGatewayConfigDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -21669,7 +22262,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentGatewayConfigResponse.self, from: data) + let response = Utility.decode(PaymentGatewayConfigDetails.self, from: data) onResponse(response, nil) } else { @@ -21689,7 +22282,7 @@ Get the saved html template for provided sales channel * Description: Store and update configuration settings for brand payment gateways i.e required for payment for a payment gateway like key, secret, merchant salt. **/ public func saveBrandPaymentGatewayConfig( - body: PaymentGatewayConfigRequest, + body: PaymentGatewayConfigCreation, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: PaymentGatewayToBeReviewed?, _ error: FDKError?) -> Void ) { @@ -21745,7 +22338,7 @@ Get the saved html template for provided sales channel shipmentId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentOptionsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentOptionsDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -21783,7 +22376,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentOptionsResponse.self, from: data) + let response = Utility.decode(PaymentOptionsDetails.self, from: data) onResponse(response, nil) } else { @@ -21816,7 +22409,7 @@ Get the saved html template for provided sales channel requestHash: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RefundAccountResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RefundAccountDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -21849,7 +22442,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RefundAccountResponse.self, from: data) + let response = Utility.decode(RefundAccountDetails.self, from: data) onResponse(response, nil) } else { @@ -21869,9 +22462,9 @@ Get the saved html template for provided sales channel * Description: The addition of a bank account specifically for refunds, employing OTP verification for security **/ public func addRefundBankAccountUsingOTP( - body: AddBeneficiaryDetailsOTPRequest, + body: AddBeneficiaryDetailsOTPCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RefundAccountResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RefundAccountDetails?, _ error: FDKError?) -> Void ) { @@ -21899,7 +22492,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RefundAccountResponse.self, from: data) + let response = Utility.decode(RefundAccountDetails.self, from: data) onResponse(response, nil) } else { @@ -21923,7 +22516,7 @@ Get the saved html template for provided sales channel orderId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OrderBeneficiaryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OrderBeneficiaryFetchResults?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -21952,7 +22545,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OrderBeneficiaryResponse.self, from: data) + let response = Utility.decode(OrderBeneficiaryFetchResults.self, from: data) onResponse(response, nil) } else { @@ -21975,7 +22568,7 @@ Get the saved html template for provided sales channel orderId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: OrderBeneficiaryResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: OrderBeneficiaryFetchResults?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -22004,7 +22597,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(OrderBeneficiaryResponse.self, from: data) + let response = Utility.decode(OrderBeneficiaryFetchResults.self, from: data) onResponse(response, nil) } else { @@ -22024,9 +22617,9 @@ Get the saved html template for provided sales channel * Description: Authentication and confirmation of a payment.It requires details such as the order ID and payment methods in the request body to authenticate and confirm the payment. **/ public func confirmPayment( - body: PaymentConfirmationRequest, + body: PaymentConfirmationCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentConfirmationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentConfirmationDetails?, _ error: FDKError?) -> Void ) { @@ -22054,7 +22647,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentConfirmationResponse.self, from: data) + let response = Utility.decode(PaymentConfirmationDetails.self, from: data) onResponse(response, nil) } else { @@ -22078,7 +22671,7 @@ Get the saved html template for provided sales channel mobileNo: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetUserCODLimitResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetUserCODLimitDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -22108,7 +22701,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetUserCODLimitResponse.self, from: data) + let response = Utility.decode(GetUserCODLimitDetails.self, from: data) onResponse(response, nil) } else { @@ -22128,9 +22721,9 @@ Get the saved html template for provided sales channel * Description: This allows access to seller to enable disable cod of specific user **/ public func setUserCODlimitRoutes( - body: SetCODForUserRequest, + body: SetCODForUserCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SetCODOptionResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SetCODOptionDetails?, _ error: FDKError?) -> Void ) { @@ -22158,7 +22751,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SetCODOptionResponse.self, from: data) + let response = Utility.decode(SetCODOptionDetails.self, from: data) onResponse(response, nil) } else { @@ -22180,7 +22773,7 @@ Get the saved html template for provided sales channel public func edcAggregatorsAndModelList( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EdcAggregatorAndModelListResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EdcAggregatorAndModelListDetails?, _ error: FDKError?) -> Void ) { @@ -22208,7 +22801,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EdcAggregatorAndModelListResponse.self, from: data) + let response = Utility.decode(EdcAggregatorAndModelListDetails.self, from: data) onResponse(response, nil) } else { @@ -22230,7 +22823,7 @@ Get the saved html template for provided sales channel public func edcDeviceStats( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EdcDeviceStatsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EdcDeviceStatsDetails?, _ error: FDKError?) -> Void ) { @@ -22258,7 +22851,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EdcDeviceStatsResponse.self, from: data) + let response = Utility.decode(EdcDeviceStatsDetails.self, from: data) onResponse(response, nil) } else { @@ -22278,9 +22871,9 @@ Get the saved html template for provided sales channel * Description: Enables the modification of settings and details associated with an Electronic Data Capture (EDC) device linked to a specific application within a company. Upon success, it returns the updated information of the EDC device. **/ public func updateEdcDevice( - body: EdcAddRequest, + body: EdcAddCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EdcDeviceAddResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EdcDeviceAddDetails?, _ error: FDKError?) -> Void ) { @@ -22308,7 +22901,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EdcDeviceAddResponse.self, from: data) + let response = Utility.decode(EdcDeviceAddDetails.self, from: data) onResponse(response, nil) } else { @@ -22331,7 +22924,7 @@ Get the saved html template for provided sales channel terminalUniqueIdentifier: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EdcDeviceDetailsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EdcDeviceDetails?, _ error: FDKError?) -> Void ) { @@ -22359,7 +22952,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EdcDeviceDetailsResponse.self, from: data) + let response = Utility.decode(EdcDeviceDetails.self, from: data) onResponse(response, nil) } else { @@ -22380,9 +22973,9 @@ Get the saved html template for provided sales channel **/ public func addEdcDevice( terminalUniqueIdentifier: String, - body: EdcUpdateRequest, + body: EdcUpdate, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EdcDeviceUpdateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EdcDeviceUpdateDetails?, _ error: FDKError?) -> Void ) { @@ -22410,7 +23003,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EdcDeviceUpdateResponse.self, from: data) + let response = Utility.decode(EdcDeviceUpdateDetails.self, from: data) onResponse(response, nil) } else { @@ -22437,7 +23030,7 @@ Get the saved html template for provided sales channel deviceTag: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EdcDeviceListResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EdcDeviceListDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -22485,7 +23078,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EdcDeviceListResponse.self, from: data) + let response = Utility.decode(EdcDeviceListDetails.self, from: data) onResponse(response, nil) } else { @@ -22519,7 +23112,7 @@ Get the saved html template for provided sales channel shipmentId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentModeRouteResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentModeRouteDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -22586,7 +23179,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentModeRouteResponse.self, from: data) + let response = Utility.decode(PaymentModeRouteDetails.self, from: data) onResponse(response, nil) } else { @@ -22606,9 +23199,9 @@ Get the saved html template for provided sales channel * Description: Initiates the payment procedure for an order.Upon successful initiation, it returns a details including the success status, aggregator information, payment method, status, merchant order ID aggregator order , polling URL, timeout, virtual ID, Razorpay payment ID, customer ID, and device ID. **/ public func initialisePayment( - body: PaymentInitializationRequest, + body: PaymentInitializationCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentInitializationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentInitializationDetails?, _ error: FDKError?) -> Void ) { @@ -22636,7 +23229,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentInitializationResponse.self, from: data) + let response = Utility.decode(PaymentInitializationDetails.self, from: data) onResponse(response, nil) } else { @@ -22656,9 +23249,9 @@ Get the saved html template for provided sales channel * Description: Polling process to confirm the payment status. It periodically checks and updates the current status of a payment, ensuring timely and accurate confirmation of payment transactions. **/ public func checkAndUpdatePaymentStatus( - body: PaymentStatusUpdateRequest, + body: PaymentStatusUpdateCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentStatusUpdateResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentStatusUpdateDetails?, _ error: FDKError?) -> Void ) { @@ -22686,7 +23279,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentStatusUpdateResponse.self, from: data) + let response = Utility.decode(PaymentStatusUpdateDetails.self, from: data) onResponse(response, nil) } else { @@ -22706,9 +23299,9 @@ Get the saved html template for provided sales channel * Description: Enable you to perform actions related to the resending and cancellation of payment links through SMS or EMAIL. resend or cancel payment link that have been initiated but may require modification or cancellation for various reasons, ensuring flexibility and control in payment processing. **/ public func resendOrCancelPayment( - body: ResendOrCancelPaymentRequest, + body: ResendOrCancelPaymentCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ResendOrCancelPaymentResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ResendOrCancelPaymentDetails?, _ error: FDKError?) -> Void ) { @@ -22736,7 +23329,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ResendOrCancelPaymentResponse.self, from: data) + let response = Utility.decode(ResendOrCancelPaymentDetails.self, from: data) onResponse(response, nil) } else { @@ -22756,9 +23349,9 @@ Get the saved html template for provided sales channel * Description: Retrieve status of multiple payments in bulk and returns the status of each payment along with associated details such as payment ID, amount, currency, status, payment mode, and payment gateway in the response **/ public func paymentStatusBulk( - body: PaymentStatusBulkHandlerRequest, + body: PaymentStatusBulkHandlerCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentStatusBulkHandlerResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentStatusBulkHandlerDetails?, _ error: FDKError?) -> Void ) { @@ -22786,7 +23379,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentStatusBulkHandlerResponse.self, from: data) + let response = Utility.decode(PaymentStatusBulkHandlerDetails.self, from: data) onResponse(response, nil) } else { @@ -22811,7 +23404,7 @@ Get the saved html template for provided sales channel failureRedirectUrl: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetOauthUrlResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetOauthUrlDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -22847,7 +23440,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetOauthUrlResponse.self, from: data) + let response = Utility.decode(GetOauthUrlDetails.self, from: data) onResponse(response, nil) } else { @@ -22920,7 +23513,7 @@ Get the saved html template for provided sales channel public func repaymentDetails( body: RepaymentDetailsSerialiserPayAll, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RepaymentResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RepaymentDetails?, _ error: FDKError?) -> Void ) { @@ -22948,7 +23541,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RepaymentResponse.self, from: data) + let response = Utility.decode(RepaymentDetails.self, from: data) onResponse(response, nil) } else { @@ -22968,9 +23561,9 @@ Get the saved html template for provided sales channel * Description: Initiate the merchant onboarding process for Buy Now Pay Later (BNPL). **/ public func merchantOnBoarding( - body: MerchantOnBoardingRequest, + body: MerchantOnBoardingCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: MerchantOnBoardingResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: MerchantOnBoardingDetails?, _ error: FDKError?) -> Void ) { @@ -22998,7 +23591,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(MerchantOnBoardingResponse.self, from: data) + let response = Utility.decode(MerchantOnBoardingDetails.self, from: data) onResponse(response, nil) } else { @@ -23018,9 +23611,9 @@ Get the saved html template for provided sales channel * Description: Verify whether the user is eligible for pay-later payment from the payment aggregator's side using the customer's phone number **/ public func verifyCustomerForPayment( - body: ValidateCustomerRequest, + body: ValidateCustomerCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ValidateCustomerResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ValidateCustomerDetails?, _ error: FDKError?) -> Void ) { @@ -23048,7 +23641,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ValidateCustomerResponse.self, from: data) + let response = Utility.decode(ValidateCustomerDetails.self, from: data) onResponse(response, nil) } else { @@ -23071,7 +23664,7 @@ Get the saved html template for provided sales channel paymentLinkId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetPaymentLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetPaymentLinkDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -23103,7 +23696,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetPaymentLinkResponse.self, from: data) + let response = Utility.decode(GetPaymentLinkDetails.self, from: data) onResponse(response, nil) } else { @@ -23123,9 +23716,9 @@ Get the saved html template for provided sales channel * Description: Generate a payment link for accepting payments. **/ public func createPaymentLink( - body: CreatePaymentLinkRequest, + body: CreatePaymentLinkCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CreatePaymentLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CreatePaymentLinkDetails?, _ error: FDKError?) -> Void ) { @@ -23153,7 +23746,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CreatePaymentLinkResponse.self, from: data) + let response = Utility.decode(CreatePaymentLinkDetails.self, from: data) onResponse(response, nil) } else { @@ -23176,7 +23769,7 @@ Get the saved html template for provided sales channel paymentLinkId: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PollingPaymentLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PollingPaymentLinkDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -23208,7 +23801,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PollingPaymentLinkResponse.self, from: data) + let response = Utility.decode(PollingPaymentLinkDetails.self, from: data) onResponse(response, nil) } else { @@ -23228,9 +23821,9 @@ Get the saved html template for provided sales channel * Description: Resends an existing payment link to the user to complete the payment. **/ public func resendPaymentLink( - body: CancelOrResendPaymentLinkRequest, + body: CancelOrResendPaymentLinkCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ResendPaymentLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ResendPaymentLinkDetails?, _ error: FDKError?) -> Void ) { @@ -23258,7 +23851,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ResendPaymentLinkResponse.self, from: data) + let response = Utility.decode(ResendPaymentLinkDetails.self, from: data) onResponse(response, nil) } else { @@ -23278,9 +23871,9 @@ Get the saved html template for provided sales channel * Description: Deactivate and cancel a payment link. **/ public func cancelPaymentLink( - body: CancelOrResendPaymentLinkRequest, + body: CancelOrResendPaymentLinkCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: CancelPaymentLinkResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: CancelPaymentLinkDetails?, _ error: FDKError?) -> Void ) { @@ -23308,7 +23901,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(CancelPaymentLinkResponse.self, from: data) + let response = Utility.decode(CancelPaymentLinkDetails.self, from: data) onResponse(response, nil) } else { @@ -23331,7 +23924,7 @@ Get the saved html template for provided sales channel mode: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformPaymentModeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformPaymentModeDetails?, _ error: FDKError?) -> Void ) { @@ -23359,7 +23952,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformPaymentModeResponse.self, from: data) + let response = Utility.decode(PlatformPaymentModeDetails.self, from: data) onResponse(response, nil) } else { @@ -23380,9 +23973,9 @@ Get the saved html template for provided sales channel **/ public func setMerchantModeControlRoutes( mode: String, - body: MerchantPaymentModeRequest, + body: MerchantPaymentModeCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformPaymentModeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformPaymentModeDetails?, _ error: FDKError?) -> Void ) { @@ -23410,7 +24003,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformPaymentModeResponse.self, from: data) + let response = Utility.decode(PlatformPaymentModeDetails.self, from: data) onResponse(response, nil) } else { @@ -23534,7 +24127,7 @@ Get the saved html template for provided sales channel public func getPaymentCodeOption( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GetPaymentCodeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: GetPaymentCodeDetails?, _ error: FDKError?) -> Void ) { @@ -23562,7 +24155,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GetPaymentCodeResponse.self, from: data) + let response = Utility.decode(GetPaymentCodeDetails.self, from: data) onResponse(response, nil) } else { @@ -23586,7 +24179,7 @@ Get the saved html template for provided sales channel lineItem: Bool?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentSessionSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentSessionFetchDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -23618,7 +24211,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentSessionSerializer.self, from: data) + let response = Utility.decode(PaymentSessionFetchDetails.self, from: data) onResponse(response, nil) } else { @@ -23639,9 +24232,9 @@ Get the saved html template for provided sales channel **/ public func updatePaymentSession( gid: String, - body: PaymentSessionRequestSerializer, + body: PaymentSessionCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentSessionResponseSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentSessionPutDetails?, _ error: FDKError?) -> Void ) { @@ -23669,7 +24262,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentSessionResponseSerializer.self, from: data) + let response = Utility.decode(PaymentSessionPutDetails.self, from: data) onResponse(response, nil) } else { @@ -23691,9 +24284,9 @@ Get the saved html template for provided sales channel public func updateRefundSession( gid: String, requestId: String, - body: RefundSessionRequestSerializer, + body: RefundSessionCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RefundSessionResponseSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RefundSessionDetails?, _ error: FDKError?) -> Void ) { @@ -23721,7 +24314,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RefundSessionResponseSerializer.self, from: data) + let response = Utility.decode(RefundSessionDetails.self, from: data) onResponse(response, nil) } else { @@ -23743,7 +24336,7 @@ Get the saved html template for provided sales channel public func getMerchantPaymentOption( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformPaymentModeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformPaymentModeDetails?, _ error: FDKError?) -> Void ) { @@ -23771,7 +24364,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformPaymentModeResponse.self, from: data) + let response = Utility.decode(PlatformPaymentModeDetails.self, from: data) onResponse(response, nil) } else { @@ -23791,9 +24384,9 @@ Get the saved html template for provided sales channel * Description: Updated online/offline payment as active/inactive like disable offline payment mode will disable offline payment modes on checkout page on merchant's website **/ public func patchMerchantPaymentOption( - body: MerchnatPaymentModeRequest, + body: MerchnatPaymentModeCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformPaymentModeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformPaymentModeDetails?, _ error: FDKError?) -> Void ) { @@ -23821,7 +24414,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformPaymentModeResponse.self, from: data) + let response = Utility.decode(PlatformPaymentModeDetails.self, from: data) onResponse(response, nil) } else { @@ -23846,7 +24439,7 @@ Get the saved html template for provided sales channel device: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformPaymentModeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformPaymentModeDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -23876,7 +24469,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformPaymentModeResponse.self, from: data) + let response = Utility.decode(PlatformPaymentModeDetails.self, from: data) onResponse(response, nil) } else { @@ -23897,9 +24490,9 @@ Get the saved html template for provided sales channel **/ public func patchMerchantAggregatorPaymentModeDetails( aggregatorId: Int, - body: PlatformPaymentModeResponse, + body: PlatformPaymentModeDetails, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformPaymentModeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformPaymentModeDetails?, _ error: FDKError?) -> Void ) { @@ -23927,7 +24520,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformPaymentModeResponse.self, from: data) + let response = Utility.decode(PlatformPaymentModeDetails.self, from: data) onResponse(response, nil) } else { @@ -23949,7 +24542,7 @@ Get the saved html template for provided sales channel public func getPGConfigAggregators( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformPaymentModeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformPaymentModeDetails?, _ error: FDKError?) -> Void ) { @@ -23977,7 +24570,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformPaymentModeResponse.self, from: data) + let response = Utility.decode(PlatformPaymentModeDetails.self, from: data) onResponse(response, nil) } else { @@ -24000,7 +24593,7 @@ Get the saved html template for provided sales channel configType: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RefundPriorityResponseSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RefundPriorityDetails?, _ error: FDKError?) -> Void ) { @@ -24028,7 +24621,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RefundPriorityResponseSerializer.self, from: data) + let response = Utility.decode(RefundPriorityDetails.self, from: data) onResponse(response, nil) } else { @@ -24049,9 +24642,9 @@ Get the saved html template for provided sales channel **/ public func createMerchantRefundPriority( configType: String, - body: RefundPriorityRequestSerializer, + body: RefundPriorityCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RefundPriorityResponseSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RefundPriorityDetails?, _ error: FDKError?) -> Void ) { @@ -24079,7 +24672,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RefundPriorityResponseSerializer.self, from: data) + let response = Utility.decode(RefundPriorityDetails.self, from: data) onResponse(response, nil) } else { @@ -24100,9 +24693,9 @@ Get the saved html template for provided sales channel **/ public func updateMerchantRefundPriority( configType: String, - body: RefundPriorityRequestSerializer, + body: RefundPriorityCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: RefundPriorityResponseSerializer?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: RefundPriorityDetails?, _ error: FDKError?) -> Void ) { @@ -24130,7 +24723,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(RefundPriorityResponseSerializer.self, from: data) + let response = Utility.decode(RefundPriorityDetails.self, from: data) onResponse(response, nil) } else { @@ -24150,9 +24743,9 @@ Get the saved html template for provided sales channel * Description: Create an order and payment on the aggregator side **/ public func createPaymentOrder( - body: PaymentOrderRequest, + body: PaymentOrderCreation, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PaymentOrderResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PaymentOrderDetails?, _ error: FDKError?) -> Void ) { @@ -24180,7 +24773,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PaymentOrderResponse.self, from: data) + let response = Utility.decode(PaymentOrderDetails.self, from: data) onResponse(response, nil) } else { @@ -24207,7 +24800,7 @@ Get the saved html template for provided sales channel subPaymentMode: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: AggregatorVersionResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: AggregatorVersionDetails?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -24245,7 +24838,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(AggregatorVersionResponse.self, from: data) + let response = Utility.decode(AggregatorVersionDetails.self, from: data) onResponse(response, nil) } else { @@ -24266,9 +24859,9 @@ Get the saved html template for provided sales channel **/ public func patchMerchantPaymentOptionVersion( aggregatorId: Int, - body: AggregatorControlRequest, + body: PatchAggregatorControl, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: PlatformPaymentModeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: PlatformPaymentModeDetails?, _ error: FDKError?) -> Void ) { @@ -24296,7 +24889,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(PlatformPaymentModeResponse.self, from: data) + let response = Utility.decode(PlatformPaymentModeDetails.self, from: data) onResponse(response, nil) } else { @@ -24335,7 +24928,7 @@ Get the saved html template for provided sales channel pageSize: Int, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: GiveawayResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ListGiveaway?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -24365,7 +24958,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(GiveawayResponse.self, from: data) + let response = Utility.decode(ListGiveaway.self, from: data) onResponse(response, nil) } else { @@ -24902,7 +25495,7 @@ Get the saved html template for provided sales channel * Description: Configure and modify the settings for the rewards program. **/ public func setRewardsConfiguration( - body: ConfigurationRequest, + body: SetConfiguration, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: SetConfigurationRes?, _ error: FDKError?) -> Void ) { @@ -25207,7 +25800,7 @@ Get the saved html template for provided sales channel surlId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ClickStatsResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ClickStatsResult?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -25236,7 +25829,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ClickStatsResponse.self, from: data) + let response = Utility.decode(ClickStatsResult.self, from: data) onResponse(response, nil) } else { @@ -25472,13 +26065,13 @@ Get the saved html template for provided sales channel /** * - * Summary: Update a page - * Description: Modify and update the content of a page. + * Summary: Delete a page + * Description: Remove a page from a theme of the platform. **/ - public func updatePage( + public func deletePage( themeId: String, pageValue: String, - body: AvailablePageSchema, + headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: AvailablePageSchema?, _ error: FDKError?) -> Void ) { @@ -25493,10 +26086,10 @@ Get the saved html template for provided sales channel } PlatformAPIClient.execute( config: config, - method: "PUT", + method: "DELETE", url: "/service/platform/theme/v1.0/company/\(companyId)/application/\(applicationId)/\(themeId)/\(pageValue)", query: nil, - body: body.dictionary, + body: nil, headers: xHeaders, responseType: "application/json", onResponse: { (responseData, error, responseCode) in @@ -25524,13 +26117,14 @@ Get the saved html template for provided sales channel /** * - * Summary: Delete a page - * Description: Remove a page from a theme of the platform. + * Summary: Update a page + * Description: Modify and update the content of a page. **/ - public func deletePage( + public func updatePage( themeId: String, pageValue: String, - + socketId: String, + body: AvailablePageSchema, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: AvailablePageSchema?, _ error: FDKError?) -> Void ) { @@ -25545,10 +26139,10 @@ Get the saved html template for provided sales channel } PlatformAPIClient.execute( config: config, - method: "DELETE", - url: "/service/platform/theme/v1.0/company/\(companyId)/application/\(applicationId)/\(themeId)/\(pageValue)", + method: "PUT", + url: "/service/platform/theme/v1.0/company/\(companyId)/application/\(applicationId)/\(themeId)/\(pageValue)/\(socketId)", query: nil, - body: nil, + body: body.dictionary, headers: xHeaders, responseType: "application/json", onResponse: { (responseData, error, responseCode) in @@ -26245,7 +26839,7 @@ Get the saved html template for provided sales channel themeId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ThemeUpgradableResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ThemeUpgradable?, _ error: FDKError?) -> Void ) { @@ -26273,7 +26867,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ThemeUpgradableResponse.self, from: data) + let response = Utility.decode(ThemeUpgradable.self, from: data) onResponse(response, nil) } else { @@ -27392,7 +27986,7 @@ Get the saved html template for provided sales channel public func createUserAttributeDefinition( body: CreateUserAttributeDefinition, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UserAttributeDefinitionResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UserAttributeDefinitionDetails?, _ error: FDKError?) -> Void ) { @@ -27420,7 +28014,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UserAttributeDefinitionResponse.self, from: data) + let response = Utility.decode(UserAttributeDefinitionDetails.self, from: data) onResponse(response, nil) } else { @@ -27599,7 +28193,7 @@ Get the saved html template for provided sales channel attributeDefId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessMessageResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessMessage?, _ error: FDKError?) -> Void ) { @@ -27627,7 +28221,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessMessageResponse.self, from: data) + let response = Utility.decode(SuccessMessage.self, from: data) onResponse(response, nil) } else { @@ -27700,9 +28294,9 @@ Get the saved html template for provided sales channel public func updateUserAttribute( attributeDefId: String, userId: String, - body: CreateUserAttributeRequest, + body: CreateUserAttribute, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UserAttributeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UserAttribute?, _ error: FDKError?) -> Void ) { @@ -27730,7 +28324,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UserAttributeResponse.self, from: data) + let response = Utility.decode(UserAttribute.self, from: data) onResponse(response, nil) } else { @@ -27754,7 +28348,7 @@ Get the saved html template for provided sales channel userId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UserAttributeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UserAttribute?, _ error: FDKError?) -> Void ) { @@ -27782,7 +28376,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UserAttributeResponse.self, from: data) + let response = Utility.decode(UserAttribute.self, from: data) onResponse(response, nil) } else { @@ -27806,7 +28400,7 @@ Get the saved html template for provided sales channel userId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: SuccessMessageResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: SuccessMessage?, _ error: FDKError?) -> Void ) { @@ -27834,7 +28428,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(SuccessMessageResponse.self, from: data) + let response = Utility.decode(SuccessMessage.self, from: data) onResponse(response, nil) } else { @@ -27918,7 +28512,7 @@ Get the saved html template for provided sales channel attributeId: String, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: UserAttributeResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: UserAttribute?, _ error: FDKError?) -> Void ) { @@ -27946,7 +28540,7 @@ Get the saved html template for provided sales channel onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(UserAttributeResponse.self, from: data) + let response = Utility.decode(UserAttribute.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/platform/PlatformEnums.swift b/Sources/code/platform/PlatformEnums.swift index 6aa2706230..c1668dac9a 100644 --- a/Sources/code/platform/PlatformEnums.swift +++ b/Sources/code/platform/PlatformEnums.swift @@ -15,6 +15,92 @@ import Foundation public extension PlatformClient.Catalog { + /* + Enum: order + Used By: Catalog + */ + enum order: String, Codable { + + case browntapeV2 = "browntape_v2" + + case easyops = "easyops" + + case holisol = "holisol" + + case logic = "logic" + + case tcnss = "tcnss" + + case increff = "increff" + + case liberty = "liberty" + + case browntape = "browntape" + + case easyecom = "easyecom" + + case majorBrands = "major_brands" + + case jiopos = "jiopos" + + case jockey = "jockey" + + case omsguru = "omsguru" + + case pulse = "pulse" + + case sellerware = "sellerware" + + case unicommerce = "unicommerce" + + case ethos = "ethos" + + case sarasuole = "sarasuole" + + case vajor = "vajor" + + case vinculum = "vinculum" + + case jiomartPos = "jiomart_pos" + + case rblSap = "rbl_sap" + + case ginesysPos = "ginesys-pos" + + case fyndpos = "fyndpos" + + case jioposOpenapi = "jiopos_openapi" + + case jioposHamleys = "jiopos_hamleys" + + case westelm = "westelm" + + case rblSapFurniture = "rbl_sap_furniture" + + case vinculumV2 = "vinculum_v2" + + case wizapp = "wizapp" + + } + + + + + + /* + Enum: CurrencyCodeEnum + Used By: Catalog + */ + enum CurrencyCodeEnum: String, Codable { + + case inr = "INR" + + case usd = "USD" + + case eur = "EUR" + + } + } @@ -23,6 +109,92 @@ public extension PlatformClient.Catalog { public extension PlatformClient.ApplicationClient.Catalog { + /* + Enum: order + Used By: Catalog + */ + enum order: String, Codable { + + case browntapeV2 = "browntape_v2" + + case easyops = "easyops" + + case holisol = "holisol" + + case logic = "logic" + + case tcnss = "tcnss" + + case increff = "increff" + + case liberty = "liberty" + + case browntape = "browntape" + + case easyecom = "easyecom" + + case majorBrands = "major_brands" + + case jiopos = "jiopos" + + case jockey = "jockey" + + case omsguru = "omsguru" + + case pulse = "pulse" + + case sellerware = "sellerware" + + case unicommerce = "unicommerce" + + case ethos = "ethos" + + case sarasuole = "sarasuole" + + case vajor = "vajor" + + case vinculum = "vinculum" + + case jiomartPos = "jiomart_pos" + + case rblSap = "rbl_sap" + + case ginesysPos = "ginesys-pos" + + case fyndpos = "fyndpos" + + case jioposOpenapi = "jiopos_openapi" + + case jioposHamleys = "jiopos_hamleys" + + case westelm = "westelm" + + case rblSapFurniture = "rbl_sap_furniture" + + case vinculumV2 = "vinculum_v2" + + case wizapp = "wizapp" + + } + + + + + + /* + Enum: CurrencyCodeEnum + Used By: Catalog + */ + enum CurrencyCodeEnum: String, Codable { + + case inr = "INR" + + case usd = "USD" + + case eur = "EUR" + + } + } @@ -92,8 +264,6 @@ public extension PlatformClient.ApplicationClient.Content { - - public extension PlatformClient.Lead { diff --git a/Sources/code/platform/PlatformModelsExtenstions.swift b/Sources/code/platform/PlatformModelsExtenstions.swift index 79e2dc1763..ea6e3f548e 100644 --- a/Sources/code/platform/PlatformModelsExtenstions.swift +++ b/Sources/code/platform/PlatformModelsExtenstions.swift @@ -450,8 +450,6 @@ public extension PlatformClient.ApplicationClient.Content.ActionPage { - - diff --git a/Sources/code/platform/PlatformPageType.swift b/Sources/code/platform/PlatformPageType.swift index 0f93e544eb..457130f0dd 100644 --- a/Sources/code/platform/PlatformPageType.swift +++ b/Sources/code/platform/PlatformPageType.swift @@ -2074,8 +2074,6 @@ public extension PlatformClient.ApplicationClient.Content { - - diff --git a/Sources/code/public/Client/ConfigurationPublicClient.swift b/Sources/code/public/Client/ConfigurationPublicClient.swift index 16df0df973..b41d7c6a0e 100644 --- a/Sources/code/public/Client/ConfigurationPublicClient.swift +++ b/Sources/code/public/Client/ConfigurationPublicClient.swift @@ -22,7 +22,7 @@ extension PublicClient { query: String?, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ApplicationResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ApplicationResponseSchema?, _ error: FDKError?) -> Void ) { var xQuery: [String: Any] = [:] @@ -58,7 +58,7 @@ extension PublicClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ApplicationResponse.self, from: data) + let response = Utility.decode(ApplicationResponseSchema.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/public/Client/ContentPublicClient.swift b/Sources/code/public/Client/ContentPublicClient.swift index 7aa4a1d927..070495c81b 100644 --- a/Sources/code/public/Client/ContentPublicClient.swift +++ b/Sources/code/public/Client/ContentPublicClient.swift @@ -12,13 +12,507 @@ extension PublicClient { + /** + * + * Summary: get basic platform information + * Description: get basic platform information on Admin panel like Common Settings, Appereance of Authentication Page, Text on Seller Login or Register Page, Business Account Restrictions, Seller Support Details and Footer Details + **/ + public func getBasicDetails( + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: BasicDetailsPayloadSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PublicAPIClient.execute( + config: config, + method: "GET", + url: "/service/public/content/basic-details", + query: nil, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(BasicDetailsPayloadSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Get desktop menu content + * Description: Retrieves the desktop menu content. + **/ + public func getMenuContent( + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: MenusSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PublicAPIClient.execute( + config: config, + method: "GET", + url: "/service/public/content/menu", + query: nil, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(MenusSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Get desktop menu content + * Description: Retrieves the desktop menu content. + **/ + public func getMenuContentByType( + type: String, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: MenuTypeSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PublicAPIClient.execute( + config: config, + method: "GET", + url: "/service/public/content/menu/\(type)", + query: nil, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(MenuTypeSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Get Analytics Tags + * Description: Retrieve analytics tags. + **/ + public func getAnalyticsTags( + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: AnalyticsTagsSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PublicAPIClient.execute( + config: config, + method: "GET", + url: "/service/public/content/analytics-tags", + query: nil, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(AnalyticsTagsSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Retrieve info for custom page. + * Description: Retrieve info of custom pagee to develop and manage custom webpages. + **/ + public func getCustomPage( + slug: String, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: CustomPageBySlugSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PublicAPIClient.execute( + config: config, + method: "GET", + url: "/service/public/content/custom-pages/\(slug)", + query: nil, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(CustomPageBySlugSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Get Footer Content + * Description: Retrieve footer content. + **/ + public func getFooterContent( + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: FooterSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PublicAPIClient.execute( + config: config, + method: "GET", + url: "/service/public/content/footer", + query: nil, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(FooterSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Get Home Page Content + * Description: Retrieve home page content for a specific page type. + **/ + public func getHomePageContent( + pageType: String, + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: HomePageContentSchema?, _ error: FDKError?) -> Void + ) { + + var xQuery: [String: Any] = [:] + xQuery["page_type"] = pageType + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PublicAPIClient.execute( + config: config, + method: "GET", + url: "/service/public/content/home-page", + query: xQuery, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(HomePageContentSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Get Navbar + * Description: Retrieve navbar information. + **/ + public func getNavbar( + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: NavbarSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PublicAPIClient.execute( + config: config, + method: "GET", + url: "/service/public/content/navbar", + query: nil, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(NavbarSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Get Pricing Banner + * Description: Retrieve pricing banner information. + **/ + public func getPricingBanner( + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: PricingBannerSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PublicAPIClient.execute( + config: config, + method: "GET", + url: "/service/public/content/pricing-banner", + query: nil, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(PricingBannerSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + + /** + * + * Summary: Retrieve tags with injected css/javascript info. + * Description: Retrieve custom tag with injected css/javascript info. + **/ + public func getAllTags( + + headers: [(key: String, value: String)]? = nil, + onResponse: @escaping (_ response: TagsSchema?, _ error: FDKError?) -> Void + ) { + + + + var xHeaders: [(key: String, value: String)] = [] + + + if let headers = headers { + xHeaders.append(contentsOf: headers) + } + PublicAPIClient.execute( + config: config, + method: "GET", + url: "/service/public/content/tags", + query: nil, + extraHeaders: xHeaders, + body: nil, + responseType: "application/json", + onResponse: { (responseData, error, responseCode) in + if let _ = error, let data = responseData { + var err = Utility.decode(FDKError.self, from: data) + if err?.status == nil { + err?.status = responseCode + } + onResponse(nil, err) + } else if let data = responseData { + + let response = Utility.decode(TagsSchema.self, from: data) + + onResponse(response, nil) + } else { + let userInfo: [String: Any] = [ NSLocalizedDescriptionKey : NSLocalizedString("Unidentified", value: "Please try after sometime", comment: "") , + NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unidentified", value: "Something went wrong", comment: "")] + let err = FDKError(message: "Something went wrong", status: 502, code: "Unidentified", exception: nil, info: "Please try after sometime", requestID: nil, stackTrace: nil, meta: userInfo) + onResponse(nil, err) + } + }); + } + + /** * * Summary: Get credentials to power chat support systems * Description: Get credentials for support system **/ public func getCredentialsByEntity( - entity: String, + entityType: String, headers: [(key: String, value: String)]? = nil, onResponse: @escaping (_ response: CredentialsSchema?, _ error: FDKError?) -> Void @@ -35,7 +529,7 @@ extension PublicClient { PublicAPIClient.execute( config: config, method: "GET", - url: "/service/public/content/credentials/\(entity)", + url: "/service/public/content/credentials/\(entityType)", query: nil, extraHeaders: xHeaders, body: nil, diff --git a/Sources/code/public/Client/WebhookPublicClient.swift b/Sources/code/public/Client/WebhookPublicClient.swift index 0dbbf11c69..7b391ac1d1 100644 --- a/Sources/code/public/Client/WebhookPublicClient.swift +++ b/Sources/code/public/Client/WebhookPublicClient.swift @@ -20,7 +20,7 @@ extension PublicClient { public func fetchAllWebhookEvents( headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EventConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EventDetails?, _ error: FDKError?) -> Void ) { @@ -48,7 +48,7 @@ extension PublicClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EventConfigResponse.self, from: data) + let response = Utility.decode(EventDetails.self, from: data) onResponse(response, nil) } else { @@ -69,7 +69,7 @@ extension PublicClient { public func queryWebhookEventDetails( body: [EventConfigBase], headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: EventConfigResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: EventDetails?, _ error: FDKError?) -> Void ) { @@ -97,7 +97,7 @@ extension PublicClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(EventConfigResponse.self, from: data) + let response = Utility.decode(EventDetails.self, from: data) onResponse(response, nil) } else { @@ -165,9 +165,9 @@ extension PublicClient { * Description: Test transformation of handler **/ public func testHandlerTransformation( - body: TransformEventRequest, + body: TransformEventPayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: TransformEventResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: TransformEventResult?, _ error: FDKError?) -> Void ) { @@ -195,7 +195,7 @@ extension PublicClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(TransformEventResponse.self, from: data) + let response = Utility.decode(TransformEventResult.self, from: data) onResponse(response, nil) } else { @@ -214,9 +214,9 @@ extension PublicClient { * Description: Validate Schema for an event **/ public func validateSchema( - body: ValidateSchemaRequest, + body: ValidateSchemaPayload, headers: [(key: String, value: String)]? = nil, - onResponse: @escaping (_ response: ValidateSchemaResponse?, _ error: FDKError?) -> Void + onResponse: @escaping (_ response: ValidateSchemaResult?, _ error: FDKError?) -> Void ) { @@ -244,7 +244,7 @@ extension PublicClient { onResponse(nil, err) } else if let data = responseData { - let response = Utility.decode(ValidateSchemaResponse.self, from: data) + let response = Utility.decode(ValidateSchemaResult.self, from: data) onResponse(response, nil) } else { diff --git a/Sources/code/public/Models/Configuration/ApplicationResponseConfigurationPublicModel.swift b/Sources/code/public/Models/Configuration/ApplicationResponseSchemaConfigurationPublicModel.swift similarity index 93% rename from Sources/code/public/Models/Configuration/ApplicationResponseConfigurationPublicModel.swift rename to Sources/code/public/Models/Configuration/ApplicationResponseSchemaConfigurationPublicModel.swift index 5b4341859d..0a9897ce21 100644 --- a/Sources/code/public/Models/Configuration/ApplicationResponseConfigurationPublicModel.swift +++ b/Sources/code/public/Models/Configuration/ApplicationResponseSchemaConfigurationPublicModel.swift @@ -3,11 +3,11 @@ import Foundation public extension PublicClient.Configuration { /* - Model: ApplicationResponse + Model: ApplicationResponseSchema Used By: Configuration */ - class ApplicationResponse: Codable { + class ApplicationResponseSchema: Codable { public var application: Application? diff --git a/Sources/code/public/Models/Configuration/BadRequestConfigurationPublicModel.swift b/Sources/code/public/Models/Configuration/BadRequestSchemaConfigurationPublicModel.swift similarity index 94% rename from Sources/code/public/Models/Configuration/BadRequestConfigurationPublicModel.swift rename to Sources/code/public/Models/Configuration/BadRequestSchemaConfigurationPublicModel.swift index 435f97fa72..0b9edf6e14 100644 --- a/Sources/code/public/Models/Configuration/BadRequestConfigurationPublicModel.swift +++ b/Sources/code/public/Models/Configuration/BadRequestSchemaConfigurationPublicModel.swift @@ -3,11 +3,11 @@ import Foundation public extension PublicClient.Configuration { /* - Model: BadRequest + Model: BadRequestSchema Used By: Configuration */ - class BadRequest: Codable { + class BadRequestSchema: Codable { public var message: String? diff --git a/Sources/code/public/Models/Content/AnalyticsTagsSchemaContentPublicModel.swift b/Sources/code/public/Models/Content/AnalyticsTagsSchemaContentPublicModel.swift new file mode 100644 index 0000000000..1b212e00c2 --- /dev/null +++ b/Sources/code/public/Models/Content/AnalyticsTagsSchemaContentPublicModel.swift @@ -0,0 +1,165 @@ + + +import Foundation +public extension PublicClient.Content { + /* + Model: AnalyticsTagsSchema + Used By: Content + */ + + class AnalyticsTagsSchema: Codable { + + + public var id: String? + + public var v: Double? + + public var bodyCode: String? + + public var enabled: Bool? + + public var headerCode: String? + + public var name: String? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case v = "__v" + + case bodyCode = "body_code" + + case enabled = "enabled" + + case headerCode = "header_code" + + case name = "name" + + } + + public init(bodyCode: String? = nil, enabled: Bool? = nil, headerCode: String? = nil, name: String? = nil, id: String? = nil, v: Double? = nil) { + + self.id = id + + self.v = v + + self.bodyCode = bodyCode + + self.enabled = enabled + + self.headerCode = headerCode + + self.name = name + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + v = try container.decode(Double.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + bodyCode = try container.decode(String.self, forKey: .bodyCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + enabled = try container.decode(Bool.self, forKey: .enabled) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + headerCode = try container.decode(String.self, forKey: .headerCode) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(id, forKey: .id) + + + + try? container.encodeIfPresent(v, forKey: .v) + + + + try? container.encodeIfPresent(bodyCode, forKey: .bodyCode) + + + + try? container.encodeIfPresent(enabled, forKey: .enabled) + + + + try? container.encodeIfPresent(headerCode, forKey: .headerCode) + + + + try? container.encodeIfPresent(name, forKey: .name) + + + } + + } +} diff --git a/Sources/code/platform/Models/Finance/GetEngineDataFinancePlatformModel.swift b/Sources/code/public/Models/Content/ApplicationLevelMenuItemSchemaContentPublicModel.swift similarity index 60% rename from Sources/code/platform/Models/Finance/GetEngineDataFinancePlatformModel.swift rename to Sources/code/public/Models/Content/ApplicationLevelMenuItemSchemaContentPublicModel.swift index 6c1dab00d7..5c6cff670b 100644 --- a/Sources/code/platform/Models/Finance/GetEngineDataFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/ApplicationLevelMenuItemSchemaContentPublicModel.swift @@ -1,71 +1,69 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: GetEngineData - Used By: Finance + Model: ApplicationLevelMenuItemSchema + Used By: Content */ - class GetEngineData: Codable { + class ApplicationLevelMenuItemSchema: Codable { - public var status: String? + public var visibleOn: VisibleOnSchema? - public var filters: GetEngineFilters? + public var display: String? - public var project: [String]? + public var permissions: [String]? - public var tableName: String? + public var title: String? - public var search: [String: Any]? + public var link: String? - public var page: Int? + public var icon: String? - public var pageSize: Int? + public var isDisabled: Bool? - public var orderBy: String? + public var child: [ApplicationLevelMenuItemSchema]? public enum CodingKeys: String, CodingKey { - case status = "status" + case visibleOn = "visible_on" - case filters = "filters" + case display = "display" - case project = "project" + case permissions = "permissions" - case tableName = "table_name" + case title = "title" - case search = "search" + case link = "link" - case page = "page" + case icon = "icon" - case pageSize = "page_size" + case isDisabled = "is_disabled" - case orderBy = "order_by" + case child = "child" } - public init(filters: GetEngineFilters? = nil, orderBy: String? = nil, page: Int? = nil, pageSize: Int? = nil, project: [String]? = nil, search: [String: Any]? = nil, status: String? = nil, tableName: String? = nil) { + public init(child: [ApplicationLevelMenuItemSchema]? = nil, display: String? = nil, icon: String? = nil, isDisabled: Bool? = nil, link: String? = nil, permissions: [String]? = nil, title: String? = nil, visibleOn: VisibleOnSchema? = nil) { - self.status = status + self.visibleOn = visibleOn - self.filters = filters + self.display = display - self.project = project + self.permissions = permissions - self.tableName = tableName + self.title = title - self.search = search + self.link = link - self.page = page + self.icon = icon - self.pageSize = pageSize + self.isDisabled = isDisabled - self.orderBy = orderBy + self.child = child } @@ -74,7 +72,7 @@ public extension PlatformClient.Finance { do { - status = try container.decode(String.self, forKey: .status) + visibleOn = try container.decode(VisibleOnSchema.self, forKey: .visibleOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,7 +84,7 @@ public extension PlatformClient.Finance { do { - filters = try container.decode(GetEngineFilters.self, forKey: .filters) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +96,7 @@ public extension PlatformClient.Finance { do { - project = try container.decode([String].self, forKey: .project) + permissions = try container.decode([String].self, forKey: .permissions) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +108,7 @@ public extension PlatformClient.Finance { do { - tableName = try container.decode(String.self, forKey: .tableName) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +120,7 @@ public extension PlatformClient.Finance { do { - search = try container.decode([String: Any].self, forKey: .search) + link = try container.decode(String.self, forKey: .link) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +132,7 @@ public extension PlatformClient.Finance { do { - page = try container.decode(Int.self, forKey: .page) + icon = try container.decode(String.self, forKey: .icon) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +144,7 @@ public extension PlatformClient.Finance { do { - pageSize = try container.decode(Int.self, forKey: .pageSize) + isDisabled = try container.decode(Bool.self, forKey: .isDisabled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +156,7 @@ public extension PlatformClient.Finance { do { - orderBy = try container.decode(String.self, forKey: .orderBy) + child = try container.decode([ApplicationLevelMenuItemSchema].self, forKey: .child) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,50 +172,38 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(status, forKey: .status) - - - - - try? container.encodeIfPresent(filters, forKey: .filters) + try? container.encodeIfPresent(visibleOn, forKey: .visibleOn) + try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(project, forKey: .project) + try? container.encodeIfPresent(permissions, forKey: .permissions) - try? container.encodeIfPresent(tableName, forKey: .tableName) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(search, forKey: .search) + try? container.encodeIfPresent(link, forKey: .link) + try? container.encodeIfPresent(icon, forKey: .icon) - try? container.encodeIfPresent(page, forKey: .page) + try? container.encodeIfPresent(isDisabled, forKey: .isDisabled) - try? container.encodeIfPresent(pageSize, forKey: .pageSize) - - - - try? container.encodeIfPresent(orderBy, forKey: .orderBy) + try? container.encodeIfPresent(child, forKey: .child) } } } - - - - diff --git a/Sources/code/public/Models/Content/BasicDetailsPayloadSchemaContentPublicModel.swift b/Sources/code/public/Models/Content/BasicDetailsPayloadSchemaContentPublicModel.swift new file mode 100644 index 0000000000..0d0374f10c --- /dev/null +++ b/Sources/code/public/Models/Content/BasicDetailsPayloadSchemaContentPublicModel.swift @@ -0,0 +1,495 @@ + + +import Foundation +public extension PublicClient.Content { + /* + Model: BasicDetailsPayloadSchema + Used By: Content + */ + + class BasicDetailsPayloadSchema: Codable { + + + public var name: String? + + public var logoUrl: String? + + public var faviconUrl: String? + + public var title: String? + + public var metaTitle: String? + + public var metaDescription: String? + + public var metaImage: String? + + public var whatsNew: [WhatsNew]? + + public var features: [Features]? + + public var authentication: [String: Any]? + + public var businessAccount: BusinessAccount? + + public var sellerSupport: SellerSupport? + + public var copyright: String? + + public var address: String? + + public var documentationUrl: String? + + public var faqUrl: String? + + public var facebookUrl: String? + + public var instagramUrl: String? + + public var privacyUrl: String? + + public var twitterUrl: String? + + public var termsofserviceUrl: String? + + + public enum CodingKeys: String, CodingKey { + + case name = "name" + + case logoUrl = "logo_url" + + case faviconUrl = "favicon_url" + + case title = "title" + + case metaTitle = "meta_title" + + case metaDescription = "meta_description" + + case metaImage = "meta_image" + + case whatsNew = "whats_new" + + case features = "features" + + case authentication = "authentication" + + case businessAccount = "business_account" + + case sellerSupport = "seller_support" + + case copyright = "copyright" + + case address = "address" + + case documentationUrl = "documentation_url" + + case faqUrl = "faq_url" + + case facebookUrl = "facebook_url" + + case instagramUrl = "instagram_url" + + case privacyUrl = "privacy_url" + + case twitterUrl = "twitter_url" + + case termsofserviceUrl = "termsofservice_url" + + } + + public init(address: String? = nil, authentication: [String: Any]? = nil, businessAccount: BusinessAccount? = nil, copyright: String? = nil, documentationUrl: String? = nil, facebookUrl: String? = nil, faqUrl: String? = nil, faviconUrl: String? = nil, features: [Features]? = nil, instagramUrl: String? = nil, logoUrl: String? = nil, metaDescription: String? = nil, metaImage: String? = nil, metaTitle: String? = nil, name: String? = nil, privacyUrl: String? = nil, sellerSupport: SellerSupport? = nil, termsofserviceUrl: String? = nil, title: String? = nil, twitterUrl: String? = nil, whatsNew: [WhatsNew]? = nil) { + + self.name = name + + self.logoUrl = logoUrl + + self.faviconUrl = faviconUrl + + self.title = title + + self.metaTitle = metaTitle + + self.metaDescription = metaDescription + + self.metaImage = metaImage + + self.whatsNew = whatsNew + + self.features = features + + self.authentication = authentication + + self.businessAccount = businessAccount + + self.sellerSupport = sellerSupport + + self.copyright = copyright + + self.address = address + + self.documentationUrl = documentationUrl + + self.faqUrl = faqUrl + + self.facebookUrl = facebookUrl + + self.instagramUrl = instagramUrl + + self.privacyUrl = privacyUrl + + self.twitterUrl = twitterUrl + + self.termsofserviceUrl = termsofserviceUrl + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + logoUrl = try container.decode(String.self, forKey: .logoUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + faviconUrl = try container.decode(String.self, forKey: .faviconUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + title = try container.decode(String.self, forKey: .title) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + metaTitle = try container.decode(String.self, forKey: .metaTitle) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + metaDescription = try container.decode(String.self, forKey: .metaDescription) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + metaImage = try container.decode(String.self, forKey: .metaImage) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + whatsNew = try container.decode([WhatsNew].self, forKey: .whatsNew) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + features = try container.decode([Features].self, forKey: .features) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + authentication = try container.decode([String: Any].self, forKey: .authentication) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + businessAccount = try container.decode(BusinessAccount.self, forKey: .businessAccount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + sellerSupport = try container.decode(SellerSupport.self, forKey: .sellerSupport) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + copyright = try container.decode(String.self, forKey: .copyright) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + documentationUrl = try container.decode(String.self, forKey: .documentationUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + faqUrl = try container.decode(String.self, forKey: .faqUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + facebookUrl = try container.decode(String.self, forKey: .facebookUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + instagramUrl = try container.decode(String.self, forKey: .instagramUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + privacyUrl = try container.decode(String.self, forKey: .privacyUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + twitterUrl = try container.decode(String.self, forKey: .twitterUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + termsofserviceUrl = try container.decode(String.self, forKey: .termsofserviceUrl) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(name, forKey: .name) + + + + try? container.encodeIfPresent(logoUrl, forKey: .logoUrl) + + + + try? container.encodeIfPresent(faviconUrl, forKey: .faviconUrl) + + + + try? container.encodeIfPresent(title, forKey: .title) + + + + try? container.encodeIfPresent(metaTitle, forKey: .metaTitle) + + + + try? container.encodeIfPresent(metaDescription, forKey: .metaDescription) + + + + try? container.encodeIfPresent(metaImage, forKey: .metaImage) + + + + try? container.encodeIfPresent(whatsNew, forKey: .whatsNew) + + + + try? container.encodeIfPresent(features, forKey: .features) + + + + try? container.encodeIfPresent(authentication, forKey: .authentication) + + + + try? container.encodeIfPresent(businessAccount, forKey: .businessAccount) + + + + try? container.encodeIfPresent(sellerSupport, forKey: .sellerSupport) + + + + try? container.encodeIfPresent(copyright, forKey: .copyright) + + + + try? container.encodeIfPresent(address, forKey: .address) + + + + try? container.encodeIfPresent(documentationUrl, forKey: .documentationUrl) + + + + try? container.encodeIfPresent(faqUrl, forKey: .faqUrl) + + + + try? container.encodeIfPresent(facebookUrl, forKey: .facebookUrl) + + + + try? container.encodeIfPresent(instagramUrl, forKey: .instagramUrl) + + + + try? container.encodeIfPresent(privacyUrl, forKey: .privacyUrl) + + + + try? container.encodeIfPresent(twitterUrl, forKey: .twitterUrl) + + + + try? container.encodeIfPresent(termsofserviceUrl, forKey: .termsofserviceUrl) + + + } + + } +} diff --git a/Sources/code/public/Models/Content/BusinessAccountContentPublicModel.swift b/Sources/code/public/Models/Content/BusinessAccountContentPublicModel.swift new file mode 100644 index 0000000000..31608e1add --- /dev/null +++ b/Sources/code/public/Models/Content/BusinessAccountContentPublicModel.swift @@ -0,0 +1,77 @@ + + +import Foundation +public extension PublicClient.Content { + /* + Model: BusinessAccount + Used By: Content + */ + + class BusinessAccount: Codable { + + + public var isLimit: Bool? + + public var threshold: Int? + + + public enum CodingKeys: String, CodingKey { + + case isLimit = "is_limit" + + case threshold = "threshold" + + } + + public init(isLimit: Bool? = nil, threshold: Int? = nil) { + + self.isLimit = isLimit + + self.threshold = threshold + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + isLimit = try container.decode(Bool.self, forKey: .isLimit) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + threshold = try container.decode(Int.self, forKey: .threshold) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(isLimit, forKey: .isLimit) + + + + try? container.encodeIfPresent(threshold, forKey: .threshold) + + + } + + } +} diff --git a/Sources/code/platform/Models/Finance/CnDownloadReportFinancePlatformModel.swift b/Sources/code/public/Models/Content/CompanyLevelMenuItemSchemaContentPublicModel.swift similarity index 60% rename from Sources/code/platform/Models/Finance/CnDownloadReportFinancePlatformModel.swift rename to Sources/code/public/Models/Content/CompanyLevelMenuItemSchemaContentPublicModel.swift index 4a49bf81f0..efd514b29d 100644 --- a/Sources/code/platform/Models/Finance/CnDownloadReportFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/CompanyLevelMenuItemSchemaContentPublicModel.swift @@ -1,71 +1,69 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: CnDownloadReport - Used By: Finance + Model: CompanyLevelMenuItemSchema + Used By: Content */ - class CnDownloadReport: Codable { + class CompanyLevelMenuItemSchema: Codable { - public var page: Int? + public var visibleOn: VisibleOnSchema? - public var startDate: String? + public var display: String? - public var endDate: String? + public var permissions: [String]? - public var affiliateId: String? + public var title: String? - public var search: String? + public var link: String? - public var status: String? + public var icon: String? - public var searchType: String? + public var isDisabled: Bool? - public var pageSize: Int? + public var child: [CompanyLevelMenuItemSchema]? public enum CodingKeys: String, CodingKey { - case page = "page" + case visibleOn = "visible_on" - case startDate = "start_date" + case display = "display" - case endDate = "end_date" + case permissions = "permissions" - case affiliateId = "affiliate_id" + case title = "title" - case search = "search" + case link = "link" - case status = "status" + case icon = "icon" - case searchType = "search_type" + case isDisabled = "is_disabled" - case pageSize = "page_size" + case child = "child" } - public init(affiliateId: String? = nil, endDate: String? = nil, page: Int? = nil, pageSize: Int? = nil, search: String? = nil, searchType: String? = nil, startDate: String? = nil, status: String? = nil) { + public init(child: [CompanyLevelMenuItemSchema]? = nil, display: String? = nil, icon: String? = nil, isDisabled: Bool? = nil, link: String? = nil, permissions: [String]? = nil, title: String? = nil, visibleOn: VisibleOnSchema? = nil) { - self.page = page + self.visibleOn = visibleOn - self.startDate = startDate + self.display = display - self.endDate = endDate + self.permissions = permissions - self.affiliateId = affiliateId + self.title = title - self.search = search + self.link = link - self.status = status + self.icon = icon - self.searchType = searchType + self.isDisabled = isDisabled - self.pageSize = pageSize + self.child = child } @@ -74,7 +72,7 @@ public extension PlatformClient.Finance { do { - page = try container.decode(Int.self, forKey: .page) + visibleOn = try container.decode(VisibleOnSchema.self, forKey: .visibleOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,7 +84,7 @@ public extension PlatformClient.Finance { do { - startDate = try container.decode(String.self, forKey: .startDate) + display = try container.decode(String.self, forKey: .display) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -98,7 +96,7 @@ public extension PlatformClient.Finance { do { - endDate = try container.decode(String.self, forKey: .endDate) + permissions = try container.decode([String].self, forKey: .permissions) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +108,7 @@ public extension PlatformClient.Finance { do { - affiliateId = try container.decode(String.self, forKey: .affiliateId) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +120,7 @@ public extension PlatformClient.Finance { do { - search = try container.decode(String.self, forKey: .search) + link = try container.decode(String.self, forKey: .link) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +132,7 @@ public extension PlatformClient.Finance { do { - status = try container.decode(String.self, forKey: .status) + icon = try container.decode(String.self, forKey: .icon) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +144,7 @@ public extension PlatformClient.Finance { do { - searchType = try container.decode(String.self, forKey: .searchType) + isDisabled = try container.decode(Bool.self, forKey: .isDisabled) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +156,7 @@ public extension PlatformClient.Finance { do { - pageSize = try container.decode(Int.self, forKey: .pageSize) + child = try container.decode([CompanyLevelMenuItemSchema].self, forKey: .child) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -174,50 +172,38 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(page, forKey: .page) - - - - - try? container.encodeIfPresent(startDate, forKey: .startDate) + try? container.encodeIfPresent(visibleOn, forKey: .visibleOn) + try? container.encodeIfPresent(display, forKey: .display) - try? container.encodeIfPresent(endDate, forKey: .endDate) + try? container.encodeIfPresent(permissions, forKey: .permissions) - try? container.encodeIfPresent(affiliateId, forKey: .affiliateId) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(search, forKey: .search) + try? container.encodeIfPresent(link, forKey: .link) + try? container.encodeIfPresent(icon, forKey: .icon) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(isDisabled, forKey: .isDisabled) - try? container.encodeIfPresent(searchType, forKey: .searchType) - - - - try? container.encodeIfPresent(pageSize, forKey: .pageSize) + try? container.encodeIfPresent(child, forKey: .child) } } } - - - - diff --git a/Sources/code/platform/Models/Webhook/UrlWebhookPlatformModel.swift b/Sources/code/public/Models/Content/ConfigurationSchemaContentPublicModel.swift similarity index 66% rename from Sources/code/platform/Models/Webhook/UrlWebhookPlatformModel.swift rename to Sources/code/public/Models/Content/ConfigurationSchemaContentPublicModel.swift index 407af1e871..d644a33d78 100644 --- a/Sources/code/platform/Models/Webhook/UrlWebhookPlatformModel.swift +++ b/Sources/code/public/Models/Content/ConfigurationSchemaContentPublicModel.swift @@ -1,35 +1,33 @@ import Foundation - - -public extension PlatformClient.Webhook { +public extension PublicClient.Content { /* - Model: Url - Used By: Webhook + Model: ConfigurationSchema + Used By: Content */ - class Url: Codable { + class ConfigurationSchema: Codable { - public var url: String? + public var token: String? - public var name: String? + public var host: String? public enum CodingKeys: String, CodingKey { - case url = "url" + case token = "token" - case name = "name" + case host = "host" } - public init(name: String? = nil, url: String? = nil) { + public init(host: String? = nil, token: String? = nil) { - self.url = url + self.token = token - self.name = name + self.host = host } @@ -38,7 +36,7 @@ public extension PlatformClient.Webhook { do { - url = try container.decode(String.self, forKey: .url) + token = try container.decode(String.self, forKey: .token) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +48,7 @@ public extension PlatformClient.Webhook { do { - name = try container.decode(String.self, forKey: .name) + host = try container.decode(String.self, forKey: .host) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -66,20 +64,14 @@ public extension PlatformClient.Webhook { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(url, forKey: .url) - + try? container.encodeIfPresent(token, forKey: .token) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(host, forKey: .host) } } } - - - - diff --git a/Sources/code/platform/Models/Finance/PaymentDetailFinancePlatformModel.swift b/Sources/code/public/Models/Content/CreateCustomPageSeoSchemaContentPublicModel.swift similarity index 64% rename from Sources/code/platform/Models/Finance/PaymentDetailFinancePlatformModel.swift rename to Sources/code/public/Models/Content/CreateCustomPageSeoSchemaContentPublicModel.swift index 176e396513..f7efb3420c 100644 --- a/Sources/code/platform/Models/Finance/PaymentDetailFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/CreateCustomPageSeoSchemaContentPublicModel.swift @@ -1,35 +1,33 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: PaymentDetail - Used By: Finance + Model: CreateCustomPageSeoSchema + Used By: Content */ - class PaymentDetail: Codable { + class CreateCustomPageSeoSchema: Codable { - public var displayName: String? + public var title: String? - public var value: String? + public var description: String? public enum CodingKeys: String, CodingKey { - case displayName = "display_name" + case title = "title" - case value = "value" + case description = "description" } - public init(displayName: String? = nil, value: String? = nil) { + public init(description: String? = nil, title: String? = nil) { - self.displayName = displayName + self.title = title - self.value = value + self.description = description } @@ -38,7 +36,7 @@ public extension PlatformClient.Finance { do { - displayName = try container.decode(String.self, forKey: .displayName) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +48,7 @@ public extension PlatformClient.Finance { do { - value = try container.decode(String.self, forKey: .value) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -66,20 +64,14 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(displayName, forKey: .displayName) - + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(description, forKey: .description) } } } - - - - diff --git a/Sources/code/platform/Models/Webhook/UploadServiceObjectWebhookPlatformModel.swift b/Sources/code/public/Models/Content/CreatedBySchemaContentPublicModel.swift similarity index 68% rename from Sources/code/platform/Models/Webhook/UploadServiceObjectWebhookPlatformModel.swift rename to Sources/code/public/Models/Content/CreatedBySchemaContentPublicModel.swift index 2bb5835772..cdd8058042 100644 --- a/Sources/code/platform/Models/Webhook/UploadServiceObjectWebhookPlatformModel.swift +++ b/Sources/code/public/Models/Content/CreatedBySchemaContentPublicModel.swift @@ -1,29 +1,27 @@ import Foundation - - -public extension PlatformClient.Webhook { +public extension PublicClient.Content { /* - Model: UploadServiceObject - Used By: Webhook + Model: CreatedBySchema + Used By: Content */ - class UploadServiceObject: Codable { + class CreatedBySchema: Codable { - public var cdn: CdnObject? + public var userId: String? public enum CodingKeys: String, CodingKey { - case cdn = "cdn" + case userId = "user_id" } - public init(cdn: CdnObject? = nil) { + public init(userId: String? = nil) { - self.cdn = cdn + self.userId = userId } @@ -32,7 +30,7 @@ public extension PlatformClient.Webhook { do { - cdn = try container.decode(CdnObject.self, forKey: .cdn) + userId = try container.decode(String.self, forKey: .userId) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,15 +46,10 @@ public extension PlatformClient.Webhook { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(cdn, forKey: .cdn) + try? container.encodeIfPresent(userId, forKey: .userId) } } } - - - - diff --git a/Sources/code/public/Models/Content/CredentialSchemaContentPublicModel.swift b/Sources/code/public/Models/Content/CredentialSchemaContentPublicModel.swift index abdd906d86..e81de3c316 100644 --- a/Sources/code/public/Models/Content/CredentialSchemaContentPublicModel.swift +++ b/Sources/code/public/Models/Content/CredentialSchemaContentPublicModel.swift @@ -10,7 +10,9 @@ public extension PublicClient.Content { class CredentialSchema: Codable { - public var configuration: [String: Any]? + public var id: String? + + public var configuration: ConfigurationSchema? public var entityType: String? @@ -18,9 +20,17 @@ public extension PublicClient.Content { public var isEnable: Bool? + public var updatedAt: String? + + public var createdAt: String? + + public var v: Double? + public enum CodingKeys: String, CodingKey { + case id = "_id" + case configuration = "configuration" case entityType = "entity_type" @@ -29,9 +39,17 @@ public extension PublicClient.Content { case isEnable = "is_enable" + case updatedAt = "updated_at" + + case createdAt = "created_at" + + case v = "__v" + } - public init(configuration: [String: Any]? = nil, entityType: String? = nil, isEnable: Bool? = nil, type: String? = nil) { + public init(configuration: ConfigurationSchema? = nil, createdAt: String? = nil, entityType: String? = nil, isEnable: Bool? = nil, type: String? = nil, updatedAt: String? = nil, id: String? = nil, v: Double? = nil) { + + self.id = id self.configuration = configuration @@ -41,6 +59,12 @@ public extension PublicClient.Content { self.isEnable = isEnable + self.updatedAt = updatedAt + + self.createdAt = createdAt + + self.v = v + } required public init(from decoder: Decoder) throws { @@ -48,7 +72,19 @@ public extension PublicClient.Content { do { - configuration = try container.decode([String: Any].self, forKey: .configuration) + 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 { + + } + + + + do { + configuration = try container.decode(ConfigurationSchema.self, forKey: .configuration) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -94,12 +130,52 @@ public extension PublicClient.Content { } + + do { + updatedAt = try container.decode(String.self, forKey: .updatedAt) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + createdAt = try container.decode(String.self, forKey: .createdAt) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + v = try container.decode(Double.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(id, forKey: .id) + + + try? container.encodeIfPresent(configuration, forKey: .configuration) @@ -115,6 +191,18 @@ public extension PublicClient.Content { try? container.encodeIfPresent(isEnable, forKey: .isEnable) + + try? container.encodeIfPresent(updatedAt, forKey: .updatedAt) + + + + try? container.encodeIfPresent(createdAt, forKey: .createdAt) + + + + try? container.encodeIfPresent(v, forKey: .v) + + } } diff --git a/Sources/code/platform/Models/Webhook/EventProcessReportObjectWebhookPlatformModel.swift b/Sources/code/public/Models/Content/CustomItemSchemaContentPublicModel.swift similarity index 61% rename from Sources/code/platform/Models/Webhook/EventProcessReportObjectWebhookPlatformModel.swift rename to Sources/code/public/Models/Content/CustomItemSchemaContentPublicModel.swift index 7e2e4760db..fbdb3dc304 100644 --- a/Sources/code/platform/Models/Webhook/EventProcessReportObjectWebhookPlatformModel.swift +++ b/Sources/code/public/Models/Content/CustomItemSchemaContentPublicModel.swift @@ -1,95 +1,93 @@ import Foundation - - -public extension PlatformClient.Webhook { +public extension PublicClient.Content { /* - Model: EventProcessReportObject - Used By: Webhook + Model: CustomItemSchema + Used By: Content */ - class EventProcessReportObject: Codable { + class CustomItemSchema: Codable { - public var eventName: String? + public var id: String? - public var responseCode: Int? + public var name: String? - public var responseMessage: String? + public var type: String? - public var data: String? + public var subType: String? - public var attempt: Int? + public var position: String? - public var lastAttemptedOn: Double? + public var archived: Bool? - public var status: String? + public var createdBy: UserSchema? - public var name: String? + public var url: String? - public var webhookUrl: String? + public var content: String? - public var responseTime: Int? + public var createdOn: String? - public var messageId: String? + public var modifiedOn: String? - public var eventTraceId: String? + public var v: Double? public enum CodingKeys: String, CodingKey { - case eventName = "event_name" + case id = "_id" - case responseCode = "response_code" + case name = "name" - case responseMessage = "response_message" + case type = "type" - case data = "data" + case subType = "sub_type" - case attempt = "attempt" + case position = "position" - case lastAttemptedOn = "last_attempted_on" + case archived = "archived" - case status = "status" + case createdBy = "created_by" - case name = "name" + case url = "url" - case webhookUrl = "webhook_url" + case content = "content" - case responseTime = "response_time" + case createdOn = "created_on" - case messageId = "message_id" + case modifiedOn = "modified_on" - case eventTraceId = "event_trace_id" + case v = "__v" } - public init(attempt: Int? = nil, data: String? = nil, eventName: String? = nil, eventTraceId: String? = nil, lastAttemptedOn: Double? = nil, messageId: String? = nil, name: String? = nil, responseCode: Int? = nil, responseMessage: String? = nil, responseTime: Int? = nil, status: String? = nil, webhookUrl: String? = nil) { + public init(archived: Bool? = nil, content: String? = nil, createdBy: UserSchema? = nil, createdOn: String? = nil, modifiedOn: String? = nil, name: String? = nil, position: String? = nil, subType: String? = nil, type: String? = nil, url: String? = nil, id: String? = nil, v: Double? = nil) { - self.eventName = eventName + self.id = id - self.responseCode = responseCode + self.name = name - self.responseMessage = responseMessage + self.type = type - self.data = data + self.subType = subType - self.attempt = attempt + self.position = position - self.lastAttemptedOn = lastAttemptedOn + self.archived = archived - self.status = status + self.createdBy = createdBy - self.name = name + self.url = url - self.webhookUrl = webhookUrl + self.content = content - self.responseTime = responseTime + self.createdOn = createdOn - self.messageId = messageId + self.modifiedOn = modifiedOn - self.eventTraceId = eventTraceId + self.v = v } @@ -98,7 +96,7 @@ public extension PlatformClient.Webhook { do { - eventName = try container.decode(String.self, forKey: .eventName) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -110,7 +108,7 @@ public extension PlatformClient.Webhook { do { - responseCode = try container.decode(Int.self, forKey: .responseCode) + name = try container.decode(String.self, forKey: .name) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -122,7 +120,7 @@ public extension PlatformClient.Webhook { do { - responseMessage = try container.decode(String.self, forKey: .responseMessage) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -134,7 +132,7 @@ public extension PlatformClient.Webhook { do { - data = try container.decode(String.self, forKey: .data) + subType = try container.decode(String.self, forKey: .subType) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -146,7 +144,7 @@ public extension PlatformClient.Webhook { do { - attempt = try container.decode(Int.self, forKey: .attempt) + position = try container.decode(String.self, forKey: .position) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -158,7 +156,7 @@ public extension PlatformClient.Webhook { do { - lastAttemptedOn = try container.decode(Double.self, forKey: .lastAttemptedOn) + archived = try container.decode(Bool.self, forKey: .archived) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -170,7 +168,7 @@ public extension PlatformClient.Webhook { do { - status = try container.decode(String.self, forKey: .status) + createdBy = try container.decode(UserSchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -182,7 +180,7 @@ public extension PlatformClient.Webhook { do { - name = try container.decode(String.self, forKey: .name) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -194,7 +192,7 @@ public extension PlatformClient.Webhook { do { - webhookUrl = try container.decode(String.self, forKey: .webhookUrl) + content = try container.decode(String.self, forKey: .content) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -206,7 +204,7 @@ public extension PlatformClient.Webhook { do { - responseTime = try container.decode(Int.self, forKey: .responseTime) + createdOn = try container.decode(String.self, forKey: .createdOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -218,7 +216,7 @@ public extension PlatformClient.Webhook { do { - messageId = try container.decode(String.self, forKey: .messageId) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -230,7 +228,7 @@ public extension PlatformClient.Webhook { do { - eventTraceId = try container.decode(String.self, forKey: .eventTraceId) + v = try container.decode(Double.self, forKey: .v) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -246,70 +244,54 @@ public extension PlatformClient.Webhook { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(id, forKey: .id) - try? container.encodeIfPresent(eventName, forKey: .eventName) - - - - - try? container.encodeIfPresent(responseCode, forKey: .responseCode) - - - - - try? container.encodeIfPresent(responseMessage, forKey: .responseMessage) - - - - - try? container.encodeIfPresent(data, forKey: .data) + try? container.encodeIfPresent(name, forKey: .name) - try? container.encodeIfPresent(attempt, forKey: .attempt) + try? container.encodeIfPresent(type, forKey: .type) - try? container.encodeIfPresent(lastAttemptedOn, forKey: .lastAttemptedOn) + try? container.encodeIfPresent(subType, forKey: .subType) + try? container.encodeIfPresent(position, forKey: .position) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(archived, forKey: .archived) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(webhookUrl, forKey: .webhookUrl) + try? container.encodeIfPresent(url, forKey: .url) + try? container.encodeIfPresent(content, forKey: .content) - try? container.encodeIfPresent(responseTime, forKey: .responseTime) + try? container.encodeIfPresent(createdOn, forKey: .createdOn) - try? container.encodeIfPresent(messageId, forKey: .messageId) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - try? container.encodeIfPresent(eventTraceId, forKey: .eventTraceId) + try? container.encodeIfPresent(v, forKey: .v) } } } - - - - diff --git a/Sources/code/public/Models/Content/CustomPageBySlugSchemaContentPublicModel.swift b/Sources/code/public/Models/Content/CustomPageBySlugSchemaContentPublicModel.swift new file mode 100644 index 0000000000..bb8085adbf --- /dev/null +++ b/Sources/code/public/Models/Content/CustomPageBySlugSchemaContentPublicModel.swift @@ -0,0 +1,341 @@ + + +import Foundation +public extension PublicClient.Content { + /* + Model: CustomPageBySlugSchema + Used By: Content + */ + + class CustomPageBySlugSchema: Codable { + + + public var id: String? + + public var title: String? + + public var slug: String? + + public var type: String? + + public var description: String? + + public var published: Bool? + + public var content: [ItemSchema]? + + public var seo: CreateCustomPageSeoSchema? + + public var createdBy: CreatedBySchema? + + public var modifiedBy: CreatedBySchema? + + public var archived: Bool? + + public var createdOn: String? + + public var modifiedOn: String? + + public var v: Double? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case title = "title" + + case slug = "slug" + + case type = "type" + + case description = "description" + + case published = "published" + + case content = "content" + + case seo = "seo" + + case createdBy = "created_by" + + case modifiedBy = "modified_by" + + case archived = "archived" + + case createdOn = "created_on" + + case modifiedOn = "modified_on" + + case v = "__v" + + } + + public init(archived: Bool? = nil, content: [ItemSchema]? = nil, createdBy: CreatedBySchema? = nil, createdOn: String? = nil, description: String? = nil, modifiedBy: CreatedBySchema? = nil, modifiedOn: String? = nil, published: Bool? = nil, seo: CreateCustomPageSeoSchema? = nil, slug: String? = nil, title: String? = nil, type: String? = nil, id: String? = nil, v: Double? = nil) { + + self.id = id + + self.title = title + + self.slug = slug + + self.type = type + + self.description = description + + self.published = published + + self.content = content + + self.seo = seo + + self.createdBy = createdBy + + self.modifiedBy = modifiedBy + + self.archived = archived + + self.createdOn = createdOn + + self.modifiedOn = modifiedOn + + self.v = v + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + title = try container.decode(String.self, forKey: .title) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + slug = try container.decode(String.self, forKey: .slug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + 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 { + + } + + + + do { + content = try container.decode([ItemSchema].self, forKey: .content) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + seo = try container.decode(CreateCustomPageSeoSchema.self, forKey: .seo) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + createdBy = try container.decode(CreatedBySchema.self, forKey: .createdBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + modifiedBy = try container.decode(CreatedBySchema.self, forKey: .modifiedBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + archived = try container.decode(Bool.self, forKey: .archived) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + 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 { + + } + + + + do { + v = try container.decode(Double.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(id, forKey: .id) + + + + try? container.encodeIfPresent(title, forKey: .title) + + + + try? container.encodeIfPresent(slug, forKey: .slug) + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + try? container.encodeIfPresent(description, forKey: .description) + + + + try? container.encodeIfPresent(published, forKey: .published) + + + + try? container.encodeIfPresent(content, forKey: .content) + + + + try? container.encodeIfPresent(seo, forKey: .seo) + + + + try? container.encodeIfPresent(createdBy, forKey: .createdBy) + + + + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + + + + try? container.encodeIfPresent(archived, forKey: .archived) + + + + try? container.encodeIfPresent(createdOn, forKey: .createdOn) + + + + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + + + try? container.encodeIfPresent(v, forKey: .v) + + + } + + } +} diff --git a/Sources/code/platform/Models/Finance/GetReportingFiltersFinancePlatformModel.swift b/Sources/code/public/Models/Content/FeaturesContentPublicModel.swift similarity index 69% rename from Sources/code/platform/Models/Finance/GetReportingFiltersFinancePlatformModel.swift rename to Sources/code/public/Models/Content/FeaturesContentPublicModel.swift index faf566dc4a..8d9664fdb1 100644 --- a/Sources/code/platform/Models/Finance/GetReportingFiltersFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/FeaturesContentPublicModel.swift @@ -1,47 +1,45 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: GetReportingFilters - Used By: Finance + Model: Features + Used By: Content */ - class GetReportingFilters: Codable { + class Features: Codable { - public var text: String? + public var title: String? - public var type: String? + public var text: String? - public var options: [[String: Any]]? + public var list: [String]? - public var value: String? + public var image: String? public enum CodingKeys: String, CodingKey { - case text = "text" + case title = "title" - case type = "type" + case text = "text" - case options = "options" + case list = "list" - case value = "value" + case image = "image" } - public init(options: [[String: Any]]? = nil, text: String? = nil, type: String? = nil, value: String? = nil) { + public init(image: String? = nil, list: [String]? = nil, text: String? = nil, title: String? = nil) { - self.text = text + self.title = title - self.type = type + self.text = text - self.options = options + self.list = list - self.value = value + self.image = image } @@ -50,7 +48,7 @@ public extension PlatformClient.Finance { do { - text = try container.decode(String.self, forKey: .text) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +60,7 @@ public extension PlatformClient.Finance { do { - type = try container.decode(String.self, forKey: .type) + text = try container.decode(String.self, forKey: .text) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +72,7 @@ public extension PlatformClient.Finance { do { - options = try container.decode([[String: Any]].self, forKey: .options) + list = try container.decode([String].self, forKey: .list) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,7 +84,7 @@ public extension PlatformClient.Finance { do { - value = try container.decode(String.self, forKey: .value) + image = try container.decode(String.self, forKey: .image) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,30 +100,22 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(text, forKey: .text) - - - - - try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(text, forKey: .text) - try? container.encodeIfPresent(options, forKey: .options) + try? container.encodeIfPresent(list, forKey: .list) - try? container.encodeIfPresent(value, forKey: .value) + try? container.encodeIfPresent(image, forKey: .image) } } } - - - - diff --git a/Sources/code/platform/Models/Finance/InvoicePdfResponseFinancePlatformModel.swift b/Sources/code/public/Models/Content/FooterContentSchemaContentPublicModel.swift similarity index 63% rename from Sources/code/platform/Models/Finance/InvoicePdfResponseFinancePlatformModel.swift rename to Sources/code/public/Models/Content/FooterContentSchemaContentPublicModel.swift index f59fd85801..72356229d4 100644 --- a/Sources/code/platform/Models/Finance/InvoicePdfResponseFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/FooterContentSchemaContentPublicModel.swift @@ -1,41 +1,39 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: InvoicePdfResponse - Used By: Finance + Model: FooterContentSchema + Used By: Content */ - class InvoicePdfResponse: Codable { + class FooterContentSchema: Codable { - public var success: Bool? + public var isVisible: Bool? - public var data: [String]? + public var lineOne: String? - public var error: [String]? + public var lineTwo: String? public enum CodingKeys: String, CodingKey { - case success = "success" + case isVisible = "is_visible" - case data = "data" + case lineOne = "line_one" - case error = "error" + case lineTwo = "line_two" } - public init(data: [String]? = nil, error: [String]? = nil, success: Bool? = nil) { + public init(isVisible: Bool? = nil, lineOne: String? = nil, lineTwo: String? = nil) { - self.success = success + self.isVisible = isVisible - self.data = data + self.lineOne = lineOne - self.error = error + self.lineTwo = lineTwo } @@ -44,7 +42,7 @@ public extension PlatformClient.Finance { do { - success = try container.decode(Bool.self, forKey: .success) + isVisible = try container.decode(Bool.self, forKey: .isVisible) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +54,7 @@ public extension PlatformClient.Finance { do { - data = try container.decode([String].self, forKey: .data) + lineOne = try container.decode(String.self, forKey: .lineOne) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +66,7 @@ public extension PlatformClient.Finance { do { - error = try container.decode([String].self, forKey: .error) + lineTwo = try container.decode(String.self, forKey: .lineTwo) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,25 +82,18 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(success, forKey: .success) - - + try? container.encodeIfPresent(isVisible, forKey: .isVisible) - try? container.encodeIfPresent(data, forKey: .data) + try? container.encodeIfPresent(lineOne, forKey: .lineOne) - try? container.encodeIfPresent(error, forKey: .error) + try? container.encodeIfPresent(lineTwo, forKey: .lineTwo) } } } - - - - diff --git a/Sources/code/public/Models/Content/FooterSchemaContentPublicModel.swift b/Sources/code/public/Models/Content/FooterSchemaContentPublicModel.swift new file mode 100644 index 0000000000..0131c5283f --- /dev/null +++ b/Sources/code/public/Models/Content/FooterSchemaContentPublicModel.swift @@ -0,0 +1,297 @@ + + +import Foundation +public extension PublicClient.Content { + /* + Model: FooterSchema + Used By: Content + */ + + class FooterSchema: Codable { + + + public var id: String? + + public var title: String? + + public var description: String? + + public var type: String? + + public var tags: [[String: Any]]? + + public var published: Bool? + + public var content: [RawHtmlContentSchema]? + + public var footerMeta: [[String: Any]]? + + public var createdBy: CreatedBySchema? + + public var modifiedBy: CreatedBySchema? + + public var archived: Bool? + + public var v: Int? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case title = "title" + + case description = "description" + + case type = "type" + + case tags = "tags" + + case published = "published" + + case content = "content" + + case footerMeta = "footer_meta" + + case createdBy = "created_by" + + case modifiedBy = "modified_by" + + case archived = "archived" + + case v = "__v" + + } + + public init(archived: Bool? = nil, content: [RawHtmlContentSchema]? = nil, createdBy: CreatedBySchema? = nil, description: String? = nil, footerMeta: [[String: Any]]? = nil, modifiedBy: CreatedBySchema? = nil, published: Bool? = nil, tags: [[String: Any]]? = nil, title: String? = nil, type: String? = nil, id: String? = nil, v: Int? = nil) { + + self.id = id + + self.title = title + + self.description = description + + self.type = type + + self.tags = tags + + self.published = published + + self.content = content + + self.footerMeta = footerMeta + + self.createdBy = createdBy + + self.modifiedBy = modifiedBy + + self.archived = archived + + self.v = v + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + title = try container.decode(String.self, forKey: .title) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + type = try container.decode(String.self, forKey: .type) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + tags = try container.decode([[String: Any]].self, forKey: .tags) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + content = try container.decode([RawHtmlContentSchema].self, forKey: .content) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + footerMeta = try container.decode([[String: Any]].self, forKey: .footerMeta) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + createdBy = try container.decode(CreatedBySchema.self, forKey: .createdBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + modifiedBy = try container.decode(CreatedBySchema.self, forKey: .modifiedBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + archived = try container.decode(Bool.self, forKey: .archived) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + v = try container.decode(Int.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(id, forKey: .id) + + + + try? container.encodeIfPresent(title, forKey: .title) + + + + try? container.encodeIfPresent(description, forKey: .description) + + + + try? container.encodeIfPresent(type, forKey: .type) + + + + try? container.encodeIfPresent(tags, forKey: .tags) + + + + try? container.encodeIfPresent(published, forKey: .published) + + + + try? container.encodeIfPresent(content, forKey: .content) + + + + try? container.encodeIfPresent(footerMeta, forKey: .footerMeta) + + + + try? container.encodeIfPresent(createdBy, forKey: .createdBy) + + + + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) + + + + try? container.encodeIfPresent(archived, forKey: .archived) + + + + try? container.encodeIfPresent(v, forKey: .v) + + + } + + } +} diff --git a/Sources/code/public/Models/Content/HomePageContentSchemaContentPublicModel.swift b/Sources/code/public/Models/Content/HomePageContentSchemaContentPublicModel.swift new file mode 100644 index 0000000000..c8b14700be --- /dev/null +++ b/Sources/code/public/Models/Content/HomePageContentSchemaContentPublicModel.swift @@ -0,0 +1,209 @@ + + +import Foundation +public extension PublicClient.Content { + /* + Model: HomePageContentSchema + Used By: Content + */ + + class HomePageContentSchema: Codable { + + + public var id: String? + + public var slug: String? + + public var createdBy: CreatedBySchema? + + public var archived: Bool? + + public var pageType: String? + + public var createdOn: String? + + public var modifiedOn: String? + + public var v: Double? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case slug = "slug" + + case createdBy = "created_by" + + case archived = "archived" + + case pageType = "page_type" + + case createdOn = "created_on" + + case modifiedOn = "modified_on" + + case v = "__v" + + } + + public init(archived: Bool? = nil, createdBy: CreatedBySchema? = nil, createdOn: String? = nil, modifiedOn: String? = nil, pageType: String? = nil, slug: String? = nil, id: String? = nil, v: Double? = nil) { + + self.id = id + + self.slug = slug + + self.createdBy = createdBy + + self.archived = archived + + self.pageType = pageType + + self.createdOn = createdOn + + self.modifiedOn = modifiedOn + + self.v = v + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + slug = try container.decode(String.self, forKey: .slug) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + createdBy = try container.decode(CreatedBySchema.self, forKey: .createdBy) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + archived = try container.decode(Bool.self, forKey: .archived) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + pageType = try container.decode(String.self, forKey: .pageType) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + 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 { + + } + + + + do { + 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 { + + } + + + + do { + v = try container.decode(Double.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(id, forKey: .id) + + + + try? container.encodeIfPresent(slug, forKey: .slug) + + + + try? container.encodeIfPresent(createdBy, forKey: .createdBy) + + + + try? container.encodeIfPresent(archived, forKey: .archived) + + + + try? container.encodeIfPresent(pageType, forKey: .pageType) + + + + try? container.encodeIfPresent(createdOn, forKey: .createdOn) + + + + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) + + + + try? container.encodeIfPresent(v, forKey: .v) + + + } + + } +} diff --git a/Sources/code/platform/Models/Finance/ChannelDisplayNameItemsFinancePlatformModel.swift b/Sources/code/public/Models/Content/ItemSchemaContentPublicModel.swift similarity index 77% rename from Sources/code/platform/Models/Finance/ChannelDisplayNameItemsFinancePlatformModel.swift rename to Sources/code/public/Models/Content/ItemSchemaContentPublicModel.swift index ee32a7d596..b8fb064327 100644 --- a/Sources/code/platform/Models/Finance/ChannelDisplayNameItemsFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/ItemSchemaContentPublicModel.swift @@ -1,33 +1,31 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: ChannelDisplayNameItems - Used By: Finance + Model: ItemSchema + Used By: Content */ - class ChannelDisplayNameItems: Codable { + class ItemSchema: Codable { - public var key: String? + public var type: String? public var value: String? public enum CodingKeys: String, CodingKey { - case key = "key" + case type = "type" case value = "value" } - public init(key: String? = nil, value: String? = nil) { + public init(type: String? = nil, value: String? = nil) { - self.key = key + self.type = type self.value = value @@ -38,7 +36,7 @@ public extension PlatformClient.Finance { do { - key = try container.decode(String.self, forKey: .key) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -66,9 +64,7 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(key, forKey: .key) - + try? container.encodeIfPresent(type, forKey: .type) @@ -79,7 +75,3 @@ public extension PlatformClient.Finance { } } - - - - diff --git a/Sources/code/platform/Models/AuditTrail/EntityObjAuditTrailPlatformModel.swift b/Sources/code/public/Models/Content/MediaSchemaContentPublicModel.swift similarity index 69% rename from Sources/code/platform/Models/AuditTrail/EntityObjAuditTrailPlatformModel.swift rename to Sources/code/public/Models/Content/MediaSchemaContentPublicModel.swift index ea6316c224..294ddcbc4b 100644 --- a/Sources/code/platform/Models/AuditTrail/EntityObjAuditTrailPlatformModel.swift +++ b/Sources/code/public/Models/Content/MediaSchemaContentPublicModel.swift @@ -1,47 +1,45 @@ import Foundation - - -public extension PlatformClient.AuditTrail { +public extension PublicClient.Content { /* - Model: EntityObj - Used By: AuditTrail + Model: MediaSchema + Used By: Content */ - class EntityObj: Codable { + class MediaSchema: Codable { - public var id: String? + public var url: String? public var type: String? - public var action: String? + public var alt: String? - public var entityDetails: [String: Any]? + public var anchorLink: String? public enum CodingKeys: String, CodingKey { - case id = "id" + case url = "url" case type = "type" - case action = "action" + case alt = "alt" - case entityDetails = "entity_details" + case anchorLink = "anchor_link" } - public init(action: String? = nil, entityDetails: [String: Any]? = nil, id: String? = nil, type: String? = nil) { + public init(alt: String? = nil, anchorLink: String? = nil, type: String? = nil, url: String? = nil) { - self.id = id + self.url = url self.type = type - self.action = action + self.alt = alt - self.entityDetails = entityDetails + self.anchorLink = anchorLink } @@ -50,7 +48,7 @@ public extension PlatformClient.AuditTrail { do { - id = try container.decode(String.self, forKey: .id) + url = try container.decode(String.self, forKey: .url) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +72,7 @@ public extension PlatformClient.AuditTrail { do { - action = try container.decode(String.self, forKey: .action) + alt = try container.decode(String.self, forKey: .alt) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,7 +84,7 @@ public extension PlatformClient.AuditTrail { do { - entityDetails = try container.decode([String: Any].self, forKey: .entityDetails) + anchorLink = try container.decode(String.self, forKey: .anchorLink) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,9 +100,7 @@ public extension PlatformClient.AuditTrail { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(id, forKey: .id) - + try? container.encodeIfPresent(url, forKey: .url) @@ -112,20 +108,14 @@ public extension PlatformClient.AuditTrail { - - try? container.encodeIfPresent(action, forKey: .action) + try? container.encodeIfPresent(alt, forKey: .alt) - - try? container.encodeIfPresent(entityDetails, forKey: .entityDetails) + try? container.encodeIfPresent(anchorLink, forKey: .anchorLink) } } } - - - - diff --git a/Sources/code/public/Models/Content/MenuSchemaContentPublicModel.swift b/Sources/code/public/Models/Content/MenuSchemaContentPublicModel.swift new file mode 100644 index 0000000000..20c24f78a8 --- /dev/null +++ b/Sources/code/public/Models/Content/MenuSchemaContentPublicModel.swift @@ -0,0 +1,165 @@ + + +import Foundation +public extension PublicClient.Content { + /* + Model: MenuSchema + Used By: Content + */ + + class MenuSchema: Codable { + + + public var salesChannel: SalesChannelSchema? + + public var otherSeller: OtherSellerSchema? + + public var footerContent: FooterContentSchema? + + public var canCreateBusinessAccount: Bool? + + public var companyLevel: [CompanyLevelMenuItemSchema]? + + public var applicationLevel: [ApplicationLevelMenuItemSchema]? + + + public enum CodingKeys: String, CodingKey { + + case salesChannel = "sales_channel" + + case otherSeller = "other_seller" + + case footerContent = "footer_content" + + case canCreateBusinessAccount = "can_create_business_account" + + case companyLevel = "company_level" + + case applicationLevel = "application_level" + + } + + public init(applicationLevel: [ApplicationLevelMenuItemSchema]? = nil, canCreateBusinessAccount: Bool? = nil, companyLevel: [CompanyLevelMenuItemSchema]? = nil, footerContent: FooterContentSchema? = nil, otherSeller: OtherSellerSchema? = nil, salesChannel: SalesChannelSchema? = nil) { + + self.salesChannel = salesChannel + + self.otherSeller = otherSeller + + self.footerContent = footerContent + + self.canCreateBusinessAccount = canCreateBusinessAccount + + self.companyLevel = companyLevel + + self.applicationLevel = applicationLevel + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + salesChannel = try container.decode(SalesChannelSchema.self, forKey: .salesChannel) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + otherSeller = try container.decode(OtherSellerSchema.self, forKey: .otherSeller) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + footerContent = try container.decode(FooterContentSchema.self, forKey: .footerContent) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + canCreateBusinessAccount = try container.decode(Bool.self, forKey: .canCreateBusinessAccount) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + companyLevel = try container.decode([CompanyLevelMenuItemSchema].self, forKey: .companyLevel) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + applicationLevel = try container.decode([ApplicationLevelMenuItemSchema].self, forKey: .applicationLevel) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(salesChannel, forKey: .salesChannel) + + + + try? container.encodeIfPresent(otherSeller, forKey: .otherSeller) + + + + try? container.encodeIfPresent(footerContent, forKey: .footerContent) + + + + try? container.encodeIfPresent(canCreateBusinessAccount, forKey: .canCreateBusinessAccount) + + + + try? container.encodeIfPresent(companyLevel, forKey: .companyLevel) + + + + try? container.encodeIfPresent(applicationLevel, forKey: .applicationLevel) + + + } + + } +} diff --git a/Sources/code/platform/Models/Webhook/CdnObjectWebhookPlatformModel.swift b/Sources/code/public/Models/Content/MenuTypeSchemaContentPublicModel.swift similarity index 68% rename from Sources/code/platform/Models/Webhook/CdnObjectWebhookPlatformModel.swift rename to Sources/code/public/Models/Content/MenuTypeSchemaContentPublicModel.swift index d706efe3e4..d4016787c8 100644 --- a/Sources/code/platform/Models/Webhook/CdnObjectWebhookPlatformModel.swift +++ b/Sources/code/public/Models/Content/MenuTypeSchemaContentPublicModel.swift @@ -1,29 +1,27 @@ import Foundation - - -public extension PlatformClient.Webhook { +public extension PublicClient.Content { /* - Model: CdnObject - Used By: Webhook + Model: MenuTypeSchema + Used By: Content */ - class CdnObject: Codable { + class MenuTypeSchema: Codable { - public var urls: [Url]? + public var menu: MenuSchema? public enum CodingKeys: String, CodingKey { - case urls = "urls" + case menu = "menu" } - public init(urls: [Url]? = nil) { + public init(menu: MenuSchema? = nil) { - self.urls = urls + self.menu = menu } @@ -32,7 +30,7 @@ public extension PlatformClient.Webhook { do { - urls = try container.decode([Url].self, forKey: .urls) + menu = try container.decode(MenuSchema.self, forKey: .menu) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,15 +46,10 @@ public extension PlatformClient.Webhook { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(urls, forKey: .urls) + try? container.encodeIfPresent(menu, forKey: .menu) } } } - - - - diff --git a/Sources/code/public/Models/Content/MenusSchemaContentPublicModel.swift b/Sources/code/public/Models/Content/MenusSchemaContentPublicModel.swift new file mode 100644 index 0000000000..f2a8c2dee0 --- /dev/null +++ b/Sources/code/public/Models/Content/MenusSchemaContentPublicModel.swift @@ -0,0 +1,121 @@ + + +import Foundation +public extension PublicClient.Content { + /* + Model: MenusSchema + Used By: Content + */ + + class MenusSchema: Codable { + + + public var id: String? + + public var desktop: MenuTypeSchema? + + public var mobile: MenuTypeSchema? + + public var v: Double? + + + public enum CodingKeys: String, CodingKey { + + case id = "_id" + + case desktop = "desktop" + + case mobile = "mobile" + + case v = "__v" + + } + + public init(desktop: MenuTypeSchema? = nil, mobile: MenuTypeSchema? = nil, id: String? = nil, v: Double? = nil) { + + self.id = id + + self.desktop = desktop + + self.mobile = mobile + + self.v = v + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + + do { + desktop = try container.decode(MenuTypeSchema.self, forKey: .desktop) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + mobile = try container.decode(MenuTypeSchema.self, forKey: .mobile) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + v = try container.decode(Double.self, forKey: .v) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(id, forKey: .id) + + + + try? container.encodeIfPresent(desktop, forKey: .desktop) + + + + try? container.encodeIfPresent(mobile, forKey: .mobile) + + + + try? container.encodeIfPresent(v, forKey: .v) + + + } + + } +} diff --git a/Sources/code/platform/Models/Finance/CurrencyFinancePlatformModel.swift b/Sources/code/public/Models/Content/NavItemSchemaContentPublicModel.swift similarity index 65% rename from Sources/code/platform/Models/Finance/CurrencyFinancePlatformModel.swift rename to Sources/code/public/Models/Content/NavItemSchemaContentPublicModel.swift index 02f009a412..3e774d292d 100644 --- a/Sources/code/platform/Models/Finance/CurrencyFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/NavItemSchemaContentPublicModel.swift @@ -1,41 +1,39 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: Currency - Used By: Finance + Model: NavItemSchema + Used By: Content */ - class Currency: Codable { + class NavItemSchema: Codable { - public var code: String? + public var title: String? - public var symbol: String? + public var link: String? - public var name: String? + public var href: String? public enum CodingKeys: String, CodingKey { - case code = "code" + case title = "title" - case symbol = "symbol" + case link = "link" - case name = "name" + case href = "href" } - public init(code: String? = nil, name: String? = nil, symbol: String? = nil) { + public init(href: String? = nil, link: String? = nil, title: String? = nil) { - self.code = code + self.title = title - self.symbol = symbol + self.link = link - self.name = name + self.href = href } @@ -44,7 +42,7 @@ public extension PlatformClient.Finance { do { - code = try container.decode(String.self, forKey: .code) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +54,7 @@ public extension PlatformClient.Finance { do { - symbol = try container.decode(String.self, forKey: .symbol) + link = try container.decode(String.self, forKey: .link) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +66,7 @@ public extension PlatformClient.Finance { do { - name = try container.decode(String.self, forKey: .name) + href = try container.decode(String.self, forKey: .href) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,25 +82,18 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(code, forKey: .code) - - + try? container.encodeIfPresent(title, forKey: .title) - try? container.encodeIfPresent(symbol, forKey: .symbol) + try? container.encodeIfPresent(link, forKey: .link) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(href, forKey: .href) } } } - - - - diff --git a/Sources/code/platform/Models/Finance/GetEngineResponseFinancePlatformModel.swift b/Sources/code/public/Models/Content/NavbarSchemaContentPublicModel.swift similarity index 66% rename from Sources/code/platform/Models/Finance/GetEngineResponseFinancePlatformModel.swift rename to Sources/code/public/Models/Content/NavbarSchemaContentPublicModel.swift index 6085cd0b4b..ea88895012 100644 --- a/Sources/code/platform/Models/Finance/GetEngineResponseFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/NavbarSchemaContentPublicModel.swift @@ -1,47 +1,45 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: GetEngineResponse - Used By: Finance + Model: NavbarSchema + Used By: Content */ - class GetEngineResponse: Codable { + class NavbarSchema: Codable { - public var success: Bool? + public var id: String? - public var items: [[String: Any]]? + public var items: [NavItemSchema]? - public var page: Page? + public var v: Double? - public var itemCount: Int? + public var modifiedBy: CreatedBySchema? public enum CodingKeys: String, CodingKey { - case success = "success" + case id = "_id" case items = "items" - case page = "page" + case v = "__v" - case itemCount = "item_count" + case modifiedBy = "modified_by" } - public init(items: [[String: Any]]? = nil, itemCount: Int? = nil, page: Page? = nil, success: Bool? = nil) { + public init(items: [NavItemSchema]? = nil, modifiedBy: CreatedBySchema? = nil, id: String? = nil, v: Double? = nil) { - self.success = success + self.id = id self.items = items - self.page = page + self.v = v - self.itemCount = itemCount + self.modifiedBy = modifiedBy } @@ -50,7 +48,7 @@ public extension PlatformClient.Finance { do { - success = try container.decode(Bool.self, forKey: .success) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -62,7 +60,7 @@ public extension PlatformClient.Finance { do { - items = try container.decode([[String: Any]].self, forKey: .items) + items = try container.decode([NavItemSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -74,7 +72,7 @@ public extension PlatformClient.Finance { do { - page = try container.decode(Page.self, forKey: .page) + v = try container.decode(Double.self, forKey: .v) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -86,7 +84,7 @@ public extension PlatformClient.Finance { do { - itemCount = try container.decode(Int.self, forKey: .itemCount) + modifiedBy = try container.decode(CreatedBySchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -102,9 +100,7 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(success, forKey: .success) - + try? container.encodeIfPresent(id, forKey: .id) @@ -112,20 +108,14 @@ public extension PlatformClient.Finance { - - try? container.encodeIfPresent(page, forKey: .page) + try? container.encodeIfPresent(v, forKey: .v) - - try? container.encodeIfPresent(itemCount, forKey: .itemCount) + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) } } } - - - - diff --git a/Sources/code/public/Models/Content/OtherSellerSchemaContentPublicModel.swift b/Sources/code/public/Models/Content/OtherSellerSchemaContentPublicModel.swift new file mode 100644 index 0000000000..e47b571c83 --- /dev/null +++ b/Sources/code/public/Models/Content/OtherSellerSchemaContentPublicModel.swift @@ -0,0 +1,77 @@ + + +import Foundation +public extension PublicClient.Content { + /* + Model: OtherSellerSchema + Used By: Content + */ + + class OtherSellerSchema: Codable { + + + public var isVisible: Bool? + + public var title: String? + + + public enum CodingKeys: String, CodingKey { + + case isVisible = "is_visible" + + case title = "title" + + } + + public init(isVisible: Bool? = nil, title: String? = nil) { + + self.isVisible = isVisible + + self.title = title + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + isVisible = try container.decode(Bool.self, forKey: .isVisible) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + title = try container.decode(String.self, forKey: .title) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(isVisible, forKey: .isVisible) + + + + try? container.encodeIfPresent(title, forKey: .title) + + + } + + } +} diff --git a/Sources/code/platform/Models/Finance/PageFinancePlatformModel.swift b/Sources/code/public/Models/Content/PageSchemaContentPublicModel.swift similarity index 64% rename from Sources/code/platform/Models/Finance/PageFinancePlatformModel.swift rename to Sources/code/public/Models/Content/PageSchemaContentPublicModel.swift index ffb412bc72..8797e60d13 100644 --- a/Sources/code/platform/Models/Finance/PageFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/PageSchemaContentPublicModel.swift @@ -1,66 +1,52 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: Page - Used By: Finance + Model: PageSchema + Used By: Content */ - class Page: Codable { - + class PageSchema: Codable { - public var itemTotal: Int? - public var nextId: String? + public var type: String? - public var hasPrevious: Bool? - - public var hasNext: Bool? + public var current: Double? - public var current: Int? + public var size: Double? - public var type: String + public var itemTotal: Double? - public var size: Int? + public var hasNext: Bool? public enum CodingKeys: String, CodingKey { - case itemTotal = "item_total" - - case nextId = "next_id" - - case hasPrevious = "has_previous" - - case hasNext = "has_next" + case type = "type" case current = "current" - case type = "type" - case size = "size" - } - - public init(current: Int? = nil, hasNext: Bool? = nil, hasPrevious: Bool? = nil, itemTotal: Int? = nil, nextId: String? = nil, size: Int? = nil, type: String) { - - self.itemTotal = itemTotal + case itemTotal = "item_total" - self.nextId = nextId + case hasNext = "has_next" - self.hasPrevious = hasPrevious + } + + public init(current: Double? = nil, hasNext: Bool? = nil, itemTotal: Double? = nil, size: Double? = nil, type: String? = nil) { - self.hasNext = hasNext + self.type = type self.current = current - self.type = type - self.size = size + self.itemTotal = itemTotal + + self.hasNext = hasNext + } required public init(from decoder: Decoder) throws { @@ -68,19 +54,7 @@ public extension PlatformClient.Finance { do { - itemTotal = try container.decode(Int.self, forKey: .itemTotal) - - } catch DecodingError.typeMismatch(let type, let context) { - print("Type '\(type)' mismatch:", context.debugDescription) - print("codingPath:", context.codingPath) - } catch { - - } - - - - do { - nextId = try container.decode(String.self, forKey: .nextId) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +66,7 @@ public extension PlatformClient.Finance { do { - hasPrevious = try container.decode(Bool.self, forKey: .hasPrevious) + current = try container.decode(Double.self, forKey: .current) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +78,7 @@ public extension PlatformClient.Finance { do { - hasNext = try container.decode(Bool.self, forKey: .hasNext) + size = try container.decode(Double.self, forKey: .size) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,7 +90,7 @@ public extension PlatformClient.Finance { do { - current = try container.decode(Int.self, forKey: .current) + itemTotal = try container.decode(Double.self, forKey: .itemTotal) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -127,13 +101,8 @@ public extension PlatformClient.Finance { - type = try container.decode(String.self, forKey: .type) - - - - do { - size = try container.decode(Int.self, forKey: .size) + hasNext = try container.decode(Bool.self, forKey: .hasNext) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -149,45 +118,26 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(itemTotal, forKey: .itemTotal) + try? container.encodeIfPresent(type, forKey: .type) + try? container.encodeIfPresent(current, forKey: .current) - try? container.encodeIfPresent(nextId, forKey: .nextId) + try? container.encodeIfPresent(size, forKey: .size) - try? container.encodeIfPresent(hasPrevious, forKey: .hasPrevious) + try? container.encodeIfPresent(itemTotal, forKey: .itemTotal) try? container.encodeIfPresent(hasNext, forKey: .hasNext) - - - try? container.encodeIfPresent(current, forKey: .current) - - - - - try? container.encodeIfPresent(type, forKey: .type) - - - - - try? container.encodeIfPresent(size, forKey: .size) - - } } } - - - - diff --git a/Sources/code/platform/Models/Webhook/HistoryItemsWebhookPlatformModel.swift b/Sources/code/public/Models/Content/PricingBannerSchemaContentPublicModel.swift similarity index 63% rename from Sources/code/platform/Models/Webhook/HistoryItemsWebhookPlatformModel.swift rename to Sources/code/public/Models/Content/PricingBannerSchemaContentPublicModel.swift index dcfdb5b958..ab9d33f54a 100644 --- a/Sources/code/platform/Models/Webhook/HistoryItemsWebhookPlatformModel.swift +++ b/Sources/code/public/Models/Content/PricingBannerSchemaContentPublicModel.swift @@ -1,77 +1,75 @@ import Foundation - - -public extension PlatformClient.Webhook { +public extension PublicClient.Content { /* - Model: HistoryItems - Used By: Webhook + Model: PricingBannerSchema + Used By: Content */ - class HistoryItems: Codable { + class PricingBannerSchema: Codable { - public var id: Int? + public var id: String? - public var association: HistoryAssociation? + public var webBanner: MediaSchema? - public var filters: HistoryFilters? + public var mobileBanner: MediaSchema? - public var filename: String? + public var published: Bool? - public var status: String? + public var createdBy: CreatedBySchema? - public var uploadServiceResponse: UploadServiceObject? + public var modifiedBy: CreatedBySchema? public var createdOn: String? - public var updatedOn: String? + public var modifiedOn: String? - public var message: String? + public var v: Int? public enum CodingKeys: String, CodingKey { - case id = "id" + case id = "_id" - case association = "association" + case webBanner = "web_banner" - case filters = "filters" + case mobileBanner = "mobile_banner" - case filename = "filename" + case published = "published" - case status = "status" + case createdBy = "created_by" - case uploadServiceResponse = "upload_service_response" + case modifiedBy = "modified_by" case createdOn = "created_on" - case updatedOn = "updated_on" + case modifiedOn = "modified_on" - case message = "message" + case v = "__v" } - public init(association: HistoryAssociation? = nil, createdOn: String? = nil, filename: String? = nil, filters: HistoryFilters? = nil, id: Int? = nil, message: String? = nil, status: String? = nil, updatedOn: String? = nil, uploadServiceResponse: UploadServiceObject? = nil) { + public init(createdBy: CreatedBySchema? = nil, createdOn: String? = nil, mobileBanner: MediaSchema? = nil, modifiedBy: CreatedBySchema? = nil, modifiedOn: String? = nil, published: Bool? = nil, webBanner: MediaSchema? = nil, id: String? = nil, v: Int? = nil) { self.id = id - self.association = association + self.webBanner = webBanner - self.filters = filters + self.mobileBanner = mobileBanner - self.filename = filename + self.published = published - self.status = status + self.createdBy = createdBy - self.uploadServiceResponse = uploadServiceResponse + self.modifiedBy = modifiedBy self.createdOn = createdOn - self.updatedOn = updatedOn + self.modifiedOn = modifiedOn - self.message = message + self.v = v } @@ -80,7 +78,7 @@ public extension PlatformClient.Webhook { do { - id = try container.decode(Int.self, forKey: .id) + id = try container.decode(String.self, forKey: .id) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -92,7 +90,7 @@ public extension PlatformClient.Webhook { do { - association = try container.decode(HistoryAssociation.self, forKey: .association) + webBanner = try container.decode(MediaSchema.self, forKey: .webBanner) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -104,7 +102,7 @@ public extension PlatformClient.Webhook { do { - filters = try container.decode(HistoryFilters.self, forKey: .filters) + mobileBanner = try container.decode(MediaSchema.self, forKey: .mobileBanner) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -116,7 +114,7 @@ public extension PlatformClient.Webhook { do { - filename = try container.decode(String.self, forKey: .filename) + published = try container.decode(Bool.self, forKey: .published) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -128,7 +126,7 @@ public extension PlatformClient.Webhook { do { - status = try container.decode(String.self, forKey: .status) + createdBy = try container.decode(CreatedBySchema.self, forKey: .createdBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -140,7 +138,7 @@ public extension PlatformClient.Webhook { do { - uploadServiceResponse = try container.decode(UploadServiceObject.self, forKey: .uploadServiceResponse) + modifiedBy = try container.decode(CreatedBySchema.self, forKey: .modifiedBy) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -164,7 +162,7 @@ public extension PlatformClient.Webhook { do { - updatedOn = try container.decode(String.self, forKey: .updatedOn) + modifiedOn = try container.decode(String.self, forKey: .modifiedOn) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -176,7 +174,7 @@ public extension PlatformClient.Webhook { do { - message = try container.decode(String.self, forKey: .message) + v = try container.decode(Int.self, forKey: .v) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -192,34 +190,27 @@ public extension PlatformClient.Webhook { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(id, forKey: .id) - - try? container.encodeIfPresent(association, forKey: .association) - - - - - try? container.encodeIfPresent(filters, forKey: .filters) + try? container.encodeIfPresent(webBanner, forKey: .webBanner) + try? container.encodeIfPresent(mobileBanner, forKey: .mobileBanner) - try? container.encodeIfPresent(filename, forKey: .filename) + try? container.encodeIfPresent(published, forKey: .published) - try? container.encodeIfPresent(status, forKey: .status) + try? container.encodeIfPresent(createdBy, forKey: .createdBy) - try? container.encodeIfPresent(uploadServiceResponse, forKey: .uploadServiceResponse) - + try? container.encodeIfPresent(modifiedBy, forKey: .modifiedBy) @@ -227,20 +218,14 @@ public extension PlatformClient.Webhook { - - try? container.encodeIfPresent(updatedOn, forKey: .updatedOn) + try? container.encodeIfPresent(modifiedOn, forKey: .modifiedOn) - - try? container.encodeIfPresent(message, forKey: .message) + try? container.encodeIfPresent(v, forKey: .v) } } } - - - - diff --git a/Sources/code/platform/Models/Finance/InvoiceTypeResponseItemsFinancePlatformModel.swift b/Sources/code/public/Models/Content/RawHtmlContentSchemaContentPublicModel.swift similarity index 76% rename from Sources/code/platform/Models/Finance/InvoiceTypeResponseItemsFinancePlatformModel.swift rename to Sources/code/public/Models/Content/RawHtmlContentSchemaContentPublicModel.swift index 3e6364cb2b..71a92f25e8 100644 --- a/Sources/code/platform/Models/Finance/InvoiceTypeResponseItemsFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/RawHtmlContentSchemaContentPublicModel.swift @@ -1,33 +1,31 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: InvoiceTypeResponseItems - Used By: Finance + Model: RawHtmlContentSchema + Used By: Content */ - class InvoiceTypeResponseItems: Codable { + class RawHtmlContentSchema: Codable { - public var text: String? + public var type: String? public var value: String? public enum CodingKeys: String, CodingKey { - case text = "text" + case type = "type" case value = "value" } - public init(text: String? = nil, value: String? = nil) { + public init(type: String? = nil, value: String? = nil) { - self.text = text + self.type = type self.value = value @@ -38,7 +36,7 @@ public extension PlatformClient.Finance { do { - text = try container.decode(String.self, forKey: .text) + type = try container.decode(String.self, forKey: .type) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -66,9 +64,7 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(text, forKey: .text) - + try? container.encodeIfPresent(type, forKey: .type) @@ -79,7 +75,3 @@ public extension PlatformClient.Finance { } } - - - - diff --git a/Sources/code/platform/Models/Finance/ErrorMetaItemsFinancePlatformModel.swift b/Sources/code/public/Models/Content/SalesChannelSchemaContentPublicModel.swift similarity index 65% rename from Sources/code/platform/Models/Finance/ErrorMetaItemsFinancePlatformModel.swift rename to Sources/code/public/Models/Content/SalesChannelSchemaContentPublicModel.swift index b331923f1b..b0a99c4813 100644 --- a/Sources/code/platform/Models/Finance/ErrorMetaItemsFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/SalesChannelSchemaContentPublicModel.swift @@ -1,35 +1,33 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: ErrorMetaItems - Used By: Finance + Model: SalesChannelSchema + Used By: Content */ - class ErrorMetaItems: Codable { + class SalesChannelSchema: Codable { - public var code: Int? + public var canAdd: Bool? - public var message: String? + public var title: String? public enum CodingKeys: String, CodingKey { - case code = "code" + case canAdd = "can_add" - case message = "message" + case title = "title" } - public init(code: Int? = nil, message: String? = nil) { + public init(canAdd: Bool? = nil, title: String? = nil) { - self.code = code + self.canAdd = canAdd - self.message = message + self.title = title } @@ -38,7 +36,7 @@ public extension PlatformClient.Finance { do { - code = try container.decode(Int.self, forKey: .code) + canAdd = try container.decode(Bool.self, forKey: .canAdd) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +48,7 @@ public extension PlatformClient.Finance { do { - message = try container.decode(String.self, forKey: .message) + title = try container.decode(String.self, forKey: .title) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -66,20 +64,14 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(code, forKey: .code) - + try? container.encodeIfPresent(canAdd, forKey: .canAdd) - try? container.encodeIfPresent(message, forKey: .message) + try? container.encodeIfPresent(title, forKey: .title) } } } - - - - diff --git a/Sources/code/platform/Models/Finance/GetReasonReqFinancePlatformModel.swift b/Sources/code/public/Models/Content/SdkReadmeSchemaContentPublicModel.swift similarity index 77% rename from Sources/code/platform/Models/Finance/GetReasonReqFinancePlatformModel.swift rename to Sources/code/public/Models/Content/SdkReadmeSchemaContentPublicModel.swift index 72ea85afea..d5fa001c6b 100644 --- a/Sources/code/platform/Models/Finance/GetReasonReqFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/SdkReadmeSchemaContentPublicModel.swift @@ -1,18 +1,16 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: GetReasonReq - Used By: Finance + Model: SdkReadmeSchema + Used By: Content */ - class GetReasonReq: Codable { + class SdkReadmeSchema: Codable { - public var data: GetReason? + public var data: String? public enum CodingKeys: String, CodingKey { @@ -21,7 +19,7 @@ public extension PlatformClient.Finance { } - public init(data: GetReason? = nil) { + public init(data: String? = nil) { self.data = data @@ -32,7 +30,7 @@ public extension PlatformClient.Finance { do { - data = try container.decode(GetReason.self, forKey: .data) + data = try container.decode(String.self, forKey: .data) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,7 +46,6 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(data, forKey: .data) @@ -56,7 +53,3 @@ public extension PlatformClient.Finance { } } - - - - diff --git a/Sources/code/public/Models/Content/SellerSupportContentPublicModel.swift b/Sources/code/public/Models/Content/SellerSupportContentPublicModel.swift new file mode 100644 index 0000000000..68b082901a --- /dev/null +++ b/Sources/code/public/Models/Content/SellerSupportContentPublicModel.swift @@ -0,0 +1,77 @@ + + +import Foundation +public extension PublicClient.Content { + /* + Model: SellerSupport + Used By: Content + */ + + class SellerSupport: Codable { + + + public var email: String? + + public var phoneNumber: Int? + + + public enum CodingKeys: String, CodingKey { + + case email = "email" + + case phoneNumber = "phone_number" + + } + + public init(email: String? = nil, phoneNumber: Int? = nil) { + + self.email = email + + self.phoneNumber = phoneNumber + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + email = try container.decode(String.self, forKey: .email) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + + do { + phoneNumber = try container.decode(Int.self, forKey: .phoneNumber) + + } catch DecodingError.typeMismatch(let type, let context) { + print("Type '\(type)' mismatch:", context.debugDescription) + print("codingPath:", context.codingPath) + } catch { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(email, forKey: .email) + + + + try? container.encodeIfPresent(phoneNumber, forKey: .phoneNumber) + + + } + + } +} diff --git a/Sources/code/platform/Models/Webhook/HistoryResponseWebhookPlatformModel.swift b/Sources/code/public/Models/Content/TagsSchemaContentPublicModel.swift similarity index 77% rename from Sources/code/platform/Models/Webhook/HistoryResponseWebhookPlatformModel.swift rename to Sources/code/public/Models/Content/TagsSchemaContentPublicModel.swift index 023925cc11..a148275fd6 100644 --- a/Sources/code/platform/Models/Webhook/HistoryResponseWebhookPlatformModel.swift +++ b/Sources/code/public/Models/Content/TagsSchemaContentPublicModel.swift @@ -1,20 +1,18 @@ import Foundation - - -public extension PlatformClient.Webhook { +public extension PublicClient.Content { /* - Model: HistoryResponse - Used By: Webhook + Model: TagsSchema + Used By: Content */ - class HistoryResponse: Codable { + class TagsSchema: Codable { - public var items: [HistoryItems]? + public var items: [CustomItemSchema]? - public var page: Page? + public var page: PageSchema? public enum CodingKeys: String, CodingKey { @@ -25,7 +23,7 @@ public extension PlatformClient.Webhook { } - public init(items: [HistoryItems]? = nil, page: Page? = nil) { + public init(items: [CustomItemSchema]? = nil, page: PageSchema? = nil) { self.items = items @@ -38,7 +36,7 @@ public extension PlatformClient.Webhook { do { - items = try container.decode([HistoryItems].self, forKey: .items) + items = try container.decode([CustomItemSchema].self, forKey: .items) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -50,7 +48,7 @@ public extension PlatformClient.Webhook { do { - page = try container.decode(Page.self, forKey: .page) + page = try container.decode(PageSchema.self, forKey: .page) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -66,12 +64,10 @@ public extension PlatformClient.Webhook { var container = encoder.container(keyedBy: CodingKeys.self) - try? container.encodeIfPresent(items, forKey: .items) - try? container.encodeIfPresent(page, forKey: .page) @@ -79,7 +75,3 @@ public extension PlatformClient.Webhook { } } - - - - diff --git a/Sources/code/public/Models/Content/UserSchemaContentPublicModel.swift b/Sources/code/public/Models/Content/UserSchemaContentPublicModel.swift new file mode 100644 index 0000000000..3c17ac829f --- /dev/null +++ b/Sources/code/public/Models/Content/UserSchemaContentPublicModel.swift @@ -0,0 +1,55 @@ + + +import Foundation +public extension PublicClient.Content { + /* + Model: UserSchema + Used By: Content + */ + + class UserSchema: Codable { + + + public var userId: String? + + + public enum CodingKeys: String, CodingKey { + + case userId = "user_id" + + } + + public init(userId: String? = nil) { + + self.userId = userId + + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + + do { + 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 { + + } + + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + + try? container.encodeIfPresent(userId, forKey: .userId) + + + } + + } +} diff --git a/Sources/code/platform/Models/Finance/ReasonItemFinancePlatformModel.swift b/Sources/code/public/Models/Content/VisibleOnSchemaContentPublicModel.swift similarity index 64% rename from Sources/code/platform/Models/Finance/ReasonItemFinancePlatformModel.swift rename to Sources/code/public/Models/Content/VisibleOnSchemaContentPublicModel.swift index 3ba9b3d9c3..56d22adb8d 100644 --- a/Sources/code/platform/Models/Finance/ReasonItemFinancePlatformModel.swift +++ b/Sources/code/public/Models/Content/VisibleOnSchemaContentPublicModel.swift @@ -1,41 +1,39 @@ import Foundation - - -public extension PlatformClient.Finance { +public extension PublicClient.Content { /* - Model: ReasonItem - Used By: Finance + Model: VisibleOnSchema + Used By: Content */ - class ReasonItem: Codable { + class VisibleOnSchema: Codable { - public var id: String? + public var web: Bool? - public var name: String? + public var ios: Bool? - public var displayName: String? + public var android: Bool? public enum CodingKeys: String, CodingKey { - case id = "id" + case web = "web" - case name = "name" + case ios = "ios" - case displayName = "display_name" + case android = "android" } - public init(displayName: String? = nil, id: String? = nil, name: String? = nil) { + public init(android: Bool? = nil, ios: Bool? = nil, web: Bool? = nil) { - self.id = id + self.web = web - self.name = name + self.ios = ios - self.displayName = displayName + self.android = android } @@ -44,7 +42,7 @@ public extension PlatformClient.Finance { do { - id = try container.decode(String.self, forKey: .id) + web = try container.decode(Bool.self, forKey: .web) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -56,7 +54,7 @@ public extension PlatformClient.Finance { do { - name = try container.decode(String.self, forKey: .name) + ios = try container.decode(Bool.self, forKey: .ios) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -68,7 +66,7 @@ public extension PlatformClient.Finance { do { - displayName = try container.decode(String.self, forKey: .displayName) + android = try container.decode(Bool.self, forKey: .android) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -84,25 +82,18 @@ public extension PlatformClient.Finance { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(id, forKey: .id) - - + try? container.encodeIfPresent(web, forKey: .web) - try? container.encodeIfPresent(name, forKey: .name) + try? container.encodeIfPresent(ios, forKey: .ios) - try? container.encodeIfPresent(displayName, forKey: .displayName) + try? container.encodeIfPresent(android, forKey: .android) } } } - - - - diff --git a/Sources/code/platform/Models/AuditTrail/LogSchemaResponseAuditTrailPlatformModel.swift b/Sources/code/public/Models/Content/WhatsNewContentPublicModel.swift similarity index 66% rename from Sources/code/platform/Models/AuditTrail/LogSchemaResponseAuditTrailPlatformModel.swift rename to Sources/code/public/Models/Content/WhatsNewContentPublicModel.swift index 0d503fe209..0eef752b38 100644 --- a/Sources/code/platform/Models/AuditTrail/LogSchemaResponseAuditTrailPlatformModel.swift +++ b/Sources/code/public/Models/Content/WhatsNewContentPublicModel.swift @@ -1,29 +1,27 @@ import Foundation - - -public extension PlatformClient.AuditTrail { +public extension PublicClient.Content { /* - Model: LogSchemaResponse - Used By: AuditTrail + Model: WhatsNew + Used By: Content */ - class LogSchemaResponse: Codable { + class WhatsNew: Codable { - public var docs: [LogDocs]? + public var description: String? public enum CodingKeys: String, CodingKey { - case docs = "docs" + case description = "description" } - public init(docs: [LogDocs]? = nil) { + public init(description: String? = nil) { - self.docs = docs + self.description = description } @@ -32,7 +30,7 @@ public extension PlatformClient.AuditTrail { do { - docs = try container.decode([LogDocs].self, forKey: .docs) + description = try container.decode(String.self, forKey: .description) } catch DecodingError.typeMismatch(let type, let context) { print("Type '\(type)' mismatch:", context.debugDescription) @@ -48,15 +46,10 @@ public extension PlatformClient.AuditTrail { var container = encoder.container(keyedBy: CodingKeys.self) - - try? container.encodeIfPresent(docs, forKey: .docs) + try? container.encodeIfPresent(description, forKey: .description) } } } - - - - diff --git a/Sources/code/public/Models/Webhook/EventConfigResponseWebhookPublicModel.swift b/Sources/code/public/Models/Webhook/EventDetailsWebhookPublicModel.swift similarity index 94% rename from Sources/code/public/Models/Webhook/EventConfigResponseWebhookPublicModel.swift rename to Sources/code/public/Models/Webhook/EventDetailsWebhookPublicModel.swift index 90db237e4e..c6ad06578d 100644 --- a/Sources/code/public/Models/Webhook/EventConfigResponseWebhookPublicModel.swift +++ b/Sources/code/public/Models/Webhook/EventDetailsWebhookPublicModel.swift @@ -3,11 +3,11 @@ import Foundation public extension PublicClient.Webhook { /* - Model: EventConfigResponse + Model: EventDetails Used By: Webhook */ - class EventConfigResponse: Codable { + class EventDetails: Codable { public var eventConfigs: [EventConfig]? diff --git a/Sources/code/public/Models/Webhook/TransformEventRequestWebhookPublicModel.swift b/Sources/code/public/Models/Webhook/TransformEventPayloadWebhookPublicModel.swift similarity index 97% rename from Sources/code/public/Models/Webhook/TransformEventRequestWebhookPublicModel.swift rename to Sources/code/public/Models/Webhook/TransformEventPayloadWebhookPublicModel.swift index 91d74cbf7c..83d1354836 100644 --- a/Sources/code/public/Models/Webhook/TransformEventRequestWebhookPublicModel.swift +++ b/Sources/code/public/Models/Webhook/TransformEventPayloadWebhookPublicModel.swift @@ -3,11 +3,11 @@ import Foundation public extension PublicClient.Webhook { /* - Model: TransformEventRequest + Model: TransformEventPayload Used By: Webhook */ - class TransformEventRequest: Codable { + class TransformEventPayload: Codable { public var eventName: String diff --git a/Sources/code/public/Models/Webhook/TransformEventResponseWebhookPublicModel.swift b/Sources/code/public/Models/Webhook/TransformEventResultWebhookPublicModel.swift similarity index 98% rename from Sources/code/public/Models/Webhook/TransformEventResponseWebhookPublicModel.swift rename to Sources/code/public/Models/Webhook/TransformEventResultWebhookPublicModel.swift index f8eb3cb22d..35677f3220 100644 --- a/Sources/code/public/Models/Webhook/TransformEventResponseWebhookPublicModel.swift +++ b/Sources/code/public/Models/Webhook/TransformEventResultWebhookPublicModel.swift @@ -3,11 +3,11 @@ import Foundation public extension PublicClient.Webhook { /* - Model: TransformEventResponse + Model: TransformEventResult Used By: Webhook */ - class TransformEventResponse: Codable { + class TransformEventResult: Codable { public var eventTraceId: [String]? diff --git a/Sources/code/public/Models/Webhook/ValidateSchemaRequestWebhookPublicModel.swift b/Sources/code/public/Models/Webhook/ValidateSchemaPayloadWebhookPublicModel.swift similarity index 97% rename from Sources/code/public/Models/Webhook/ValidateSchemaRequestWebhookPublicModel.swift rename to Sources/code/public/Models/Webhook/ValidateSchemaPayloadWebhookPublicModel.swift index 6916f0860f..e7178b6194 100644 --- a/Sources/code/public/Models/Webhook/ValidateSchemaRequestWebhookPublicModel.swift +++ b/Sources/code/public/Models/Webhook/ValidateSchemaPayloadWebhookPublicModel.swift @@ -3,11 +3,11 @@ import Foundation public extension PublicClient.Webhook { /* - Model: ValidateSchemaRequest + Model: ValidateSchemaPayload Used By: Webhook */ - class ValidateSchemaRequest: Codable { + class ValidateSchemaPayload: Codable { public var eventName: String diff --git a/Sources/code/public/Models/Webhook/ValidateSchemaResponseWebhookPublicModel.swift b/Sources/code/public/Models/Webhook/ValidateSchemaResultWebhookPublicModel.swift similarity index 96% rename from Sources/code/public/Models/Webhook/ValidateSchemaResponseWebhookPublicModel.swift rename to Sources/code/public/Models/Webhook/ValidateSchemaResultWebhookPublicModel.swift index deb1fd3a60..e809de0a19 100644 --- a/Sources/code/public/Models/Webhook/ValidateSchemaResponseWebhookPublicModel.swift +++ b/Sources/code/public/Models/Webhook/ValidateSchemaResultWebhookPublicModel.swift @@ -3,11 +3,11 @@ import Foundation public extension PublicClient.Webhook { /* - Model: ValidateSchemaResponse + Model: ValidateSchemaResult Used By: Webhook */ - class ValidateSchemaResponse: Codable { + class ValidateSchemaResult: Codable { public var status: Bool? diff --git a/Sources/code/public/PublicAPIClient.swift b/Sources/code/public/PublicAPIClient.swift index 457263e734..650c96b195 100644 --- a/Sources/code/public/PublicAPIClient.swift +++ b/Sources/code/public/PublicAPIClient.swift @@ -9,7 +9,7 @@ class PublicAPIClient { responseType: String = "application/json", onResponse: @escaping OnResponse) { var headers = [ - (key: "x-fp-sdk-version", value: "1.4.13") + (key: "x-fp-sdk-version", value: "1.4.14") ] headers.append(contentsOf: extraHeaders) headers.append(contentsOf: config.extraHeaders)